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

provider: Add hashibot deprecated_import_commenter for terraform-plugin-sdk migration #10372

Merged
merged 1 commit into from
Oct 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .hashibot.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ queued_behavior "release_commenter" "releases" {
EOF
}

behavior "deprecated_import_commenter" "hashicorp_terraform" {
import_regexp = "github.com/hashicorp/terraform/"
marker_label = "terraform-plugin-sdk-migration"

message = <<-EOF
Hello, and thank you for your contribution!

This project recently migrated to the [standalone Terraform Plugin SDK](https://www.terraform.io/docs/extend/plugin-sdk.html). While this will help speed up future feature requests and bug fixes with Terraform AWS Provider's interface with Terraform itself, it also has the unfortunate consequence of requiring some minor changes to pull requests created before the migration.

This pull request appears to include the Go import path `${var.import_path}`, which was from the older SDK. The newer SDK uses import paths beginning with `github.com/hashicorp/terraform-plugin-sdk/`.

To resolve this situation without losing any existing work, you may be able to Git rebase your branch against the current master branch (example below), then replacing any remaining old import paths with the newer ones.

```console
$ git fetch --all
$ git rebase origin/master
```

Another option is to create a new branch from the current master with the same code changes (replacing the import paths), submit a new pull request, and close this existing pull request.

We apologize for this inconvenience and appreciate your effort. Thank you for contributing and helping make the Terraform AWS Provider better for everyone.
EOF
}

# Catch the following in issues:
# *aws_XXX
# * aws_XXX
Expand Down