We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5af6ca5 commit 0c544b3Copy full SHA for 0c544b3
.github/workflows/pr-labeled.yml
@@ -4,12 +4,15 @@ env:
4
GH_TOKEN: ${{ github.token }}
5
PR: ${{ github.event.pull_request.html_url }}
6
on:
7
- pull_request:
+ pull_request_target:
8
types:
9
- labeled
10
jobs:
11
process_labels:
12
runs-on: ubuntu-latest
13
+ permissions:
14
+ pull-requests: write
15
+ contents: read
16
steps:
17
- uses: actions/checkout@v3
18
with:
.github/workflows/script/PrLabeled.ps1
@@ -60,6 +60,11 @@ if ($CommentDict.ContainsKey($LabelName)) {
60
Write-Host "Comment is already added"
61
}
62
else {
63
- gh pr comment $PrUrl --body $comment
+ try {
64
+ gh pr comment $PrUrl --body $comment
65
+ }
66
+ catch {
67
+ Write-Host "Failed to add comment: $_"
68
69
70
0 commit comments