Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 1.08 KB

HOW_IT_WORKS.md

File metadata and controls

11 lines (6 loc) · 1.08 KB

How it works

architecture

The WIP GitHub is built with Probot – a Node.js framework for GitHub workflow automation and improvements.

When installed, the WIP app starts receiving request for every pull request event, such as "created", "edited" or "labeled". The requests are received by Probot and verified using the Webhook Secret. If the verification succeeds, probot creates an authentication token for the installation and passes both the event request payload as well as the authenticated GitHub API client to the pull request event handler.

The event handler checks if the installation belongs to a free plan or a paid plan. For the free plan it only checks if the PR title contains one of the default terms such as "WIP" or "🚧". For the paid plan it loads the configuration and gets the status of the pull request based on that.

Finally, it compares the new to the current state and updates if it changed.