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}
* @return a {@link List} names of imported repositories
* @throws IOException
* @since 2.11.0
* @deprecated
*/
public List<String> importRepositories(RepositoryManager manager) throws IOException;

View File

@@ -174,6 +174,8 @@ describe("test url validation", () => {
}
const valid = [
"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_(wikipedia)",
"https://foo.com/blah_blah_(wikipedia)_(again)",

View File

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

View File

@@ -22,7 +22,7 @@
* SOFTWARE.
*/
import {Collection, Links} from "./hal";
import { Collection, Links } from "./hal";
export type RepositoryType = {
name: string;

View File

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

View File

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