Skip to content

Commit

Permalink
Tag the actual author of web commits
Browse files Browse the repository at this point in the history
  • Loading branch information
wktk committed Dec 25, 2024
1 parent 7451585 commit 5b68f73
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/functions/get-committer-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export async function getRecentCommitLogin(sha: string): Promise<string> {
page: 1
})
const commitData = commitResponse.data
lastCommitter = commitData.committer?.login || commitData.author?.login || commitData.commit?.committer?.name || commitData.commit?.author?.name
lastCommitter = commitData.committer?.login
if (!lastCommitter || lastCommitter === 'web-flow') {
lastCommitter = commitData.author?.login || commitData.commit?.committer?.name || commitData.commit?.author?.name
}
assert.ok(lastCommitter, 'Committer cannot be empty.')
} catch (err) {
if (err instanceof Error) {
Expand Down

0 comments on commit 5b68f73

Please sign in to comment.