Skip to content

Commit cf6a770

Browse files
ci(cmd): fix reaction permissions and drop deprecated regex action (#205)
* ci(cmd): fix reaction permissions and drop deprecated regex action The acknowledge job failed with "Resource not accessible by integration" when reacting to a comment on a PR: reacting to a PR conversation comment needs pull-requests: write, but the job only granted issues: write. Add pull-requests: write to acknowledge, and to clean/help which share the same comment/reaction pattern. Replace actions-ecosystem/action-regex-match (Node 20 + deprecated set-output) in get-pr-info with an inline actions/github-script step, preserving the group2 output. * Update from github-actions[bot] running command 'fmt' --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3399aeb commit cf6a770

2 files changed

Lines changed: 29 additions & 22 deletions

File tree

.github/workflows/cmd.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363
permissions:
6464
issues: write
65+
pull-requests: write
6566
steps:
6667
- name: Add reaction to triggered comment
6768
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -79,6 +80,7 @@ jobs:
7980
runs-on: ubuntu-latest
8081
permissions:
8182
issues: write
83+
pull-requests: write
8284
steps:
8385
- name: Clean previous comments
8486
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
@@ -127,11 +129,15 @@ jobs:
127129
repo: ${{ steps.get-pr.outputs.repo }}
128130
steps:
129131
- name: Get command
130-
uses: actions-ecosystem/action-regex-match@9e6c4fb3d5e898f505be7a1fb6e7b0a278f6665b # v2.0.2
131132
id: get-comment
133+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
134+
env:
135+
COMMENT_BODY: ${{ github.event.comment.body }}
132136
with:
133-
text: ${{ github.event.comment.body }}
134-
regex: "^(\\/cmd )([-\\/\\s\\w.=:]+)$" # see explanation in docs/contributor/commands-readme.md#examples
137+
script: |
138+
// see explanation in docs/contributor/commands-readme.md#examples
139+
const match = process.env.COMMENT_BODY.match(/^(\/cmd )([-\/\s\w.=:]+)$/);
140+
core.setOutput('group2', match ? match[2] : '');
135141
136142
# Get PR branch name, because the issue_comment event does not contain the PR branch name
137143
- name: Check if the issue is a PR
@@ -180,6 +186,7 @@ jobs:
180186
permissions:
181187
contents: read
182188
issues: write
189+
pull-requests: write
183190
steps:
184191
- name: Checkout
185192
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

deny.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
[licenses]
66
version = 2
77
allow = [
8-
"Apache-2.0",
9-
"Apache-2.0 WITH LLVM-exception",
10-
"BSD-1-Clause",
11-
"BSD-2-Clause",
12-
"BSD-3-Clause",
13-
"BSL-1.0",
14-
"CC0-1.0",
15-
"CDLA-Permissive-2.0",
16-
"GPL-3.0",
17-
"GPL-3.0-only",
18-
"ISC",
19-
"LGPL-2.1-or-later",
20-
"MIT",
21-
"MIT-0",
22-
"MPL-2.0",
23-
"Unicode-3.0",
24-
"Unlicense",
25-
"Zlib",
26-
"0BSD",
8+
"0BSD",
9+
"Apache-2.0 WITH LLVM-exception",
10+
"Apache-2.0",
11+
"BSD-1-Clause",
12+
"BSD-2-Clause",
13+
"BSD-3-Clause",
14+
"BSL-1.0",
15+
"CC0-1.0",
16+
"CDLA-Permissive-2.0",
17+
"GPL-3.0",
18+
"GPL-3.0-only",
19+
"ISC",
20+
"LGPL-2.1-or-later",
21+
"MIT",
22+
"MIT-0",
23+
"MPL-2.0",
24+
"Unicode-3.0",
25+
"Unlicense",
26+
"Zlib",
2727
]
2828

2929
# Some older crates use non-SPDX license expressions (e.g. "MIT/Apache-2.0"

0 commit comments

Comments
 (0)