-
Notifications
You must be signed in to change notification settings - Fork 262
51 lines (49 loc) · 1.97 KB
/
compfuzzci_process_issues.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This workflow is triggered on issue being opened, closed, reopened.
# The CompFuzzCI fuzzer needs to keep track of active issues in the repository to ensure that the fuzzer does not report the same issue multiple times.
# For open and reopen events: It dispatches workflow on CompFuzzCI repository, where the issue is added to the database.
# For close event: It dispatches workflow on CompFuzzCI repository, where the issue is removed from the database.
name: Issue Update for Fuzzer
on:
issues:
branches:
- master
types: [opened, closed, reopened]
jobs:
UpdateIssueOpened:
if: github.event.action == 'opened' || github.event.action == 'reopened'
runs-on: ubuntu-latest
steps:
- name: Trigger CompFuzzCI
uses: actions/github-script@v7
with:
github-token: ${{ secrets.COMPFUZZCI_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'CompFuzzCI',
repo: 'DafnyCompilerFuzzer',
workflow_id: 'update_issue_open.yaml',
ref: 'main',
inputs: {
issue_number: '${{github.event.issue.number}}',
issuer: '${{github.event.issue.user.login}}',
commit: '${{ github.sha }}'
}
})
UpdateIssueClosed:
if: github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Trigger CompFuzzCI
uses: actions/github-script@v7
with:
github-token: ${{ secrets.COMPFUZZCI_PAT }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'CompFuzzCI',
repo: 'DafnyCompilerFuzzer',
workflow_id: 'update_issue_close.yaml',
ref: 'main',
inputs: {
issue_number: '${{github.event.issue.number}}'
}
})