-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ci(v2): remove duplicated lint jobs/steps #5562
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
steps: | ||
- uses: actions/checkout@v4 | ||
with: |
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.
Out of curiosity: what's the deal behind this double checkout?
Is the first one for pushes to main
and the other one checking out the merge commit of a pr?
Maybe leaving a comment would be good for future readers.
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 missed an if
here. The first checkout should only be executed if we're not running in the pull request context. Thanks for catching this 🙇
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.
FYI, after resolving the conflicts I had to restore 2 checkouts when we're running on pull_request_target
. This is so that we can run lint on the code from the pull request but get the code of the setup-env
action from the base branch.
I added the following comment above the first checkout so that this bit of context is not lost:
# NOTE: When running on a pull_request_target, we're checking out the repo
# twice. The first checkout is for the base branch of the PR. The second,
# for the merge commit. We do this to be able to use the `setup-env`
# action that's on the base branch.
8695e07
to
848980a
Compare
848980a
to
38bb49e
Compare
This PR is a subset of #5301.
In this PR, I minimise the number of places where we perform linting to limit duplication. In particular:
Lint
workflow topull_request_target
and added a second job that comments on a PR when needed.Comment on lint failure
workflow because it is duplicated by theLint
workflow after the changes.Check Docs Site
workflow because it is duplicated in theLint
workflow.