-
Notifications
You must be signed in to change notification settings - Fork 92
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
Enable tfnotify executed by GitHub Actions to add pull request comments #94
base: master
Are you sure you want to change the base?
Enable tfnotify executed by GitHub Actions to add pull request comments #94
Conversation
0b12943
to
d0c5d88
Compare
@drlau @micnncim @KeisukeYamashita @tyuhara Hi! What's the status of this PR? |
@drlau @micnncim @KeisukeYamashita Hi, can you review this PR? Do you want me to do anything about this PR? |
Sorry for the late reply (the author left the company and there are no clear maintainer for this project...)🙏 |
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.
As far as I checked, I guess it can be handled by this PR 👉 #77 I have merged that PR.
That PR is much more simple as it only checks one env var GITHUB_REF
and does not read any files from runtime. It will make better portability as it's runnable anywhere if it has GITHUB_REF
on the other hand, this PR's implementation needs a file (JSON) for the event information.
Still, this PR implementation also supports triggers such as GitHub Issues, but as the title of this PR suggests, it often targets Pull Requests, and we believe such cases are limited.
Is it possible to try the latest tfnotify, please?
Please let us know if you have any concerns or questions.
WHAT
This PR allows tfnotify executed by GitHub Actions on pull requests to add pull request comments instead of commit comments.
For GitHub Actions, the content of the event that triggered the action is stored as a JSON file at
GITHUB_EVENT_PATH
.For the
pull_request
events, we can read the number of the pull request from the file.For more details about
GITHUB_EVENT_PATH
and the content of the event payload, please refer to these guides.As an example of implementation, an official helper for GitHub Actions reads a pull request number or an issue number from the file.
WHY
This change allows users of tfnotify and GitHub Actons to comment results of plan or apply command to pull requests.