mercari / tfnotify

A CLI command to parse Terraform execution result and notify it to GitHub
MIT License
619 stars 91 forks source link

Github apply notification not goes to the current commit #96

Open vmatyus opened 3 years ago

vmatyus commented 3 years ago

WHAT

My project uses tfnotify with Github and Travis as CI. A CI execution for a specific commit also produces a plan and an apply results. The plan result goes to the actual commit, that the CI was executed on, while the apply result goes to the previous commit. It would be good if an execution result would go to the same commit and this commit would be the actual commit.

WHY

To review back the CI execution results, it is easier to compare the plan and apply results, if it goes to the current commit.

I tried to create an image that depicts the current operation:

Screenshot 2021-07-26 at 16 06 40

fnaoto commented 2 years ago

I hope this could help you ;)

tfnotify get commit number from environment variables of travis ci.

If pull request is opened, using TRAVIS_PULL_REQUEST_SHA . And also there is no pull request, using TRAVIS_COMMIT

It means, comment on commit depends on Pull Request Status.

Code here