1616 pull-requests : write # to create the PR comment
1717 steps :
1818 - name : share link to workflow run
19- uses : actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4 .1
19+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0 .1
2020 with :
2121 script : |
2222 github.rest.issues.createComment({
@@ -49,16 +49,11 @@ jobs:
4949 https://gitlab.com/baserow/baserow
5050 https://gitlab.com/cryptsetup/cryptsetup
5151 EOF
52- # use shell syntax to escape, since the checks arg goes to CLI when calling scdiff
53- - name : escape comment body
54- id : comment
55- env :
56- BODY : ${{ github.event.comment.body }}
57- run : |
58- echo "body=$BODY" >> $GITHUB_OUTPUT
5952 - name : configure scdiff
6053 id : config
61- uses : actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
54+ env :
55+ COMMENT_BODY : ${{ github.event.comment.body }}
56+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
6257 with :
6358 script : |
6459 const allowedAssociations = ["COLLABORATOR", "CONTRIBUTOR", "MEMBER", "OWNER"];
@@ -76,13 +71,13 @@ jobs:
7671 core.setOutput('head', response.data.head.sha)
7772
7873 checks = '""'
79- const commentBody = '${{ steps.comment.outputs.body }}'
74+ const commentBody = process.env.COMMENT_BODY
8075 const regex = /\/scdiff generate ([^ ]+)/;
8176 const found = commentBody.match(regex);
8277 if (found && found.length == 2) {
8378 checks = found[1]
8479 }
85- core.setOutput('checks ', checks)
80+ core.exportVariable('SCORECARD_CHECKS ', checks)
8681 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8782 with :
8883 ref : ${{ steps.config.outputs.base }}
9893 run : |
9994 go run cmd/internal/scdiff/main.go generate \
10095 --repos $HOME/repos.txt \
101- --checks ${{ steps.config.outputs.checks }} > $HOME/before.json
96+ --checks $SCORECARD_CHECKS > $HOME/before.json
10297 - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
10398 with :
10499 ref : ${{ steps.config.outputs.head }}
@@ -109,7 +104,7 @@ jobs:
109104 run : |
110105 go run cmd/internal/scdiff/main.go generate \
111106 --repos $HOME/repos.txt \
112- --checks ${{ steps.config.outputs.checks }} > $HOME/after.json
107+ --checks $SCORECARD_CHECKS > $HOME/after.json
113108 - name : compare results
114109 run : |
115110 go run cmd/internal/scdiff/main.go compare $HOME/before.json $HOME/after.json
0 commit comments