Skip to content

Commit cfef15c

Browse files
committed
Sync auto-label-comment-prs.yml from .github repo
1 parent 2cc70c7 commit cfef15c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Label PRs and auto-comment"
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize]
5+
jobs:
6+
pr_label_comment:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/github-script@main
10+
with:
11+
github-token: ${{ secrets.GITHUB_TOKEN }}
12+
script: |
13+
const pr_number = context.payload.pull_request.number;
14+
// Add label
15+
await github.rest.issues.addLabels({
16+
owner: context.repo.owner,
17+
repo: context.repo.repo,
18+
issue_number: pr_number,
19+
labels: ["needs-review", "copilot"] // <-- TUNE ME
20+
});
21+
// Add automated comment
22+
await github.rest.issues.createComment({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
issue_number: pr_number,
26+
body: "Thanks for the PR! Copilot will assist with review."
27+
});

0 commit comments

Comments
 (0)