Skip to content
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

enhance(webhook): enable skipping builds during tag events #217

Merged
merged 5 commits into from
Dec 28, 2021

Conversation

JordanSussman
Copy link
Collaborator

@JordanSussman JordanSussman commented Dec 10, 2021

@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #217 (4550072) into master (7ffe95d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #217   +/-   ##
=======================================
  Coverage   96.73%   96.74%           
=======================================
  Files          53       53           
  Lines        5644     5645    +1     
=======================================
+ Hits         5460     5461    +1     
  Misses        137      137           
  Partials       47       47           
Impacted Files Coverage Δ
webhook.go 100.00% <100.00%> (ø)

@JordanSussman JordanSussman marked this pull request as ready for review December 20, 2021 16:47
@JordanSussman JordanSussman requested a review from a team as a code owner December 20, 2021 16:47
Copy link
Contributor

@jbrockopp jbrockopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +34 to +36
// push or tag event
// nolint: lll // ignore long line length due to if logic
if strings.EqualFold(constants.EventPush, w.Build.GetEvent()) || strings.EqualFold(constants.EventTag, w.Build.GetEvent()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change LGTM so I already approved 👍

However, wanted to throw out a question as a discussion for future reviewers.

Is there an appetite to remove the event parsing logic completely?

This would expose the skip functionality to all event types rather than just push and tag.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that's fine?! i guess it's only there to lock conditions to known scenarios. for example, i don't know if the commit is null for other events that we want to process, ie. comments? we're probably good, but that would be going through my head.

@jbrockopp jbrockopp added the enhancement Indicates an improvement to a feature label Dec 20, 2021
@wass3r wass3r merged commit 34d807f into go-vela:master Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates an improvement to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants