mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
cleanup
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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)",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user