check that repos have common files, and add them via PR if they are missing.
$ ./cherp.js -h
🐦 cherp 🐦 - a tool for CHEcking github RePos
----------------------------------------------
Usage:
$ ./cherp.js -h
show this help output
$ cherp add-file --license GPL-2.0 --repo my-repo
adds add GPL-2.0 license file to "my-repo"
List repos in an org not having a license
$ ./cherp license
[
{ id: 202489481, name: 'my-repo', full_name: 'my-org/my-repo' },
{ id: 253125888, name: 'my-other-repo', full_name: 'my-org/my-other-repo' }
]
Add a GPLv2.0 license file to a repo
$ ./cherp add-file --repo=my-other-repo --license=GPL-2.0
git clone https://github.com/hackforla/github-automation ~
cd ~/github-automation/check-repo
npm i
Running cherp
requires minimal configuration of GITHUB_TOKEN
, and GITHUB_ORG
set into a .env
file
(see .env.example)
or exported to the process environment, e.g. export GITHUB_TOKEN=<your github personal access token>
GITHUB_TOKEN - required
GITHUB_ORG - the org or owner of a repo or set of repos
Read more here about creating a Github Personal Access Token
check-repo exposes a small command line interface aliased as 🐦 cherp
🐦.
opens a PR to my-repo with a GPL-2.0 license
check all repos in GITHUB_ORG
that do not have a recognizable LICENSE file
prints the version
lists any members of the GITHUB_ORG
that have not enabled 2fa. Returns an
empty Array if none exist.
GPL-2.0 hackforla © 2020