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 1
1
# Changelog
2
2
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
+
3
9
## 2.9.0
4
10
5
11
### Fixes
Original file line number Diff line number Diff line change 7
7
8
8
## TLDR
9
9
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
+
14
16
cd reponame
15
- export DANGER_TEST_PR=' 1234'
16
- git checkout branch-for-pr-1234
17
+ gh pr checkout $env:DANGER_TEST_PR
17
18
npx danger ci --text-only --failOnErrors --dangerfile=../github-workflows/danger/dangerfile.js
18
19
```
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ async function checkActionsArePinned() {
146
146
147
147
const usesRegex = / ^ \+ ? * u s e s : / ;
148
148
const usesActionRegex =
149
- / ^ \+ ? * u s e s : * (?< user > [ ^ \/ ] + ) \/ (?< action > [ ^ @ ] + ) @ (?< ref > [ ^ ] * ) / ;
149
+ / ^ \+ ? * u s e s : * (?< user > [ ^ \/ ] + ) \/ (?< action > [ ^ @ ] + ) @ (?< ref > [ ^ \s ] + ) / ;
150
150
const usesLocalRegex = / ^ \+ ? * u s e s : * \. \/ / ; // e.g. 'uses: ./.github/actions/something'
151
151
const shaRegex = / ^ [ a - f 0 - 9 ] { 40 } $ / ;
152
152
const whitelistedUsers = [ "getsentry" , "actions" , "github" ] ;
You can’t perform that action at this time.
0 commit comments