Function
GitHub
GitHubbuildRepos
/*
@param org = String
@param repo = String
@param vis = String
@param token = String
*/
const buildRepos = require('jwz/github');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
var vis = 'public';
const token = 'your-token';
const res = await buildGitHubRepos(org, repos, vis, token);
console.log(res);
GitHubdeleteRepos
/*
@param org = String
@param repos = Array
@param token = String
*/
const deleteRepos = require('jwz/github');
const org = 'your-org-name';
var repos = ['your-repoA', 'your-repoB'];
const token = 'your-token';
deleteGitHubRepos(org, repos, token)
GitHubinviteCollaboratorsToRepos
/*
@param org = String
@param repos = Array
@param arrays = Two dimension array
@param token = String
*/
const inviteCollaboratorsToRepos = require('jwz/github');
const org = 'your-org-name';
var repo = ['your-repoA', 'your-repoB'];
var arrays = [['collaboratorA', 'collaboratorB'], ['collaboratorC', 'collaboratorD']]
const token = 'your-token';
inviteGitHubReposCollaborators(org, repos, arrays, token);
note
- when code is running it will have output of result
GitHubremoveCollaboratorsFromRepos
/*
@param org = String
@param repos = Array
@param arrays = Two dimension array
@param token = String
*/
const removeCollaboratorsFromRepos = require('jwz/github');
const org = 'your-org-name';
var repo = ['your-repoA', 'your-repoB'];
var arrays = [['collaboratorA', 'collaboratorB'], ['collaboratorC', 'collaboratorD']]
const token = 'your-token';
removeGitHubReposCollaborators(org, repos, arrays, token);
GitHubgetReleaseVersion
/*
@param org = String
@param repo = String
@param version = String
*/
const getReleaseVersion = require('jwz/github');
const org = 'org-name';
const repo = 'repo-name';
const version = 'version'
const release = await getGitHubReleaseVersion(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