Skip to content

Commit 18c4e9d

Browse files
Update pr-auto-label.yml
Signed-off-by: Matty Widdop <18513864+MattyTheHacker@users.noreply.github.com>
1 parent 4e3d277 commit 18c4e9d

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/pr-auto-label.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ jobs:
1212

1313
runs-on: ubuntu-latest
1414
steps:
15-
- run: gh pr edit $PR --add-label sync
15+
- name: Add "sync" label to PR
16+
run: gh pr edit "$PR_URL" --add-label sync
1617
env:
1718
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
PR: ${{ github.event.number }}
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
21+
- name: Comment on PR to explain sync label
22+
run: gh pr comment "$PR_URL" --body "This pull request has been marked to **automatically sync** to its base branch. You can **disable** this behavior by removing the `sync` label."
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
PR_URL: ${{ github.event.pull_request.html_url }}

0 commit comments

Comments
 (0)