From a345b8bb98e5f4c631fe63bf64208195649c6338 Mon Sep 17 00:00:00 2001 From: Philip Hartlieb Date: Fri, 13 Nov 2026 14:26:00 -0500 Subject: [PATCH] CLA: use release-workflows v1.3.0 --- .github/workflows/cla.yml | 69 ++++++--------------------------------- 1 file changed, 10 insertions(+), 59 deletions(-) diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index bb9c379..31bc4d3 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,68 +1,19 @@ -name: "CLA Assistant" +name: CLA + +# The CLA bot needs both triggers; cla-reusable.yml never checks out pull request code. on: - issue_comment: + issue_comment: # zizmor: ignore[dangerous-triggers] types: [created] - pull_request_target: + pull_request_target: # zizmor: ignore[dangerous-triggers] types: [opened, closed, synchronize] permissions: - actions: write - contents: write pull-requests: write statuses: write jobs: - CLAAssistant: - runs-on: ubuntu-latest - steps: - - name: Generate token from GitHub App - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - owner: blacklanternsecurity - - - name: Check org membership - id: membership - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - if [ "${{ github.event_name }}" = "pull_request_target" ]; then - AUTHOR="${{ github.event.pull_request.user.login }}" - else - PR_NUM="${{ github.event.issue.number }}" - AUTHOR=$(gh api "repos/${{ github.repository }}/pulls/$PR_NUM" --jq '.user.login' 2>/dev/null) - fi - if [ -n "$AUTHOR" ] && gh api "orgs/blacklanternsecurity/members/$AUTHOR" > /dev/null 2>&1; then - echo "is_member=true" >> "$GITHUB_OUTPUT" - else - echo "is_member=false" >> "$GITHUB_OUTPUT" - fi - - - name: Skip CLA for org members - if: steps.membership.outputs.is_member == 'true' && github.event_name == 'pull_request_target' - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh api --method POST "repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }}" \ - -f state=success \ - -f context="CLAAssistant" \ - -f description="CLA check skipped — author is an org member" - - - name: "CLA Assistant" - if: | - (steps.membership.outputs.is_member != 'true') && - ((github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target') - uses: contributor-assistant/github-action@v2.6.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PERSONAL_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }} - with: - path-to-signatures: "signatures/version1/cla.json" - path-to-document: "https://github.com/blacklanternsecurity/CLA/blob/main/ICLA.md" - branch: "main" - allowlist: "dependabot[bot],github-actions[bot],renovate[bot]" - remote-organization-name: "blacklanternsecurity" - remote-repository-name: "CLA" - lock-pullrequest-aftermerge: "false" + cla: + uses: blacklanternsecurity/release-workflows/.github/workflows/cla-reusable.yml@3fe35ff9c43f61c98bd8c93182686b6be97d2759 # v1.3.0 + secrets: + APP_ID: ${{ secrets.APP_ID }} + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}