File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 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+ });
You can’t perform that action at this time.
0 commit comments