From a420e724f74315f34ddcd39af214f9ab9577aec9 Mon Sep 17 00:00:00 2001 From: ajianaz Date: Thu, 22 Oct 2026 19:50:29 +0700 Subject: [PATCH] chore: remove CLA gate (fleet CLA retirement, uteke#1548) --- .github/workflows/cla-check.yml | 127 -------------------------------- CONTRIBUTING.md | 14 +--- 2 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 .github/workflows/cla-check.yml diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml deleted file mode 100644 index a88fb67..0000000 --- a/.github/workflows/cla-check.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: CLA Check - -on: - pull_request: - types: [opened, synchronize, reopened] - -permissions: - pull-requests: write - contents: read - statuses: write - -jobs: - cla-check: - runs-on: ubuntu-latest - # Bot PRs are exempt from the CLA — exact allowlist only (a `[bot]` - # substring match would exempt any third-party GitHub App and turn the - # CLA gate into an opt-out). `user.login` for app-authored PRs is the - # bot account (e.g. `dependabot[bot]`); `app/dependabot` / `app/renovate` - # are kept as legacy fallbacks. - if: "!contains(fromJSON('[\"dependabot[bot]\", \"renovate[bot]\", \"github-actions[bot]\", \"app/dependabot\", \"app/renovate\"]'), github.event.pull_request.user.login)" - steps: - - name: Fetch & check CLA signature - id: check - run: | - # Fetch signatures.json directly from raw GitHub (public repo) - # Use wget as primary (handles 200-with-404-body better than curl) - wget -q -O signatures.json "https://raw.githubusercontent.com/codecoradev/.github/main/.cla/signatures.json" 2>/dev/null \ - || curl -sfL "https://raw.githubusercontent.com/codecoradev/.github/main/.cla/signatures.json" -o signatures.json 2>/dev/null \ - || echo '{"signatures":[]}' > signatures.json - # Validate JSON — if invalid, use empty - python3 -c "import json; json.load(open('signatures.json'))" 2>/dev/null \ - || echo '{"signatures":[]}' > signatures.json - python3 - << 'EOF' - import json, os - - author = os.environ["PR_AUTHOR"] - with open("signatures.json") as f: - data = json.load(f) - - signatures = data.get("signatures", []) - found = any( - s.get("github_username", "").lower() == author.lower() - for s in signatures - ) - - with open(os.environ["GITHUB_OUTPUT"], "a") as f: - f.write(f"signed={'true' if found else 'false'}\n") - - print(f"CLA signed by @{author}: {found}") - EOF - env: - PR_AUTHOR: ${{ github.event.pull_request.user.login }} - - - name: Comment on PR (unsigned only) - if: steps.check.outputs.signed != 'true' - uses: actions/github-script@v9 - with: - script: | - const author = '${{ github.event.pull_request.user.login }}'; - const prNumber = ${{ github.event.pull_request.number }}; - - const body = [ - '## ⚠️ CodeCoraDev CLA Bot', - '', - `Hi @${author}! Thanks for your contribution.`, - '', - 'Before this PR can be reviewed, please sign our Contributor License Agreement:', - '', - '- 📋 **Individual?** → [Sign CLA Individual](https://codecoradev.github.io/cla/?type=individual)', - '- 🏢 **Corporate?** → [Sign CLA Corporate](https://codecoradev.github.io/cla/?type=corporate)', - '', - '---', - 'By signing, you agree to the terms in [CLA_INDIVIDUAL.md](https://github.com/codecoradev/.github/blob/main/CLA_INDIVIDUAL.md) or [CLA_CORPORATE.md](https://github.com/codecoradev/.github/blob/main/CLA_CORPORATE.md).', - ].join('\n'); - - // Find existing CLA bot comment - const comments = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - }); - - const botComment = comments.data.find(c => - c.user.login === 'github-actions[bot]' && - c.body.includes('CodeCoraDev CLA Bot') - ); - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body, - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - body, - }); - } - - - name: Set commit status - uses: actions/github-script@v9 - with: - script: | - const signed = '${{ steps.check.outputs.signed }}' === 'true'; - await github.rest.repos.createCommitStatus({ - owner: context.repo.owner, - repo: context.repo.repo, - sha: '${{ github.event.pull_request.head.sha }}', - state: signed ? 'success' : 'failure', - context: 'CLA Check', - description: signed - ? '✅ CLA signed' - : '❌ CLA not signed — sign at https://codecoradev.github.io/cla', - target_url: signed - ? 'https://github.com/codecoradev/.github/blob/main/.cla/signatures.json' - : 'https://codecoradev.github.io/cla', - }); - - - name: Fail if not signed - if: steps.check.outputs.signed != 'true' - run: | - echo "❌ CLA not signed by ${{ github.event.pull_request.user.login }}" - exit 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6d7c84..a425089 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,6 @@ This document helps you decide *whether* and *how* to contribute in a way that's 1. Fork, branch from `develop` (feature branches only; `main` and `develop` are protected). 2. `cargo fmt --all && cargo clippy --all-targets -- -D warnings && cargo test --workspace` must pass locally. 3. Open a PR against `develop`. CI runs fmt/clippy/test/build on every PR. -4. Sign the CLA when the bot asks. ## What gets merged fast @@ -33,18 +32,9 @@ This document helps you decide *whether* and *how* to contribute in a way that's See [SECURITY.md](SECURITY.md). -## CLA +## License -All contributions (code, docs, tests, configuration) require a signed -Contributor License Agreement before a pull request can be merged: - -- 📋 **Individual?** → [Sign the Individual CLA](https://codecoradev.github.io/cla/?type=individual) -- 🏢 **Contributing on behalf of a company?** → [Sign the Corporate CLA](https://codecoradev.github.io/cla/?type=corporate) - -The CLA is a license agreement, not a copyright assignment — you keep -ownership of your work. Signing takes a couple of minutes and is stored -in the [codecoradev/.github](https://github.com/codecoradev/.github) -repository; a bot checks it automatically on every pull request. +Contributions are licensed to the project under the Apache-2.0 license (inbound = outbound). No additional agreement is required. ## Contributions are unpaid