Handle revert commits - #73
Draft
BKPepe wants to merge 2 commits into
Draft
Conversation
Commits made by `git revert` have the subject Revert "<original>", so the package prefix ends up inside the quotes and the bot rejects them. The author cannot fix that without breaking the link to the reverted commit. Accept this format, including reverts of reverts and the prefixed <package>: Revert "..." variant. For them the subject layout rules are skipped, the Revert "..." wrapper is excluded from the length limit, and the PKG_VERSION check is skipped, because a revert restores the previous version. Subjects like 'Revert the broken change' are still rejected. The new allow_revert config key (default true) turns this off. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
A revert puts PKG_VERSION and PKG_RELEASE back to the values from before the reverted commit. The release audit reads that as a version update and demands PKG_RELEASE reset to 1, which a revert must not do, so reverting a version bump fails the audit. Reverting the removal of a package hits the same problem through the new package rule. Skip both rules for packages that only revert commits touched, and say so in the audit output instead of reporting a bump to a lower release. A revert that changes package content without touching the version or release still has to bump PKG_RELEASE, otherwise users would keep the content that was reverted. Attribution needs commit messages, so PRs with more than 15 commits, where only one patch for the whole PR is fetched, keep the strict rules. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
BKPepe
force-pushed
the
feature/handle-revert-commits
branch
from
July 26, 2026 07:32
dc42698 to
edd98be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #72