Skip to content

Handle revert commits - #73

Draft
BKPepe wants to merge 2 commits into
mainfrom
feature/handle-revert-commits
Draft

Handle revert commits#73
BKPepe wants to merge 2 commits into
mainfrom
feature/handle-revert-commits

Conversation

@BKPepe

@BKPepe BKPepe commented Jul 25, 2026

Copy link
Copy Markdown
Member

Closes: #72

BKPepe added 2 commits July 26, 2026 09:32
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
BKPepe force-pushed the feature/handle-revert-commits branch from dc42698 to edd98be Compare July 26, 2026 07:32
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.

Handle special format revert commit

1 participant