Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🎣 A webhook to forward GitHub/GitLab events to StreamLabs Alerts and Twitch Chat

License

NotificationsYou must be signed in to change notification settings

streamdevs/webhook

Repository files navigation

All Contributors

licenseNode.js CI

Goal

A webhook to forward GitHub and GitLab events to StreamLabs Alerts and Twitch Chat.

This is a tool created with live-coding streamers in mind. The goal is to have another source ofinteraction and showcase relevant activity on GitHub to their audience on streaming platformsgenerating more interest in their Open Source projects.

StreamDevs Webhook Demo

Features

GitHub

We support the following events:

  • Stars
  • Forks
  • Releases
  • Issues
    • Opened
    • Assigned
  • Pull Requests
    • Opened
    • Merged

GitLab

At the moment GitLab's webhooks don't support as many events. So far, we support:

  • Merge Request
    • Opened
    • Merged

Setup

There are a few requirements for the integration to work.

  • Your webhook is on a server, running 24/7
  • Your webhook is able to receive HTTP requests from GitHub/GitLab.
  • Your repository (and/or user/organisation) on GitHub/GitLab is configured to notify yourwebhook

You can deploy this webhook in different ways

Deploy to Heroku

Deploy

Deploy to your own server

  1. Get the source code

    git clone https://github.com/streamdevs/webhook.git
  2. Change into the source code directory

    cd webhook
  3. Install the dependencies with yarn (or alternative you can usenpm)

    yarn install
  4. Create a .env file with your (configuration)[#configuration] and the edit it

    cp .env.example .env
  5. Compile the project to JavaScript

    yarn build
  6. Run the start command

    yarn run start
  7. You should see your webhook running on the port specified in the configuration below

Configuration

We make use of the following environment variables:

VariableSettingMandatoryDefault
PORTWhere the HTTP server should listen.No8080
STREAMLABS_TOKENA token to use the StreamLabs API. You can get one by usingStreamDevs/streamlabs-tokenNoempty
TWITCH_BOT_NAMEThe account (username) that the chatbot uses to send chat messages.Noempty
TWITCH_BOT_TOKENThe token to authenticate your chatbot. Generate this withhttps://twitchapps.com/tmi/, while logged in to your chatbot account. The token will be an alphanumeric string.Noempty
TWITCH_BOT_CHANNELThe Twitch channel name where you want to run the bot. Usually this is your main Twitch account.Noempty
NOTIFY_ISSUES_ASSIGNED_TOA comma-separated list of GitHub user names. Only issues assigned to these users will be notified or leave it empty to receive all notifications.Noempty array
IGNORE_PR_OPENED_BYA comma-separated list of GitHub user names. Only PR not opened by these users will be notified or leave it empty to receive all notifications.Noempty array
NOTIFY_CHECK_RUNS_FORComma-separated list of branches to notify Check Runs for. Leave empty to notify for any branchNoemptyarray

GitHub Configuration

Repositories

  1. Open your repository settings on GitHub.
  2. Go to theWebhooks section.
  3. Click onAdd webhook.
  4. On thePayload field, enter the GitHub endpoint for your deployed webhook. For examplehttps://YOUR-SITE-HERE.herokuapp.com/github.
  5. ForContent type we want to selectapplication/json.
  6. OnWhich events would you like to trigger this webhook? selectLet me select individual events.
  7. On the list of events check any of thesupported events
  8. Make sure theActive checkbox is checked
  9. Click onAdd webhook
  10. You will receive your first notification on Twitch Chat and StreamLabs letting you now your webhook has been configured correctly.

Sponsorships

Check the GitHub documentation

GitLab Configuration

  1. Open your repository settings on GitLab.
  2. Go to theSettings/Webhooks section.
  3. On theURL field, enter the GitLab endpoint for your deployed webhook. For examplehttps://YOUR-SITE-HERE.herokuapp.com/gitlab.
  4. On the list ofTrigger you can activate any of thesupported events
  5. Click onAdd webhook

Contributing

Everyone is welcome to contribute to this repository. To do so follow these steps:

  • Open anIssue with your idea and label it using theidea tag
  • Open apull request and reference your original issue
  • Make sure your PR includes proper tests
  • Be on the lookout for requested changes or clarifications during the Code Review
  • Once your PR is reviewed and merged, we'll add you tothe contributors list

Deploying to Heroku

You can use the "deploy to Heroku" button or use the Heroku CLI

Configuring your local repo to deploy on Heroku

  • Install theHeroku CLI
  • Log in to Heroku withheroku login
  • Open the Heroku dashboard for your app
  • Go to the settings tab
  • UnderApp Information, copy theHeroku git Url
  • Add a new git remote withgit remote add heroku your-https-git-repo-goes-here

Deploying changes to a Heroku app using the CLI

Push to the master branch on Heroku withgit push heroku master

Note that you can deploy a different branch to Heroku, but it will only deploy the remote master branch. To deploy alocal branch you can rungit push heroku your-branch-here:master so that your branch overrides themaster branch on Heroky.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Orestes Carracedo

💻

Santi

💻

hugolesta

💻

Hugo Perez Fernandez

💻

riolcrt

🤔

This project follows theall-contributors specification. Contributions of any kind welcome!

License

This project is under theCC-BY 4.0 license

About

🎣 A webhook to forward GitHub/GitLab events to StreamLabs Alerts and Twitch Chat

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2026 Movatter.jp