Skip to content

Commit 7d3dfd1

Browse files
feat: add workflow to review PRs labeled with GFI and Beginner (#1828)
Signed-off-by: tech0priyanshu <priyanshuyadv101106@gmail.com>
1 parent cbddff0 commit 7d3dfd1

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Request triage review on beginner and Good First Issue PRs
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, labeled]
6+
7+
concurrency:
8+
group: triage-${{ github.event.pull_request.number }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
request-triage:
17+
if: ${{ contains(github.event.pull_request.labels.*.name, 'Good First Issue') || contains(github.event.pull_request.labels.*.name, 'beginner') }}
18+
runs-on: [self-hosted,hl-sdk-py-lin-md]
19+
20+
steps:
21+
- name: Request triage review
22+
uses: actions/github-script@v9.0.0 #v9.0.0
23+
with:
24+
script: |
25+
const tag = "<!-- triage -->";
26+
const { data: comments } = await github.rest.issues.listComments({
27+
owner: context.repo.owner,
28+
repo: context.repo.repo,
29+
issue_number: context.payload.pull_request.number
30+
});
31+
if (!comments.some(c => c.body?.includes(tag))) {
32+
await github.rest.issues.createComment({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
issue_number: context.payload.pull_request.number,
36+
body: `${tag} Requesting triage review from: @hiero-ledger/hiero-sdk-python-triage`
37+
});
38+
}

0 commit comments

Comments
 (0)