new ContainerOperations(octokit, orgName, repoName, mainBranchName, lockFileName)
Parameters:
| Name | Type | Description |
|---|---|---|
octokit |
Object | Octokit instance |
orgName |
String | GitHub organization name |
repoName |
String | GitHub repository name |
mainBranchName |
String | Main branch name |
lockFileName |
String | Lock file name |
- Source:
Methods
-
<async> catchContainers(repoMetadata, objectFiles, createBranchFn, readObjectsFn)
-
Catches multiple containers (locks them and prepares for operations)
Parameters:
Name Type Description repoMetadataObject Container metadata object
objectFilesObject Mapping of container names to their object files
createBranchFnfunction Function to create a branch
readObjectsFnfunction Function to read container objects
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> checkForLock(containerName)
-
Checks if a container is locked
Parameters:
Name Type Description containerNameString Container name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> lockContainer(containerName)
-
Locks a container
Parameters:
Name Type Description containerNameString Container name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> releaseContainers(repoMetadata, mergeBranchFn)
-
Releases containers (unlocks them and merges changes)
Parameters:
Name Type Description repoMetadataObject Container metadata object
mergeBranchFnfunction Function to merge branch to main
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> unlockContainer(containerName, commitSha, branchName)
-
Unlocks a container
Parameters:
Name Type Description containerNameString Container name
commitShaString SHA of the lock file
branchNameString Branch name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
Mediumroast for GitHub API and SDK