generated from ultralytics/template
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Ultralytics CLA Action #252
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
Open
glenn-jocher
wants to merge
53
commits into
main
Choose a base branch
from
cla-branch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
b8898cf
Ultralytics CLA Action
UltralyticsAssistant a892cae
Ultralytics CLA Action
UltralyticsAssistant 0632ac5
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant 02b94d7
Update action.yml
glenn-jocher 68efcb7
Merge branch 'main' into cla-branch
glenn-jocher 0c12b0f
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant e13f5b9
Simplify Actions
UltralyticsAssistant 62d31c0
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant 4e5b295
Simplify Actions
UltralyticsAssistant c68104a
Simplify Actions
UltralyticsAssistant 1395196
Simplify Actions
UltralyticsAssistant 5eb4caa
Simplify Actions
UltralyticsAssistant dfb9b60
Simplify Actions
UltralyticsAssistant b56f11b
Merge branch 'main' into cla-branch
glenn-jocher 7705f58
Update action.yml
glenn-jocher 0534a9e
Merge branch 'main' into cla-branch
glenn-jocher 9255e68
Merge branch 'main' into cla-branch
glenn-jocher c1c2b12
Merge branch 'main' into cla-branch
glenn-jocher 6fc2263
Update action.yml
glenn-jocher 5cf3b37
Merge branch 'main' into cla-branch
glenn-jocher b8eca82
Merge branch 'main' into cla-branch
glenn-jocher cc6dba1
Merge branch 'main' into cla-branch
glenn-jocher f5c49f7
Update action.yml
glenn-jocher ebe6a4a
Merge branch 'main' into cla-branch
glenn-jocher deb279f
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant 3c2ee16
Merge branch 'main' into cla-branch
glenn-jocher f36e315
Merge branch 'main' into cla-branch
glenn-jocher 8f4198b
Merge branch 'main' into cla-branch
glenn-jocher 23ceca5
Merge branch 'main' into cla-branch
UltralyticsAssistant bf9385d
Merge branch 'main' into cla-branch
glenn-jocher 8e46a29
Merge branch 'main' into cla-branch
glenn-jocher 5b707f4
Merge branch 'main' into cla-branch
glenn-jocher c141d66
Merge branch 'main' into cla-branch
glenn-jocher 1c69bf1
Merge branch 'main' into cla-branch
glenn-jocher 58e8aad
Merge branch 'main' into cla-branch
glenn-jocher 91ba653
Merge branch 'main' into cla-branch
glenn-jocher 4b35227
Update check_cla.py
glenn-jocher de1180e
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant 586a0dd
Merge branch 'main' into cla-branch
glenn-jocher 5096bf5
Merge branch 'main' into cla-branch
glenn-jocher 4f13f92
Auto-format by https://ultralytics.com/actions
UltralyticsAssistant 9541ccb
Merge branch 'main' into cla-branch
glenn-jocher 77f8582
Merge branch 'main' into cla-branch
glenn-jocher a5a35ac
Merge branch 'main' into cla-branch
glenn-jocher a79606e
Merge branch 'main' into cla-branch
glenn-jocher c130a8b
Merge branch 'main' into cla-branch
glenn-jocher de48a5e
Merge branch 'main' into cla-branch
glenn-jocher 684fd80
Merge branch 'main' into cla-branch
glenn-jocher fadbf2a
Merge branch 'main' into cla-branch
glenn-jocher 235696b
Merge branch 'main' into cla-branch
glenn-jocher 31298ca
Merge branch 'main' into cla-branch
glenn-jocher e61c390
Merge branch 'main' into cla-branch
glenn-jocher fd5b446
Merge branch 'main' into cla-branch
glenn-jocher File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Ultralytics π AGPL-3.0 License - https://ultralytics.com/license | ||
|
|
||
| import os | ||
|
|
||
|
|
||
| def main(): | ||
| """Check CLA on pull requests.""" | ||
| print("RUNNING CHECK_CLA FUNCTION") | ||
| os.environ.get("GITHUB_TOKEN") | ||
| os.environ.get("CLA_REPOSITORY") | ||
| os.environ.get("CLA_BRANCH") | ||
| os.environ.get("CLA_SIGNATURES_PATH") | ||
| os.environ.get("CLA_DOCUMENT_URL") | ||
| os.environ.get("ALLOWLIST", "").split(",") | ||
| os.environ.get("SIGN_COMMENT") | ||
| os.environ.get("ALLSIGNED_COMMENT") | ||
|
|
||
| # Your CLA check logic here | ||
| # Note: You can extract the organization and repository name if needed: | ||
| # org, repo = cla_repository.split('/', 1) if '/' in cla_repository else ('', cla_repository) | ||
|
|
||
| # ... rest of your CLA check logic ... | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # Ultralytics π AGPL-3.0 License - https://ultralytics.com/license | ||
|
|
||
| name: "Ultralytics CLA" | ||
| description: "Checks if contributors have signed the Ultralytics Contributor License Agreement" | ||
| inputs: | ||
| github-token: | ||
| description: "GitHub token" | ||
| required: true | ||
| cla_repository: | ||
| description: "GitHub repository name for storing CLA signatures (including organization, e.g., 'org/repo')" | ||
| required: true | ||
| cla_branch: | ||
| description: "Branch to store CLA signatures" | ||
| required: true | ||
| default: "cla-signatures" | ||
| cla_signatures_path: | ||
| description: "Path to the JSON file containing CLA signatures" | ||
| required: true | ||
| default: "signatures/version1/cla.json" | ||
| cla_document_url: | ||
| description: "URL to the CLA document" | ||
| required: true | ||
| default: "https://docs.ultralytics.com/help/CLA" | ||
| allowlist: | ||
| description: "Comma-separated list of users/bots to ignore" | ||
| required: false | ||
| default: "dependabot[bot],github-actions,bot*" | ||
| sign_comment: | ||
| description: "Comment to trigger CLA signing" | ||
| required: true | ||
| default: "I have read the CLA Document and I sign the CLA" | ||
| allsigned_comment: | ||
| description: "Comment to post when all contributors have signed" | ||
| required: true | ||
| default: "All Contributors have signed the CLA. β " | ||
| openai_api_key: | ||
| description: "OpenAI API Key" | ||
| required: false | ||
| openai_model: | ||
| description: "OpenAI Model" | ||
| required: false | ||
| default: "gpt-4o" | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip wheel | ||
| pip install -q git+https://github.com/ultralytics/actions@cla-branch | ||
| # pip install -q ultralytics-actions | ||
| ultralytics-actions-info | ||
| shell: bash | ||
|
|
||
| - name: Check CLA | ||
| env: | ||
| GITHUB_TOKEN: ${{ inputs.github-token }} | ||
| CLA_REPOSITORY: ${{ inputs.cla_repository }} | ||
| CLA_BRANCH: ${{ inputs.cla_branch }} | ||
| CLA_SIGNATURES_PATH: ${{ inputs.cla_signatures_path }} | ||
| CLA_DOCUMENT_URL: ${{ inputs.cla_document_url }} | ||
| ALLOWLIST: ${{ inputs.allowlist }} | ||
| SIGN_COMMENT: ${{ inputs.sign_comment }} | ||
| ALLSIGNED_COMMENT: ${{ inputs.allsigned_comment }} | ||
| OPENAI_API_KEY: ${{ inputs.openai_api_key }} | ||
| OPENAI_MODEL: ${{ inputs.openai_model }} | ||
| run: ultralytics-actions-check-cla | ||
| shell: bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β CRITICAL:
main()exits successfully without consuming any of the inputs or performing a CLA check, so the action will never catch unsigned contributors. Please implement the verification logic (and fail fast when checks fail) before wiring this into workflows; otherwise every run will report success regardless of CLA status.