{"record":{"id":"353df1b289f10a61","repo":"abpframework/abp","slug":"repositorynamewithorganization-repositorynamewit","errorCode":null,"errorMessage":"repositoryNameWithOrganization '{repositoryNameWithOrganization}' is not valid! It should be formatted as 'organization-name/repository-name'.","messagePattern":"repositoryNameWithOrganization '(.+?)' is not valid! It should be formatted as 'organization-name/repository-name'\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/GithubRepositoryInfo.cs","lineNumber":17,"sourceCode":"﻿using System;\n\nnamespace Volo.Abp.Cli.ProjectBuilding.Building;\n\npublic class GithubRepositoryInfo\n{\n    public string RepositoryNameWithOrganization { get; }\n\n    public string RepositoryName { get; }\n\n    public string AccessToken { get; }\n\n    public GithubRepositoryInfo(string repositoryNameWithOrganization, string accessToken)\n    {\n        if (!repositoryNameWithOrganization.Contains(\"/\"))\n        {\n            throw new ApplicationException($\"{nameof(repositoryNameWithOrganization)} '{repositoryNameWithOrganization}' is not valid! It should be formatted as 'organization-name/repository-name'.\");\n        }\n\n        RepositoryNameWithOrganization = repositoryNameWithOrganization;\n        RepositoryName = repositoryNameWithOrganization.Split('/')[1];\n        AccessToken = accessToken;\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/GithubRepositoryInfo.cs#L1-L25","documentation":"Thrown by the `GithubRepositoryInfo` constructor when `repositoryNameWithOrganization` does not contain a `/` character, i.e. it is not in the `organization/repository` format. It is an `ApplicationException`. The constructor then splits on `/` to derive the repository name.","triggerScenarios":"Providing a local module/template source as a GitHub repo reference (e.g. via `--template-source`/module source) using a bare repository name like `myrepo` instead of `acme/myrepo`.","commonSituations":"Typing the repo without the org prefix; copying just the repo name from a URL; using an SSH/HTTPS URL where the CLI expects the `org/repo` slug.","solutions":["Format the value as `organization/repository`, e.g. `abpframework/abp`.","If you meant a local path or URL, use the appropriate `template-source` form instead of the GitHub slug.","Optionally pass a GitHub access token as the second constructor argument once the slug is correct."],"exampleFix":"// before\nnew GithubRepositoryInfo(\"myrepo\", token);\n// after\nnew GithubRepositoryInfo(\"acme/myrepo\", token);","handlingStrategy":"validation","validationCode":"static bool IsValidRepoSlug(string slug) =>\n    !string.IsNullOrWhiteSpace(slug) && slug.Count(c => c == '/') == 1 && !slug.StartsWith(\"/\") && !slug.EndsWith(\"/\");\n\nif (!IsValidRepoSlug(repositoryNameWithOrganization))\n    throw new ArgumentException(\"Expected 'organization/repository'.\", nameof(repositoryNameWithOrganization));","typeGuard":"static bool IsGithubRepoSlug(string value) =>\n    !string.IsNullOrEmpty(value)\n    && value.Split('/', StringSplitOptions.None) is { Length: 2 } parts\n    && !string.IsNullOrWhiteSpace(parts[0])\n    && !string.IsNullOrWhiteSpace(parts[1]);","tryCatchPattern":"try { var info = new GithubRepositoryInfo(slug, token); }\ncatch (ApplicationException ex) when (ex.Message.Contains(\"organization-name/repository-name\"))\n{\n    logger.LogError(\"Invalid repo slug '{Slug}'. Use 'org/repo'.\", slug);\n    throw;\n}","preventionTips":["Always provide the organization prefix when referencing GitHub repos.","Validate the slug format in UI/scripts before submission.","Copy the slug from the GitHub URL path (after the domain)."],"tags":["cli","project-building","github","validation","argument"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}