Skip to content

Commit

Permalink
fix: use jq to properly format JSON output for check runs
Browse files Browse the repository at this point in the history
Co-Authored-By: Aaron <AJ> Steers <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and aaronsteers committed Jan 23, 2025
1 parent c5daa88 commit e4f431b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/dummy_check_result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
run: |
HEAD_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
# Create JSON payload file
echo '{"title":"Success Check","summary":"This is a dummy success check."}' > output.json
# Create check run with properly formatted JSON output
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
Expand All @@ -34,7 +32,10 @@ jobs:
-f status="completed" \
-f conclusion="success" \
-f details_url="https://www.google.com/search?q=success" \
-F [email protected]
-f output="$(jq -n \
--arg title "Success Check" \
--arg summary "This is a dummy success check." \
'{title: $title, summary: $summary}')"
failure_check:
name: "Dummy Check (fail)"
Expand All @@ -49,9 +50,7 @@ jobs:
run: |
HEAD_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
# Create JSON payload file
echo '{"title":"Failure Check","summary":"This is a dummy failure check."}' > output.json
# Create check run with properly formatted JSON output
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
Expand All @@ -62,4 +61,7 @@ jobs:
-f status="completed" \
-f conclusion="failure" \
-f details_url="https://www.google.com/search?q=failed" \
-F [email protected]
-f output="$(jq -n \
--arg title "Failure Check" \
--arg summary "This is a dummy failure check." \
'{title: $title, summary: $summary}')"

0 comments on commit e4f431b

Please sign in to comment.