jwz
v1.7.3
Published
Utils
Downloads
44
Readme
JetsadaWijit
Function
GitHub
GitHub buildRepos
usage
/*
@param org = String
@param repos = Array
@param vis = String
@param token = String
*/
const buildRepos = require('jwz/github/build');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
var vis = 'public';
const token = 'your-token';
const res = await buildRepos(org, repos, vis, token);
console.log(res);
GitHub deleteRepos
usage
/*
@param org = String
@param repos = Array
@param token = String
*/
const deleteRepos = require('jwz/github/delete');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
const token = 'your-token';
deleteRepos(org, repos, token)
GitHub inviteCollaboratorsToRepos
usage
/*
@param org = String
@param repos = Array
@param collaborators = Two dimension array
@param token = String
*/
const inviteCollaboratorsToRepos = require('jwz/github/invite');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
var collaborators = [['collaboratorA', 'collaboratorB'], ['collaboratorC', 'collaboratorD']]
const token = 'your-token';
inviteCollaboratorsToRepos(org, repos, collaborators, token);
note
- when code is running it will have output of result
GitHub removeCollaboratorsFromRepos
usage
/*
@param org = String
@param repos = Array
@param collaborators = Two dimension array
@param token = String
*/
const removeCollaboratorsFromRepos = require('jwz/github/remove');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
var collaborators = [['collaboratorA', 'collaboratorB'], ['collaboratorC', 'collaboratorD']]
const token = 'your-token';
removeCollaboratorsFromRepos(org, repos, collaborators, token);
GitHub getReleaseVersion
usage
/*
@param org = String
@param repo = String
@param version = String
*/
const getReleaseVersion = require('jwz/github/release');
const org = 'org-name';
const repo = 'repo-name';
const version = 'version'
const release = await getReleaseVersion(org, repo, version);
console.log(`Release Name: ${release.releaseName}`);
console.log(`Release Tag: ${release.releaseTag}`);
console.log(`Release URL: ${release.releaseURL}`);
note
- return
releaseName
releaseTag
releaseURL
- This is for public organization repository
- return