Boostrapped BranchChooser

This commit is contained in:
Philipp Czora
2018-10-04 20:02:18 +02:00
parent e059762fc4
commit eaf8951164
4 changed files with 84 additions and 30 deletions

View File

@@ -24,23 +24,6 @@ export function fetchBranches(repository: Repository) {
});
};
}
// export function fetchBranchesByNamespaceAndName(
// namespace: string,
// name: string
// ) {
// return function(dispatch: any) {
// dispatch(fetchBranchesPending(namespace, name));
// return apiClient
// .get(REPO_URL + "/" + namespace + "/" + name + "/branches")
// .then(response => response.json())
// .then(data => {
// dispatch(fetchBranchesSuccess(data, namespace, name));
// })
// .catch(error => {
// dispatch(fetchBranchesFailure(namespace, name, error));
// });
// };
// }
// Action creators
export function fetchBranchesPending(repository: Repository) {
@@ -133,3 +116,7 @@ export function getBranchNames(state: Object, repository: Repository) {
}
return Object.keys(state.branches[key].byNames);
}
export function getBranches(state: Object, repository: Repository) {
return null;
}