Add Co-authored-by trailers to Merge's squash commit

This commit is contained in:
Ian Gulliver
2026-10-15 07:15:51 -07:00
parent c778741a4a
commit 60a1d221f4
15 changed files with 478 additions and 123 deletions
+11 -1
View File
@@ -291,7 +291,17 @@ func TestMergeTask(t *testing.T) {
task := api.Task{}
h.do("POST", "/api/projects/"+p.Id+"/tasks", api.TaskCreate{Title: "Add notes"}, &task)
code := h.do("POST", "/api/tasks/"+task.Id+"/merge", nil, nil)
coAuthors := []api.Participant{}
code := h.do("GET", "/api/tasks/"+task.Id+"/co-authors", nil, &coAuthors)
if code != http.StatusOK || len(coAuthors) != 0 {
t.Fatalf("co-authors: %d %+v", code, coAuthors)
}
code = h.do("GET", "/api/tasks/nope/co-authors", nil, nil)
if code != http.StatusNotFound {
t.Fatalf("want 404 for co-authors of an unknown task, got %d", code)
}
code = h.do("POST", "/api/tasks/"+task.Id+"/merge", nil, nil)
if code != http.StatusBadRequest {
t.Fatalf("want 400 merging without a git identity, got %d", code)
}