Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-merge-queue-ci-rerun-flip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- A human-gated (085) PR that is approved on its current head now stays in the Merge queue column while CI on that head is queued or re-running, instead of flipping to PR in progress and back as checks cycle; failing CI or an unapproved review still moves it out ([#16595](https://github.com/hivecommons/hive/issues/16595)).
6 changes: 6 additions & 0 deletions src/pkg/dashboard/stage_tracker_item_column_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ func TestStageTrackerPersonActsOnPRColumn(t *testing.T) {
{"decision with CI red, review approved", func(it *StageTrackerItem) {
it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("failing"), review("approved")
}, trackerColumnPR},
{"approved decision with CI running on the head keeps the gate", func(it *StageTrackerItem) {
it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("running"), review("approved")
}, trackerColumnMergeGate},
{"approved decision with CI queued on the head keeps the gate", func(it *StageTrackerItem) {
it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", ci("queued"), review("approved")
}, trackerColumnMergeGate},
{"bare 085 decision keeps the gate (#14821)", func(it *StageTrackerItem) {
it.Reason, it.UnauthorizedStep, it.CIActivity, it.ReviewActivity = "", "", nil, nil
}, trackerColumnMergeGate},
Expand Down
7 changes: 5 additions & 2 deletions src/pkg/dashboard/stage_tracker_vocabulary.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,13 @@ func stageTrackerMergeReadyEvidence(it *StageTrackerItem) bool {
}

// stageTrackerNotMergeReadyEvidence: a track on the current head says the
// PR is short of merge-ready (review not approved, CI not green).
// PR is short of merge-ready (review not approved, CI not green). CI that
// is queued or running on the same head is a re-run, not a regression, so
// it does not count.
func stageTrackerNotMergeReadyEvidence(it *StageTrackerItem) bool {
return (stageTrackerActivityOnHead(it, it.ReviewActivity) && it.ReviewActivity.State != "approved") ||
(stageTrackerActivityOnHead(it, it.CIActivity) && it.CIActivity.State != "passing")
(stageTrackerActivityOnHead(it, it.CIActivity) && it.CIActivity.State != "passing" &&
it.CIActivity.State != "queued" && it.CIActivity.State != "running")
}

// stageTrackerStagePhrase is the stage as a lowercase clause for the
Expand Down
Loading