Skip to content

ci: lint every commit of a push, not only the last - #34

Merged
lightchainaidev merged 1 commit into
testnetfrom
ci/lint-whole-push
Oct 21, 2026
Merged

lightchainaidev merged 1 commit into
testnetfrom
ci/lint-whole-push

Conversation

@lightchainaidev

Copy link
Copy Markdown
Contributor

On a push, --new-from-rev=HEAD~ linted only the last commit, so a rebase merge or a direct push of several commits went through with the earlier ones unlinted. A push now compares with github.event.before (the commit the branch was on before) and checks out the whole history so that commit is present; the repository is a few megabytes. Pull requests keep HEAD~ (the merge commit's first parent, which covers the whole PR) and a two-commit checkout. A tag push has no earlier commit and keeps HEAD~.

The push path runs only once this is merged; this PR's own run exercises the pull-request path.

--new-from-rev=HEAD~ compares with the merge commit's first parent on a pull
request, which covers the whole change, but on a push it covers only the last
commit: a rebase merge or a direct push of several commits went through with
the earlier ones unlinted. A push now compares with github.event.before, the
commit the branch was on before, and checks out the whole history so that
commit is there (each repository is a few megabytes). A tag push has no earlier
commit and keeps HEAD~.
@lightchainaidev
lightchainaidev merged commit 5703bb2 into testnet Oct 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant