Table of Contents

Class Project

Namespace
Ando.Server.Models
Assembly
Ando.Server.dll

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

string

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

string

Builds

All builds for this project.

public ICollection<Build> Builds { get; set; }

Property Value

ICollection<Build>

CreatedAt

When the project was created.

public DateTime CreatedAt { get; set; }

Property Value

DateTime

DefaultBranch

Default branch name (e.g., "main" or "master").

public string DefaultBranch { get; set; }

Property Value

string

DockerImage

Custom Docker image for builds. Null uses the system default.

public string? DockerImage { get; set; }

Property Value

string

EnablePrBuilds

Whether pull requests trigger builds. Default is false to avoid unexpected build usage.

public bool EnablePrBuilds { get; set; }

Property Value

bool

GitHubRepoId

GitHub's unique repository ID.

public long GitHubRepoId { get; set; }

Property Value

long

Id

Unique identifier for this project.

public int Id { get; set; }

Property Value

int

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

bool

LastBuildAt

When the last build was started for this project.

public DateTime? LastBuildAt { get; set; }

Property Value

DateTime?

NotificationEmail

Override email address for notifications. Null uses owner's email.

public string? NotificationEmail { get; set; }

Property Value

string

NotifyOnFailure

Whether to send email notifications on build failure.

public bool NotifyOnFailure { get; set; }

Property Value

bool

Owner

The user who owns this project.

public ApplicationUser Owner { get; set; }

Property Value

ApplicationUser

OwnerId

ID of the user who owns this project.

public int OwnerId { get; set; }

Property Value

int

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

string

RepoFullName

Full repository name in "owner/repo" format.

public string RepoFullName { get; set; }

Property Value

string

RepoUrl

HTTPS URL to the repository.

public string RepoUrl { get; set; }

Property Value

string

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

string

Secrets

Environment variable secrets for this project.

public ICollection<ProjectSecret> Secrets { get; set; }

Property Value

ICollection<ProjectSecret>

TimeoutMinutes

Maximum build duration in minutes before timeout. Default is 15 minutes.

public int TimeoutMinutes { get; set; }

Property Value

int

Methods

GetAvailableProfileNames()

Gets the list of available profile names.

public IReadOnlyList<string> GetAvailableProfileNames()

Returns

IReadOnlyList<string>

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

IReadOnlyList<string>

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

configuredSecretNames IEnumerable<string>

Returns

IReadOnlyList<string>

GetNotificationEmail()

Gets the email address to use for notifications.

public string? GetNotificationEmail()

Returns

string

GetRequiredSecretNames()

Gets the list of required secret names.

public IReadOnlyList<string> GetRequiredSecretNames()

Returns

IReadOnlyList<string>

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

bool

MatchesBranchFilter(string)

Checks if a branch matches the configured filter.

public bool MatchesBranchFilter(string branch)

Parameters

branch string

Returns

bool

SetAvailableProfiles(IEnumerable<string>)

Updates the available profiles from a detected list.

public void SetAvailableProfiles(IEnumerable<string> profiles)

Parameters

profiles IEnumerable<string>