CLI tools for GitHub repository/organisation managers
There's a multitude of useful tools to help organisation and repository managers better manage their organisation/repository.
pip
(viz. pip install -r requirements.txt
)config.cfg
file. Use config.sample.cfg
as a starting point.
APIKey
can be obtained by generating a personal access token on GitHub. Ensure that the user has the required permissions on the organisation/repository before generating the key.The program is controlled entirely through a command line interface (CLI).
Execute the main.py
(entry point) script with the following format:
$ python main.py [group] [tool] [tool-parameters ...|-h]
issues
-- Issue Management Tools
blast
-- Create duplicated issues for a list of GitHub userscopy
-- Duplicate issues from one GitHub repository to anotherorgs
-- GitHub Organisation Management Tools
mass-add
-- Invite a list of users to join a particular organisationpython main.py org mass-add -t 12345 usernames.csv
where 12345
is the team ID.https://api.github.com/orgs/YOUR_ORG/teams?access_token=YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
to find the team ID.To find out more about the positional/named parameters for a particular tool, run the tool with the -h
flag.
You can use the example files located in the example
folder as a reference. The hierarchy of the directory in sample
is based on the group and tool (i.e. issues blast
will be in the issues/blast
folder in example
).
All log entries for this program is stored in log.log
on the root directory
(i.e. where main.py
resides)
mass-add
You need to call the API to get the integer team ID for mass-add
using -t
option.
Use the following command on a bash
shell to get the integer ID:
curl -H "Authorization: token <put your token here>" https://api.github.com/orgs/<org-name-here>/teams
This returns a JSON string from which you can retrieve the team ID.
GitHub is a trademark of GitHub Inc. All other trademarks and servicemarks are the property of their respective owners/holders.