From a9a705f4db95dfcfd21a0ad4fcb8f6a7a8809ff5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 9 Jun 2025 00:16:23 +0800 Subject: [PATCH] Fix missed merge commit sha and time when migrating from codecommit (#34645) Fix #34627 --- 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)