From a3dded40c97ca84de95fe33ef3a62afc2fcfa14a Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Tue, 4 Apr 2023 15:15:02 -0500 Subject: [PATCH] Update READMEs and descriptions --- check-cla/README.md | 41 ++++++++++++++++++++++-------------- check-cla/action.yml | 10 ++++----- set-commit-status/README.md | 9 +++++--- set-commit-status/action.yml | 4 ++-- 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/check-cla/README.md b/check-cla/README.md index 54b013f6..7d4f1da9 100644 --- a/check-cla/README.md +++ b/check-cla/README.md @@ -1,43 +1,52 @@ # Check CLA (Contributor License Agreement) -This is a custom GitHub action to be used in the conda GitHub organization -for checking the conda contributor license agreement. +A custom GitHub action to be used in the conda GitHub organization for checking the +conda contributor license agreement. ## GitHub Action Usage In your GitHub repository include the action in your workflows: ```yaml -name: Contributor license agreement (CLA) +name: Check CLA on: issue_comment: types: - created pull_request_target: - types: - - reopened - - opened - - synchronize jobs: check: if: >- - !github.event.repository.fork - && ( + ( github.event.comment.body == '@conda-bot check' && github.event.issue.pull_request || github.event_name == 'pull_request_target' ) - runs-on: ubuntu-latest steps: - - name: Check CLA - uses: conda/actions/check-cla + - uses: conda/actions/check-cla with: # [required] - # label to add when actor has signed the CLA - label: cla-signed + # A token with ability to comment, label, and modify the commit status + # (`pull_request: write` and `statuses: write`) + # (default: secrets.GITHUB_TOKEN) + token: + # [required] + # Label to apply to contributor's PR once CLA is singed + label: + + # Upstream repository in which to create PR + # (default: conda/infrastructure) + cla_repo: + # Path to the CLA signees file within the provided `cla_repo` + # (default: .clabot) + cla_path: + + # Fork of cla_repo in which to create branch + # (default: conda-bot/infrastructure) + cla_fork: # [required] - # the GitHub Personal Access Token to comment and label with - token: ${{ secrets.CLA_ACTION_TOKEN }} + # Token for opening singee PR in the provided `cla_repo` + cla_token: ``` diff --git a/check-cla/action.yml b/check-cla/action.yml index 223a8b98..b5a7721c 100644 --- a/check-cla/action.yml +++ b/check-cla/action.yml @@ -3,7 +3,7 @@ name: CLA check description: Reacts to new PRs and check if the contributor has previously signed the conda contributor license agreement (CLA). inputs: token: - description: The GitHub token (`statuses: write` and `pull_request: write`) used to create an authenticated client + description: 'A token with ability to comment, label, and modify the commit status (`pull_request: write` and `statuses: write`)' default: ${{ github.token }} required: true label: @@ -12,15 +12,15 @@ inputs: cla_repo: description: Upstream repository in which to create PR default: conda/infrastructure + cla_path: + description: Path to the CLA signees file within the provided `cla_repo` + default: .clabot cla_fork: description: Fork of cla_repo in which to create branch default: conda-bot/infrastructure cla_token: - description: Token for opening singee PR in the provided `cla_repo` + description: Token for opening singee PR in `cla_fork` required: true - cla_path: - description: Path to the CLA signees file within the provided `cla_repo` - default: .clabot runs: using: composite diff --git a/set-commit-status/README.md b/set-commit-status/README.md index 8138c84d..f2502b2c 100644 --- a/set-commit-status/README.md +++ b/set-commit-status/README.md @@ -8,7 +8,7 @@ status. In your GitHub repository include the action in your workflows: ```yaml -name: Set commit status +name: Set Commit Status on: pull_request_target @@ -22,15 +22,18 @@ jobs: - uses: conda/actions/set-commit-status with: # [required] - # The GitHub token (`statuses: write`) used to create an authenticated client + # A token with the ability to modify the commit status + # (`statuses: write`) # (default: secrets.GITHUB_TOKEN) token: + # [required] # The name of the commit status context: # [required] - # The commit status to set, either success, error, failure, or pending + # The commit status to set; either success, error, failure, or pending state: + # A short text explaining the commit status # (default: '') description: diff --git a/set-commit-status/action.yml b/set-commit-status/action.yml index 9b47c0a4..5467476a 100644 --- a/set-commit-status/action.yml +++ b/set-commit-status/action.yml @@ -1,8 +1,9 @@ +--- name: Set Commit Status description: Modifies the commit status of the most recent commit. inputs: token: - description: "The GitHub token (`statuses: write`) used to create an authenticated client" + description: 'The GitHub token (`statuses: write`) used to create an authenticated client' default: ${{ github.token }} required: true context: @@ -52,4 +53,3 @@ runs: } catch (error) { throw new Error(`error while setting commit status: ${(error as Error).message}`); } -