Skip to content

Commit 289283c

Browse files
committed
docs(HOW_IT_WORKS): initial version
1 parent 7ae80d1 commit 289283c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

HOW_IT_WORKS.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# How it works
2+
3+
![architecture](assets/architecture.mermaid.svg)
4+
5+
The WIP GitHub is built with [Probot](https://probot.github.io/) – a Node.js framework for GitHub workflow automation and improvements.
6+
7+
When installed, the WIP app starts receiving request for every [pull request event](https://developer.github.com/v3/activity/events/types/#pullrequestevent), 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](lib/handle-pull-request-change.js).
8+
9+
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.
10+
11+
Finally, it compares the new to the current state and updates it if it changed.

0 commit comments

Comments
 (0)