From 93e6cf71823368753ed3151f6b313dbf1562124b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 06:00:28 +0000 Subject: [PATCH] ci-doctor: remove workflow_run trigger, stop-after, and if fields Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f0ddb5f9-e40a-493e-8629-f17bcfda94c1 --- .github/workflows/ci-doctor.lock.yml | 34 ++++------------------------ .github/workflows/ci-doctor.md | 12 ---------- 2 files changed, 4 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 2c36cd19ae8..8831b1509ec 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -24,9 +24,7 @@ # # Source: githubnext/agentics/workflows/ci-doctor.md@ea350161ad5dcc9624cf510f134c6a9e39a6f94d # -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"56001ce273a9f7d7963037a40b21e5f07aa6b7887525c27a2a71ace5b03d8c81","stop_time":"2026-03-03 16:27:58","strict":true,"agent_id":"copilot","agent_model":"gpt-5.1-codex-mini"} -# -# Effective stop-time: 2026-03-03 16:27:58 +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"76488d1c98ff8a029614585515c2231f113caf73d72ac1b7793546fe6cad43d7","strict":true,"agent_id":"copilot","agent_model":"gpt-5.1-codex-mini"} name: "CI Failure Doctor" "on": @@ -45,13 +43,6 @@ name: "CI Failure Doctor" description: The number of the issue, pull request, or discussion required: false type: string - workflow_run: - branches: - - main - types: - - completed - workflows: - - CI permissions: {} @@ -63,11 +54,8 @@ run-name: "CI Failure Doctor" jobs: activation: needs: pre_activation - # zizmor: ignore[dangerous-triggers] - workflow_run trigger is secured with role and fork validation if: > - (needs.pre_activation.outputs.activated == 'true' && ((github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure') || - github.event_name == 'pull_request')) && (github.event_name != 'workflow_run' || github.event.workflow_run.repository.id == github.repository_id && - (!(github.event.workflow_run.repository.fork))) + needs.pre_activation.outputs.activated == 'true' && (github.event_name == 'pull_request' && github.event.label.name == 'ci-doctor') runs-on: ubuntu-slim permissions: contents: read @@ -1230,14 +1218,12 @@ jobs: await main(); pre_activation: - if: > - (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure') || - github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.event.label.name == 'ci-doctor' runs-on: ubuntu-slim permissions: contents: read outputs: - activated: ${{ steps.check_membership.outputs.is_team_member == 'true' && steps.check_stop_time.outputs.stop_time_ok == 'true' }} + activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }} matched_command: '' steps: - name: Checkout actions folder @@ -1263,18 +1249,6 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/check_membership.cjs'); await main(); - - name: Check stop-time limit - id: check_stop_time - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 - env: - GH_AW_STOP_TIME: "2026-03-03 16:27:58" - GH_AW_WORKFLOW_NAME: "CI Failure Doctor" - with: - script: | - const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); - setupGlobals(core, github, context, exec, io); - const { main } = require('${{ runner.temp }}/gh-aw/actions/check_stop_time.cjs'); - await main(); safe_outputs: needs: agent diff --git a/.github/workflows/ci-doctor.md b/.github/workflows/ci-doctor.md index face1604ab9..1435c51dc65 100644 --- a/.github/workflows/ci-doctor.md +++ b/.github/workflows/ci-doctor.md @@ -1,21 +1,9 @@ --- description: Investigates failed CI workflows to identify root causes and patterns, creating issues with diagnostic information; also reviews PR check failures when the ci-doctor label is applied on: - workflow_run: - workflows: ["CI"] # Monitor the CI workflow specifically - types: - - completed - branches: - - main - # This will trigger only when the CI workflow completes with failure - # The condition is handled in the workflow body label_command: name: ci-doctor events: [pull_request] - stop-after: +1mo - -# Allow both CI failure runs and PR label-command triggers -if: (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'failure') || github.event_name == 'pull_request' permissions: actions: read # To query workflow runs, jobs, and logs