Best way to send slack to developers notifications daily about new PRs, new issues or new comments ? #70288
Replies: 4 comments
-
I believe there's a builtin integration with slack https://slack.github.com/ |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
I wanted such a thing, so I wrote the GitHub Notifier https://github.com/marketplace/actions/github-notifier-by-krauters I'd love feedback (leave an issue – https://github.com/krauters/github-notifier/issues) to expand use cases and support. |
Beta Was this translation helpful? Give feedback.
-
This is something that me and my team also needed. It's been working well for us and our solution seems to also work for a lot of other enterprise orgs as well. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I have thoroughly reviewed the available documentation and community forums, but I was unable to find a satisfactory answer to my query regarding - The Best Possible way to send slack notifications(and email and create jira ticket) daily about new open issues, new open PRs and new comments from external developers(outside organisation). We need to utilise this data daily so that we can be more available to the open source community.
I have tried to find some of the possible ways to achieve the results of the above problem statement. Here are the specific details that I can try to achieve the solution:
Approach 1 -
1.Creation of such service using Github Webhooks
Go to your GitHub repository: Open your repository on GitHub.
Navigate to Settings: Click on the "Settings" tab.
Webhooks: In the left sidebar, click on "Webhooks."
Add a new webhook: Click on the "Add webhook" button.
Payload URL: Create an incoming webhook in your Slack workspace. Go to your Slack channel, click on "Add an app," search for "Incoming WebHooks," and add it to your channel. Copy the Webhook URL provided by Slack.
Paste the URL in GitHub: In the GitHub webhook settings, paste the Slack Webhook URL into the "Payload URL" field.
Content type: Set the content type to application/json.
Select events: Choose the GitHub events that you want to trigger notifications. For pull request-related notifications, select "Let me select individual events" and choose "Pull requests."
Activate the webhook: Click on "Add webhook" to save and activate the webhook.
Approach 2 -
Creation of such service via Github Actions and
Step1: Create a Slack App:Go to Slack API and create a new app for your workspace. Navigate to the "Incoming Webhooks" section and activate it. Add the app to your desired channel to obtain the Webhook URL.
Step 2: Create a GitHub Actions Workflow: Create a Workflow File: In your GitHub repository, create a new file under the .github/workflows/ directory, e.g., .github/workflows/slack-notifications.yml.
Add Workflow Configuration:
Step 3: Create a Node.js Script: Create a Node.js script (e.g., notify-slack.js) in your repository to fetch information about new pull requests and send notifications to Slack.
Step 4: Add Secrets to GitHub Repository: Add Slack Webhook Secret:In your GitHub repository, go to "Settings" -> "Secrets" and add a secret named SLACK_WEBHOOK_URL with the value of your Slack Webhook URL.
Step 5: Customize GitHub API Request: Customize GitHub API Request:Customize the GitHub API request in the Node.js script based on your needs. You may want to filter pull requests based on labels, states, or other criteria.
Step 6: Commit and Push Changes: Commit and Push Changes:Commit the new files (notify-slack.js and the workflow file) and push them to your GitHub repository.
Step 7: Verify Workflow Execution: Verify Workflow Execution:After pushing the changes, the GitHub Actions workflow will be triggered daily at midnight. Check the Actions tab in your GitHub repository to verify that the workflow runs successfully.
My query being - Are there any easy other possible ways or features that Github provides for achieving my usecase?
Beta Was this translation helpful? Give feedback.
All reactions