Replace HashiBot with GitHub action for remote-plugin issue migration (#11125)

This changes removes the use of HashiBot for migrating issues labels
with remote-plugin/* to their respective plugin repositories. The GitHub
action has feature parity with HashiBot so the migration should work as
it did before.

The GitHub action closes the original issues and creates a new issue on
the remote plugin repository with the original contents of the issue to
preserve history. We chose not to go with GitHub's issue transfer option
because it completely moves the issue to the target repo, meaning there
is not history that it was ever created on the original repository.

In the future, we will look to add an action for closing remote-plugin
issues that we no longer have access to.

Closes: #11043
pull/11127/head
Wilken Rivera 5 years ago committed by GitHub
parent 7cd0167c84
commit d9d3ed6a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,27 @@
name: Migrate Remote Plugin Issues
on:
issues:
types: [labeled]
permissions:
issues: write
jobs:
PluginSplit:
if: startsWith(github.event.label.name, 'remote-plugin/')
runs-on: ubuntu-latest
steps:
- uses: bflad/action-migrate-issue@main
with:
source-issue-comment: |
This issue has been migrated to {target-issue-url} due to the [Packer Plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737).
Please follow the new issue for updates.
source-issue-skip-label-names: |
core
new-plugin-contribution
website
target-repository-name-prefix: 'packer-plugin-'
target-repository-name-prefix-label-prefix: 'remote-plugin/'
target-repository-github-token: ${{ secrets.PLUGIN_REPO_GITHUB_TOKEN }}

@ -1,17 +0,0 @@
poll "label_issue_migrater" "remote_plugin_migrater" {
schedule = "0 20 * * * *"
new_owner = "hashicorp"
repo_prefix = "packer-plugin-"
label_prefix = "remote-plugin/"
excluded_label_prefixes = ["communicator/"]
excluded_labels = ["build", "core", "new-plugin-contribution", "website"]
issue_header = <<-EOF
_This issue was originally opened by @${var.user} as ${var.repository}#${var.issue_number}. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
<hr>
EOF
migrated_comment = "This issue has been automatically migrated to ${var.repository}#${var.issue_number} because it looks like an issue with that plugin. If you believe this is _not_ an issue with the plugin, please reply to ${var.repository}#${var.issue_number}."
}
Loading…
Cancel
Save