1.0.1 • Published 6 years ago
jharry-git-automation v1.0.1
Repo Automation
Purpose
This module allows for the creation of repositories from a template with pre-set restrictions for pushing to the master branch.
Documentation Used
https://developer.github.com/v3/
https://developer.github.com/v3/repos/#create-repository-using-a-repository-template
https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator
https://developer.github.com/v3/repos/branches/#update-branch-protection
Example
const apiKey = 'MY_KEY';
const user = 'my_user';
const template = 'my_template_name';
const details = [{
email: 'firstname.lastname@qa.com',
username: 'username'
}];
const createRepos = require('jharry-git-automation');
createRepos(apiKey, user, template, details);