forked from dcoapp/app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid checking for sign offf on merges
Signed-off-by: Brandon Keepers <bkeepers@github.com>
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
module.exports = commit => { | ||
const signOff = `Signed-off-by: ${commit.author.name} <${commit.author.email}>`; | ||
return commit.message.includes(signOff); | ||
const isMerge = commit.parents && commit.parents.length > 1; | ||
return isMerge || commit.message.includes(signOff(commit)); | ||
}; | ||
|
||
function signOff(commit) { | ||
return `Signed-off-by: ${commit.author.name} <${commit.author.email}>`; | ||
} |
This file contains 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