With this GitHub Action, you can duplicate an issue with /duplicate
issue comment. It creates a duplicated issue in the same repository with these copied properties:
- Title
- Body
- Assignees
- Labels
- Milestone
- GitHub projects (including their custom fields)
Note that the following properties are not copied from the original issue:
- Author
- Comments
- State (open or closed)
- Locked or not
For details, please read this blog post (in Japanese):
Add .github/workflows/issue-duplicator.yml
to your repository:
name: Issue Duplicator
on:
issue_comment:
types: [created, edited]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: mashabow/issue-duplicator-action@v1
with:
github-token: ${{ secrets.ISSUE_DUPLICATOR_PAT }}
github-token
(required): a personal access token withrepo
andproject
scopes.
For manual testing against your development branch, you can use this workflow in another repository:
name: Issue Duplicator (dev)
on:
issue_comment:
types: [created, edited]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: mashabow/issue-duplicator-action
ref: your-development-branch
- name: Install
run: npm ci
- name: Build
run: npm run build
- uses: ./
with:
github-token: ${{ secrets.ISSUE_DUPLICATOR_PAT }}
To publish a new version of this action, create a release on GitHub. Then the following stuff are automatically done with JasonEtco/build-and-tag-action.
- Build this action.
- Commit
action.yml
and the built file. - Push the commit with version tags.