cla-assistant icon indicating copy to clipboard operation
cla-assistant copied to clipboard

Consider supporting repository files instead of gists

Open luxaritas opened this issue 3 years ago • 5 comments

Basically, my goal would be to create a CLA.md file in our organization .github repository (living alongside the other community health files), that way it could be easily updated by anyone in our organization, vs having to rely on the gist being tied to personal accounts

luxaritas avatar Jul 22 '22 01:07 luxaritas

As a workaround, you can replicate files from a repo to a gist. This is how I handle it for my org.

---
name: CLA gist replicator

on:
  push:
    branches: [master]
    paths:
      - "cla/**"
  workflow_dispatch:

jobs:
  replicate_cla:
    name: Replicate CLA
    runs-on: ubuntu-latest

    strategy:  # the action doesn't currently support multiple files
      fail-fast: true  # false to run all, true to fail entire job if any fail
      max-parallel: 1  # let's update files one by one to avoid complications
      matrix:
        include:
          - file_path: 'cla/CLA'
          - file_path: 'cla/CLA-entity'
          - file_path: 'cla/metadata'

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Deploy Gist
        uses: exuanbo/actions-deploy-gist@v1
        with:
          token: ${{ secrets.GH_BOT_TOKEN }}
          gist_id: ${{ secrets.CLA_GIST_ID }}
          file_path: ${{ matrix.file_path }}
          file_type: text

ReenigneArcher avatar Oct 24 '22 00:10 ReenigneArcher

Team, is there a possibility to provide the CLA in a file in the repo itself instead of a gist?

sumanth-lingappa avatar Mar 04 '24 11:03 sumanth-lingappa

@ReenigneArcher, in your workaround, we still need a gist isn't it?

My usecase is I do not want to have a gist at all. Reason being, we cannot create gists on an GitHub organisation level.

sumanth-lingappa avatar Mar 04 '24 12:03 sumanth-lingappa

You need a gist. I use a dedicated account for automations in my org, so that's where I store the gist.

ReenigneArcher avatar Mar 04 '24 12:03 ReenigneArcher

I would also prefer a cla that is not hard coded to to an individual person/account of the organization. If the person leaves the organization there might be issues adapting the cla.

Related:

https://stackoverflow.com/questions/20647454/how-can-you-create-github-gists-that-live-under-an-organization-account-instead

https://github.com/orgs/community/discussions/7923

fhg-isi avatar Mar 14 '24 10:03 fhg-isi