Skip to content

Commit

Permalink
update ci bot
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikJiang committed Aug 4, 2023
1 parent e7f7cd5 commit 75844ad
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 24 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/auto-pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,7 @@ jobs:
permissions:
packages: write
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v4
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.pull_request.user.login }}
MESSAGE: ${{ github.event.pull_request.body }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
ISSUE_KIND: pr
TYPE: created
GREETING: |-
Hi @${{ github.event.pull_request.user.login }},
Thanks for your pull request!
If the PR is ready, use the `/auto-cc` command to assign Reviewer to Review.
We will review it shortly.
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down
166 changes: 166 additions & 0 deletions .github/workflows/ci-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
name: CI Bot
on:
issue_comment:
types:
- created
pull_request_review_comment:
types:
- created
issues:
types:
- opened
pull_request:
types:
- opened

env:
# This plugins is for anyone who can use it
PLUGINS: |-
assign
auto-cc
cc
kind/feature
kind/bug
kind/doc
kind/ci
kind/cleanup
label-kind
label-enhancement
label-question
label-kind/bug
label-kind/doc
label-kind/ci
label-kind/feature
label-kind/cleanup
# This plugins is for organization member or repository member
MEMBERS_PLUGINS: |-
label-duplicate
label-good-first-issue
label-help-wanted
label-invalid
label-kind
label-wontfix
lifecycle
# This plugins is for in the REVIEWERS environment variable
REVIEWERS_PLUGINS: |-
retitle
# This plugins is for in the APPROVERS environment variable
APPROVERS_PLUGINS: |-
merge
# This plugins is for in the MAINTAINERS environment variable
MAINTAINERS_PLUGINS: |-
milestone
# This plugins is for organization owner or repository owner
OWNERS_PLUGINS: ""

REVIEWERS: |-
wawa0210
hangscer8
ErikJiang
panpan0000
yankay
tu1h
Rei1010
APPROVERS: |-
wawa0210
ErikJiang
panpan0000
yankay
Rei1010
MAINTAINERS: |-
wawa0210
hangscer8
ErikJiang
panpan0000
yankay
tu1h
Rei1010
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPOSITORY: ${{ github.repository }}
jobs:
issue_opened:
name: Issue Opened
if: ${{ github.event_name == 'issues' }}
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.issue.user.login }}
MESSAGE: ${{ github.event.issue.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
AUTHOR_ASSOCIATION: ${{ github.event.issue.author_association }}
ISSUE_KIND: issue
TYPE: created
GREETING: |-
Hi @${{ github.event.issue.user.login }}, Thanks for opening an issue! Please use '/kind <type>'(for example: /kind bug) to label this issue.
pr_opened:
name: PR Opened
if: ${{ github.event_name == 'pull_request' }}
continue-on-error: true
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.pull_request.user.login }}
MESSAGE: ${{ github.event.pull_request.body }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
AUTHOR_ASSOCIATION: ${{ github.event.pull_request.author_association }}
ISSUE_KIND: pr
TYPE: created
GREETING: |-
Hi @${{ github.event.pull_request.user.login }},
Thanks for your pull request!
If the PR is ready, use the `/auto-cc` command to assign Reviewer to Review.
We will review it shortly.
issue_commented:
name: Issue Commented
continue-on-error: true
if: ${{ github.event_name == 'issue_comment' && !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.comment.user.login }}
MESSAGE: ${{ github.event.comment.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
ISSUE_KIND: issue
TYPE: comment

pr_review_commented:
name: PR Review Commented
continue-on-error: true
if: ${{ github.event_name == 'pull_request_review_comment' }}
runs-on: ubuntu-latest
steps:
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.comment.user.login }}
MESSAGE: ${{ github.event.comment.body }}
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
ISSUE_KIND: pr
TYPE: comment

pr_commented:
name: PR Commented
continue-on-error: true
if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- uses: wzshiming/gh-ci-bot@v1
env:
LOGIN: ${{ github.event.comment.user.login }}
MESSAGE: ${{ github.event.comment.body }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
AUTHOR_ASSOCIATION: ${{ github.event.comment.author_association }}
ISSUE_KIND: pr
TYPE: comment
8 changes: 2 additions & 6 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
approvers:
- YunShiHang
- wawa0210
- hangscer8
- ErikJiang
- panpan0000
- yankay
- dasu23
- tu1h
- Rei1010
reviewers:
- YunShiHang
- wawa0210
- hangscer8
- ErikJiang
- panpan0000
- yankay
- dasu23
- tu1h
- Rei1010

0 comments on commit 75844ad

Please sign in to comment.