From 468d1919b51aa6c099cb590c9721c9e0e0509ca8 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 9 Jun 2025 12:21:27 +0800 Subject: [PATCH] Fix missed merge commit sha and time when migrating from codecommit (#34645) (#34650) Backport #34645 by @lunny Fix #34627 Co-authored-by: Lunny Xiao --- services/migrations/codecommit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/migrations/codecommit.go b/services/migrations/codecommit.go index 8b79edc4e5..9317156ab0 100644 --- a/services/migrations/codecommit.go +++ b/services/migrations/codecommit.go @@ -210,6 +210,10 @@ func (c *CodeCommitDownloader) GetPullRequests(ctx context.Context, page, perPag pr.State = "closed" pr.Closed = orig.LastActivityDate } + if pr.Merged { + pr.MergeCommitSHA = *target.MergeMetadata.MergeCommitId + pr.MergedTime = orig.LastActivityDate + } _ = CheckAndEnsureSafePR(pr, c.baseURL, c) prs = append(prs, pr)