Checkout native feature: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
- Deploy to heroku
- Setup the developer applications at github https://github.com/settings/applications/new
- Config the heroku ENV of the following:
- GITHUB_CLIENT_ID
- GITHUB_SECRET
- GITHUB_REDIRECT_URI
- GITHUB_WEBHOOK_PATH
- GITHUB_WEBHOOK_SECRET
- APP_SECRET
- Add webhook to your repos https://github.com/{user}/{repos}/settings/hooks/new
======================================================
- webhook-url: {HOST}/{GITHUB_WEBHOOK_PATH}
- webhook-secret: GITHUB_WEBHOOK_SECRET
- Register repos with OAuth at browser by visiting the following link
- {HOST}/api/listenpr?repo={full-repo-name}
- example: {HOST}/api/listenpr?repo=Steven-Chan/github-hook
- Set the body to be append at Pull-Request
- cat {path-to-file} | curl --data-binary @- -X PATCH {HOST}/api/listenpr?repo={full-repo-name}
- No 3, it's Done.
Check your registration
{HOST}/admin/checklist?secret={APP_SECRET}
Remove registration
{HOST}/test/delete?repo={name}