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 repoMetadata
Object Container metadata object
objectFiles
Object Mapping of container names to their object files
createBranchFn
function Function to create a branch
readObjectsFn
function 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 containerName
String Container name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> lockContainer(containerName)
-
Locks a container
Parameters:
Name Type Description containerName
String Container name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>
-
<async> releaseContainers(repoMetadata, mergeBranchFn)
-
Releases containers (unlocks them and merges changes)
Parameters:
Name Type Description repoMetadata
Object Container metadata object
mergeBranchFn
function 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 containerName
String Container name
commitSha
String SHA of the lock file
branchName
String Branch name
- Source:
Returns:
ResponseFactory result
- Type
- Promise.<Array>