Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

Conversation

@nathandines
Copy link

In the event of a non-PR workflow, the actions would still attempt to
post output to the non-existent PR URL. This change checks to see if jq
parsed a "null" URL, and doesn't run curl if that is the case.

@hashicorp-cla
Copy link

hashicorp-cla commented Sep 11, 2019

CLA assistant check
All committers have signed the CLA.

@sudomateo
Copy link
Contributor

Thanks for the work on this! There's a new environment variable named GITHUB_EVENT_NAME which will be populated like so when the event is a pull request.

GITHUB_EVENT_NAME=pull_request

Best to wrap the entire attempt to post a comment around that variable instead.

@nathandines
Copy link
Author

Ah, excellent. Much nicer to be able to use that. I've just made the requested adjustments.

In the event of a non-PR workflow, the actions would still attempt to
post output to the non-existent PR URL. This change will prevent
comments from being published when running the action against a PR.
@nathandines
Copy link
Author

@sudomateo any chance I could get this merged, please?

@sudomateo sudomateo merged commit 70e3a08 into hashicorp:master Oct 4, 2019
@sudomateo
Copy link
Contributor

Released in v0.4.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants