Skip to content

Fix escaped markdown in spec-change-impact PR comments#196

Merged
jeremy merged 1 commit intomainfrom
spec-change-impact
Mar 18, 2026
Merged

Fix escaped markdown in spec-change-impact PR comments#196
jeremy merged 1 commit intomainfrom
spec-change-impact

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 18, 2026

Summary

  • Read comment body directly from $RESPONSE_FILE instead of through a shell variable, which was mangling markdown (literal **, broken lists)
  • Create path: --body "$VAR"--body-file "$RESPONSE_FILE"
  • Update path: echo "$VAR" | jq -Rs .jq -Rs . "$RESPONSE_FILE"

Test plan

  • Push a change that touches spec/ or openapi.json and confirm the PR comment renders markdown correctly (bold, lists, checkboxes)

Summary by cubic

Fixes mangled markdown in Spec Change Impact PR comments by reading the comment body from the response file instead of a shell variable. Bold text, lists, and checkboxes now render correctly.

  • Bug Fixes
    • Update path: use jq to read the file as a raw string in the GraphQL mutation: jq -Rs . "$RESPONSE_FILE".
    • Create path: use --body-file "$RESPONSE_FILE" instead of --body "$COMMENT_BODY".

Written for commit 386a321. Summary will update on new commits.

Read comment body directly from file instead of through a shell variable,
which was mangling markdown formatting (literal **bold**, broken lists).
@jeremy jeremy requested a review from a team as a code owner March 18, 2026 00:35
Copilot AI review requested due to automatic review settings March 18, 2026 00:35
@github-actions
Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/ai-labeler.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions bot added github-actions Pull requests that update GitHub Actions bug Something isn't working labels Mar 18, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes markdown rendering in the “Spec Change Impact” PR comment posted by the spec-impact job by avoiding shell-variable/echo mangling and instead posting/updating directly from the generated response file.

Changes:

  • Switch new-comment creation from gh pr comment --body "$VAR" to gh pr comment --body-file "$RESPONSE_FILE".
  • Switch comment updates from piping a shell variable into jq to reading the body directly from the response file via jq -Rs . "$RESPONSE_FILE".

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeremy jeremy merged commit 9dbe8d8 into main Mar 18, 2026
52 of 53 checks passed
@jeremy jeremy deleted the spec-change-impact branch March 18, 2026 17:31
jeremy added a commit that referenced this pull request Mar 18, 2026
* origin/main:
  Add hill chart API support (GetHillChart, UpdateHillChartSettings) (#195)
  Switch CODEOWNERS from sip to cli team (#199)
  Use linked CodeQL CLI for Kotlin 2.3.x support (#197)
  Fix escaped markdown in spec-change-impact PR comments (#196)
  Add on_hold property to CardColumn (#188)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working github-actions Pull requests that update GitHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants