GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openzfsonwindows/notify-irc: Github actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
entrypoint.sh
entrypoint.sh
 
 
irc-notify.png
irc-notify.png
 
 
notify_irc.py
notify_irc.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Send Notification Message to IRC

Usage

See action.yml For comprehensive list of options.

This is a fork of https://github.com/rectalogic/notify-irc but I had issues getting it to send multiline messages. This has been tweaked to issue IRC notifications mimicking the style of n.tkte.ch's Notifico.

Jorgen Lundman [email protected]

V1: Add --ansicolor

V2: Add --mirccolor

  • It seems MIRC color works in more IRC clients than ANSI.

Unreleased:

  • server may be a comma separated list of host[:port], tried in order until one delivers, and each attempt gets timeout seconds (default 15) instead of asyncio's 60 second TLS handshake wait. The action fails only if every server fails.
  • only_repository: owner/repo patterns. On any other repository the action does nothing, so a fork that copies the workflow stays quiet.
  • Issue, PR and comment messages name the person who acted (sender), not the author of the issue or PR.
  • Pushes report the real commit count. GitHub truncates the event to 20 commits, so the compare API is used (github_token, defaults to the workflow token); if that is unavailable the count shows as 20+.
  • PR messages link to the PR.

Example, send notifications to Libera Chat IRC channel:

name: Notify IRC

on:
  push:
  issues:
    types:
      - opened
      - edited
      - closed
  issue_comment:
  pull_request:
  discussion:
    types:
      - created
      - edited
      - closed
      - answered
  discussion_comment:
  create:
  delete:

jobs:
  notify-irc:
    runs-on: ubuntu-latest

    steps:
      - name: Notify IRC
        uses: openzfsonwindows/notify-irc@v2
        with:
          channel: "#yourchannel"
          # Tried in order; a stalled server no longer fails the run
          server: "irc.libera.chat,irc.eu.libera.chat"
          # Stay quiet on forks that copy this workflow
          only_repository: "yourorg/yourrepo"
          nickname: "irc-bot-name"
          mirccolor: "true"
          eventpath: ${{ github.event_path }}

Screenshot

Handling Pull Requests: pull_request vs. pull_request_target

GitHub provides two different event types for pull requests:

pull_request

Runs in the context of the contributor’s fork. Requires manual approval for first-time contributors (i.e., actions won't trigger until approved). Best for workflows that need to inspect the PR’s contents safely (e.g., linting, tests).

pull_request_target

Runs in the context of the base repository (not the contributor’s fork). Does not require manual approval—PR events (opened, synchronized, etc.) will trigger immediately, even from forks. Best for workflows that don’t need to inspect untrusted code (e.g., sending notifications, labeling PRs).

For this GitHub Action (notify-irc), we use pull_request_target instead of pull_request to ensure that PR notifications are always sent to IRC, even from first-time contributors.

About

Github actions

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.