Add dedicated configure_default_client
API
#164
Workflow file for this run
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
name: "CLA Assistant" | |
# NOTE: This workflow runs against PR *target* branches, not against the source branches. | |
# This ensures modified code cannot be executed with the workflow's permissions. | |
# It's still easier to misuse than most potential triggers, hence the zizmor warning. | |
on: | |
issue_comment: | |
types: [created] | |
pull_request_target: # zizmor: ignore[dangerous-triggers] | |
types: [opened, closed, synchronize, labeled] # Added "labeled" event to check for label changes | |
workflow_dispatch: # Allow manual triggering of the workflow | |
permissions: | |
actions: write | |
contents: read # Signatures are stored in a dedicated repository | |
pull-requests: write | |
statuses: write | |
checks: write | |
jobs: | |
CLAAssistant: | |
runs-on: ubuntu-latest | |
steps: | |
- 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/github-action@v2.6.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PAT }} | |
with: | |
path-to-signatures: 'signatures/version1/cla.json' | |
path-to-document: 'https://lmstudio.ai/opensource/cla' | |
remote-organization-name: lmstudio-ai | |
remote-repository-name: cla-signatures | |
branch: 'main' | |
allowlist: yagil,ryan-the-crayon,azisislm,mattjcly,neilmehta24,ncoghlan | |
- name: "Label PR as CLA Signed" | |
if: success() | |
run: | | |
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then | |
PR_NUMBER="${{ github.event.pull_request.number }}" | |
elif [[ "${{ github.event_name }}" == "issue_comment" ]]; then | |
PR_NUMBER="${{ github.event.issue.number }}" | |
fi | |
ENDPOINT="https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/labels" | |
curl -L -X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
-d '{"labels":["CLA signed"]}' \ | |
$ENDPOINT | |
curl -L -X DELETE \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/labels/Request%20CLA" || true |