-
Notifications
You must be signed in to change notification settings - Fork 642
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
attempt: don't run unused when targeting feature branches. #3819
Conversation
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.
Rather than have two separate tasks than conditionally run, could we dynamically determine exclusions (e.g. if main isn't the base branch)?
This solution feels a little clunky, I'm happy to merge this as a short term workaround as we definitely don't care about some some of these linting errors while working on a feature branch.
But I think a better solution is to either have 2 lint yml configs (one for main and one for feature branches)
Or to dynamically pass arguments to --exclude
if it's feasible.
WDYT?
fc1c6b0
to
b909d81
Compare
30d4c0b
to
987d839
Compare
branches-ignore: | ||
- main |
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.
only run on pull requests not targeting main: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-branches
branches: | ||
- main |
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.
only run on PRs targeting main (one is a negation of the other).
Talked with Cian a bit this morning and going with separate workflow files. Since their number is getting rather large, am documenting as I add. |
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! I think separate workflows does make a bit more sense to keep each one as straightforward as possible 👍
Description
Allows skipping certain linter checks on pull requests that do not target the main branch. Only disallow unused atm but could include more.
closes: #3783
Commit Message / Changelog Entry
see the guidelines for commit messages. (view raw markdown for examples)
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.