new RepositoryManager(octokit, orgName, repoName)
Parameters:
| Name | Type | Description |
|---|---|---|
octokit |
Object | Octokit instance |
orgName |
String | GitHub organization name |
repoName |
String | GitHub repository name |
- Source:
Methods
-
<async> createOrUpdateFile(path, content, message, branch, sha)
-
Creates or updates a file in the repository
Parameters:
Name Type Default Description pathString Path to the file
contentString | Object Content to write (will be encoded)
messageString Commit message
branchString Branch name
shaString null SHA of the file (if updating)
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> createRepository(description)
-
Creates a repository in the organization
Parameters:
Name Type Description descriptionString Repository description
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> deleteFile(path, message, branch, sha)
-
Deletes a file from the repository
Parameters:
Name Type Description pathString Path to the file
messageString Commit message
branchString Branch name
shaString SHA of the file
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getActionsBilling()
-
Gets billing information for GitHub Actions
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getCollaborators()
-
Gets all users (collaborators) for the repository
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getContent(path, ref)
-
Gets content from the repository
Parameters:
Name Type Description pathString Path to the content
refString Branch or commit reference
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getOrganization()
-
Gets organization information
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getStorageBilling()
-
Gets billing information for GitHub Storage
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> getUser()
-
Gets user information
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
Mediumroast for GitHub API and SDK