This commit is contained in:
Eduard Heimbuch
2020-12-03 08:54:56 +01:00
parent 60cdc6f8cf
commit 09c13100dd
6 changed files with 5 additions and 6 deletions

View File

@@ -45,7 +45,6 @@ public interface ImportHandler {
* @param manager The global {@link RepositoryManager} * @param manager The global {@link RepositoryManager}
* @return a {@link List} names of imported repositories * @return a {@link List} names of imported repositories
* @throws IOException * @throws IOException
* @since 2.11.0
* @deprecated * @deprecated
*/ */
public List<String> importRepositories(RepositoryManager manager) throws IOException; public List<String> importRepositories(RepositoryManager manager) throws IOException;

View File

@@ -174,6 +174,8 @@ describe("test url validation", () => {
} }
const valid = [ const valid = [
"https://foo.com/blah_blah", "https://foo.com/blah_blah",
"ssh://foo.com/blah_blah",
"ftp://foo.com/blah_blah",
"https://foo.com/blah_blah/", "https://foo.com/blah_blah/",
"https://foo.com/blah_blah_(wikipedia)", "https://foo.com/blah_blah_(wikipedia)",
"https://foo.com/blah_blah_(wikipedia)_(again)", "https://foo.com/blah_blah_(wikipedia)_(again)",

View File

@@ -50,7 +50,7 @@ export const isPathValid = (path: string) => {
return pathRegex.test(path); return pathRegex.test(path);
}; };
const urlRegex = /^(ftp|https?):\/\/[^\s$.?#].[^\s]*$/; const urlRegex = /^(ssh|ftp|https?):\/\/[^\s$.?#].[^\s]*$/;
export const isUrlValid = (url: string) => { export const isUrlValid = (url: string) => {
return urlRegex.test(url); return urlRegex.test(url);

View File

@@ -86,13 +86,13 @@ const ImportRepositoryFromUrl: FC<Props> = ({ url, setImportPending }) => {
return ( return (
<form onSubmit={submit}> <form onSubmit={submit}>
<ErrorNotification error={error} />
<ImportFromUrlForm <ImportFromUrlForm
repository={repo} repository={repo}
onChange={setRepo} onChange={setRepo}
setValid={(importUrl: boolean) => setValid({ ...valid, importUrl })} setValid={(importUrl: boolean) => setValid({ ...valid, importUrl })}
disabled={loading} disabled={loading}
/> />
<ErrorNotification error={error} />
<hr /> <hr />
<NamespaceAndNameFields <NamespaceAndNameFields
repository={repo} repository={repo}

View File

@@ -250,8 +250,6 @@ public class RepositoryImportResource {
@Email @Email
String getContact(); String getContact();
String getDescription(); String getDescription();
List<HealthCheckFailureDto> getHealthCheckFailures();
Instant getLastModified();
String getImportUrl(); String getImportUrl();
String getUsername(); String getUsername();
String getPassword(); String getPassword();