diff --git a/.github/workflows/gh-aw-branch-actions-detective.lock.yml b/.github/workflows/gh-aw-branch-actions-detective.lock.yml index a684d2a8..010507ee 100644 --- a/.github/workflows/gh-aw-branch-actions-detective.lock.yml +++ b/.github/workflows/gh-aw-branch-actions-detective.lock.yml @@ -37,7 +37,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4698c5df5e82f9afbef0009e358219a46b66356bd178b5a7b4a8f16ba27467ba"} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"c39066096793c814006c0318fb064abf1e9b5f36c344d2d0264f8b1b06880ac6"} name: "Branch Actions Detective" "on": @@ -339,6 +339,7 @@ jobs: gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/jobs \ --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' ```` + - If none of the jobs have a `failure` conclusion, call `noop` with message "No failed jobs in workflow run; nothing to report" and stop. - Download logs to `/tmp/gh-aw/agent/` and inspect the failing step output: ````bash gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/logs \ diff --git a/.github/workflows/gh-aw-branch-actions-detective.md b/.github/workflows/gh-aw-branch-actions-detective.md index aa41ec2a..3b363719 100644 --- a/.github/workflows/gh-aw-branch-actions-detective.md +++ b/.github/workflows/gh-aw-branch-actions-detective.md @@ -109,6 +109,7 @@ Analyze failed GitHub Actions CI runs on protected branches (e.g. `main`) in ${{ gh api repos/${{ github.repository }}/actions/runs/{run_id}/jobs \ --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' ```` + - If none of the jobs have a `failure` conclusion, call `noop` with message "No failed jobs in workflow run; nothing to report" and stop. - Download logs to `/tmp/gh-aw/agent/` and inspect the failing step output: ````bash gh api repos/${{ github.repository }}/actions/runs/{run_id}/logs \ diff --git a/.github/workflows/gh-aw-pr-actions-detective.lock.yml b/.github/workflows/gh-aw-pr-actions-detective.lock.yml index 1bf636cd..9fdae8a3 100644 --- a/.github/workflows/gh-aw-pr-actions-detective.lock.yml +++ b/.github/workflows/gh-aw-pr-actions-detective.lock.yml @@ -36,7 +36,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d589e9e92dd79580cfa87ca119b5a0069b7f150690deb67875ebc174d1f63400"} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"8ca49070112f3c71d739dd15e34cdf1512eec4e0634ac25101ca170a10e428f5"} name: "PR Actions Detective" "on": @@ -325,6 +325,7 @@ jobs: gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/jobs \ --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' ``` + - If none of the jobs have a `failure` conclusion, call `noop` with message "No failed jobs in workflow run; nothing to report" and stop. - Download logs to `/tmp/gh-aw/agent/` and inspect the failing step output: ```bash gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/logs \ diff --git a/.github/workflows/gh-aw-pr-actions-detective.md b/.github/workflows/gh-aw-pr-actions-detective.md index 95c4bb80..a790ff76 100644 --- a/.github/workflows/gh-aw-pr-actions-detective.md +++ b/.github/workflows/gh-aw-pr-actions-detective.md @@ -100,6 +100,7 @@ Assist with failed GitHub Actions checks for pull requests in ${{ github.reposit gh api repos/${{ github.repository }}/actions/runs/{run_id}/jobs \ --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' ``` + - If none of the jobs have a `failure` conclusion, call `noop` with message "No failed jobs in workflow run; nothing to report" and stop. - Download logs to `/tmp/gh-aw/agent/` and inspect the failing step output: ```bash gh api repos/${{ github.repository }}/actions/runs/{run_id}/logs \ diff --git a/.github/workflows/gh-aw-pr-ci-detective.lock.yml b/.github/workflows/gh-aw-pr-ci-detective.lock.yml index 9775a103..f2712dc9 100644 --- a/.github/workflows/gh-aw-pr-ci-detective.lock.yml +++ b/.github/workflows/gh-aw-pr-ci-detective.lock.yml @@ -41,7 +41,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d589e9e92dd79580cfa87ca119b5a0069b7f150690deb67875ebc174d1f63400"} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"8ca49070112f3c71d739dd15e34cdf1512eec4e0634ac25101ca170a10e428f5"} name: "PR Actions Detective" "on": @@ -330,6 +330,7 @@ jobs: gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/jobs \ --jq '.jobs[] | {id: .id, name: .name, conclusion: .conclusion, html_url: .html_url}' ``` + - If none of the jobs have a `failure` conclusion, call `noop` with message "No failed jobs in workflow run; nothing to report" and stop. - Download logs to `/tmp/gh-aw/agent/` and inspect the failing step output: ```bash gh api repos/__GH_AW_GITHUB_REPOSITORY__/actions/runs/{run_id}/logs \ diff --git a/gh-agent-workflows/branch-actions-detective/README.md b/gh-agent-workflows/branch-actions-detective/README.md index e920a4b3..c30e515f 100644 --- a/gh-agent-workflows/branch-actions-detective/README.md +++ b/gh-agent-workflows/branch-actions-detective/README.md @@ -33,3 +33,4 @@ See [example.yml](example.yml) for the full workflow file. ## Safe Outputs - `create-issue` — file a tracking issue for the CI failure (max 1, auto-closes older issues) +- `noop` — emitted when no failed jobs are found or failure already tracked by an open issue diff --git a/gh-agent-workflows/pr-actions-detective/README.md b/gh-agent-workflows/pr-actions-detective/README.md index 702584b3..85705983 100644 --- a/gh-agent-workflows/pr-actions-detective/README.md +++ b/gh-agent-workflows/pr-actions-detective/README.md @@ -33,3 +33,4 @@ See [example.yml](example.yml) for the full workflow file. ## Safe Outputs - `add-comment` — post a comment explaining the failure (max 3) +- `noop` — emitted when no failed jobs are found or diagnosis unchanged since last report