github-action icon indicating copy to clipboard operation
github-action copied to clipboard

feat: handle labels

Open TGTGamer opened this issue 5 years ago • 1 comments

Heya guys,

Should be a simple one for you to implement. I'd like to be able to label my pull requests once someone has signed the CLA.

I currently have the following labels: CLA - Not Required (applied when specific conditions are met - done through workflow) CLA - Signed CLA - Unsigned

Part 1: I'd like to have an input for these labels to be automatically assigned when the bot runs. Part 2: I'd like the bot to automatically skip when specific labels are on the pull request

So the workflow.yml would look like this

jobs:
  CLAssistant:
  name: "CLA Assistant"
  runs-on: ubuntu-latest
  steps:
    - name: "CLA Assistant"
      if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
      # Alpha Release
      uses: cla-assistant/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        path-to-signatures: './contributors/cla.json'
        path-To-cladocument: 'https://github.com/${{github.repository}}/contributors/cla.md'
        # branch should not be protected
        branch: 'master'
        whitelist: ${{github.rerepository_owner}},bot*
        empty-commit-flag: false
        blockchain-storage-flag: false
        unsignedLabel: 'CLA - Unsigned'
        signedLabel: 'CLA - signed'
        ignoreLabel: 'CLA - Not Required'

TGTGamer avatar Jul 14 '20 17:07 TGTGamer

Hi @TGTGamer, I am sorry for the late response. This sounds like a really cool feature 😎 . I especially like the ignorelabel input. Sure, I will add this feature in our backlog and I will get back to you after it is implemented. Pull request is welcome too :)

ibakshay avatar Jul 24 '20 12:07 ibakshay