This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 0cdf80a issue actions (#12241)
0cdf80a is described below
commit 0cdf80a0a38c6699462fdc543c38d94c110dcb7a
Author: Torch-Fan <[email protected]>
AuthorDate: Wed Sep 8 17:49:22 2021 +0800
issue actions (#12241)
* issue actions
* remove when the issue is reopened
---
.github/workflows/ci.yml | 2 +
.github/workflows/issue.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d72dc1c..97325cb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -25,6 +25,8 @@ on:
branches: [ master, dev ]
pull_request:
branches: [ master ]
+ repository_dispatch:
+ types: [rerun-ci]
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.count=3
-Dmaven.wagon.httpconnectionManager.ttlSeconds=30
diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml
new file mode 100644
index 0000000..f7fdd54
--- /dev/null
+++ b/.github/workflows/issue.yml
@@ -0,0 +1,92 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: ISSUE Standardized Process
+
+on:
+ schedule:
+ - cron: '0 0 */1 * *' # once a day
+
+ issue_comment:
+ types: [created,edited]
+
+ issues:
+ types: [labeled,reopened]
+
+
+jobs:
+ comment-action:
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'issue_comment' }}
+ steps:
+ - name: Print Issue Comment
+ run: |
+ echo ${{ github.event.comment.body }}
+
+ - name: Trigger The CI Workflow
+ if: ${{ contains( github.event.comment.body , '/run ci') }}
+ uses: mvasigh/dispatch-action@main
+ with:
+ token: ${{ secrets.PERSONAL_TOKEN }}
+ repo: shardingsphere
+ owner: ${{ github.actor }}
+ event_type: rerun-ci
+
+ remove-inactive:
+ runs-on: ubuntu-latest
+ if: ${{ github.event_name == 'issues' && github.event.action ==
'reopened' }}
+ steps:
+ - name: Remove "status:inactive" label
+ if: ${{ contains( github.event.issue.labels.*.name , format('status{0}
inactive', ':') ) }}
+ uses: actions-cool/[email protected]
+ with:
+ actions: 'remove-labels'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ labels: "status: inactive"
+
+
+ check-inactive-issue:
+ runs-on: ubuntu-latest
+ concurrency: check-inactive # singleton-run-stage
+ if: ${{ github.event_name == 'schedule' }}
+ steps:
+ - name: check-inactive # add `status: inactive` label
+ uses: actions-cool/[email protected]
+ with:
+ actions: 'check-inactive'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ inactive-day: 15
+ inactive-label: "status: inactive"
+ body: |
+ Hello ${{ github.event.issue.user.login }}, this issue has not
received a reply for serveral days.
+ This issue is supposed to be closed.
+ contents: "heart"
+
+ close-issue:
+ runs-on: ubuntu-latest
+ concurrency: # singleton-run-stage
+ group: close-issue
+ cancel-in-progress: true
+ if: ${{ github.event_name == 'schedule' || ( github.event_name == 'issues'
&& github.event.action == 'labeled' ) }}
+ steps:
+ - name: Close Issue # close issues with `labels`
+ uses: actions-cool/[email protected]
+ with:
+ actions: 'close-issues'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ labels: 'status: inactive'