|
1 | | -name: Ads - Triage OWASP Top 10 LLM Apps Issues |
| 1 | +name: Ads - Triage OWASP Top 10 LLM Apps Issues and PRs |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | issues: |
5 | | - types: [opened, labeled, reopened] |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - labeled |
| 8 | + - reopened |
| 9 | + pull_request: |
| 10 | + types: |
| 11 | + - opened |
| 12 | + - labeled |
| 13 | + - reopened |
6 | 14 |
|
7 | 15 | env: |
8 | 16 | BOARD_NAME: "OWASP Top 10 for LLM Applications" |
@@ -39,12 +47,22 @@ jobs: |
39 | 47 | - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1 |
40 | 48 | with: |
41 | 49 | script: | |
42 | | - github.rest.issues.createComment({ |
43 | | - issue_number: context.issue.number, |
44 | | - owner: context.repo.owner, |
45 | | - repo: context.repo.repo, |
46 | | - body: '👋 Thanks for reporting! Please ensure labels are applied appropriately to the issue so that the workflow automation can triage this to the correct member of the core team' |
47 | | - }) |
| 50 | + const eventName = context.eventName; |
| 51 | + if (eventName === 'issues') { |
| 52 | + await github.rest.issues.createComment({ |
| 53 | + issue_number: context.issue.number, |
| 54 | + owner: context.repo.owner, |
| 55 | + repo: context.repo.repo, |
| 56 | + body: '👋 Thanks for reporting! Please ensure labels are applied appropriately so that the workflow automation can triage this to the assigned member of the OWASP core team' |
| 57 | + }); |
| 58 | + } else if (eventName === 'pull_request' && context.payload.action === 'opened') { |
| 59 | + await github.rest.issues.createComment({ |
| 60 | + issue_number: context.issue.number, |
| 61 | + owner: context.repo.owner, |
| 62 | + repo: context.repo.repo, |
| 63 | + body: '👋 Thanks for your pull request! Please ensure appropriate labels are applied for review routing.' |
| 64 | + }); |
| 65 | + } |
48 | 66 |
|
49 | 67 | triage: |
50 | 68 | runs-on: ubuntu-latest |
|
0 commit comments