Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Latest commit

 

History

History
130 lines (92 loc) · 4.03 KB

COMPARED_WITH_TFNOTIFY.md

File metadata and controls

130 lines (92 loc) · 4.03 KB

Compared with mercari/tfnotify

suzuki-shunsuke/tfnotify is compatible with mercari/tfnotify.

Support keep_duplicate_comments to keep duplicate comments

#52

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
# ...

Find the configuration file recursively

#19

tfnotify searches the configuration file from the current directory to the root directory recursively.

Complement CI and GitHub Repository owner and name from environment variables

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

Support to configure label colors

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.

Support to pass variables by -var option

#29

tfnotify supports to pass variables to template by -var <name>:<value> options. We can access the variable in the template by {{.Vars.<variable name>}}.

Don't recreate labels

#32

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.

--version option and version command

#4 #44

AS IS

$ tfnotify --version
tfnotify version unset

TO BE

$ tfnotify --version
tfnotify version 1.3.3

$ tfnotify version
tfnotify version 1.3.3

Fix: Post a comment even if it failed to update GitHub Pull Request labels

#56

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.