https://github.com/takanome-dev/assign-issue-action
🤖 A Github action that simplifies issue management for maintainers and contributors, making collaboration more efficient
https://github.com/takanome-dev/assign-issue-action
actions gh-actions github github-actions slash-commands typescript
Last synced: 5 months ago
JSON representation
🤖 A Github action that simplifies issue management for maintainers and contributors, making collaboration more efficient
- Host: GitHub
- URL: https://github.com/takanome-dev/assign-issue-action
- Owner: takanome-dev
- License: mit
- Created: 2022-05-22T17:54:15.000Z (about 3 years ago)
- Default Branch: beta
- Last Pushed: 2024-10-29T17:43:23.000Z (8 months ago)
- Last Synced: 2024-10-29T19:00:27.472Z (8 months ago)
- Topics: actions, gh-actions, github, github-actions, slash-commands, typescript
- Language: TypeScript
- Homepage:
- Size: 1.65 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
💬 Assign Issue Action ✋
---
This action simplifies issue management for maintainers and contributors, making collaboration more efficient.
Enable commands that streamline issue assignments:- `/assign-me` for contributors to self-assign.
- `/unassign-me` for self-unassignment.
- `/assign @` for maintainers to assign specific users.
- `/unassign @` for maintainers to unassign others easily.It can also unassign issues that have been assigned for a configured amount of time.
## 🚀 Usage
Create a workflow (eg: `.github/workflows/assign.yml` learn more about [Creating a Workflow file](https://docs.github.com/en/actions/using-workflows#creating-a-workflow-file)):
```yaml
name: Assign Issueon:
schedule:
- cron: 0 0 * * *
issue_comment:
types: [created]
workflow_dispatch:jobs:
assign:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- name: Assign the user or unassign stale assignments
uses: takanome-dev/assign-issue-action@beta
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
maintainers: '' # list of maintainers with comma separated like 'takanome-dev,octocat'
# learn more about the inputs below ⬇
```## Inputs
Various inputs are defined in action.yml to let you configure the action:
| Name | Description | Default |
| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `github_token` | PAT for GitHub API authentication. It's automatically generated when the action is running, so no need to add it into your secrets. | `${{ github.token }}` |
| `self_assign_cmd` | The command that assigns the issue to the one who triggered it | `/assign-me` |
| `self_unassign_cmd` | The command that unassigns the issue from the user who triggered it, if they are already assigned. | `/unassign-me` |
| `assign_user_cmd` | The command that assigns the user to the issue | `/assign @` |
| `unassign_user_cmd` | The command that unassigns the user from the issue, if they are assigned. | `/unassign @` |
| `maintainers` | A list of maintainers authorized to use `/assign` and `/unassign` commands. List the usernames with comma separated (i.e: 'takanome-dev,octokit'). If not set, the usage of those commands will be ignored. | `''` |
| `enable_auto_suggestion` | A boolean input that controls whether the action should automatically check user comments for phrases signaling interest in issue assignment. Set to true by default. | **`true`** |
| `assigned_label` | A label that is added to issues when they're assigned, to track which issues were assigned by this action. | `📍 Assigned` |
| `required_label` | If set, the issue must have this label to be assigned. | `''` |
| `days_until_unassign` | The span of time between a user assigning themselves to the issue being unassigned automatically by the action. | `7` |
| `pin_label` | A label that prevents the user from being unassigned, typically for issues that are expected to take a long time. | `📌 Pinned` |
| `assigned_comment` | The comment posted after a user has assigned themselves to an issue. | `👋 Hey @{{ handle }}, thanks for your interest in this issue! 🎉 ⏳ Please note, you will be automatically unassigned if the issue isn't closed within **{{ total_days }} days** (by **{{ unassigned_date }}**). A maintainer can also add the "**{{ pin_label }}**"" label to prevent automatic unassignment.` |
| `already_assigned_comment` | The comment posted when a user tries to assign themselves to an issue that is already assigned | `👋 Hey @{{ handle }}, this issue is already assigned to @{{ assignee }}. [!NOTE] ⏳ If the issue isn't closed within **{{ total_days }} days**, it will be automatically unassigned. A maintainer can also add you to the list of assignees or swap you with the current assignee.` |
| `unassigned_comment` | The comment posted after a user is unassigned from an issue. | `👋 Hey @{{ handle }}, you've been automatically unassigned from this issue due to inactivity.[!NOTE] If you'd like to be re-assigned, just leave another comment or ask a maintainer to assign you again. If you're still actively working on the issue, let us know by commenting, and we can pin it to prevent automatic unassignment.` |
| `assignment_suggestion_comment` | The comment posted when someone shows interest in being assigned to an issue without using the assignment commands. | `👋 Hey @{{ handle }}, it looks like you're interested in working on this issue! 🎉 If you'd like to take on this issue, please use the command /assign-me to assign yourself.` |## ✏️ Contributing
We would love you to contribute to this project, pull requests are welcome!
Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.## ⚖️ LICENSE
The scripts and documentation in this project are released under the [MIT License](LICENSE)