Skip to content

Commit c3da6d5

Browse files
feat: updated readme
1 parent a353dfd commit c3da6d5

File tree

1 file changed

+18
-106
lines changed

1 file changed

+18
-106
lines changed

README.md

Lines changed: 18 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,21 @@
1-
# Monitor Issues & PRs with Slack+Discord Notifications
1+
# Issue Triaging with Discord Notifications
22

3-
This repo is a fork of [repo-activity-monitor](https://github.com/shubhaamgupta11/repo-monitor) specifically for monitoring issues and pull requests in react-native.
3+
This repository is a fork of [repo-activity-monitor](https://github.com/shubhaamgupta11/repo-monitor), designed to monitor new issues in the React Native repository and send notifications to Discord for better issue triaging.
44

5-
Managing activity in open-source repositories can be challenging. With a constant influx of **issues** and **pull requests**, it's easy to lose track of what needs attention—especially when working with large teams or active projects. Missed notifications or delayed responses can lead to bottlenecks, reduced contributor satisfaction, and slower project progress.
5+
## Features
66

7-
## Repo Activity Monitor
8-
9-
This [GitHub Action](https://github.com/marketplace/actions/repo-activity-monitor) empowers open-source maintainers by:
10-
11-
- Tracking new issues and pull requests.
12-
- Sending auto-generated notifications to **Slack** or **Discord**.
13-
- Customizing **Slack** notifications with the ability to ping multiple users or groups.
14-
- Customizing **Discord** notifications with the ability to ping multiple users or roles.
15-
- Allowing **Slack** notifications to be sent to designated channels.
16-
17-
With **Repo Activity Monitor**, you can stay on top of your repositories activities, streamline communication, and ensure no critical issues or pull requests fall through the cracks.
7+
- Tracks new **issues** in the React Native repository.
8+
- Sends notifications to **Discord**.
9+
- Allows configuring **Discord** notifications to mention users or roles.
1810

1911
## Usage
2012

21-
### Monitoring Issues with Slack
13+
### Monitor Issues with Discord
2214

23-
```yml
24-
name: Monitor GitHub Repo
25-
26-
on:
27-
schedule:
28-
- cron: "0 * * * *" # Runs every hour
29-
workflow_dispatch: # Optional
30-
31-
jobs:
32-
run-notifier:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- name: Set up Node.js
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: '20'
39-
- name: Monitor New Issues
40-
uses: shubhaamgupta11/[email protected]
41-
with:
42-
# required inputs
43-
task: "monitor-issues"
44-
git_secret: "${{ secrets.GIT_SECRET }}"
45-
notifier: "slack"
46-
fetch_data_interval: 1 # Hours (must align with your cron schedule)
47-
# repo inputs
48-
repo_owner: "<owner>"
49-
repo_name: "<repo>"
50-
# Slack-specific inputs
51-
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"
52-
slack_channel: "<channel-id>"
53-
slack_id_type: "<user/group>" # Optional: Only needed to ping someone directly.
54-
slack_ids: "<user-id/group-id>" # Optional: Only needed if slack_id_type is provided. Can pass multiple similar type ids separated by commas. e.g. "Uyyyxxxx,Uzzzxxxx"
55-
```
56-
57-
> **Note:** slack_id_type and slack_ids are only needed if you want to ping someone directly.
58-
59-
### Monitoring PRs with Discord
15+
Create a GitHub Actions workflow file (e.g., .github/workflows/monitor.yml) with the following:
6016

6117
```yml
62-
name: Monitor GitHub Repo
18+
name: Monitor React Native Issues
6319

6420
on:
6521
schedule:
@@ -74,51 +30,29 @@ jobs:
7430
uses: actions/setup-node@v4
7531
with:
7632
node-version: '20'
77-
- name: Monitor New PRs
78-
uses: shubhaamgupta11/[email protected].2
33+
- name: Monitor New Issues
34+
uses: react-native-community/[email protected].0
7935
with:
8036
# required inputs
81-
task: "monitor-prs"
37+
task: "monitor-issues"
8238
git_secret: "${{ secrets.GIT_SECRET }}"
8339
notifier: "discord"
8440
fetch_data_interval: 1 # Hours (must align with your cron schedule)
8541
# repo inputs
86-
repo_owner: "<owner>"
87-
repo_name: "<repo>"
42+
repo_owner: "facebook"
43+
repo_name: "react-native"
8844
# Discord-specific inputs
8945
discord_webhook_url: "${{ secrets.DISCORD_WEBHOOK_URL }}"
9046
discord_id_type: "<user/role>" # Optional: Only needed to ping someone directly.
9147
discord_ids: "<user-id/role-id>" # Optional: Only needed if discord_id_type is provided. Can pass multiple similar type ids separated by commas. e.g. "Uyyyxxxx,Uzzzxxxx"
9248
```
9349
94-
> **Note:** You can configure any notifier (slack, discord) for any task (monitor-issues, monitor-prs, etc.).
95-
96-
## Message Previews
97-
Below are examples of how the notifications look on Slack and Discord.
98-
99-
### Slack Notification Previews
100-
<details> <summary>Click to view Slack notifications</summary>
101-
102-
For Issues
103-
104-
<img src="./assets/slack-issue-notification.png" alt="Slack Issue Notification" width="400"/>
50+
### Discord Notification Preview
10551
106-
For Pull Requests
107-
108-
<img src="./assets/slack-pr-notification.png" alt="Slack PR Notification" width="400"/> </details>
109-
110-
### Discord Notification Previews
111-
<details> <summary>Click to view Discord notifications</summary>
112-
113-
For Issues
52+
New issue notifications will be sent to Discord, mentioning the configured user or role.
11453
11554
<img src="./assets/discord-issue-notification.png" alt="Discord Issue Notification" width="400"/>
11655
117-
For Pull Requests
118-
119-
<img src="./assets/discord-pr-notification.png" alt="Discord PR Notification" width="400"/> </details>
120-
121-
12256
## 🔧 Inputs
12357
12458
| Input | Description | Required | Default |
@@ -129,31 +63,12 @@ For Pull Requests
12963
| repo_name | The name of the GitHub repository (`repo-name`). | Yes | None |
13064
| fetch_data_interval | The time interval to fetch data for (e.g., 1 hour, 24 hours). This should align with the cron schedule. | Yes | None |
13165
| notifier | Notification method (**slack** or **discord**). | Yes | None |
132-
| slack_bot_token | Slack bot token to send notifications (required if notifier=`slack`). | No | None |
133-
| slack_channel | The Slack channel id to send notifications to (required if notifier=`slack`). | No | None |
134-
| slack_id_type | Type of Slack ID (user or group, required if notifier=`slack`). This is needed to ping someone directly. | No | None |
135-
| slack_ids | user id or group id as per `slack_id_type` (required if notifier=`slack`). Can pass multiple similar type ids separated by commas. e.g. "Uyyyxxxx,Uzzzxxxx" | No | None |
13666
| discord_webhook_url | Discord webhook URL to send notifications (required if notifier=`discord`). | No | None |
13767
| discord_id_type | Type of Discord ID (user or role, required if notifier=`discord`). This is needed to ping someone directly. | No | None |
13868
| discord_ids | user id or role id as per `discord_id_type` (required if notifier=`discord`). Can pass multiple similar type ids separated by commas. e.g. "Uyyyxxxx,Uzzzxxxx" | No | None |
13969

140-
## 📖 How It Works
141-
- The action listens for new issues or PRs in the specified GitHub repository.
142-
- Depending on the `task` input, it will either monitor new issues (`monitor-issues`) or pull requests (`monitor-prs`).
143-
- Once a new issue or PR is detected, it sends a notification via Slack or Discord based on the `notifier` input.
144-
- The action checks for issues or PRs within the time period defined by `fetch_data_interval`, which should align with the cron schedule. For example, if the cron schedule is set to run every hour `(0 * * * *)`, set `fetch_data_interval` to 1 hour.
145-
14670
## 🔧 Setting Up
14771

148-
### Slack
149-
150-
- Create a [Slack App](https://api.slack.com/quickstart).
151-
- Generate a Slack Bot Token.
152-
- Retrieve the Channel ID and User/Group IDs.
153-
- Add these secrets to your GitHub repository:
154-
- `SLACK_BOT_TOKEN`
155-
- Provide the Slack Channel ID, Slack ID Type and Slack ID in the workflow.
156-
15772
### Discord
15873

15974
- Create a [Discord Webhook](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
@@ -166,14 +81,11 @@ For Pull Requests
16681

16782
## 🔮 Roadmap
16883

169-
- [ ] **Generalize Notification Channels**: Allow adding multiple notification methods (e.g. Webhooks, MS Teams).
170-
- [ ] **Support Custom Filters**: Enable users to apply filters like labels, authors, or milestones to issues and PRs.
171-
- [ ] **Handle API Rate Limiting**: Add rate limiting or retry logic for handling GitHub API rate limits.
172-
- [ ] **Track inactivity** on issues and notify users after a specific TAT (Turnaround Time).
84+
Full roadmap can be found [here](https://github.com/shubhaamgupta11/repo-monitor?tab=readme-ov-file#-roadmap).
17385

17486
## 📜 License
17587

176-
This project is licensed under the [MIT License](https://github.com/shubhaamgupta11/repo-monitor/blob/main/LICENSE).
88+
This project is licensed under the [MIT License](https://github.com/react-native-community/repo-monitor/blob/main/LICENSE).
17789

17890
## Support & Feedback
17991
If you find this action helpful, please give the repository a ⭐️ on GitHub! Your support helps us grow and continue improving. Feel free to raise issues or suggest enhancements to make this even better.

0 commit comments

Comments
 (0)