Skip to content

BED-5922 Update CLA Assistant #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
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
38 changes: 31 additions & 7 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
types: [created, edited]
pull_request_target:
types: [opened,closed,synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "Organization Members"
id: org-members
run: |
ALL_MEMBERS=""
URL="${{ github.api_url }}/orgs/${{ github.repository_owner }}/members?per_page=100"

while [ -n "$URL" ]; do
MEMBERS=$(curl -s -D headers.txt -H "Authorization: Bearer ${{ secrets.READ_MEMBERS_SCOPE }}" "$URL" | jq -r '[.[] | .login] | join(",")')
URL=$(grep -i '^Link:' headers.txt | sed -n 's/.*<\(.*\)>; rel="next".*/\1/p' || true)
rm -f headers.txt

if [ -n "$MEMBERS" ]; then
if [ -z "$ALL_MEMBERS" ]; then
ALL_MEMBERS="$MEMBERS"
else
ALL_MEMBERS="$ALL_MEMBERS,$MEMBERS"
fi
fi
done

echo "::add-mask::$ALL_MEMBERS"
echo "org_members=$ALL_MEMBERS" >> $GITHUB_OUTPUT

- name: "CLA Assistant"
if: (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/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN : ${{ secrets.REPO_SCOPE }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.REPO_SCOPE }}
with:
path-to-signatures: 'signatures.json'
path-to-document: 'https://github.com/BloodHoundAD/CLA/blob/main/ICLA.md'
branch: 'main'
remote-organization-name: BloodHoundAD
remote-repository-name: CLA
path-to-signatures: "signatures.json"
path-to-document: "https://github.com/SpecterOps/CLA/blob/main/ICLA.md"
branch: "main"
remote-organization-name: SpecterOps
remote-repository-name: CLA
allowlist: ${{ steps.org-members.outputs.org_members }}
Loading