Skip to content

Commit 76fb05e

Browse files
Fishrock123rvagg
authored andcommitted
allow fallback to author checking
PR-URL: #4
1 parent 65dda2d commit 76fb05e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

branch-diff.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,16 @@ function diffCollected (options, branchCommits, callback) {
6969
return branchCommits[0].some((c) => {
7070
if (commit.sha === c.sha)
7171
return true
72-
if (commit.summary === c.summary
73-
//&& equal(commit.description, c.description)
74-
&& commit.prUrl && c.prUrl
75-
&& commit.prUrl === c.prUrl)
76-
return true
72+
if (commit.summary === c.summary) {
73+
if (commit.prUrl && c.prUrl) {
74+
return commit.prUrl === c.prUrl
75+
} else if (commit.author.name === c.author.name
76+
&& commit.author.email === c.author.email) {
77+
if (process.stderr.isTTY)
78+
console.error(`Note: Commit fell back to author checking: "${commit.summary}" -`, commit.author)
79+
return true
80+
}
81+
}
7782
return false
7883
})
7984
}

0 commit comments

Comments
 (0)