EthanThatOneKid / gitcord

😎 expand GitHub into Discord
MIT License
5 stars 2 forks source link

Gitcord 😎

expand GitHub into Discord

Background

Gitcord is a Go package and command line tool for automating Discord management via GitHub Events.

By default, Gitcord supports an opinionated set of Discord operations that are conducive to collaborative development on GitHub. This opinionated set of Discord operations include opening a new Discord thread for every newly opened GitHub issue and pull request, forwarding issue and pull request comments to Discord, and more.

Usage

Set up your Discord server

Requirements

Inviting the Discord bot to your server

TODO: Provide instructions for inviting the Discord bot to the desired server.

Setting up your GitHub repository

In order to set up Gitcord for a GitHub repository, you must first gather some information. Collect the information listed below in any order.

Requirements

Dev πŸ‘©β€πŸ’»

Using the tool

cp .env.example .env # TODO(newdev): populate .env
source .env

go run . <event_id>

# ex: go run . 24292424235

Passing GitHub event by ID

A real GitHub repository event ID may be passed (as the first argument) to the gitcord tool.

The program attempts to fetch the GitHub event by the ID passed via the tool, then execute the expected behavior.

Passing GitHub event via Stdin

Arbitrary GitHub event data may be passed to the gitcord tool via stdin.

There are a couple of cool reasons why I wanted to see this feature implemented:

  1. This is a slight optimization (skips the initial payload fetch for the GitHub event)
  2. This allows us to pass arbitrary/imaginary GitHub events (helpful for debugging in production)

Testing πŸ‘·β€β™‚οΈ

TODO: Create gitcord package tests


Created with 😎 by ACM at CSUF