1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 01:45:22 +02:00

feat(ui): add links to milestones and projects in issue comments (#7992)

add links to the comments that appear in issue when changing milestones and projects

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7992
Reviewed-by: Beowulf <beowulf@beocode.eu>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
Robert Wolff 2025-06-23 23:31:51 +02:00 committed by Beowulf
parent 049cda526b
commit 0b24915271
4 changed files with 60 additions and 29 deletions

View file

@ -88,22 +88,19 @@ func TestIssueCommentChangeMilestone(t *testing.T) {
testIssueCommentChangeEvent(t, htmlDoc, "2000",
"octicon-milestone", "User One", "/user1",
[]string{"user1 added this to the milestone1 milestone"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/milestone/1"})
[]string{"/user1", "/user2/repo1/milestone/1"})
// Modify milestone
testIssueCommentChangeEvent(t, htmlDoc, "2001",
"octicon-milestone", "User One", "/user1",
[]string{"user1 modified the milestone from milestone1 to milestone2"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/milestone/1", "/user2/repo1/milestone/2"})
[]string{"/user1", "/user2/repo1/milestone/1", "/user2/repo1/milestone/2"})
// Remove milestone
testIssueCommentChangeEvent(t, htmlDoc, "2002",
"octicon-milestone", "User One", "/user1",
[]string{"user1 removed this from the milestone2 milestone"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/milestone/2"})
[]string{"/user1", "/user2/repo1/milestone/2"})
// Deleted milestone
testIssueCommentChangeEvent(t, htmlDoc, "2003",
@ -123,22 +120,19 @@ func TestIssueCommentChangeProject(t *testing.T) {
testIssueCommentChangeEvent(t, htmlDoc, "2010",
"octicon-project", "User One", "/user1",
[]string{"user1 added this to the First project project"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/projects/1"})
[]string{"/user1", "/user2/repo1/projects/1"})
// Modify project
testIssueCommentChangeEvent(t, htmlDoc, "2011",
"octicon-project", "User One", "/user1",
[]string{"user1 modified the project from First project to second project"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/projects/1", "/user2/repo1/projects/2"})
[]string{"/user1", "/user2/repo1/projects/1", "/user2/repo1/projects/2"})
// Remove project
testIssueCommentChangeEvent(t, htmlDoc, "2012",
"octicon-project", "User One", "/user1",
[]string{"user1 removed this from the second project project"},
[]string{"/user1"})
// []string{"/user1", "/user2/repo1/projects/2"})
[]string{"/user1", "/user2/repo1/projects/2"})
// Deleted project
testIssueCommentChangeEvent(t, htmlDoc, "2013",