From e1d8e122ced1368c60b538dfb09dc2e4616c39ac Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 11 Feb 2024 04:56:30 -0500 Subject: [PATCH] feat: add convertLabel --- api/convert.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/convert.go b/api/convert.go index 53c3df4..f2f5da0 100644 --- a/api/convert.go +++ b/api/convert.go @@ -178,6 +178,19 @@ func convertChanges(changes *structs.ChangesPayload) *github.EditChange { } } +func convertLabel(label *structs.Label) *github.Label { + if label == nil { + return &github.Label{} + } + return &github.Label{ + ID: int64Ptr(label.ID), + Name: stringPtr(label.Name), + Color: stringPtr(label.Color), + Description: stringPtr(label.Description), + URL: stringPtr(label.URL), + } +} + func translatePrAction(action structs.HookIssueAction) string { translatedAction := ""