Giter Club home page Giter Club logo

app-playground's Introduction

App Playground

This is a Codespaces enabled place to play with and debug GitHub Apps.

The goal is to provide a jumpstart to working with a GitHub App. This can be especially useful when testing new ideas or submitting bug reports.

The apptokit CLI utility comes installed and there is a .apptokit.yml provided which will be setup to work with Codespaces.

First steps

  • Create a repo using this template
  • Launch into a codespace
  • Configure the permissions your App needs in the .apptokit.yml file.
  • run apptokit manifest setup
  • ๐Ÿฅณ

At this point, you have a Codespace setup where you can use a GitHub App to interact with GitHub's API. You can make one-off requests with apptokit curl, receive webhooks*, walk through the OAuth flow, whatever you need to do.

The scripts folder is yours to add whatever you need, script a reproduction of a bug report or write a demo of a new feature.

Web Hooks

There should be a process running to receive and log hooks, if this worked correctly there will be a .hook_receiver.pid in your project root. If this doesn't exist, don't worry, run script/hook-receiver to start it.

Additionally, you'll need to make the webhook port (8077) public in the codespaces port settings.

Hooks received are logged to logs/hooks.log.

To execute a command when a hook is received, create a script in the hook_processors directory with the event name and action as the file name. The hook receiver will call this command passing the hook payload to STDIN of your command. Output of these commands is logged to logs/<command_name>.log

There is an example processor provided which receives installation-created events.

You can follow all these logs by running tail -f log/*.log in another terminal to follow along with your processes.

app-playground's People

Contributors

jakewilkins avatar

Stargazers

 avatar  avatar  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.