File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 2.9.1
4+
5+ ### Fixes
6+
7+ - Danger - fix pinned action check if the ref is at the end of the file ([ #70 ] ( https://github.com/getsentry/github-workflows/pull/70 ) )
8+
39## 2.9.0
410
511### Fixes
Original file line number Diff line number Diff line change 77
88## TLDR
99
10- ``` shell-script
11- export DANGER_GITHUB_API_TOKEN=' XXX'
12- export DANGER_FAKE_CI=" YEP"
13- export DANGER_TEST_REPO=' username/reponame'
10+ ``` pwsh
11+ $env:DANGER_GITHUB_API_TOKEN = gh auth token
12+ $env:DANGER_FAKE_CI = 'YEP'
13+ $env:DANGER_TEST_REPO = 'username/reponame'
14+ $env:DANGER_TEST_PR = 1234
15+
1416cd reponame
15- export DANGER_TEST_PR=' 1234'
16- git checkout branch-for-pr-1234
17+ gh pr checkout $env:DANGER_TEST_PR
1718npx danger ci --text-only --failOnErrors --dangerfile=../github-workflows/danger/dangerfile.js
1819```
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ async function checkActionsArePinned() {
146146
147147 const usesRegex = / ^ \+ ? * u s e s : / ;
148148 const usesActionRegex =
149- / ^ \+ ? * u s e s : * (?< user > [ ^ \/ ] + ) \/ (?< action > [ ^ @ ] + ) @ (?< ref > [ ^ ] * ) / ;
149+ / ^ \+ ? * u s e s : * (?< user > [ ^ \/ ] + ) \/ (?< action > [ ^ @ ] + ) @ (?< ref > [ ^ \s ] + ) / ;
150150 const usesLocalRegex = / ^ \+ ? * u s e s : * \. \/ / ; // e.g. 'uses: ./.github/actions/something'
151151 const shaRegex = / ^ [ a - f 0 - 9 ] { 40 } $ / ;
152152 const whitelistedUsers = [ "getsentry" , "actions" , "github" ] ;
You can’t perform that action at this time.
0 commit comments