/github-action-1

GitHub Action for Handling Contributor License Agreements

Primary LanguageJavaScript

WORK IN PROGRESS

CLA GitHub Action

We are excited to announce that we are in development of CLA Assistant Github Action (a light version of CLA Assistant). With this Action, we can get rid of the need of a centrally managed database and rather storing all the contributors data in the repository's file system itself. This action won't be able to provide all the feature-sets of the current CLA Assistant OAuth App, However, this will work just fine If you want to configure CLA Assistant for a repo and store all the contributors data inside the repository. Feel free to test this GitHub Action and give us the feedback.

Advantages

  1. decentralized database
  2. fully integrated with github environment
  3. no UI is required
  4. no need to grant any permission/scope
  5. contributors can sign the CLA by posting a Pull Request Comment
  6. Signatures will be stored inside the repository

Usage

You can use and test the CLA Action by just adding the below example workflow file to your repository in .github/workflow/cla.yml

name: "CLA Assistant"
on:
  issue_comment:
    types: [created]
  pull_request:
    types: [opened,closed,synchronize]
    
jobs:
  CLAssistant:
    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'
      uses: cla-assistant/github-action@master
      env: 
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with: 
        path-to-signatures: 'signatures/cla.json'
        path-To-cladocument: 'https://github.com/ibakshay/test-action-workflow/blob/master/cla.md'
        branch: 'master'

Environmental Variables :

Name Requirement Description
GITHUB_TOKEN required Must be in the form of GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} , CLA Action uses this in-built GitHub token to make the API calls for interacting with GitHub. It is built into Github Actions and does not need to be manually specified in your secrets store. More Info

Inputs Description :

Name Requirement Description
path-To-cladocument required provide full URL https://<clafile> to the Contributor License Agreement (CLA) to which the Contributor can read before signing the CLA. It can be a file inside the repository or it can be a gist
path-to-signatures optional Path to the JSON file where all the signatures of the contributors will be stored inside the repository. Default path is "./signatures/cla.json".
branch optional Branch in which all the signatures of the contributors will be stored and Default branch is master