packer/.github/workflows/issue-migrator.yml
Wilken Rivera d9d3ed6a9e
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
2021-06-30 14:49:14 -04:00

27 lines
867 B
YAML

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 }}