Devin CI Fix #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Devin CI Fix | |
| on: | |
| workflow_run: | |
| workflows: ["Java CI"] | |
| types: [completed] | |
| jobs: | |
| trigger-devin: | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event.workflow_run.conclusion == 'failure' && | |
| github.event.workflow_run.head_branch != 'master' && | |
| !startsWith(github.event.workflow_run.head_branch, 'devin/') | |
| steps: | |
| - name: Call Devin API | |
| run: | | |
| curl -X POST https://api.devin.ai/v1/sessions \ | |
| -H "Authorization: Bearer ${{ secrets.DEVIN_API_KEY }}" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"prompt":"A CI build failed in ${{ github.event.repository.html_url }} on branch ${{ github.event.workflow_run.head_branch }}. Clone the repo, checkout that branch, run the build, fix what failed, and push your changes.","title":"Fix CI - ${{ github.event.workflow_run.head_branch }}"}' |