- add global rename repositories permission

- add api call on rename action
This commit is contained in:
Eduard Heimbuch
2020-06-25 09:16:19 +02:00
parent e32130cd0b
commit cd8a9873a9
8 changed files with 113 additions and 21 deletions

View File

@@ -74,6 +74,13 @@ class RepositoryRoot extends React.Component<Props> {
fetchRepoByName(repoLink, namespace, name);
}
componentDidUpdate(prevProps: Props) {
const { fetchRepoByName, namespace, name, repoLink } = this.props;
if (namespace !== prevProps.namespace || name !== prevProps.name) {
fetchRepoByName(repoLink, namespace, name);
}
}
stripEndingSlash = (url: string) => {
if (url.endsWith("/")) {
return url.substring(0, url.length - 1);