GithubHelp home page GithubHelp logo

wei / github-project-notifier Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 3.0 101 KB

A Discord ๐Ÿค– that notifies on GitHub Project Card updates

License: MIT License

Shell 0.33% JavaScript 99.67%
hacktoberfest

github-project-notifier's Introduction

github-project-notifier

Never miss updates on your GitHub Projects again~

It is easy to overlook activities in GitHub Projects. GitHub Project Notifier helps you and your collaborators keep track of any project card updates on your project channels in Discord!

Usage

  1. Install GitHub Project Notifier GitHub App onto your project repositories.
  2. Add GitHub Project Notifier Discord Bot to your server.

Note

  • This app only works with GitHub Projects (classic).
  • Please self-host the application.

Commands

  • list: Lists all subscribed GitHub Project boards
    • !github-project list
  • sub: Subscribe to a GitHub Project board
    • !github-project sub https://github.com/[owner]/[repo]/projects/[0-9]+
  • unsub: Unsubscribe from a GitHub Project board
    • !github-project unsub https://github.com/[owner]/[repo]/projects/[0-9]+

Examples

card-created card-moved

card-deleted card-edited

Self-host

Please read CONTRIBUTING.md for detailed instructions.

License

This project is developed as part of MLH Fellowship Halfway Hackathon and licensed under MIT

github-project-notifier's People

Contributors

diaga avatar khattakdev avatar wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

github-project-notifier's Issues

Support Projects under Organization

Tasks

  1. Set up GitHub App at https://github.com/settings/apps/new with webhook url, Projects permission under BOTH Repository and Organization
    • Create a GitHub organization, add a project board, and install this app to it.
  2. Migrate to either octokit/app or probot for listening to webhooks, remove fastify
  3. octokit/rest can be removed from project
    • remove the need for GITHUB_TOKEN as token and authentications are handled by Step 2.
  4. Update references to repository in prepareMessage, for events from organization project boards, the webhook will not include a repository instead, it will include a organization. So use the organization name in the footer instead of repo name.
  5. Update CONTRIBUTING.md with steps to set up a github app and add private key, secrets, etc.

Demo video

We should get together and discuss what goes into the demo video.

Perhaps

  1. Introduction, elevator pitch
  2. Each team member introduces themselves and which component of the project was worked on
  3. Demo

Is the service offline?

I added the service and the bot to my account as it described in readme.md. But GitHub Project Notifier#1101 stays offlline, doesn't response to any command and doesn't send notifications.

Prepare Discord Message from Webhook Payload

File: https://github.com/wei/github-project-notifier/blob/master/webhook/prepare-message.js

  1. Process payload. Can be created, edited, moved, converted, or deleted. GitHub Webhook: docs

  2. Get githubProjectUrl using octokit.projects.get({ project_id }) it's under html_url field. Octokit rest.js: docs

  3. If content_url is not available (I think it's only available for issues added directly to project board), Parse issue/pr shorthand to get repo and issue number.

    e.g.

    • facebook/react#1
    • facebook/react/issues/1
    • facebook/react/pull/1
    • https://github.com/facebook/react/issues/1
    • https://github.com/facebook/react/pull/1
  4. Get issue/pr title using Octokit, prs can be retrieved using the octokit.issues.get too

    await octokit.issues.get({
      owner,
      repo,
      issue_number,
    });
    
  5. Column names can be retrieved using octokit.projects.getColumn({ column_id }) with payload.project_card.column_id

  6. Draft and style MessageEmbed for each action type. MessageEmbed: docs

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.