https://github.com/mashabow/issue-duplicator-action
GitHub Action to duplicate an issue with assignees, labels, milestone, and GitHub project custom fields
https://github.com/mashabow/issue-duplicator-action
github-actions github-projects
Last synced: 18 days ago
JSON representation
GitHub Action to duplicate an issue with assignees, labels, milestone, and GitHub project custom fields
- Host: GitHub
- URL: https://github.com/mashabow/issue-duplicator-action
- Owner: mashabow
- License: mit
- Created: 2022-11-23T12:13:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T02:05:25.000Z (over 3 years ago)
- Last Synced: 2025-06-28T07:40:48.909Z (about 1 year ago)
- Topics: github-actions, github-projects
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/issue-duplicator
- Size: 1.39 MB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Issue Duplicator
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):
- [GitHub の issue をまるっと複製する GitHub Action「Issue Duplicator」を自作した - Feedforce Developer Blog](https://developer.feedforce.jp/entry/2022/12/04/235514)
## Usage
Add `.github/workflows/issue-duplicator.yml` to your repository:
```yml
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 }}
```
### Input
- `github-token` **(required)**: a [personal access
token](https://github.com/settings/tokens/new) with `repo` and `project` scopes.
## Development
### Manual testing
For manual testing against your development branch, you can use this workflow in another repository:
```yml
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 }}
```
### Publish
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](https://github.com/JasonEtco/build-and-tag-action).
1. Build this action.
2. Commit `action.yml` and the built file.
3. Push the commit with version tags.