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

[pre-commit] corner case on a PR basis #915

Closed
v1v opened this issue Jan 20, 2021 · 1 comment
Closed

[pre-commit] corner case on a PR basis #915

v1v opened this issue Jan 20, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@v1v
Copy link
Member

v1v commented Jan 20, 2021

What

elastic/apm-integration-testing#1033 was required since elastic/apm-integration-testing#1016 was merged with a lint defect.

It was initially found and reported in the GitHub comment:

image

But the following commits didn't change those files and the preCommit didn't detect any failures.

Why

The preCommit step cares about the current changeset, this works well as long as the following changesets are incrementally fixing the linted issues.

But it does not work well when:

  • Contributors don't use it and
  • Contributors push several commits.

Then, the preCommit won't be able to fail in the following builds since the preCommit won't detect those changesets.

As a consequence, the failure will only happen in the target branch.

Proposal

preCommit should compare <target-branch>...<pr-head> rather than <target-branch>...<GIT_BASE_COMMIT

cc @elastic/observablt-robots

@v1v v1v added the enhancement New feature or request label Jan 20, 2021
@v1v
Copy link
Member Author

v1v commented Mar 7, 2023

We won't invest anymore in the existing Jenkins implementation unless a security or a major bug, hence I'll close this issue now

@v1v v1v closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant