Use correct changeset state for diff property
Created by: eseliger
After reopening a PR, it had no diff anymore (here)[https://k8s.sgdev.org/campaigns/Q2FtcGFpZ246MTY=]
A changesets diff
is meant to be null
in the API, whenever a changeset is NOT open. We previously checked only the metadata of the changeset, not the events also, which lead to inconsistent null
behavior, when a webhook changed the state. I also added a docstring so such bugs are less likely to happen again.
Merge request reports
Activity
Created by: codecov[bot]
Codecov Report
Merging #9028 into master will increase coverage by
<.01%
. The diff coverage is33.33%
.@@ Coverage Diff @@ ## master #9028 +/- ## ========================================== + Coverage 41.81% 41.81% +<.01% ========================================== Files 1314 1314 Lines 71085 71077 -8 Branches 6555 6555 ========================================== Hits 29723 29723 + Misses 38646 38639 -7 + Partials 2716 2715 -1
Impacted Files Coverage Δ ...erprise/internal/campaigns/resolvers/changesets.go 54.2% <0%> (+0.74%)
internal/campaigns/types.go 23.11% <33.33%> (ø)
enterprise/internal/campaigns/service.go 36.28% <50%> (+0.3%)
Please register or sign in to reply