Skip to content

Commit

Permalink
fix(restart): correct build sender using claims subject (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored May 8, 2023
1 parent 8c2fdb2 commit af42abe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ func GetBuild(c *gin.Context) {
func RestartBuild(c *gin.Context) {
// capture middleware values
m := c.MustGet("metadata").(*types.Metadata)
cl := claims.Retrieve(c)
b := build.Retrieve(c)
o := org.Retrieve(c)
r := repo.Retrieve(c)
Expand Down Expand Up @@ -1092,6 +1093,7 @@ func RestartBuild(c *gin.Context) {
b.SetHost("")
b.SetRuntime("")
b.SetDistribution("")
b.SetSender(cl.Subject)

// update the PR event action if action was never set
// for backwards compatibility with pre-0.14 releases.
Expand Down

0 comments on commit af42abe

Please sign in to comment.