Skip to content

Commit

Permalink
fix(scm): process reopened action for pull request event
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed Nov 7, 2023
1 parent 31dd3f7 commit a44c061
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/drone/envsubst v1.0.3
github.com/gin-gonic/gin v1.9.1
github.com/go-playground/assert/v2 v2.2.0
github.com/go-vela/types v0.22.0-rc1
github.com/go-vela/types v0.22.0-rc1.0.20231107155504-ba41348d0fa9
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v56 v56.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-vela/types v0.22.0-rc1 h1:LfYw8jiWW0KCPyIple2y9L75a5Lae454FfEe0JssLi0=
github.com/go-vela/types v0.22.0-rc1/go.mod h1:ljNY36D6YkpObBbNF7Xslv3oxN4mGuQAwWhnnK/V06I=
github.com/go-vela/types v0.22.0-rc1.0.20231107155504-ba41348d0fa9 h1:9ime2uWyIe2xhMWINOPs6SCj7Rk6vSAOZ/VZ+STgwpw=
github.com/go-vela/types v0.22.0-rc1.0.20231107155504-ba41348d0fa9/go.mod h1:ljNY36D6YkpObBbNF7Xslv3oxN4mGuQAwWhnnK/V06I=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down
5 changes: 3 additions & 2 deletions scm/github/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ func (c *client) processPREvent(h *library.Hook, payload *github.PullRequestEven
return &types.Webhook{Hook: h}, nil
}

// skip if the pull request action is not opened, synchronize
// skip if the pull request action is not opened, synchronize, or reopened
if !strings.EqualFold(payload.GetAction(), "opened") &&
!strings.EqualFold(payload.GetAction(), "synchronize") {
!strings.EqualFold(payload.GetAction(), "synchronize") &&
!strings.EqualFold(payload.GetAction(), "reopened") {
return &types.Webhook{Hook: h}, nil
}

Expand Down

0 comments on commit a44c061

Please sign in to comment.