-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generalized the app to be installed by anyone
- Loading branch information
1 parent
95cacf1
commit 4d5bb69
Showing
14 changed files
with
397 additions
and
197 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,104 @@ | ||
# csoc-bot | ||
# GitHub Issue Assigner Bot | ||
|
||
> A GitHub App built with [Probot](https://github.com/probot/probot) that A bot for managing workflow of CSOC projects | ||
This GitHub bot helps manage issue assignments in a repository by automatically assigning or unassigning issues based on predefined rules and user commands in comments. The bot is implemented using Probot, a framework for building GitHub Apps. | ||
|
||
## Setup | ||
# Features | ||
|
||
- Automatic Assignment: Users can request assignment to an issue by commenting with a specific command. | ||
- Limit Assignees: Configure maximum number of assignees allowed per issue. | ||
- Limit Assigned Issues: Set a limit on the number of issues a user can be assigned to at a time in the repository. | ||
- Automatic unassignment: Users can request unassignment to an issue by commenting with a specific command. | ||
- Issue opened comments: Bot greets the user when issue is opened | ||
- Customizable Responses: Customize the bot's responses and prompts using a YAML configuration file. | ||
|
||
# Usage | ||
|
||
1. [Install](https://github.com/apps/issue-assigner) the bot in your account. | ||
2. After installing the bot, create a file `.github/issue-assigner.yml` in the repo and paste the following content: | ||
|
||
```yml | ||
# Remove or comment the line from yml if you don't need that feature | ||
|
||
# The name of bot you would like to be mentioned by users. {name} will be replaced by the below name | ||
name: "issue-assigner" | ||
|
||
######################## Issue assignment ######################## | ||
|
||
# Prompt entered by user to request assign the issue to him/her | ||
assign-prompt: "@{name} claim" # For example, @issue-assigner claim | ||
|
||
# Comment from bot if the issue got already assigned to the user requesting | ||
issue-already-assigned: "You have already been assigned to this issue." | ||
|
||
# Maximum number of assignees for an issue | ||
max-assignees: 1 | ||
|
||
# Maximum number of assignees reached for the requested issue | ||
max-assignees-reached: "Sorry, maximum limit for assignees in this issue has reached. Please check other issues or contact a maintainer." | ||
|
||
# Maximum number of open issues a user can have assigned at a time in the repo | ||
max-issues-for-user: 1 | ||
|
||
# If all OK, the comment from bot to tell that issue got assigned | ||
assigned-comment: "This issue has been successfully assigned to you! 🚀" | ||
|
||
```sh | ||
# Install dependencies | ||
npm install | ||
######################## Issue un-assignment ######################## | ||
|
||
# Prompt entered by user to request un-assignment of the issue to him/her | ||
unassign-prompt: "@{name} abandon" | ||
|
||
# If the issue was already not assigned to the user | ||
issue-was-not-assigned: "You were not assigned to this issue." | ||
|
||
# If criteria is matched, the issue will get un-assigned | ||
unassigned-comment: "You have been unassigned to this issue successfully." | ||
|
||
######################## Issue Opened ######################## | ||
|
||
# If the user who opened issue is NOT a maintainer of the repo | ||
issue-opener-not-maintainer: "Thank you for opening this issue. Maintainers will check and approve if seems to be useful." | ||
|
||
# If the user who opened issue IS a maintainer of the repo | ||
issue-opener-is-maintainer: "Comment '@{name} claim' to get this issue assigned or '@{name} abandon' to get this issue unassigned." | ||
``` | ||
3. You can remove a line from yml if you don't need that feature. | ||
4. You can edit the values in the yml to customize the comments from the bot. | ||
# Contributing | ||
If you have any suggestions or want to report a bug, open an issue or make a pull request. | ||
## Prerequisites | ||
1. Git installed | ||
2. Node installed | ||
## Setup | ||
# Run the bot | ||
npm start | ||
``` | ||
1. Clone the repository | ||
## Docker | ||
```bash | ||
git clone https://github.com/Varun-Kolanu/issue-assigner.git | ||
``` | ||
|
||
```sh | ||
# 1. Build container | ||
docker build -t csoc-bot . | ||
2. Open the repo | ||
|
||
# 2. Start container | ||
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> csoc-bot | ||
``` | ||
```bash | ||
cd issue-assigner | ||
``` | ||
|
||
## Contributing | ||
3. Install dependencies | ||
|
||
If you have suggestions for how csoc-bot could be improved, or want to report a bug, open an issue! We'd love all and any contributions. | ||
```bash | ||
npm i | ||
``` | ||
|
||
For more, check out the [Contributing Guide](CONTRIBUTING.md). | ||
4. Run the app | ||
```bash | ||
npm start | ||
``` | ||
|
||
## License | ||
# License | ||
|
||
[ISC](LICENSE) © 2024 Varun Kolanu | ||
[ISC](https://github.com/Varun-Kolanu/issue-assigner/blob/main/LICENSE) © 2024 Varun Kolanu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Privacy Policy for Issue Assigner GitHub App | ||
|
||
## Introduction | ||
|
||
Thank you for using the Issue Assigner GitHub App. This Privacy Policy describes how the App collects, uses, and protects your personal information when you use the App. | ||
|
||
## Data Collection | ||
|
||
The App collects the following data: | ||
|
||
- GitHub usernames of collaborators and issue openers, commentors | ||
- Issue content and comments | ||
|
||
## Data Usage | ||
|
||
The collected data is used to: | ||
|
||
- Automate issue assignments | ||
- Manage issue comments | ||
- Data Sharing | ||
|
||
We do not share your data with third parties, except: | ||
|
||
- With GitHub as necessary to operate the App | ||
- To comply with legal obligations | ||
|
||
## Data Security | ||
|
||
We implement security measures to protect your data, but please note that no method of transmission over the internet or electronic storage is 100% secure. | ||
|
||
## User Rights | ||
|
||
You have the right to: | ||
|
||
- Access your data | ||
- Modify your data | ||
- Delete your data | ||
|
||
## Changes to this Privacy Policy | ||
|
||
We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. | ||
|
||
## Contact Us | ||
|
||
If you have any questions about this Privacy Policy, please contact us at this [email](mailto:[email protected]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.