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-wording-followup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The workflow-fence approval comment on a repo where hive auto-merge does not run now says so in words that are true for every reason (switched off, below L6, an invalid merge strategy), not only "auto-merge is off". The 090 manual-merge closing line builds its Prow and no-Prow variants from one sentence so they cannot drift (follow-up to #18843's review).
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func workflowApprovalComment(headSHA string, approval workflowApproval, verdictS
marker := workflowApprovalMarker(headSHA) + " by=" + strings.ToLower(approver)
merges, offNote := "the hive merges this PR itself", ""
if autoMergeOff {
merges, offNote = "a person merges it", " (auto-merge is off for this repository, so the hive never merges it)"
merges, offNote = "a person merges it", " (hive auto-merge does not run for this repository, so the hive never merges it)"
}
gates := merges + " once the usual gates (CI, soak, holds, review verdict) are clear" + offNote + "."
switch verdictState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestWorkflowApprovalCommentAutoMergeOff(t *testing.T) {
for _, approval := range []workflowApproval{{Login: "Danathar"}, {Login: "Danathar", CarriedFrom: "1234567890ab"}} {
off := workflowApprovalComment("9fd007702e97", approval, state, true)
if strings.Contains(off, "the hive merges this PR itself") || !strings.Contains(off, "a person merges it once the usual gates") ||
!strings.Contains(off, "auto-merge is off for this repository, so the hive never merges it") {
!strings.Contains(off, "hive auto-merge does not run for this repository, so the hive never merges it") {
t.Fatalf("state %d, carried %q: auto-merge-off comment:\n%s", state, approval.CarriedFrom, off)
}
on := workflowApprovalComment("9fd007702e97", approval, state, false)
Expand Down
8 changes: 4 additions & 4 deletions src/pkg/stagelabels/human.go
Original file line number Diff line number Diff line change
Expand Up @@ -952,11 +952,11 @@ func ReadyComment(r Route, blockedBy string) string {
if len(r.Gates) > 0 {
held()
}
if r.NoProw {
b.WriteString("\n\n<sub>The hive never merges this lane's changes itself: click **Merge** to land it.</sub>")
} else {
b.WriteString("\n\n<sub>The hive never merges this lane's changes itself: click **Merge** (or `/lgtm` + `/approve` for tide) to land it.</sub>")
merge := "click **Merge**"
if !r.NoProw {
merge += " (or `/lgtm` + `/approve` for tide)"
}
b.WriteString("\n\n<sub>The hive never merges this lane's changes itself: " + merge + " to land it.</sub>")
return b.String()
}
if len(r.Gates) > 0 {
Expand Down
Loading