Commit 7a2957c
committed
ci: github: Restrict permissions for actions, test update commit status
Observed issue is:
Run actions/github-script@v7
(...)
RequestError [HttpError]: Resource not accessible by integration
(...)
status: 403,
response: {
(...)
request: {
method: 'POST',
url: 'https://api.github.com/repos/SiliconLabsSoftware/z-wave-protocol-controller/statuses/***',
(...)
This is caused by the repo configuration (in actions):
"Workflow permissions" : "Read repository contents and packages permissions"
Which is more restrictive that default:
"Workflow permissions" : "Read and write permissions"
There is no need to set perm in token anymore.
Extra note, to some extends tokens may be replaced with GH apps.
Origin: #105
Relate-to: https://docs.github.com/en/rest/commits/statuses?apiVersion=2022-11-28#create-a-commit-status
Relate-to:#67
Relate-to: https://github.com/SiliconLabsSoftware/z-wave-protocol-controller/settings/actions
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>1 parent 1e579f8 commit 7a2957c
3 files changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
0 commit comments