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 IRC notifications for GitHub issues #22925

Merged
merged 1 commit into from
Jan 19, 2025
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
56 changes: 51 additions & 5 deletions .github/workflows/irc-notifications.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: "Push Notification"
on:
issues:
types: [opened, reopened, closed]
pull_request:
types: [opened, reopened, closed]
push:
Expand Down Expand Up @@ -117,12 +119,12 @@ jobs:
${{ env.SUMUP }}
${{ github.event.compare }}

- name: Shorten PR fields
if: github.event_name == 'pull_request'
- name: Shorten issue/PR fields
if: github.event_name == 'pull_request' || github.event_name == 'issues'
id: shorten
env:
TITLE: ${{ github.event.pull_request.title }}
BODY: ${{ github.event.pull_request.body }}
TITLE: ${{ github.event.pull_request.title || github.event.issue.title }}
BODY: ${{ github.event.pull_request.body || github.event.issue.body }}
run: |
# -------------------------------------
echo "# script parse.pl"
Expand All @@ -148,7 +150,7 @@ jobs:
echo "# done"

- name: checking BODY and TITLE variable
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || github.event_name == 'issues'
run: |
echo "BODY: $BODY"
echo "TITLE: $TITLE"
Expand All @@ -164,6 +166,17 @@ jobs:
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} opened PR #${{ github.event.pull_request.number }}: ${{ env.TITLE }} - ${{ github.event.pull_request.html_url }}

- name: irc reopened pull request
uses: rectalogic/notify-irc@v2
if: github.event_name == 'pull_request' && github.event.action == 'reopened'
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel_p5p }}
nickname: Pull-Request
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} reopened PR #${{ github.event.pull_request.number }}: ${{ env.TITLE }} - ${{ github.event.pull_request.html_url }}

- name: irc merged pull request
uses: rectalogic/notify-irc@v2
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
Expand Down Expand Up @@ -198,3 +211,36 @@ jobs:
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} updated PR #${{ github.event.pull_request.number }}
${{ env.TITLE }}
${{ github.event.pull_request.html_url }}

- name: irc opened issue
uses: rectalogic/notify-irc@v2
if: github.event_name == 'issues' && github.event.action == 'opened'
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel_p5p }}
nickname: GH-Issue
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} opened issue #${{ github.event.issue.number }}: ${{ env.TITLE }} - ${{ github.event.issue.html_url }}

- name: irc reopened issue
uses: rectalogic/notify-irc@v2
if: github.event_name == 'issues' && github.event.action == 'reopened'
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel_p5p }}
nickname: GH-Issue
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} reopened issue #${{ github.event.issue.number }}: ${{ env.TITLE }} - ${{ github.event.issue.html_url }}

- name: irc closed issue
uses: rectalogic/notify-irc@v2
if: github.event_name == 'issues' && github.event.action == 'closed'
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel_p5p }}
nickname: GH-Issue
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} closed issue #${{ github.event.issue.number }}: ${{ env.TITLE }} - ${{ github.event.issue.html_url }}
Loading