In this guide, we are going to demonstrate how to build your own GitHub App to get a fine-grained integration with GitHub’s API and to act on the behalf of its users.

In this guide, we are going to demonstrate how to build your own GitHub App to get a fine-grained integration with GitHub’s API and to act on the behalf of its users

Introduction

With  56 million developers on the platform and 85 million repositories, integrating with GitHub is not just fun, it’s essential. Some companies have even built integrations so good,  that GitHub bought them and made them part of the core platform. This has happened multiple times.

Even faster than that. When we reached out to GitHub for comment,  Martin Woodward, Director of DevRel told us that  this year they saw 60 million new repositories created.

So why is it that so many of you are doing it wrong? Many of you are still using OAuth apps which are considered legacy and have scopes which are far too broad. Many more of you are taking extreme risks by using Personal Access Tokens (PATs), most of which can do anything to your account and repositories.

GitHub Apps are first-class actors within GitHub and unlike the legacy OAuth apps, allow or fine-grained actions to be performed on your user’s repositories.

In this guide, we are going to develop a  GitHub App using Go, then we deploy it as a serverless function to make use of  faasd which is a lightweight & portable faas engine. We are also going to do this demo on our local environment, so we should open our function which runs on our local environment to the Internet so Github can send events to our function. In order to do that we use inlets-pro which provides secure TCP/L4 tunnels.

#github

How to integrate with GitHub The Right Way With GitHub Apps
1.20 GEEK