house-keeping: PR template with submission checklist
also check PR source branch (head_ref) is not main/master
This commit is contained in:
parent
4dc7a4e19e
commit
048c39abdf
2 changed files with 53 additions and 0 deletions
38
.github/pull_request_template.md
vendored
Normal file
38
.github/pull_request_template.md
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!--
|
||||
|
||||
Thank you for your contribution to the luci repository.
|
||||
|
||||
Please read this before creating your PR.
|
||||
|
||||
Review https://github.com/openwrt/luci/blob/master/CONTRIBUTING.md
|
||||
especially if this is your first time to contribute to this repo.
|
||||
|
||||
MUST NOT:
|
||||
- add a PR from your *main* branch - put it on a separate branch
|
||||
- add merge commits to your PR: rebase locally and force-push
|
||||
|
||||
MUST:
|
||||
- increment any PKG_VERSION in the affected Makefile
|
||||
- set to draft if this PR depends on other PRs to e.g. openwrt/openwrt
|
||||
- each commit subject line starts with '<package name>: title'
|
||||
- each commit has a valid `Signed-off-by: ` (S.O.B.) with a reachable email
|
||||
* Forgot? `git commit --amend ; git push -f`
|
||||
* Tip: use `git commit --signoff`
|
||||
|
||||
MAY:
|
||||
- your S.O.B. *may* be a nickname
|
||||
- delete the below *optional* entries that do not apply
|
||||
- skip a `<package name>: title` first line subject if the commit is house-keeping or chore
|
||||
|
||||
-->
|
||||
|
||||
- [ ] This PR is not from my *main* or *master* branch :poop:, but a *separate* branch :white_check_mark:
|
||||
- [ ] Each commit has a valid :black_nib: `Signed-off-by: <my@email.address>` row (via `git commit --signoff`)
|
||||
- [ ] Each commit and PR title has a valid :memo: `<package name>: title` first line subject for packages
|
||||
- [ ] Incremented :up: any `PKG_VERSION` in the Makefile
|
||||
- [ ] Tested on: (architecture, openwrt version, browser) :white_check_mark:
|
||||
- [ ] \( Preferred ) Mention: @ the original code author for feedback
|
||||
- [ ] \( Preferred ) Screenshot or mp4 of changes:
|
||||
- [ ] \( Optional ) Closes: e.g. openwrt/luci#issue-number
|
||||
- [ ] \( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo
|
||||
- [ ] Description: (describe the changes proposed in this PR)
|
15
.github/workflows/check_source_branch_is_not_master.yml
vendored
Normal file
15
.github/workflows/check_source_branch_is_not_master.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: Check PR source branch
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
check-source-branch-is-not-main-or-master:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(fromJSON('["main", "master"]'), github.head_ref)
|
||||
# or github.event.pull_request.head.ref
|
||||
steps:
|
||||
- run: |
|
||||
echo "Error: Pull requests should not be from your 'main' or 'master' branch. :("
|
||||
exit 1
|
Loading…
Reference in a new issue