Skip to content

fix(commits): skip default git revert messages#34

Merged
apermo merged 1 commit into
mainfrom
fix/conventional-commits-skip-reverts
May 2, 2026
Merged

fix(commits): skip default git revert messages#34
apermo merged 1 commit into
mainfrom
fix/conventional-commits-skip-reverts

Conversation

@apermo
Copy link
Copy Markdown
Owner

@apermo apermo commented May 2, 2026

Summary

  • Extends the merge-commit skip in reusable-conventional-commits.yml to also bypass the default message that git revert generates (Revert "<original subject>").
  • Hand-written revert: … / revert(scope): … subjects still go through allowed-types validation — only the auto-generated form is bypassed.
  • Adds CHANGELOG entry for 0.6.2.

Fixes #33.

Test plan

  • PR validation passes on this PR (the fix doesn't change behaviour for non-revert commits)
  • Verify locally that a Revert "feat(foo): add bar" style subject would now be skipped by the bash matcher

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request improves the developer experience by adjusting how conventional commit messages are validated. By allowing default git revert messages to bypass the strict conventional commit check, it ensures that automated tools relying on the standard 'Revert' prefix continue to function correctly while maintaining validation for manually authored revert commits.

Highlights

  • Commit Validation Logic: Updated the conventional commit validator to automatically skip default git revert messages, preventing unnecessary validation failures for auto-generated revert commits.
  • Changelog Update: Added release notes for version 0.6.2 documenting the fix for git revert message handling.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/reusable-conventional-commits.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.


The revert message caused a fight, / The validator wasn't right. / We skipped the text, / To keep things flexed, / And now the commits are looking bright.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@apermo apermo merged commit 6a9bf82 into main May 2, 2026
3 checks passed
@apermo apermo deleted the fix/conventional-commits-skip-reverts branch May 2, 2026 12:22
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Released as v0.6.2

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the CHANGELOG.md to document a fix for skipping default git revert messages in the conventional commit validator. However, the actual implementation of this fix in reusable-conventional-commits.yml is missing from the current changes.

Comment thread CHANGELOG.md
Comment on lines +12 to +17
- `reusable-conventional-commits.yml` — skip the default message that `git revert` generates
(`Revert "<original subject>"`) the same way merge commits are skipped. Previously the
validator rejected reverts and forced contributors to hand-edit the message into the
conventional schema, which dropped the `Revert "` prefix that release-please and similar
tools rely on to group reverts. Hand-written `revert: …` / `revert(scope): …` subjects are
still validated against `allowed-types`. (#33)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The implementation of the fix described in this CHANGELOG entry and the pull request description (extending the merge-commit skip in reusable-conventional-commits.yml) appears to be missing from the current changes. Only CHANGELOG.md has been modified. Please ensure the corresponding logic changes are included in the pull request.

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.

conventional-commits: skip standard Revert "…" commits like merge commits

1 participant