Skip to content

Repository Creation and Access

Vaishnav Nugala edited this page Sep 16, 2021 · 15 revisions

How it works

To create the respective repository, the tool sends requests to GitHub api endpoints, Provide teams with access to the created repository and create project and project columns when specified. The information on teams and team permissions is extracted from a pre-written csv file.

Required Inputs

  • Team Names for providing repository access
  • Name of the repository and description to be given
  • Organization Name and GitHub PAT
  • Name of the project to be added to the repository and column names of the project
  • CSV file for Team names and permissions mapped to each of the teams

CSV Source

Create an csv file listing the teams and the access levels to be established for the repository to allow multiple team access with different permissions. The tool will search for this excel file and give the listed teams access to the repository. Check below for the sample.

img

Run with command line

Clone the repository and run the below commands.

  • Install the required modules
pip install -r requirements.txt

  • Run the autocreate script with the following command and give the required inputs
python git_autocreate.py
``

- Run the autocreate script with the following command all in a single line

python git_autocreate.py -t token -o orgname -v repovisibility -r reponame -f "./team_permissions.csv" -d "repo description" -p projectname -c "column1,column2,column3"

[or]

python git_autocreate.py --Token token --Organization orgname -Visibility repovisibility --Repository reponame --File "./team_permissions.csv" --Description "repo description" --Project projectname --Columns "column1,column2,column3"

- Provide the required inputs. 


![img](./images/git-create-window.png)

### Outputs

- The new repository is created and the csv input file provides access to teams with appropriate permissions
- When the project columns input is specified, project with a **Basic Kanban** template will be created for the repository. Any automation must be manually enabled


Clone this wiki locally