Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takanome-dev/assign-issue-action
🤖 A github action that assign issues based on "/assign" command (or any trigger you want to use)
https://github.com/takanome-dev/assign-issue-action
actions gh-actions github github-actions slash-commands typescript
Last synced: 3 months ago
JSON representation
🤖 A github action that assign issues based on "/assign" command (or any trigger you want to use)
- Host: GitHub
- URL: https://github.com/takanome-dev/assign-issue-action
- Owner: takanome-dev
- License: mit
- Created: 2022-05-22T17:54:15.000Z (over 2 years ago)
- Default Branch: beta
- Last Pushed: 2024-10-10T13:40:06.000Z (3 months ago)
- Last Synced: 2024-10-11T03:01:11.315Z (3 months ago)
- Topics: actions, gh-actions, github, github-actions, slash-commands, typescript
- Language: TypeScript
- Homepage:
- Size: 1.7 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
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 ✋
---
A GitHub Action that listens for a `/assign` "command" (or any trigger you want) and assigns the issue to the user who commented (or the user who triggered the action).
It can also unassign issues that have been assigned for a configured amount of time.This Action is heavily inspired by [JasonEtco/slash-assign-action](https://github.com/JasonEtco/slash-assign-action)
## 📸 Screenshots
| ![assign_1](https://user-images.githubusercontent.com/79809121/207156221-9ef2da18-018e-46be-846b-f80bd1b60402.png) | ![assign_2](https://user-images.githubusercontent.com/79809121/207156278-8c338712-9519-4987-83d0-22c6bd63b7f5.png) |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |## 🚀 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)) to utilize the `trigger` action with content:
```yaml
name: Assign Issueon:
schedule:
- cron: 0 0 * * *
issue_comment:
types: [created]
workflow_dispatch:jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Assign the user or unassign stale assignments
uses: takanome-dev/[email protected]
with:
github_token: '${{ secrets.GITHUB_TOKEN }}'
# trigger: '/assign-me' # you can change the default trigger to something else
# required_label: # if present, the issue must have this label to be assigned
# assigned_label: 📍 Assigned
# days_until_unassign: 7
# 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 }}` |
| `trigger` | The comment that triggers the action. This can be anything you want. | `/assign-me` |
| `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. | N/A |
| `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.
The following variables are supported:
- `inputs`: the inputs given to the action
- `comment`: an object holding the commenter infos
- `totalDays`: `days_until_unassign` | `👋 Hey @{{ comment.user.login }}, thanks for your interest in this issue! 🎉
⚠ Note that this issue will become unassigned if it isn't closed within **{{ totalDays }} days**.
🔧 A maintainer can also add the **{{ inputs.pin_label }}** label to prevent it from being unassigned automatically.
` |
| `already_assigned_comment` | The comment posted when a user tries to assign themselves to an issue that is already assigned. | `👋 Hey @{{ comment.user.login }}, this issue is already assigned to @{{ assignee.login }}.
⚠️ It will become unassigned if it isn't closed within **{{ daysUntilUnassign }} days**.
🔧 A maintainer can also add you to the list of assignees or swap you with the current assignee.
` |## ✏️ Contributing
We would love you to contribute to this project, pull requests are welcome!
Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.## ⚖️ Licence
The scripts and documentation in this project are released under the [MIT License](LICENSE)