cla-assistant
cla-assistant copied to clipboard
Consider supporting repository files instead of gists
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
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
Team, is there a possibility to provide the CLA in a file in the repo itself instead of a gist?
@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.
You need a gist. I use a dedicated account for automations in my org, so that's where I store the gist.
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