Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,31 @@ jobs:
-f context="CLAAssistant" \
-f description="CLA check skipped — author is an org member"

- name: Check if author is a bot
id: bot-check
if: github.event_name == 'pull_request_target'
run: |
AUTHOR="${{ github.event.pull_request.user.login }}"
if [[ "$AUTHOR" == *"[bot]" ]]; then
echo "is_bot=true" >> "$GITHUB_OUTPUT"
else
echo "is_bot=false" >> "$GITHUB_OUTPUT"
fi

- name: Skip CLA for bots
if: steps.bot-check.outputs.is_bot == '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 a bot"

- name: "CLA Assistant"
if: |
(steps.membership.outputs.is_member != 'true') &&
(steps.bot-check.outputs.is_bot != '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:
Expand Down
Loading