ghreview 3.0.24 → 3.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
1
|
+
# Copy into .github/workflows/ of the repo you want reviewed. One workflow,
|
|
2
|
+
# two jobs: review computes with a read-only token, post holds the write
|
|
3
|
+
# scopes. The README explains the security model.
|
|
4
|
+
#
|
|
5
|
+
# pull_request_target runs the base branch's workflow definition and action
|
|
6
|
+
# pin (a PR cannot modify what executes here), and its token can post the
|
|
7
|
+
# comment, including on Dependabot and fork PRs whose own token is read-only.
|
|
8
|
+
# It is safe here because no PR code is ever checked out or executed: the
|
|
9
|
+
# review job reads the PR's manifest bytes as git objects, and depsound's
|
|
10
|
+
# parsers treat all of it as hostile data.
|
|
3
11
|
name: depsound
|
|
4
12
|
on:
|
|
5
|
-
|
|
13
|
+
pull_request_target:
|
|
6
14
|
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read # checkout + diff the PR's manifests; no write, never posts
|
|
15
|
+
permissions: {} # scopes are granted per job below
|
|
9
16
|
|
|
10
17
|
jobs:
|
|
11
18
|
review:
|
|
12
19
|
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read # diff the PR's manifests; this job never sees a write token
|
|
13
22
|
steps:
|
|
14
|
-
- uses: rvagg/depsound-action@
|
|
23
|
+
- uses: rvagg/depsound-action@ca2026afd4d1fd614f990784867e09da10b6faa8 # v0.3.0
|
|
24
|
+
post:
|
|
25
|
+
needs: review
|
|
26
|
+
if: ${{ always() && needs.review.result != 'cancelled' }} # a failed review still posts its failure marker
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions:
|
|
29
|
+
pull-requests: write # upsert the sticky comment
|
|
30
|
+
checks: write # set the neutral check
|
|
31
|
+
actions: read # download the report artifact
|
|
32
|
+
steps:
|
|
33
|
+
- uses: rvagg/depsound-action/post@ca2026afd4d1fd614f990784867e09da10b6faa8 # v0.3.0
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Posts the report artifact without checking out or running PR code with its
|
|
2
|
-
# write token.
|
|
3
|
-
name: depsound-post
|
|
4
|
-
on:
|
|
5
|
-
workflow_run:
|
|
6
|
-
workflows: [depsound]
|
|
7
|
-
types: [completed]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
pull-requests: write # upsert the sticky comment
|
|
11
|
-
checks: write # set the neutral check
|
|
12
|
-
actions: read # download the report artifact from the compute run
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
post:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
18
|
-
steps:
|
|
19
|
-
- uses: rvagg/depsound-action/post@cae3f58d212f5761ae6ea256acb15441ec5dcd6a # v0.2.2
|