Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pr notification yaml #3830

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pr-notification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: PR Notification
on:
pull_request:
types: [opened, reopened]
branches:
- master
jobs:
slack-notification:
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: New PR opened to master branch
author_name: GitHub Action
fields: repo,message,commit,author,action,eventName,ref,workflow
env:
Comment on lines +10 to +18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Steps configuration is well-defined.

The use of 8398a7/action-slack@v3 for sending Slack notifications is appropriate. The configuration includes detailed fields which will provide comprehensive information about the PR in Slack.

Suggestion: Enhance notification details.
Consider adding more context-specific fields or customizing the notification text to include more details about the PR, such as the PR title or a link to the PR, to enhance the utility of the notifications.

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ANNOUNCEMENT_WEBHOOK_URL }}
Loading