Class Project
A GitHub repository configured for CI builds.
public class Project
- Inheritance
-
Project
- Inherited Members
Properties
AvailableProfiles
Comma-separated list of available profile names detected from build.csando. Updated when the repo is connected and on each build.
public string? AvailableProfiles { get; set; }
Property Value
BranchFilter
Comma-separated list of branches that trigger builds. Default is "main,master" to catch both common defaults.
public string BranchFilter { get; set; }
Property Value
Builds
All builds for this project.
public ICollection<Build> Builds { get; set; }
Property Value
CreatedAt
When the project was created.
public DateTime CreatedAt { get; set; }
Property Value
DefaultBranch
Default branch name (e.g., "main" or "master").
public string DefaultBranch { get; set; }
Property Value
DockerImage
Custom Docker image for builds. Null uses the system default.
public string? DockerImage { get; set; }
Property Value
EnablePrBuilds
Whether pull requests trigger builds. Default is false to avoid unexpected build usage.
public bool EnablePrBuilds { get; set; }
Property Value
GitHubRepoId
GitHub's unique repository ID.
public long GitHubRepoId { get; set; }
Property Value
Id
Unique identifier for this project.
public int Id { get; set; }
Property Value
InstallationId
GitHub App installation ID for this repository. Required for API access and webhook verification.
public long? InstallationId { get; set; }
Property Value
- long?
IsConfigured
Checks if all required secrets are configured.
public bool IsConfigured { get; }
Property Value
LastBuildAt
When the last build was started for this project.
public DateTime? LastBuildAt { get; set; }
Property Value
NotificationEmail
Override email address for notifications. Null uses owner's email.
public string? NotificationEmail { get; set; }
Property Value
NotifyOnFailure
Whether to send email notifications on build failure.
public bool NotifyOnFailure { get; set; }
Property Value
Owner
The user who owns this project.
public ApplicationUser Owner { get; set; }
Property Value
OwnerId
ID of the user who owns this project.
public int OwnerId { get; set; }
Property Value
Profile
The selected build profile to use. Null means no profile (default build). Must match one of the profiles in AvailableProfiles.
public string? Profile { get; set; }
Property Value
RepoFullName
Full repository name in "owner/repo" format.
public string RepoFullName { get; set; }
Property Value
RepoUrl
HTTPS URL to the repository.
public string RepoUrl { get; set; }
Property Value
RequiredSecrets
Comma-separated list of required environment variable names. Builds are blocked until all required secrets are configured.
public string? RequiredSecrets { get; set; }
Property Value
Secrets
Environment variable secrets for this project.
public ICollection<ProjectSecret> Secrets { get; set; }
Property Value
TimeoutMinutes
Maximum build duration in minutes before timeout. Default is 15 minutes.
public int TimeoutMinutes { get; set; }
Property Value
Methods
GetAvailableProfileNames()
Gets the list of available profile names.
public IReadOnlyList<string> GetAvailableProfileNames()
Returns
GetMissingSecrets()
Gets the list of required secrets that are not yet configured. Uses the Secrets navigation property (must be loaded).
public IReadOnlyList<string> GetMissingSecrets()
Returns
GetMissingSecretsFrom(IEnumerable<string>)
Gets the list of required secrets that are not in the provided list. Use when Secrets navigation property is not loaded.
public IReadOnlyList<string> GetMissingSecretsFrom(IEnumerable<string> configuredSecretNames)
Parameters
configuredSecretNamesIEnumerable<string>
Returns
GetNotificationEmail()
Gets the email address to use for notifications.
public string? GetNotificationEmail()
Returns
GetRequiredSecretNames()
Gets the list of required secret names.
public IReadOnlyList<string> GetRequiredSecretNames()
Returns
IsProfileValid()
Checks if the selected profile is valid. A null profile is always valid (uses default build). A non-null profile must exist in AvailableProfiles.
public bool IsProfileValid()
Returns
MatchesBranchFilter(string)
Checks if a branch matches the configured filter.
public bool MatchesBranchFilter(string branch)
Parameters
branchstring
Returns
SetAvailableProfiles(IEnumerable<string>)
Updates the available profiles from a detected list.
public void SetAvailableProfiles(IEnumerable<string> profiles)
Parameters
profilesIEnumerable<string>