Fix various problems (#37547)

1. Fix ugly commit form "warning" message
2. Use JSONError for "Update PR Branch" response 
3. Remove useless "timeline" class
4. Make timeline review default to "comment" to avoid icon missing
5. Align PR's "command line instructions" UI
6. Simply "Update PR branch" button logic

And then some TODOs are fixed.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
wxiaoguang
2026-05-05 23:54:07 +08:00
committed by GitHub
parent 5e8004a515
commit 6ba907d89c
16 changed files with 73 additions and 126 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ test('toggle issue reactions', async ({page, request}) => {
]);
await page.goto(`/${owner}/${repoName}/issues/1`);
const issueComment = page.locator('.timeline-item.comment.first');
const issueComment = page.locator('.timeline-item.comment.issue-content-comment');
const reactionPicker = issueComment.locator('.select-reaction');
await reactionPicker.click();
+1 -1
View File
@@ -1801,7 +1801,7 @@ jobs:
testEditFile(t, session, "user2", repoName, repo.DefaultBranch, "dir1/dir1.txt", "11")
// update by rebase
req := NewRequest(t, "POST", fmt.Sprintf("/%s/%s/pulls/%d/update?style=rebase", "user2", repoName, apiPull.Index))
session.MakeRequest(t, req, http.StatusSeeOther)
session.MakeRequest(t, req, http.StatusOK)
runner.fetchNoTask(t)
})
}
+2 -2
View File
@@ -692,9 +692,9 @@ func TestIssueReferenceURL(t *testing.T) {
htmlDoc := NewHTMLParser(t, resp.Body)
// the "reference" uses relative URLs, then JS code will convert them to absolute URLs for current origin, in case users are using multiple domains
ref, _ := htmlDoc.Find(`.timeline-item.comment.first .reference-issue`).Attr("data-reference")
ref, _ := htmlDoc.Find(`.timeline-item.comment.issue-content-comment .reference-issue`).Attr("data-reference")
assert.Equal(t, "/user2/repo1/issues/1#issue-1", ref)
ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.first) .reference-issue`).Attr("data-reference")
ref, _ = htmlDoc.Find(`.timeline-item.comment:not(.issue-content-comment) .reference-issue`).Attr("data-reference")
assert.Equal(t, "/user2/repo1/issues/1#issuecomment-2", ref)
}