Skip to content

Repository to interact with github form the Univeristies VMs

Notifications You must be signed in to change notification settings

AberdeenRSS/VmGithub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VM Github integration

The University of Aberdeen virtual machines do unfortunately not support git. This is why we created this java script (java is available on the VMs), to pull and push to git regardless

Install

Simply download this repository as a zip by clicking on the green "Code" button on github

How to run

Pre-compiled jar files are available in the /target subdirectory. You can simply run the script using java -jar vm-github-1.0.jar in your console.

Usage

The script is designed to pull a repository from git and push any changes through pull requests. To configure the script you need to create a config file like this one:

owner=AberdeenRSS
repo=Engineering
branch=master
token=YOUR GITHUB PAT
folder=Engineering

This config file configures the script to work with our Engineering repository. To work with your own repository change the owner and repo accordingly. branch determines the git branch you will be working on. folder tells the script where you'd like the repository files to go. Lastly you'll need a github Personal Access Token (PAT). Follow this tutorial to find out how to generate such a token.

Pull

WARNING: this will delete the any modified files in this folder

Pulls files from the specified repository and moves them to the folder specified. Also creates a _COMPARE folder, this is used by the script to determine which files you changed. Do not modify this folder or its contents.

Example: java -jar vm-github-1.0.jar pull -c your/config.txt

Push

Pushes files to the repository and creates a pull request (the pull request url will be printed to the console).

Example: java -jar vm-github-1.0.jar push -c your/config.txt

Known issues

Windows file name endings

If you get a FileNotFoundException make sure that your file name ending is correct. If you create a new text file on windows it will automatically append .txt to it. So if you name your file config.txt it will actually be config.txt.txt, this can lead to file not found errors.

About

Repository to interact with github form the Univeristies VMs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages