Skip to content

Commit

Permalink
ci: switch to commit status API for custom URLs
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 24, 2025
1 parent 8ef33b7 commit 4879558
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions .github/workflows/dummy_check_result.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dummy Check Result
name: Dummy Commit Status

on:
pull_request:
Expand All @@ -8,25 +8,23 @@ on:
- '.github/workflows/dummy_check_result.yml'

jobs:
failure_check:
name: "Dummy Check (fail)"
failure_status:
name: "Dummy Status (fail)"
runs-on: ubuntu-22.04
permissions:
checks: write
contents: read
contents: write # Required for creating commit statuses
steps:
- name: Create Failure Check Run
uses: LouisBrunner/[email protected]
- name: Create Failure Status
env:
GH_TOKEN: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
with:
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
name: "Dummy Check (fail custom)"
status: completed
conclusion: failure
details_url: "https://www.google.com/search?q=failed"
output: |
{
"title": "Test Report",
"summary": "This is a dummy failure check.\nHTML Report URL: https://www.google.com/search?q=failed"
}
run: |
HEAD_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
repos/${{ github.repository }}/statuses/$HEAD_SHA \
-f state="failure" \
-f target_url="https://www.google.com/search?q=failed" \
-f description="Click Details to view the test report" \
-f context="Test Report: Dummy Connector"

0 comments on commit 4879558

Please sign in to comment.