Skip to content

Commit 04671b3

Browse files
calin-lupas_dsamcapscalin-lupas_dsamcaps
authored andcommitted
#25 Enhance repository validation logic
Added a line to set the `isValid` variable to `false` if the repository already exists. This improves the clarity and functionality of the validation process by explicitly indicating the repository's validity status.
1 parent 953f3e3 commit 04671b3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/DevExcelerateApi/Services/RepositoryService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public async Task ValidateRepository(IssuesEvent issuesEvent, bool createPullReq
5656
{
5757
await gitHubClient.Repository.Get(repoRequest.RepositoryOwner, repoRequest.RepositoryName);
5858
validationReasons.Add(_localizationService.GetLocalizedString(Constants.ERROR_REPO_EXISTS));
59+
isValid = false;
5960
}
6061
catch (NotFoundException)
6162
{

0 commit comments

Comments
 (0)