-
Notifications
You must be signed in to change notification settings - Fork 27
54 lines (27 loc) · 954 Bytes
/
auto-label-comment-prs.yml
File metadata and controls
54 lines (27 loc) · 954 Bytes
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
52
53
name: "Label PRs and auto-comment"
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
pr_label_comment:
runs-on: self-hosted
steps:
- uses: actions/github-script@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr_number = context.payload.pull_request.number;
// Add label
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
labels: ["needs-review", "copilot"] // <-- TUNE ME
});
// Add automated comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
body: "Thanks for the PR! Copilot will assist with review."
});