suzuki-shunsuke/tfnotify is compatible with mercari/tfnotify.
- Features
- Support
keep_duplicate_comments
to keep duplicate comments - Find the configuration file recursively
- Complement CI and GitHub Repository owner and name from environment variables
- Support to configure label colors
- Support template functions sprig
- Support to pass variables by -var option
- Don't recreate labels
- --version option and version command
- Support
- Fixes
- Others
- refactoring
- update urfave/cli to v2
tfnotify deletes duplicate comments at GitHub and GitLab.
But by setting keep_duplicate_comments: true
, tfnotify doesn't remove them.
notifier:
github:
token: $GITHUB_TOKEN
keep_duplicate_comments: true
# ...
tfnotify searches the configuration file from the current directory to the root directory recursively.
Supported platform
- CI
- CircleCI
- CodeBuild
- GitHub Actions
- Drone
- Notifier
- GitHub
The configuration of CI and GitHub Repository owner and name is complemented by CI builtin environment variables. suzuki-shunsuke/go-ci-env is used to complement them.
AS IS
ci: circleci
notifier:
github:
token: $GITHUB_TOKEN
repository:
owner: suzuki-shunsuke
name: tfcmt
We can omit ci
and repository
.
notifier:
github:
token: $GITHUB_TOKEN
98547135a6d37b11b641feb399eec17721fe0bc0 49ea5c3a8c01e53cac6d3b529bd5d9907c41e9d3
tfnotify supports to configure label colors. So we don't have to configure label colors manually. This feature is useful especially for Monorepo.
tfnotify supports to pass variables to template by -var <name>:<value>
options.
We can access the variable in the template by {{.Vars.<variable name>}}
.
If the label which tfnotify set is already set to a pull request, mercari/tfnotify removes the label from the pull request and re-adds the same label to the pull request. This is meaningless.
So suzuki-shunsuke/tfnotify doesn't recreate a label.
AS IS
$ tfnotify --version
tfnotify version unset
TO BE
$ tfnotify --version
tfnotify version 1.3.3
$ tfnotify version
tfnotify version 1.3.3
mercari/tfnotify doesn't post a comment when it failed to update GitHub Pull Request labels. For example, when the label length is too long, tfnotify failed to add the label and the comment isn't posted.
On the other hand, suzuki-shunsuke/tfnotify outputs the error log but the process continues even if it failed to update labels.