Skip to content

Commit

Permalink
ci(main): add ci for merge (labring#2785)
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu authored Mar 9, 2023
1 parent a22e98e commit 5e5ac7f
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 23 deletions.
6 changes: 6 additions & 0 deletions .github/mergeable.settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
version: 1
mergeable:
use_config_from_pull_request: true
use_config_cache: false
use_org_as_default_config: false
67 changes: 67 additions & 0 deletions .github/mergeable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: 2
mergeable:
- when: pull_request.*, pull_request_review.*
name: check title and commit
validate:
- do: title
# Enforce semantic release convention.
must_include:
regex: ^(feat|docs|chore|fix|refactor|test|style|perf|ci)(\(\w+\))?:.+$
message: Semantic release conventions must be followed.
# All todo check boxes must be checked.
- do: description
must_exclude:
regex: \[ \]
message: There are incomplete TODO task(s) unchecked.
- do: commit
message:
regex: '^(feat|docs|chore|fix|refactor|test|style|perf|ci)(\(\w+\))?:.+$'
message: 'Semantic release conventions must be followed' # Semantic release conventions must be followed
skip_merge: true # Optional, Default is true. Will skip commit with message that includes 'Merge'
oldest_only: false # Optional, Default is false. Only check the regex against the oldest commit
newest_only: false # Optional, Default is false. Only check the regex against the newest commit
single_commit_only: true # Optional, Default is false. only process this validator if there is one commit
message_type: '' # Optional, only check regex against the field specified. Default is '', which processes the 'message' field. Can also be set to 'author_email' or 'committer_email'
pass:
- do: checks
status: 'success'
- do: labels
# if label doesn't exist, it'll be created
labels: [ 'needs-triage' ] # Only arrays are accepted
mode: 'replace'
error:
- do: labels
labels: [ 'needs-triage' ]
mode: 'delete'
- do: labels
labels: [ 'triage/accepted' ]
mode: 'replace'
fail:
- do: labels
labels: [ 'needs-triage' ]
mode: 'delete'
- do: labels
labels: [ 'triage/accepted' ]
mode: 'replace'
- when: pull_request.*, pull_request_review.*
validate:
- do: approvals
min:
count: 1
block:
changes_requested: true
exclude:
users: [ 'sealos-ci-robot' ]
- do: milestone
no_empty:
enabled: true # Cannot be empty when true.
message: 'Milestone cannot be empty'
begins_with:
match: 'v' # array of strings
message: 'Milestones must be chosen to start with v'
pass:
- do: checks
status: 'success'
- do: labels
labels: [ 'approved' ]
mode: 'replace'
9 changes: 0 additions & 9 deletions .github/no-response.yml

This file was deleted.

23 changes: 9 additions & 14 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 60
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
# Label requiring a response
staleLabel: response-expired
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: true
This issue has been automatically closed because we haven't heard back for more than 60 days, please reopen this issue if necessary.
closeComment: false

0 comments on commit 5e5ac7f

Please sign in to comment.