Closed drlau closed 4 years ago
Thank you for the contribution, @drlau. Awesome, but I left 1 comment.
@b4b4r07 I updated the README, please take a look!
Also, what is your opinion on attempting to remove the label? And if it does, should it always remove the label before running so that Github will create an "IssueLabeled" event for webhooks?
@drlau
Also, what is your opinion on attempting to remove the label?
Yeah, that's more friendly for users. This is because there are some cases which users add some changes. If so, it is not no-changes
but the label will be still on there. So it should be removed depending on users changes.
And if it does, should it always remove the label before running so that Github will create an "IssueLabeled" event for webhooks?
tfnotify doesn't have event fetch feature now. So if we get the changes depending on users changes, currently we need to check terraform plan
change each time and if it is not no-changes
change, we need to remove it..!
Hmm I think it's fine to always remove the label. If the PR gets updated but it's still no changes, it'll remove the label but re-add it. This generates another "IssueLabeled" event for webhooks but other than that there's no changes, which should be ok.
WHAT
This PR adds a feature to optionally add a label to a Github PR when the
terraform plan
output has no changes.WHY
With this, routine PRs that don't result in any changes to existing infrastructure can be easily triaged and become actionable with CI.