Skip to content

Commit

Permalink
fix: hash used for webhook secret (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockopp authored Feb 17, 2020
1 parent d9d6cb9 commit 46c745e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ func CreateRepo(c *gin.Context) {
return
}

// check if the repo already has a hash created
if len(r.GetHash()) > 0 {
// overwrite the new repo hash with the existing repo hash
input.SetHash(r.GetHash())
}

// send API call to create the webhook
url, err := source.FromContext(c).Enable(u, input.GetOrg(), input.GetName(), input.GetHash())
if err != nil {
Expand Down

0 comments on commit 46c745e

Please sign in to comment.