GitHubCatalogOptions
Namespace: Meshmakers.Octo.ConstructionKit.Contracts.ModelCatalogs
Defines the GitHub Options for GitHub construction kit catalog
public abstract class GitHubCatalogOptions : CatalogOptions, IGitHubOptions
Inheritance Object → CatalogOptions → GitHubCatalogOptions
Implements IGitHubOptions
Properties
GitHubApiToken
API Token for GitHub
public string GitHubApiToken { get; set; }
Property Value
GitHubRepositoryName
Name of the GitHub repository
public string GitHubRepositoryName { get; set; }
Property Value
GitHubRepositoryOwner
Owner of the GitHub repository
public string GitHubRepositoryOwner { get; set; }
Property Value
GitHubRepositoryBranch
GitHub repository branch
public string GitHubRepositoryBranch { get; set; }
Property Value
GitHubPagesUri
The uri to the GitHub pages site where the construction kit models are stored. If null or empty, the repository will use GitHub API for reading models.
public string GitHubPagesUri { get; set; }
Property Value
ProductName
Represents the product name to be used in the User-Agent header when making requests to GitHub API.
public string ProductName { get; set; }
Property Value
IsEnabled
When true, this GitHub catalog is enabled for reading and writing models.
public bool IsEnabled { get; set; }
Property Value
RefreshNotFoundRetryCount
How often a catalog refresh retries reading an index file that is listed in the root catalog but answers 404. GitHub Pages briefly serves 404 while a deployment is being replaced, so a listed-but-missing index is usually transient. The count is a budget shared across one refresh, so a full site swap cannot stall a refresh for minutes.
public int RefreshNotFoundRetryCount { get; set; }
Property Value
RefreshNotFoundRetryDelaySeconds
Delay in seconds between the retries of GitHubCatalogOptions.RefreshNotFoundRetryCount.
public int RefreshNotFoundRetryDelaySeconds { get; set; }
Property Value
ApiReads
Whether a process that holds an API token may use the GitHub Contents API for READS (the source-of-truth
read of dependency resolution, ValidateVersion, the cascade check and the API fallback of a model read).
CatalogApiReadMode.Auto (default): on a CI build only. A token that merely happens to be configured on a
developer machine does not switch local builds to API reads; they use the Pages mirror and the cached catalogs and
need no token. A publish needs the token and always reads authoritatively, whatever this says.
public CatalogApiReadMode ApiReads { get; set; }
Property Value
ApiReadsEnabled
The effective value of GitHubCatalogOptions.ApiReads: true when reads may use the API (a token is still required).
public bool ApiReadsEnabled { get; }
Property Value
CacheFileName
Get or sets the cache file name for GitHub catalog
public string CacheFileName { get; set; }
Property Value
CacheDirectory
Gets or sets the cache directory for model catalogs
public string CacheDirectory { get; set; }
Property Value
Methods
ParseApiReads(String)
Parses Auto / Enabled / Disabled (case-insensitive); null for an empty or unknown value.
public static Nullable<CatalogApiReadMode> ParseApiReads(string value)
Parameters
value String
Returns
IsContinuousIntegrationEnvironment()
True on an Azure Pipelines build (TF_BUILD), a build that sets ContinuousIntegrationBuild or CI.
public static bool IsContinuousIntegrationEnvironment()