Skip to content
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

build: fix commit linter on unrebased PRs #39123

Closed
wants to merge 1 commit into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jun 22, 2021

Alternative to #39121.

The commit linter was checking out the PR HEAD commit instead of
merge/rebase commit, causing it to fail for any PRs that were not
rebased on our default branch.

The commit linter was checking out the PR HEAD commit instead of
merge/rebase commit, causing it to fail for any PRs that were not
rebased on our default branch.
@aduh95 aduh95 requested a review from mmarchini June 22, 2021 19:38
@github-actions github-actions bot added the meta Issues and PRs related to the general management of the project. label Jun 22, 2021
Copy link
Contributor

@mmarchini mmarchini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add more dependencies it means we need to fetch more things, plus this PR unnecessarily increases the complexity of the Action.

@aduh95
Copy link
Contributor Author

aduh95 commented Jun 22, 2021

If we add more dependencies it means we need to fetch more things, plus this PR unnecessarily increases the complexity of the Action.

I'm confused, this PR doesn't add a dependency, what do you mean by that?

@mmarchini
Copy link
Contributor

mmarchini commented Jun 22, 2021

Dependencies in "external" files (as in files that are not the Action file, not actual dependencies). So if we move git log --oneline ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | grep -v -e fixup -e squash | awk '{ print $1 }' | xargs npx -q core-validate-commit --no-validate-metadata --tap to a script in tools/actions now we need to download two files instead of one. Furthermore, downloading a file manually when this file will be fetched automatically as part of #39121 is unnecessary extra work that doesn't add robustness to the action, just complexity.

@aduh95
Copy link
Contributor Author

aduh95 commented Jun 22, 2021

I agree that curl command does make the action more fragile. If the script is made to work around merging (which clearly different from squashing, please blame my insufficient knowledge of git on that one), I'm closing this in favor of your PR.

@aduh95 aduh95 closed this Jun 22, 2021
@aduh95 aduh95 deleted the fix-linter-pr branch June 22, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants