Code Monkey home page Code Monkey logo

using-the-github-api-in-your-app's Introduction

This is an example GitHub App that adds a label to all new issues opened in a repository. You can follow the "Using the GitHub API in your app" quickstart guide on developer.github.com to learn how to build the app code in server.rb.

This project listens for webhook events and uses the Octokit.rb library to make REST API calls. This example project consists of two different servers:

  • template_server.rb (GitHub App template code)
  • server.rb (completed project)

To learn how to set up a template GitHub App, follow the "Setting up your development environment" quickstart guide on developer.github.com.

Install

To run the code, make sure you have Bundler installed; then enter bundle install on the command line.

Set environment variables

  1. Create a copy of the .env-example file called .env.
  2. Add your GitHub App's private key, app ID, and webhook secret to the .env file.

Run the server

  1. Run ruby template_server.rb or ruby server.rb on the command line.
  2. View the default Sinatra app at localhost:3000.

using-the-github-api-in-your-app's People

Contributors

rachmari avatar

Stargazers

 avatar

Watchers

 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.