Skip to content

Commit

Permalink
Tag the actual author of web commits (#1310)
Browse files Browse the repository at this point in the history
fix #1289

Co-authored-by: Chris Kerins <clkerins@gmail.com>
  • Loading branch information
wktk and crs-k authored Jan 28, 2025
1 parent 1b5bd0a commit e28bb96
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 e28bb96

Please sign in to comment.