-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding check for no issue number #8792
base: main
Are you sure you want to change the base?
Conversation
Terraform Plan Summarysingle-sign-on |
Terraform Plan Summarymodernisation-platform-account |
Terraform Plan Summarycore-vpc-preproduction |
Terraform Plan Summarycore-vpc-production |
Terraform Plan Summarycore-vpc-development |
|
Terraform Plan Summarycore-security-production |
Terraform Plan Summarypagerduty |
Terraform Plan Summarycore-logging-production |
Terraform Plan Summarycore-shared-services-production |
Terraform Plan Summarygithub |
Terraform Plan Summarycore-network-services-production |
Terraform Plan Summarygithub |
@@ -126,6 +126,10 @@ jobs: | |||
const identifier = workflowId ? `_${workflowId}_\n` : `_${{ inputs.workflow_id }}_\n`; | |||
const summary = `\`${{ steps.show.outputs.summary }}\``; | |||
const issue_number = context.payload.pull_request.number; | |||
if (!issue_number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this can work. You are comparing null to boolean and I cannot see the evidence of it working, as this run has a PR number.
Terraform Plan Summarysingle-sign-on |
Terraform Plan Summarymodernisation-platform-account |
Terraform Plan Summarypagerduty |
Terraform Plan Summarycore-vpc-production |
Terraform Plan Summarycore-vpc-preproduction |
Terraform Plan Summarycore-vpc-development |
Terraform Plan Summarycore-security-production |
|
Terraform Plan Summarycore-logging-production |
Terraform Plan Summarycore-network-services-production |
Terraform Plan Summarycore-shared-services-production |
Terraform Plan Summarygithub |
A reference to the issue / Description of it
we have found an issue with the new post comment feature that breaks the plan when the reusable workflow is called outside of a PR. Because there is no issue number we are seeing errors like the following
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'number')
How does this PR fix the problem?
This PR adds in a check test to see if issue_number is blank if it is it just puts a comment in the console and skips to the end
How has this been tested?
Please describe the tests that you ran and provide instructions to reproduce.
{Please write here}
Deployment Plan / Instructions
Will this deployment impact the platform and / or services on it?
{Please write here}
Checklist (check
x
in[ ]
of list items)Additional comments (if any)
{Please write here}