Skip to content

Script that creates GitHub & git repository from the commandline using the GitHub API.

Notifications You must be signed in to change notification settings

lepasq/repo-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository Automation

This repository contains a python script, that speeds up the process of setting up projects.

Running the script will initialize a local repository, add an empty README.md and push it to Github.

Install

git clone https://github.com/lepasq/repo-automation.git

Setup

In order to get the program running, a few variables need to be changed.

alt Screenshot

Inside main.py, user_token, user_name and code_editor have to be adjusted.

alt Screenshot

Next, you need to install the required python packages.

pip3 install -r requirements.txt

If your version 3.X of Python is linked to python instead of python3, you should run

pip install -r requirements.txt

and replace the first line of create.py with

#!/usr/bin/env python

If you are running windows, you need to replace echo inside create.py (l. 34) with ECHO.

Add Command to Windows

In order to use the program inside your command prompt, the folder containing the repository has to be added to the environment variables.

In order to open the environment variables, type env in the windows search bar and hit enter Click on "Environment Variables".

Edit the user variable "Path" (or create a new user variable with the variable name Path, it if it doesn't exist yet). Enter the location of the directory containing this repository in the variable name.

Your window should now look like this:

alt Screenshot

In order to execute the command, you need to type

create name

where name is the desired name of the repository that shall be created.

If you want the command to be called differently, you should change the name of create.bat.

Add Command to Linux

You should keep the python file create in your scripts folder (~/.local/bin/) and rename the file to whatever the command should be called.

Finally, you need to add Execution Permissions to your file:

chmod +x create

About

Script that creates GitHub & git repository from the commandline using the GitHub API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages