Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency suzuki-shunsuke/tfcmt to v3.4.2 #162

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 12, 2022

Mend Renovate

This PR contains the following updates:

Package Update Change
suzuki-shunsuke/tfcmt minor v3.0.0 -> v3.4.2

Release Notes

suzuki-shunsuke/tfcmt

v3.4.2

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.4.1...v3.4.2

Bug Fixes

#​451 Add pull request labels properly even if a pull request number isn't passed as an argument or an environment variable

tfcmt plan gets an associated pull request from a commit hash if a pull request number isn't passed as an argument or an environment variable,
and adds pull request labels according to the terraform plan result.
This update has fixed a bug that a pull request label isn't added properly.

If a pull request number is passed as an argument or an environment variable, this update isn't related.

v3.4.1

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.4.0...v3.4.1

Bug Fixes

#​436 Fix links to GitHub Actions jobs in GitHub Enterprise

Others

#​437 Update Go from v1.18.5 to v1.19.1

Contributors

Thank you, Contributors!

@​Warashi #​436
@​hirosassa #​412

v3.4.0

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.3.0...v3.4.0

Features

#​387 #​390 Create comments to pull request instead of commit

GitHub no longer shows commit comments in the pull request timeline 1.

From v3.4.0, tfcmt gets an associated pull request from commit hash and creates a comment to not commit but associated pull request.
If there is no associated pull request, tfcmt sends a comment to commit.

Example
$ tfcmt -v
tfcmt version 3.4.0-1 (48333cac413f4500b2631eebb9703a9edc5e0a9d)

$ terraform -v
Terraform v1.2.6
on darwin_arm64
+ provider registry.terraform.io/hashicorp/null v3.1.1
export GITHUB_TOKEN=xxx
export CIRCLECI=true
export CIRCLE_PROJECT_USERNAME=suzuki-shunsuke
export CIRCLE_PROJECT_REPONAME=test-github-action
export CIRCLE_SHA1=092cda867dea7b7a229bc2dcff64aaba8fb26f8d

https://github.com/suzuki-shunsuke/test-github-action/pull/104/commits/092cda867dea7b7a229bc2dcff64aaba8fb26f8d

$ tfcmt plan -- terraform plan
null_resource.foo: Refreshing state... [id=8966706083595703589]
null_resource.bar: Refreshing state... [id=7780302426904623778]

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

👍 tfcmt v3.4.0 creates a pull request comment.

https://github.com/suzuki-shunsuke/test-github-action/pull/104#issuecomment-1207331774

image

On the other hand, tfcmt v3.3.0 creates a commit comment.

suzuki-shunsuke/test-github-action@092cda8#commitcomment-80523712

image

Others

#​392 Update Go from v1.18.4 to v1.18.5

Contributors

Thank you, Contributors!

@​micnncim #​387 #​390

v3.3.0

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.5...v3.3.0

Features

#​376 Support Google Cloud Build

Please set the environment variable GOOGLE_CLOUD_BUILD.

GOOGLE_CLOUD_BUILD=true

And please set the following environment variables using substitutions.

  • COMMIT_SHA
  • BUILD_ID
  • PROJECT_ID
  • _PR_NUMBER
  • _REGION

Please specify the repository owner and name in tfcmt.yaml.

e.g.

tfcmt.yaml

repo_owner: suzuki-shunsuke
repo_name: tfcmt

v3.2.5

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.4...v3.2.5

Others

#​329 Windows Support 🎉

v3.2.4

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.3...v3.2.4

Bug Fixes

#​317 Set os.Stdin when terraform command is run

This change allows you to run terraform apply without -auto-approve option.

AS IS

tfcmt apply -- terraform apply -no-color
null_resource.foo: Refreshing state... [id=8966706083595703589]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

### null_resource.bar will be created
  + resource "null_resource" "bar" {
      + id = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: 
Error: error asking for approval: EOF
Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: 
Error: error asking for approval: EOF

TO BE

tfcmt apply -- terraform apply -no-color
null_resource.foo: Refreshing state... [id=8966706083595703589]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

### null_resource.bar will be created
  + resource "null_resource" "bar" {
      + id = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

null_resource.bar: Creating...
null_resource.bar: Creation complete after 0s [id=7780302426904623778]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

v3.2.3

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.2...v3.2.3

Bug Fixes

#​300 #​304 Fix the support of GitHub Enterprise. Support setting GitHub API v4 endpoint

https://suzuki-shunsuke.github.io/tfcmt/github-enterprise

To use tfcmt for GitHub Enterprise, please set the following fields in tfcmt.yaml.

e.g. tfcmt.yaml

ghe_base_url: https://example.com
ghe_graphql_endpoint: https://example.com/graphql

⚠️ I (@​suzuki-shunsuke) don't use GitHub Enterprise, so I can't confirm if it works well for GitHub Enterprise.

v3.2.2

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.1...v3.2.2

Features

#​288 (apply): Get the associated pull request with commit

The behavior of getting notification destination (pull request or commit) in tfcmt apply is improved.

AS IS
  1. Get pull request number from commit message
  2. Get SHA from previous commit
TO BE
  1. Get pull request number from associated pull request with GitHub API. https://docs.github.com/en/rest/commits/commits#list-pull-requests-associated-with-a-commit
  2. Get SHA from current commit

By getting associated pull request via GitHub API, this works even if the pull request was merged by squash merge.

Others

#​279 Update Go to v1.18.1
#​280 Update go-github to v43
#​277 #​278 #​284 #​287 Refactoring

v3.2.1

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.2.0...v3.2.1

Bug Fixes

#​253 Fix the bug that comments of tfcmt apply patch comments of tfcmt plan.

Follow up #​245

Affected versions: v3.2.0

v3.2.0

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.1.0...v3.2.0

⚠️ This release includes a bug #​253 . Please use v3.2.1 or later.

Features

#​199 #​245 #​248 #​249 Support patching comments of tfcmt plan

The option -patch has been added to tfcmt plan command.

tfcmt plan -patch -- terraform plan -no-color

And the configuration option plan_patch has also been added.

plan_patch: true

The command line option -patch takes precedence over configuration file option plan_patch.

If you want to disable patching although plan_patch is true, please set -patch=false.

$ tfcmt plan -patch=false -- terraform plan -no-color
Motivation

By patching the comment instead of creating a new comment, you can keep the pull request comments clean.

Trouble shooting

If the comment isn't patched expectedly, please set -log-level=debug.

$ tfcmt -log-level=debug plan -patch -- terraform plan -no-color
⚠️ Note to use tfcmt plan's patch option with github-comment hide

If you hide comments by github-comment hide and enable tfcmt plan's patch option,
you should be careful not to hide tfcmt plan's comments.

There are some ways to fix the problem.

  1. Stop using github-comment hide
  2. Fix github-comment hide's condition and exclude tfcmt's comments from the target ofgithub-comment hide
  3. Run github-comment hide after tfcmt

v3.1.1

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.1.0...v3.1.1

Bug Fixes

#​241 Fix not removing stale labels if there are too many labels in the pull request

Thanks to kyontan.

tfcmt sets a pull request label.
When the result of terraform plan is changed, tfcmt removes an old label and sets a new label.
But when the pull request has over 30 labels, tfcmt might not remove the old label.
This change fixes the bug.

Others

#​237 #​238 #​239 Move the document to GitHub Pages

https://suzuki-shunsuke.github.io/tfcmt/

v3.1.0

Compare Source

Pull Requests | Issues | suzuki-shunsuke/tfcmt@v3.0.1...v3.1.0

Feature

#​227 #​231 Omit too long text in the template function wrapCode automatically

tfcmt fails to post a comment if the comment is too long because the maximum length of GitHub Comment is 65536.

422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]

To prevent the error, the template function wrapCode checks the length of the text and if the length is over 60000, the text is omitted as the following.

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:
### null_resource.foo will be created
  + resource "null_resource" "foo" {
      + id = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.
null_resource.foo: Creating...
null_resource.foo: Creation complete after 0s [id=8966706083595703589]
### ...
### ... The maximum length of GitHub Comment is 65536, so the content is omitted by tfcmt.
### ...

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Others

#​233 Update Go from v1.17.5 to v1.18.0

v3.0.1

Compare Source

Pull Request | suzuki-shunsuke/tfcmt@v3.0.0...v3.0.1

Bug Fixes

#​179 Fix the title when it fails to parse the result of terraform apply

AS IS

#### Apply Result{{if .Vars.target}} ({{.Vars.target}}){{end}}

TO BE

{{template "apply_title" .}}

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

Footnotes

  1. https://github.blog/changelog/2022-08-04-commit-comments-no-longer-appear-in-the-pull-request-timeline/

@renovate renovate bot force-pushed the renovate/suzuki-shunsuke-tfcmt-3.x branch from 73aced4 to af379f6 Compare September 9, 2022 07:39
@renovate renovate bot changed the title Update dependency suzuki-shunsuke/tfcmt to v3.4.0 Update dependency suzuki-shunsuke/tfcmt to v3.4.1 Sep 9, 2022
@renovate renovate bot changed the title Update dependency suzuki-shunsuke/tfcmt to v3.4.1 Update dependency suzuki-shunsuke/tfcmt to v3.4.2 Sep 20, 2022
@renovate renovate bot force-pushed the renovate/suzuki-shunsuke-tfcmt-3.x branch from af379f6 to f55ec12 Compare September 20, 2022 15:37
@renovate renovate bot deleted the renovate/suzuki-shunsuke-tfcmt-3.x branch September 28, 2022 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant