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

Rework status constraint logic for successes #1515

Merged
merged 4 commits into from
Jan 2, 2023

Conversation

smuth4
Copy link
Contributor

@smuth4 smuth4 commented Dec 31, 2022

Since "success" and "failure" are the only two possible values, and "success" is considered to be included by default, the existing code can also be simplified a little.

This has the side effect of ignoring the "exclude" part of the constraint completely. I put it in the tests just to make sure the workaround in #1181 (comment) continues to work as expected, but couldn't think of any legitimate use cases for it.

Fixes #1181

Since "success" and "failure" are the only two possible values, and
"success" is considered to be included by default, the existing code
can also be simplified a little.

Fixes woodpecker-ci#1181
@codecov-commenter
Copy link

codecov-commenter commented Jan 1, 2023

Codecov Report

Base: 42.01% // Head: 42.10% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (8213ed3) compared to base (1816f6c).
Patch coverage: 71.42% of modified lines in pull request are covered.

❗ Current head 8213ed3 differs from pull request most recent head 3284a4d. Consider uploading reports for the commit 3284a4d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1515      +/-   ##
==========================================
+ Coverage   42.01%   42.10%   +0.09%     
==========================================
  Files         154      154              
  Lines       10578    10583       +5     
==========================================
+ Hits         4444     4456      +12     
+ Misses       5852     5845       -7     
  Partials      282      282              
Impacted Files Coverage Δ
pipeline/frontend/yaml/compiler/convert.go 0.00% <0.00%> (ø)
pipeline/frontend/yaml/constraint/constraint.go 84.36% <83.33%> (+2.92%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@6543 6543 added server bug Something isn't working labels Jan 1, 2023
@6543 6543 added this to the 1.0.0 milestone Jan 1, 2023
@6543 6543 enabled auto-merge (squash) January 2, 2023 04:51
@6543 6543 merged commit bc87208 into woodpecker-ci:master Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

conditional step event failure aways triggered
4 participants