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

feat: check all autosquash messages #395

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JP-Ellis
Copy link

Expand the autosquash prefixes from just fixup! to now include squash! and amend!. These are the prefixes supported by default when using Git's --autosquash.

To keep the commits atomic as requested in #394, this commit only changes the functionality, while leaving the configuration as is (thereby creating an mismatch between the config naming, and resulting behaviour)

crates/committed/src/checks.rs Fixed Show fixed Hide fixed
crates/committed/src/checks.rs Fixed Show fixed Hide fixed
@epage
Copy link
Collaborator

epage commented Sep 19, 2024

feat!

For myself, I don't think I'd consider this a major breaking change. Its a minor breaking change that expands functionality to cover cases that either didn't exist or were unknown at the time of creation.

@epage epage mentioned this pull request Sep 19, 2024
@JP-Ellis
Copy link
Author

I would have considered this to be a breaking change, but if you don't, you should then use a squash-and-rebase instead of a merge. This way, you can ensure the commit message is exactly as you want.

@epage
Copy link
Collaborator

epage commented Sep 19, 2024

This is blocked on CI. Since you have to edit this anyways, please remove !.

Expand the autosquash prefixes from just `fixup!` to now include
`squash!` and `amend!`. These are the prefixes supported by default when
using [Git's
`--autosquash`](https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---autosquash).

Signed-off-by: JP-Ellis <josh@jpellis.me>
auto-merge was automatically disabled September 19, 2024 22:19

Head branch was pushed to by a user without write access

@JP-Ellis
Copy link
Author

As requested I have removed the breaking change exclamation from the commit message. I do not know if CI is fixed yet though.

@@ -63,7 +63,7 @@ pub(crate) enum Content<'s> {
NoPunctuation(NoPunctuation),
Imperative(Imperative<'s>),
Wip(Wip),
Fixup(Fixup),
Autosquash(Autosquash),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change is unrelated to this commit and is a breaking change as discussed on the other PRs

Copy link
Collaborator

Choose a reason for hiding this comment

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

To be clear, my expectation is this commit will continue to emit Fixup

@epage
Copy link
Collaborator

epage commented Sep 20, 2024

Looks like cargo fmt also needs to be run.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10949763923

Details

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 5.517%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/committed/src/checks.rs 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
crates/committed/src/checks.rs 2 2.14%
Totals Coverage Status
Change from base Build 10906075176: 0.0%
Covered Lines: 24
Relevant Lines: 435

💛 - Coveralls

@epage epage changed the title feat!: check all autosquash messages feat: check all autosquash messages Sep 20, 2024
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.

3 participants