Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { authMeta, masterBranch, commitBranch, commitMessage, repository, repositoryOwner } = meta
const repositoryIdentity: RepositoryIdentity = {
username: repositoryOwner,
repo: repository,
ref: masterBranch,
}
const gitCommitMeta: GithubCommitMeta = {
repositoryIdentity,
files,
branchName: commitBranch,
commitMessage,
}
const githubGateway = createGithubGateway(authMeta)
return githubGateway.commitFilesToRepo(gitCommitMeta)
}
export const fetchTemplate = async (template: RemoteTemplateDefinition) => {
const authData = template.auth || {}
const githubGateway = createGithubGateway(authData)
return githubGateway.getRepository(template)
}