| @@ -41,7 +41,7 @@ func TestCommitMessageIssueActions(t *testing.T) { |
| 41 | 41 | mustGit(t, dir, env, "push", "-q", "origin", "main") |
| 42 | 42 | |
| 43 | 43 | out, _, _ := inst.ssh(t, aliceKey, "", "issue", "show", "alice/app", "1", "--json") |
| 44 | | if !strings.Contains(out, `"state":"closed"`) || !strings.Contains(out, "closed by commit") { |
| 44 | if !strings.Contains(out, `"state":"closed"`) || !strings.Contains(out, "closed by ") { |
| 45 | 45 | t.Fatalf("issue 1 not closed by commit: %s", out) |
| 46 | 46 | } |
| 47 | 47 | // The entry is a system message with a linked sha, not a user comment. |
| @@ -86,15 +86,15 @@ func TestCommitMessageIssueActions(t *testing.T) { |
| 86 | 86 | t.Fatalf("merge: %s", errOut) |
| 87 | 87 | } |
| 88 | 88 | out, _, _ = inst.ssh(t, aliceKey, "", "issue", "show", "alice/app", "3", "--json") |
| 89 | | if !strings.Contains(out, `"state":"closed"`) || !strings.Contains(out, "closed by commit") { |
| 89 | if !strings.Contains(out, `"state":"closed"`) || !strings.Contains(out, "closed by ") { |
| 90 | 90 | t.Fatalf("merge did not close issue 3: %s", out) |
| 91 | 91 | } |
| 92 | 92 | // This one was authored by an address nobody has verified, so it names |
| 93 | 93 | // git's author without inventing a profile link for them. |
| 94 | | if !strings.Contains(out, "by t:") || strings.Contains(out, "by [t]") { |
| 94 | if !strings.Contains(out, "closed by t in commit") || strings.Contains(out, "closed by [t]") { |
| 95 | 95 | t.Fatalf("unresolved author should stay plain text: %s", out) |
| 96 | 96 | } |
| 97 | | if strings.Count(out, "closed by commit") != 1 { |
| 97 | if strings.Count(out, "closed by ") != 1 { |
| 98 | 98 | t.Fatalf("duplicate close comments: %s", out) |
| 99 | 99 | } |
| 100 | 100 | |
| @@ -126,8 +126,9 @@ func TestCommitMessageIssueActions(t *testing.T) { |
| 126 | 126 | t.Fatalf("commit-file: %s", errOut) |
| 127 | 127 | } |
| 128 | 128 | out, _, _ = inst.ssh(t, aliceKey, "", "issue", "show", "alice/app", "2", "--json") |
| 129 | | if !strings.Contains(out, `"state":"closed"`) || !strings.Contains(out, "closed by commit") || |
| 130 | | !strings.Contains(out, "by [alice](/alice): Closes #2 from the editor") { |
| 129 | if !strings.Contains(out, `"state":"closed"`) || |
| 130 | !strings.Contains(out, "closed by [alice](/alice) in commit") || |
| 131 | !strings.Contains(out, ": Closes #2 from the editor") { |
| 131 | 132 | t.Fatalf("commit-file did not close issue 2: %s", out) |
| 132 | 133 | } |
| 133 | 134 | if strings.Count(out, "referenced in commit") != 1 { |