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...)🙏 |
KeisukeYamashita
left a comment
There was a problem hiding this comment.
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_requestevents, we can read the number of the pull request from the file.For more details about
GITHUB_EVENT_PATHand 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.