Skip to content

Check repos for certain files and add them via PR if they don't exist

License

Notifications You must be signed in to change notification settings

100Automations/cherp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cherp

check that repos have common files, and add them via PR if they are missing.

example

$ ./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

install

git clone https://github.com/hackforla/github-automation ~
cd ~/github-automation/check-repo
npm i

configuration

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

API

check-repo exposes a small command line interface aliased as 🐦 cherp 🐦.

cherp add-file --repo=my-repo --license=GPL-2.0

opens a PR to my-repo with a GPL-2.0 license

cherp license

check all repos in GITHUB_ORG that do not have a recognizable LICENSE file

cherp version

prints the version

cherp mfa

lists any members of the GITHUB_ORG that have not enabled 2fa. Returns an empty Array if none exist.

LICENSE

GPL-2.0 hackforla © 2020

About

Check repos for certain files and add them via PR if they don't exist

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •