Skip to content

Commit

Permalink
couple more
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Jul 18, 2024
1 parent 1e5d955 commit 17f40cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/webhook/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ func PostWebhook(c *gin.Context) {

// if the webhook was from a Pull event from a forked repository, verify it is allowed to run
if webhook.PullRequest.IsFromFork {
l.Tracef("inside %s workflow for fork PR build %s/%d", repo.GetApproveBuild(), r.GetFullName(), b.GetNumber())
l.Tracef("inside %s workflow for fork PR build %s/%d", repo.GetApproveBuild(), repo.GetFullName(), b.GetNumber())

switch repo.GetApproveBuild() {
case constants.ApproveForkAlways:
Expand All @@ -496,7 +496,7 @@ func PostWebhook(c *gin.Context) {
return
case constants.ApproveForkNoWrite:
// determine if build sender has write access to parent repo. If not, this call will result in an error
_, err = scm.FromContext(c).RepoAccess(ctx, b.GetSender(), r.GetOwner().GetToken(), r.GetOrg(), r.GetName())
_, err = scm.FromContext(c).RepoAccess(ctx, b.GetSender(), repo.GetOwner().GetToken(), repo.GetOrg(), repo.GetName())
if err != nil {
err = gatekeepBuild(c, b, repo)
if err != nil {
Expand Down

0 comments on commit 17f40cf

Please sign in to comment.