diff --git a/pkg/github/gists.go b/pkg/github/gists.go index 3f1645f3e..53e85d5ba 100644 --- a/pkg/github/gists.go +++ b/pkg/github/gists.go @@ -166,6 +166,7 @@ func CreateGist(getClient GetClientFn, t translations.TranslationHelperFunc) (to } minimalResponse := MinimalResponse{ + ID: createdGist.GetID(), URL: createdGist.GetHTMLURL(), } @@ -254,6 +255,7 @@ func UpdateGist(getClient GetClientFn, t translations.TranslationHelperFunc) (to } minimalResponse := MinimalResponse{ + ID: updatedGist.GetID(), URL: updatedGist.GetHTMLURL(), } diff --git a/pkg/github/issues.go b/pkg/github/issues.go index 01ce7b42e..b5e75b0e6 100644 --- a/pkg/github/issues.go +++ b/pkg/github/issues.go @@ -874,6 +874,7 @@ func CreateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", issue.GetID()), URL: issue.GetHTMLURL(), } @@ -1249,6 +1250,7 @@ func UpdateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", updatedIssue.GetID()), URL: updatedIssue.GetHTMLURL(), } diff --git a/pkg/github/minimal_types.go b/pkg/github/minimal_types.go index 0c3c220aa..099b87481 100644 --- a/pkg/github/minimal_types.go +++ b/pkg/github/minimal_types.go @@ -110,6 +110,7 @@ type MinimalBranch struct { // Success is implicit in the HTTP response status, and all other information // can be derived from the URL or fetched separately if needed. type MinimalResponse struct { + ID string `json:"id"` URL string `json:"url"` } diff --git a/pkg/github/pullrequests.go b/pkg/github/pullrequests.go index b2e4e9290..8289a4e48 100644 --- a/pkg/github/pullrequests.go +++ b/pkg/github/pullrequests.go @@ -195,6 +195,7 @@ func CreatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", pr.GetID()), URL: pr.GetHTMLURL(), } @@ -471,6 +472,7 @@ func UpdatePullRequest(getClient GetClientFn, getGQLClient GetGQLClientFn, t tra // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", finalPR.GetID()), URL: finalPR.GetHTMLURL(), } diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index cef227ba5..cc68375b4 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -468,6 +468,7 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", createdRepo.GetID()), URL: createdRepo.GetHTMLURL(), } @@ -744,6 +745,7 @@ func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc) // Return minimal response with just essential information minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", forkedRepo.GetID()), URL: forkedRepo.GetHTMLURL(), }