-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix HEAD_REF -> GITHUB_HEAD_REF split into condition checks script and a wait for tests script pr title is checked in condition checks only branch is used in wait checks stop ignoring patternfly bumps - we have screenshot tests now No-Issue
- Loading branch information
Showing
3 changed files
with
43 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// get these values from env instead of cli args due to RCE issues | ||
const actor = process.env.GITHUB_ACTOR; | ||
const branch = process.env.GITHUB_HEAD_REF; | ||
const prTitle = process.env.PR_TITLE; | ||
|
||
console.log({ actor, branch, prTitle }); | ||
|
||
if (actor != 'dependabot[bot]') { | ||
console.log('Actor incorrect (GITHUB_ACTOR)'); | ||
process.exit(1); | ||
} | ||
|
||
if (!branch) { | ||
console.log('Branch name not set (GITHUB_HEAD_REF)'); | ||
process.exit(1); | ||
} | ||
|
||
if (!prTitle) { | ||
console.log('PR title not set (PR_TITLE)'); | ||
process.exit(1); | ||
} | ||
|
||
if (prTitle.includes('@types/node') && !prTitle.match(/from (\d+)\.\d+\.\d+ to \1\.\d+\.\d+/)) { | ||
console.log('Not automerging major @types/node version bump'); | ||
process.exit(1); | ||
} | ||
|
||
process.exit(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters