mirror of https://github.com/panjf2000/ants.git
chore: update the workflow of pull requests
This commit is contained in:
parent
2c599b83a1
commit
46f9b68028
|
@ -0,0 +1,17 @@
|
|||
name: Check pull request target
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
jobs:
|
||||
check-branches:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check target branch
|
||||
run: |
|
||||
if [ ${{ github.base_ref }} == "master" ] && [ ${{ github.head_ref }} != "dev" ]; then
|
||||
echo "Only pull requests from dev branch are only allowed to be merged into master branch."
|
||||
exit 1
|
||||
fi
|
|
@ -10,6 +10,7 @@ on:
|
|||
- '.github/FUNDING.yml'
|
||||
- '.github/release-drafter.yml'
|
||||
- '.github/ISSUE_TEMPLATE/*'
|
||||
- '.github/workflows/pull-request.yaml'
|
||||
- '.github/workflows/release-drafter.yaml'
|
||||
- 'examples/*'
|
||||
pull_request:
|
||||
|
@ -21,6 +22,7 @@ on:
|
|||
- '.github/FUNDING.yml'
|
||||
- '.github/release-drafter.yml'
|
||||
- '.github/ISSUE_TEMPLATE/*'
|
||||
- '.github/workflows/pull-request.yaml'
|
||||
- '.github/workflows/release-drafter.yaml'
|
||||
- 'examples/*'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- Review existing issues and provide feedback or react to them.
|
||||
|
||||
## With pull requests:
|
||||
- Open your pull request against `master`.
|
||||
- Open your pull request against `dev`.
|
||||
- Open one pull request for only one feature/proposal, if you have several those, please put them into different PRs, whereas you are allowed to open one pull request with several bug-fixs.
|
||||
- Your pull request should have no more than two commits, if not, you should squash them.
|
||||
- It should pass all tests in the available continuous integrations systems such as TravisCI.
|
||||
|
|
Loading…
Reference in New Issue