From 36e099bf8b8be6e4e9e157e437b053d60c25f24a Mon Sep 17 00:00:00 2001 From: Thomas Stringer Date: Tue, 24 May 2022 19:43:23 -0400 Subject: [PATCH] Add debug statement for issue create This PR adds a debug logging statement to stdout prior to creating the issue. This will help troubleshoot issues, such as a GitHub API http/422 response status with invalid message. --- approval.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/approval.go b/approval.go index b0b385d..58bf139 100644 --- a/approval.go +++ b/approval.go @@ -57,6 +57,14 @@ Respond %s to continue workflow or %s to cancel.`, formatAcceptedWords(deniedWords), ) var err error + fmt.Printf( + "Creating issue in repo %s/%s with the following content:\nTitle: %s\nApprovers: %s\nBody:\n%s", + a.repoOwner, + a.repo, + issueTitle, + a.approvers, + issueBody, + ) a.approvalIssue, _, err = a.client.Issues.Create(ctx, a.repoOwner, a.repo, &github.IssueRequest{ Title: &issueTitle, Body: &issueBody,