Skip to content

Commit

Permalink
chore: verbose comment on fallback user fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Jun 4, 2024
1 parent 242ebf9 commit 7625a96
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/webhook/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ func PostWebhook(c *gin.Context) {
}

// attach a sender SCM id if the webhook payload from the SCM has no sender id
// the code in ProcessWebhook implies that the sender may not always be present
// fallbacks like pusher/commit_author do not have an id
if len(b.GetSenderSCMID()) == 0 || b.GetSenderSCMID() == "0" {
// fetch scm user id for pusher
senderID, err := scm.FromContext(c).GetUserID(ctx, b.GetSender(), repo.GetOwner().GetToken())
Expand Down

0 comments on commit 7625a96

Please sign in to comment.