Skip to content

Commit

Permalink
Merge branch 'enhance/build-sender-id' of github.com:go-vela/server i…
Browse files Browse the repository at this point in the history
…nto feat/oidc-provider
  • Loading branch information
plyr4 committed Jun 4, 2024
2 parents 27f52be + 7625a96 commit a04a62f
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 a04a62f

Please sign in to comment.