Skip to content

Commit d8c4582

Browse files
chore: expand workflow to prs (OWASP#523)
* chore: expand workflow to prs * chore: mod to handle issues and pr separate * chore: slight mod codeowners
1 parent 7c4e119 commit d8c4582

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.github/workflows/issue-triage.yml renamed to .github/workflows/owasp-workflow-triage.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
name: Ads - Triage OWASP Top 10 LLM Apps Issues
1+
name: Ads - Triage OWASP Top 10 LLM Apps Issues and PRs
22

33
on:
44
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
614

715
env:
816
BOARD_NAME: "OWASP Top 10 for LLM Applications"
@@ -39,12 +47,22 @@ jobs:
3947
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
4048
with:
4149
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+
}
4866
4967
triage:
5068
runs-on: ubuntu-latest

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
# Shared Community Files and Areas:
55
# TBC
66

7-
## Either Ads or Steve can approve changes to CODEOWNERS:
7+
## Either Ads or Steve can approve changes to CODEOWNERS or github:
88
CODEOWNERS @GangGreenTemperTatum @virtualsteve-star
9+
.github/ @GangGreenTemperTatum @virtualsteve-star
910

1011
## Data Gathering
1112
data_gathering/* @emmanuelgjr @GangGreenTemperTatum

0 commit comments

Comments
 (0)