From 0093a15645650fe7de213dfe7ab89668d3d5afc2 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 11 Feb 2024 04:47:58 -0500 Subject: [PATCH] fix: add missing convertChanges --- api/convert.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/api/convert.go b/api/convert.go index c9077db..95a83eb 100644 --- a/api/convert.go +++ b/api/convert.go @@ -147,6 +147,25 @@ func convertPullRequest(request *structs.PullRequest) *github.PullRequest { return pr } +func convertChanges(changes *structs.ChangesPayload) *github.EditChange { + if changes == nil { + return nil + } + return &github.EditChange{ + Title: &github.EditTitle{ + From: stringPtr(changes.Title.From), + }, + Body: &github.EditBody{ + From: stringPtr(changes.Body.From), + }, + Base: &github.EditBase{ + Ref: &github.EditRef{ + From: stringPtr(changes.Ref.From), + }, + }, + } +} + func translatePrAction(action structs.HookIssueAction) string { translatedAction := ""