-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compiler/database/scm)!: add event action build field and use for rulesets #630
Conversation
Codecov Report
@@ Coverage Diff @@
## master #630 +/- ##
=======================================
Coverage 55.47% 55.48%
=======================================
Files 195 195
Lines 15740 15749 +9
=======================================
+ Hits 8732 8738 +6
- Misses 6644 6646 +2
- Partials 364 365 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a question about restricting the PR edited event. Otherwise this looks good
scm/github/webhook.go
Outdated
// if the edits to the PR are not related to the title or base branch, ignore them | ||
if strings.EqualFold(payload.GetAction(), "edited") { | ||
title := payload.GetChanges().GetTitle() | ||
base := payload.GetChanges().GetBase() | ||
|
||
if title == nil && base == nil { | ||
return &types.Webhook{Hook: h}, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? What if someone had a workflow that validated the PR description followed some format, would we not support that?
conflicts :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Part of the effort of go-vela/community#159
PR accomplishes the following:
scm/github/webhook.go
if the event ispull_request
orcomment
. Otherwise, this field remainsnil
.nil
, to create a scoped<event>:<action>
combination to utilize for determining whether or not a step should execute. There will be a separate PR to address this at runtime in the worker code.event_action
field to the ddl