From ec43f131cf77265c1fa8f56205114c2a2b733599 Mon Sep 17 00:00:00 2001 From: Andrew whitehouse Date: Mon, 18 Aug 2025 18:57:03 +1000 Subject: [PATCH] feat: add pipeline agents --- .github/ci-error-analysis.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/ci-error-analysis.yml diff --git a/.github/ci-error-analysis.yml b/.github/ci-error-analysis.yml new file mode 100644 index 0000000..08bc6b1 --- /dev/null +++ b/.github/ci-error-analysis.yml @@ -0,0 +1,37 @@ +name: Error Analysis + +on: + workflow_run: + workflows: ["CI", "Release"] + types: [completed] + +jobs: + analyze-error: + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + runs-on: ubuntu-latest + + permissions: + contents: read + actions: read + pull-requests: write + + steps: + - name: Debug Workflow Trigger + run: | + echo "Workflow run ID: ${{ github.event.workflow_run.id }}" + echo "Workflow name: ${{ github.event.workflow_run.name }}" + echo "Conclusion: ${{ github.event.workflow_run.conclusion }}" + echo "Event name: ${{ github.event_name }}" + echo "Repository: ${{ github.repository }}" + echo "Branch: ${{ github.event.workflow_run.head_branch }}" + + - name: Run AI Error Analysis + uses: aswhitehouse/gh-pipeline-agents@main + with: + openai_api_key: ${{ secrets.OPENAI_API_KEY }} + workflow_run_id: ${{ github.event.workflow_run.id }} + repository: ${{ github.repository }} + branch: ${{ github.event.workflow_run.head_branch }} + commit_sha: ${{ github.event.workflow_run.head_sha }} + pr_number: ${{ github.event.workflow_run.pull_requests[0].number || '' }} + slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file