This document explains how to set up the CLA Assistant GitHub Action to automatically enforce Contributor License Agreement (CLA) signing for all pull requests.
The CLA Assistant GitHub Action (.github/workflows/cla.yml) automatically:
- Comments on new pull requests asking contributors to sign the CLA
- Tracks who has signed the CLA in
.github/CLA_SIGNATORIES.json - Updates PR status checks based on CLA signature status
- Allows contributors to sign by commenting on their PR
To enable CLA enforcement, a repository administrator must create a Personal Access Token (PAT) with appropriate permissions.
The CLA Assistant needs a PAT to commit signature data back to the repository.
Steps:
-
Go to GitHub Settings → Developer settings → Personal access tokens → Fine-grained tokens
-
Click "Generate new token"
-
Configure the token:
- Token name:
CLA Assistant - DeepWork - Expiration: Choose appropriate expiration (recommend 1 year, then renew)
- Repository access: Select "Only select repositories" and choose
Unsupervisedcom/deepwork
- Token name:
-
Under "Permissions", configure Repository permissions:
- Contents: Read and write (required to commit signatures)
- Pull requests: Read and write (required to comment and update status)
- Metadata: Read-only (automatically selected)
-
Click "Generate token" and copy the token (you won't be able to see it again)
-
Go to the DeepWork repository settings:
-
Click "New repository secret"
-
Add the secret:
- Name:
CLA_ASSISTANT_PAT - Value: Paste the PAT you generated in step 1
- Name:
-
Click "Add secret"
To verify the CLA Assistant is working:
-
Create a test pull request from a different GitHub account (or ask a team member to create one)
-
Check for the CLA comment: The CLA Assistant bot should automatically comment on the PR with instructions to sign the CLA
-
Sign the CLA: Comment on the PR with:
I have read the CLA Document and I hereby sign the CLA -
Verify signature tracking: After signing, a new commit should be added to the main branch updating
.github/CLA_SIGNATORIES.json -
Check PR status: The PR status check should update to show "All contributors have signed the CLA ✅"
When a contributor opens a pull request:
- The CLA Assistant bot comments with a link to the CLA and instructions
- The contributor reads the CLA at
/CLA.md - The contributor signs by commenting:
I have read the CLA Document and I hereby sign the CLA - The bot records the signature in
.github/CLA_SIGNATORIES.json - The bot updates the PR status to indicate CLA is signed
- Future PRs from the same contributor don't require re-signing
Signatures are stored in .github/CLA_SIGNATORIES.json in the following format:
{
"signedContributors": [
{
"name": "username",
"id": 12345678,
"comment_id": 987654321,
"created_at": "YYYY-MM-DDTHH:MM:SSZ",
"repoId": 123456789,
"pullRequestNo": 42
}
]
}This file is automatically created and updated by the CLA Assistant.
Possible causes:
- The
CLA_ASSISTANT_PATsecret is not set or has expired - The PAT doesn't have the required permissions
- The workflow file has syntax errors
Solutions:
- Check that the secret exists in repository settings
- Verify PAT permissions (Contents: write, Pull requests: write)
- Check the Actions tab for workflow errors
Possible causes:
- The PAT doesn't have write access to Contents
- Branch protection rules prevent the bot from committing
Solutions:
- Verify the PAT has "Contents: Read and write" permission
- Check branch protection rules and add the CLA Assistant as an exception if needed
Possible causes:
- The comment text was not exact
- The workflow didn't trigger
Solutions:
- Ensure the comment is exactly:
I have read the CLA Document and I hereby sign the CLA - Try commenting
recheckto trigger the workflow again - Check the Actions tab to see if the workflow ran
The following accounts are automatically exempt from CLA requirements:
dependabot[bot]github-actions[bot]
To add more accounts to the allowlist, edit .github/workflows/cla.yml and update the allowlist field.
For security, rotate the PAT periodically:
- Generate a new PAT following the steps above
- Update the
CLA_ASSISTANT_PATsecret with the new token - Delete the old PAT from GitHub settings
Recommended rotation period: Every 12 months
- CLA Assistant GitHub Action Documentation
- GitHub Personal Access Tokens Guide
- DeepWork CLA
- DeepWork License
For questions or issues with CLA setup, please:
- Open an issue in the repository
- Contact the repository administrators
- Email legal@unsupervised.com for legal questions about the CLA