create RepositoryInitializer which can be used to create new files in the initial commit on a new repository

This commit is contained in:
Eduard Heimbuch
2020-01-20 15:19:51 +01:00
parent af866f2ae8
commit f44d17d640
10 changed files with 494 additions and 13 deletions

View File

@@ -158,7 +158,7 @@ export function fetchRepoFailure(namespace: string, name: string, error: Error):
export function createRepo(link: string, repository: Repository, initRepository: boolean, callback?: (repo: Repository) => void) {
return function(dispatch: any) {
dispatch(createRepoPending());
const repoLink = initRepository ? link + "?initRepository=true" : link;
const repoLink = initRepository ? link + "?initialize=true" : link;
return apiClient
.post(repoLink, repository, CONTENT_TYPE)
.then(response => {