-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent linting jobs from running on PR close events #1328
Conversation
Website deployed to CF Pages, 👀 preview link https://59da137c.flowzone.pages.dev |
3f055c1
to
d4d3193
Compare
d4d3193
to
810b78a
Compare
There is no value in running actionlint or pre-commit checks on PR merge or close events. Same with the Node version checks, no need on close events. The octoscan checks should run on merge to update the main branch code scanning results, but not on PR close. Change-type: patch Signed-off-by: Kyle Harding <[email protected]>
a599a31
to
010eff0
Compare
flowzone.yml
Outdated
@@ -1890,12 +1908,18 @@ jobs: | |||
|
|||
# check if the repository has a package.json file and which engine versions are supported | |||
is_npm: | |||
name: Check NodeJS versions | |||
name: request branch for pull requestJS versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: request branch for pull requestJS versions | |
name: request branch for pull request JS versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That must have been a copy-paste error, I didn't even mean to update that job name? Weird.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it was weird too, but I assumed you had some reason? :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very nice of you
These jobs do not rely on versioned source, so they can default to the pull request HEAD sha and fallback to the github ref for other event types. Using the github ref is not appropriate for pull_request_target events where the ref/sha is always the base branch. Change-type: minor Signed-off-by: Kyle Harding <[email protected]>
010eff0
to
9fb5218
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Prevent linting jobs from running on PR close events
There is no value in running actionlint or pre-commit checks
on PR merge or close events.
Same with the Node version checks, no need on close events.
The octoscan checks should run on merge to update the main
branch code scanning results, but not on PR close.
Tested close event here.
Note that
File List
runs without failing, so we can leverage it forCustom always
job conditions in a future PR.Use shallow checkout with github token for linting jobs
These jobs do not rely on versioned source, so they
can default to the pull request HEAD sha and fallback
to the github ref for other event types.
Using the github ref is not appropriate for pull_request_target
events where the ref/sha is always the base branch.