From a8af7c9617ffe3b92f88c7f0bb34c15519cb0f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Thu, 2 Apr 2026 20:21:02 +0800 Subject: [PATCH] ci: integrate CLA bot checks (#2367) --- .github/cla.yml | 17 +++++++++++++++ .github/pull_request_template.md | 2 +- .github/workflows/cla.yml | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/cla.yml create mode 100644 .github/workflows/cla.yml diff --git a/.github/cla.yml b/.github/cla.yml new file mode 100644 index 000000000..dca7d5fdc --- /dev/null +++ b/.github/cla.yml @@ -0,0 +1,17 @@ +enabled: true + +document: + version: v1 + url: https://github.com/rustfs/cla/blob/main/cla/v1.md + +signing: + mode: comment + comment_pattern: I have read and agree to the CLA. + +registry: + type: json-repo + repository: rustfs/cla + path_prefix: signatures + +status: + check_name: CLA Check diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7f346586b..2c240c971 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -34,4 +34,4 @@ Pull Request Template for RustFS --- -Thank you for your contribution! Please ensure your PR follows the community standards ([CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)) and sign the CLA if this is your first contribution. +Thank you for your contribution! Please ensure your PR follows the community standards ([CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)). If this is your first contribution, review the [CLA document](https://github.com/rustfs/cla/blob/main/cla/v1.md) and sign it by commenting `I have read and agree to the CLA.` on the PR. diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 000000000..bc1ce5cdc --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,37 @@ +# Copyright 2026 RustFS Team +# +# Licensed 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: CLA Check + +on: + pull_request_target: + types: [opened, synchronize, reopened] + issue_comment: + types: [created] + +permissions: + contents: read + pull-requests: read + issues: write + checks: write + +jobs: + cla: + if: ${{ github.event_name != 'issue_comment' || github.event.issue.pull_request }} + runs-on: ubuntu-latest + steps: + - name: Run CLA Bot + uses: overtrue/cla-bot@v0.0.1 + with: + github-token: ${{ github.token }}