github.js
- Version:
-
- 1.0.0
- Copyright:
-
- 2024 Mediumroast, Inc. All rights reserved.
- License:
-
- Apache-2.0
- Source:
Example
const gitHubCtl = new GitHubFunctions(accessToken, myOrgName, 'mr-cli-setup') const createRepoResp = await gitHubCtl.createRepository()
Requires
- module:octokit
- module:axios
Methods
-
<inner> createContainers()
-
Creates the top level Study, Company and Interaction containers for all mediumroast.io assets
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the responses or error messages.
- Type
- Array
-
<inner> createRepository()
-
Creates a repository, at the organization level, for keeping track of all mediumroast.io assets
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the created repo or error message.
- Type
- Array
-
<async, inner> getActionsBillings()
-
Gets the complete billing status for actions from the GitHub API
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the user info or error message.
- Type
- Array
-
<async, inner> getAllUsers()
-
Gets all of the users from the GitHub API
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the user info or error message.
- Type
- Array
-
<inner> getGitHubOrg()
-
If the GitHub organization exists retrieves the detail about it and returns to the caller
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the org or error message.
- Type
- Array
-
<async, inner> getStorageBillings()
-
Gets the complete billing status for actions from the GitHub API
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the user info or error message.
- Type
- Array
-
<async, inner> getUser()
-
Gets the authenticated user from the GitHub API
- Source:
- To Do:
-
- Add a check to see if the user is a member of the organization
- Add a check to see if the user has admin rights to the organization
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the user info or error message.
- Type
- Array
-
<async, inner> getWorkflowRuns()
-
Gets all of the workflow runs for the repository
Returns:
An array with position 0 being boolean to signify success/failure and position 1 being the response or error message.
- Type
- Array