Skip to content

Commit 4a18f71

Browse files
LeoYuanJackLian
authored andcommitted
feat: add workflow for checking base branch
1 parent f2e014c commit 4a18f71

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check Base Branch
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
code-review:
9+
name: Check
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# 判断用户是否有写仓库权限
14+
- name: 'Check User Permission'
15+
uses: 'lannonbr/repo-permission-check-action@2.0.0'
16+
with:
17+
permission: 'write'
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: 'Check base branch name is develop or not'
22+
if: github.event.pull_request.base.ref != 'develop' # check the target branch if it's master
23+
uses: actions-cool/issues-helper@v2
24+
with:
25+
actions: 'create-comment'
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
issue-number: ${{ github.event.pull_request.number }}
28+
body: |
29+
感谢你的 PR,根据引擎的 [研发协作流程](https://lowcode-engine.cn/site/docs/participate/flow),请将目标合入分支设置为 **develop**。
30+
31+
Thanks in advance, according to the [Contribution Guideline](https://lowcode-engine.cn/site/docs/participate/flow), please set the base branch to **develop**.
32+
33+
@${{ github.event.pull_request.user.login }}

.github/workflows/help wanted.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Issue Reply
1+
name: Help Wanted
22

33
on:
44
issues:

.github/workflows/insufficient information.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Issue Reply
1+
name: Insufficient Info
22

33
on:
44
issues:

.github/workflows/test modules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: lint & test
1+
name: Lint & Test (Mods)
22

33
on:
44
push:

.github/workflows/test packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: lint & test
1+
name: Lint & Test (Pkgs)
22

33
on:
44
push:

0 commit comments

Comments
 (0)