From ffd10d37a6771a16ffbc1222bd7c307970c75a13 Mon Sep 17 00:00:00 2001 From: Akashdeep Dhar Date: Fri, 8 May 2026 04:43:33 +0200 Subject: [PATCH] fix: ensure moving all commits in a pull request for pagure migration (#12433) While the changes were conveyed in the pull request in its entirety, the commit history of a pull request having more than one commit was bugged and the log would have shown just the presence of the most recent commit event, having the entire changes contained in a pull request. This is a problem that was mostly noticed in the closed pull request, so it is not as bad as it looks. Even then, if we are migrating closed pull requests, we should do it the right way. We do not want to retain these pull requests for archival purposes if they are not accurate. Signed-off-by: Akashdeep Dhar Fixes https://forge.fedoraproject.org/forge/forge/issues/556 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12433 Reviewed-by: Gusted --- services/migrations/pagure.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/migrations/pagure.go b/services/migrations/pagure.go index 6573871e0d..0bcbfb6d3e 100644 --- a/services/migrations/pagure.go +++ b/services/migrations/pagure.go @@ -153,6 +153,7 @@ type PagurePRResponse struct { Requests []struct { Branch string `json:"branch"` BranchFrom string `json:"branch_from"` + CommitStart string `json:"commit_start"` CommitStop string `json:"commit_stop"` DateCreated string `json:"date_created"` FullURL string `json:"full_url"` @@ -560,7 +561,7 @@ func (d *PagureDownloader) GetPullRequests(page, perPage int) ([]*base.PullReque } mergedtime := processDate(&pr.ClosedAt) - err = d.callAPI("/api/0/"+d.repoName+"/c/"+pr.CommitStop+"/info", nil, &commit) + err = d.callAPI("/api/0/"+d.repoName+"/c/"+pr.CommitStart+"/info", nil, &commit) if err != nil { return nil, false, err }