Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactoring RepositoryForm Validators #2395
Open
+46
−45
Conversation
| await SafeRepositoryNameWarningValidator.ResetAsync(); | ||
| RepositoryName = name; | ||
| }); | ||
| // this.WhenAny(x => x.SelectedConnection, x => x.SelectedAccount, |
This comment has been minimized.
This comment has been minimized.
| @@ -25,8 +25,8 @@ public interface IRepositoryForm : IViewModel | |||
| /// dashes. | |||
| /// </summary> | |||
| string SafeRepositoryName { get; } | |||
| ReactivePropertyValidator<string> RepositoryNameValidator { get; } | |||
| ReactivePropertyValidator<string> SafeRepositoryNameWarningValidator { get; } | |||
| ReactivePropertyValidator<(string repositoryName, IConnection connection, IAccount account)> RepositoryNameValidator { get; } | |||
This comment has been minimized.
This comment has been minimized.
jcansdale
Jun 28, 2019
Collaborator
Looking at the code, I can't see where we're using the connection or account for validation. I wonder if once upon a time we were checking for an existing repository with the same name as part of the validation? It looks like this check is now done and the error surfaced when the user attempts to create the repository.
I think we might be able to simplify this to use just the repositoryName. I'm wondering if the buggy code was actually completely obsolete. ;-)
|
I'm wondering if we could simply remove the buggy code? See comment: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


StanleyGoldman commentedJun 27, 2019
No description provided.