Skip to content

Commit fc23571

Browse files
pieterddnickjmv
authored andcommitted
Block amend commits
Amend commits are a new type of fixup commits recently added by git. They allow you to fully replace the commit message of the commit you are amending. Since they semantically the same as fixup commits, we similarly don't want to ever merge them into our master branch.
1 parent e319968 commit fc23571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github-webhooks/validators/fixupCommits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const FixupValidator = function() {
1515
.then((commits) => {
1616
const messages = commits.map((a) => a.commit.message);
1717
const fixups = messages
18-
.filter((message) => message.startsWith('fixup!') || message.startsWith('squash!'));
18+
.filter((message) => message.startsWith('fixup!') || message.startsWith('squash!') || message.startsWith('amend!'));
1919
let state = self.gitHubClient.COMMITSTATUS.SUCCESS;
2020
let description = 'no fixups found, you\'re good to go!';
2121
if (fixups.length > 0) {

0 commit comments

Comments
 (0)