diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index afbf680..0104820 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -49,6 +49,19 @@ jobs: exit 1 fi + # dispatched runs are not associated with the PR, so report via commit status + - name: "Pass CLA via commit status" + if: github.event_name == 'workflow_dispatch' + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + gh api -X POST "repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \ + -f state=success \ + -f context=CLAssistant \ + -f description="Changesets release PR: github-actions[bot] is CLA-allowlisted" \ + -f target_url="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" + - name: "CLA Assistant" if: (github.event.issue.pull_request && (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