Import comments on merge requests in Gitea Import
What does this MR do and why?
Fix a missing feature in Gitea Import as Merge Requests comments were lost during the process. It appears that the import was de-activated in case of gitea import as the expected github endpoint does not answer on gitea. But this can be easily fixed as the Issues Comments endpoint from gitea also answer for Merge Requests Comments
Closes #450973 (closed)
Screenshots or screen recordings
Test on gitea api :
curl -X 'GET' \
'https://gitea.com/api/v1/repos/gitea/act_runner/issues/272/comments' \
-H 'accept: application/json'
allow to get comments from PR https://gitea.com/gitea/act_runner/pulls/272
[
{
"id": 743543,
"html_url": "https://gitea.com/gitea/act_runner/pulls/272#issuecomment-743543",
"pull_request_url": "https://gitea.com/gitea/act_runner/pulls/272",
"issue_url": "",
"user": {
"id": 1,
"login": "lunny",
"login_name": "",
"full_name": "Lunny Xiao",
"email": "lunny@noreply.gitea.com",
"avatar_url": "https://seccdn.libravatar.org/avatar/271fc56bcea89c6f69ab0024b59b3f81?d=identicon",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2018-11-27T17:33:38Z",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "Shanghai, China",
"website": "https://gitea.com/lunny",
"description": "",
"visibility": "public",
"followers_count": 72,
"following_count": 84,
"starred_repos_count": 310,
"username": "lunny"
},
"original_author": "",
"original_author_id": 0,
"body": "Could you give more context?",
"assets": [],
"created_at": "2023-07-04T04:08:50Z",
"updated_at": "2023-07-04T04:08:50Z"
},
{
"id": 743544,
"html_url": "https://gitea.com/gitea/act_runner/pulls/272#issuecomment-743544",
"pull_request_url": "https://gitea.com/gitea/act_runner/pulls/272",
"issue_url": "",
"user": {
"id": 41574,
"login": "sorenisanerd",
"login_name": "",
"full_name": "",
"email": "sorenisanerd@noreply.gitea.com",
"avatar_url": "https://seccdn.libravatar.org/avatar/19b63d9a5fa3a4810eb4327e58b9d28f?d=identicon",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2023-04-22T19:40:08Z",
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "sorenisanerd"
},
"original_author": "",
"original_author_id": 0,
"body": "Yes, of course. Sorry.\r\n\r\nhttps://github.com/go-gitea/gitea/pull/25664",
"assets": [],
"created_at": "2023-07-04T04:20:23Z",
"updated_at": "2023-07-04T04:20:23Z"
}
]
How to set up and validate locally
Import a gitea project with at least one PR with comments
Edited by Ashraf Khamis