Coder Social home page Coder Social logo

tzkmx / gollum-page-watcher-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benmatselby/gollum-page-watcher-action

0.0 1.0 0.0 253 KB

๐Ÿ“ฆ A GitHub Action to watch for GitHub Wiki Page changes, and then notify a Slack channel

License: MIT License

Dockerfile 1.96% Makefile 7.06% Go 90.98%

gollum-page-watcher-action's Introduction

Gollum Page Watcher GitHub Action

status Go Report Card

A GitHub Action to watch for GitHub Wiki Page changes, and then notify a Slack channel

Secrets

  • SLACK_WEBHOOK: The Slack Webhook URL required to post a message to your workspace.

Environment Variables

  • SLACK_USERNAME: The Slack username if you want to define it, otherwise it will be what you have defined in Slack.
  • SLACK_CHANNEL: The Slack channel if you want to define it, otherwise it will be what you have defined in Slack.
  • PAGES_TO_WATCH: A regex of page titles you want to watch, in order to get a notification. If not defined, all pages are watched.

Example

...
- name: Wiki Watcher
  uses: benmatselby/gollum-page-watcher-action@v1
  env:
    SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    SLACK_CHANNEL: #random
    SLACK_USERNAME: Gollum
    PAGES_TO_WATCH: (^Home$)|(^Meeting minutes)
...

This will result in a match on "Home", and all pages with a title starting with "Meeting minutes".

Output

Testing

To test this, you can run it from your command line with the following setup

GITHUB_EVENT_PATH=example-payloads/valid-payload.json \
GITHUB_EVENT_NAME=gollum \
SLACK_WEBHOOK=[your-slack-webhook-url] \
SLACK_CHANNEL=[your-slack-channel] \
DEBUG=true \
go run main.go

If DEBUG is defined, it will not post to Slack, but rather output the webhook message in your terminal.

Gollum

gollum-page-watcher-action's People

Contributors

benmatselby avatar markgaze avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.