Check if pull request is targeted into correct branch.
This hook uses exclusively conventions from CKEditor 4 workflow:
- There are 2 main branches:
master
andmajor
. - All minor releases (x.y.z) are based on
master
branch. - All major releases (x.y.0) are based on
major
branch. - All PR-s are created from
t/x
branch, wherex
refers to the issue number. - Every issue could have one of four allowed milestone values:
4.x.y
– next minor release; merged tomaster
4.x.0
– next major release; merged tomajor
Backlog
– done when it's done; merged tomaster
- no milestone – done when it's done although it probably shouldn't be done; merged to
master
- Based on the milestone of PR's parent issue, PR should be merged into appropriate branch (
master
ormajor
).
Based on this conventions, it finds the PR's parent issue (via branch's name or PR's description) and determine appropriate branch using its milestone.
It needs 4 environment variables:
GH_MSWH_SECRET
– hook's secretGH_MSWH_TOKEN
– personal token from repo's owner/administrator with at leastrepo:status
scopeGH_MSWH_OWNER
– repo's ownerGH_MSWH_REPO
– repo's name
See LICENSE file for details.