forked from gothinkster/spring-boot-realworld-example-app
-
Notifications
You must be signed in to change notification settings - Fork 0
22 lines (19 loc) · 862 Bytes
/
Copy pathdevin-ci-fix.yml
File metadata and controls
22 lines (19 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 }}"}'