gh-abcs-developer

The GitHub ABCs developer training with templates, examples, hands-on labs and additional learning resources.

View project on GitHub

4 - GitHub Apps

In this lab you will develop a GitHub App using the Probot framework.

Duration: 15-20 minutes

References:

4.1 Developing a GitHub App

  1. Follow the guide Probot - Developing an app to develop your first GitHub App.
  2. Choose the basic-js template and follow the steps to generate, run, configure, and install your GitHub App.
  3. Once installed on your repository, use npm start to start your application and listen to webhook events.
  4. Test your application by creating a new issue on the installed repository
  5. Update the index.js file to add the following listener:
      app.onAny(async (context) => {
     app.log.info({ event: context.name, action: context.payload.action });
      });
    
  6. Run the application npm start
  7. Navigate to your repository where the application is installed
  8. Add a new label to an existing issue, push new code or update the repository settings
  9. Watch the application logs for triggered events