Add debug statement for issue create (#9)

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.
This commit is contained in:
Thomas Stringer 2022-05-24 19:46:25 -04:00 committed by GitHub
parent c24bf80784
commit 1fd10e9380
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,