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 upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Refactoring RepositoryForm Validators #2395
Conversation
| await SafeRepositoryNameWarningValidator.ResetAsync(); | ||
| RepositoryName = name; | ||
| }); | ||
| // this.WhenAny(x => x.SelectedConnection, x => x.SelectedAccount, |
jcansdale
Jun 28, 2019
•
Collaborator
We should delete these comments!
We should delete these comments!
| @@ -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; } | |||
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. ;-)
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: |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

No description provided.