mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
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 <akashdeep.dhar@gmail.com> Fixes https://forge.fedoraproject.org/forge/forge/issues/556 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12433 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
parent
115f8594cf
commit
ffd10d37a6
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue