Skip to content

Commit

Permalink
Add IRC notifications for GitHub issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Grinnz authored and khwilliamson committed Jan 19, 2025
1 parent f21b866 commit 0a14b9f
Showing 1 changed file with 51 additions and 5 deletions.
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 }}

0 comments on commit 0a14b9f

Please sign in to comment.