Skip to content

Commit

Permalink
Merge branch 'feature/github-action' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
RayWangQvQ committed Mar 6, 2022
2 parents 148bbc8 + dc7c5b5 commit b40472e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/auto-close-pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# 自动关闭不规范PR
name: AutocloserPR
on:
pull_request_target:
types: [opened, edited]

name: Autocloser
on: pull_request_target
jobs:
autoclose:
Autoclose:
runs-on: ubuntu-latest
if: github.repository == 'RayWangQvQ/BiliBiliToolPro'
steps:
- uses: roots/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-close-message: "This PR was automatically closed because it did not follow the PR template."
pr-close-message: "This PR was automatically closed because it did not meet the requirements."
pr-pattern: ".*请问您是否明白:【yes】 -->.*"

checkTargetBranch:
runs-on: ubuntu-latest
needs: Autoclose
steps:
- uses: Vankka/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target: main
change-to: development
comment: |
Your PR was set to `main`, but PRs should be sent to `development`
The base branch of this PR has been automatically changed to `development`, please check that there are no merge conflicts.
13 changes: 13 additions & 0 deletions .github/workflows/no-toxic-comments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Check Toxic Comments
on: [issue_comment, pull_request_review]

jobs:
toxic_check:
runs-on: ubuntu-latest
name: Safe space
steps:
- uses: actions/checkout@v2
- name: Safe space - action step
uses: charliegerard/safe-space@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
- 优化推送日志,在标题中显示运行的任务名称
- 新增`CodeQL`workflows,用于检测代码
- 新增`Publish image`workflows,用于发布镜像
- 新增`no-toxic-comments.yml`,用于检测评论
- 更新`auto-close-pr.yml`,用于修正PR的目标到`develop`

0 comments on commit b40472e

Please sign in to comment.