-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加github的issue和pull request流程规范 1. issue-checker 2. rust_check
- Loading branch information
1 parent
45ba00c
commit 41807e8
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
default-mode: | ||
add: | ||
remove: [pull_request_target, issues] | ||
labels: | ||
# skips and removes | ||
- name: skip all | ||
content: | ||
regexes: '[Ss]kip (?:[Aa]ll |)[Ll]abels?' | ||
- name: remove all | ||
content: | ||
regexes: '[Rr]emove (?:[Aa]ll |)[Ll]abels?' | ||
- name: skip ambiguous | ||
content: | ||
regexes: '[Ss]kip (?:[Ll]abels? |)(?:`|)ambiguous(?:`|)' | ||
- name: remove ambiguous | ||
content: | ||
regexes: '[Rr]emove (?:[Ll]abels? |)(?:`|)ambiguous(?:`|)' | ||
# `feature` | ||
- name: enhance | ||
content: enhancement | ||
regexes: '[Ff]eat(?:\([a-zA-Z]*/?[a-zA-Z]*\))?[\:\.\,]' | ||
skip-if: | ||
- skip all | ||
remove-if: | ||
- remove all | ||
# `Bug fix` | ||
- name: bug-fix | ||
content: Bug fix | ||
regexes: '[Ff]ix(?:\([a-zA-Z]*/?[a-zA-Z]*\))?[\:\.\,]' | ||
skip-if: | ||
- skip all | ||
remove-if: | ||
- remove all | ||
# `document` | ||
- name: doc | ||
content: documentation | ||
regexes: '[Dd]ocs(?:\([a-zA-Z]*/?[a-zA-Z]*\))?[\:\.\,]' | ||
skip-if: | ||
- skip all | ||
remove-if: | ||
- remove all | ||
# `test` | ||
- name: test | ||
content: test | ||
regexes: '[Tt]est(?:\([a-zA-Z]*/?[a-zA-Z]*\))?[\:\.\,]' | ||
skip-if: | ||
- skip all | ||
remove-if: | ||
- remove all | ||
# `ambiguous` | ||
- name: pr-ambiguous | ||
# 不符合 commitizen 的 PR | ||
content: ambiguous | ||
regexes: '^(?!(?:build|chore|ci|docs?|feat|fix|perf|refactor|rft|style|test)(?:\([a-zA-Z]*\))?[\:\.\(\,]|[Rr]evert|[Rr]elease)' | ||
mode: | ||
pull_request_target: | ||
skip-if: | ||
- skip all | ||
- skip ambiguous | ||
remove-if: | ||
- remove all | ||
- remove ambiguous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: "Issue Checker" | ||
on: | ||
issues: | ||
types: [opened, edited] | ||
pull_request_target: | ||
types: [opened, edited] | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: zzyyyl/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
configuration-path: .github/issue-checker.yml | ||
not-before: 2024-04-20T00:00:00Z | ||
include-title: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
check: | ||
name: Rust Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cargo check | ||
test: | ||
name: Rust Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cargo test | ||
fmt: | ||
name: Rust fmt Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: cargo-fmt --all --check | ||
# clippy: | ||
# name: Rust Clippy | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - run: cargo-clippy -D warnings | ||
|