Table of Contents

Interface IProjectService

Namespace
Ando.Server.Services
Assembly
Ando.Server.dll

Service for managing projects.

public interface IProjectService

Methods

CreateProjectAsync(int, long, string, string, string, long?)

Creates a new project.

Task<Project> CreateProjectAsync(int ownerId, long gitHubRepoId, string repoFullName, string repoUrl, string defaultBranch, long? installationId = null)

Parameters

ownerId int
gitHubRepoId long
repoFullName string
repoUrl string
defaultBranch string
installationId long?

Returns

Task<Project>

DeleteProjectAsync(int)

Deletes a project and all associated data.

Task<bool> DeleteProjectAsync(int projectId)

Parameters

projectId int

Returns

Task<bool>

DeleteSecretAsync(int, string)

Deletes a secret from a project.

Task<bool> DeleteSecretAsync(int projectId, string name)

Parameters

projectId int
name string

Returns

Task<bool>

DetectAndUpdateProfilesAsync(int)

Updates the available profiles list for a project by detecting them from the build script.

Task<IReadOnlyList<string>> DetectAndUpdateProfilesAsync(int projectId)

Parameters

projectId int

Project ID.

Returns

Task<IReadOnlyList<string>>

The list of detected available profiles.

DetectAndUpdateRequiredSecretsAsync(int)

Updates the required secrets list for a project by detecting them from the build script.

Task<IReadOnlyList<string>> DetectAndUpdateRequiredSecretsAsync(int projectId)

Parameters

projectId int

Project ID.

Returns

Task<IReadOnlyList<string>>

The list of detected required secrets.

GetProjectAsync(int)

Gets a project by ID.

Task<Project?> GetProjectAsync(int projectId)

Parameters

projectId int

Returns

Task<Project>

GetProjectForUserAsync(int, int)

Gets a project by ID, verifying ownership.

Task<Project?> GetProjectForUserAsync(int projectId, int userId)

Parameters

projectId int
userId int

Returns

Task<Project>

GetProjectsForUserAsync(int)

Gets all projects for a user.

Task<IReadOnlyList<Project>> GetProjectsForUserAsync(int userId)

Parameters

userId int

Returns

Task<IReadOnlyList<Project>>

GetSecretNamesAsync(int)

Gets secret names (not values) for a project.

Task<IReadOnlyList<string>> GetSecretNamesAsync(int projectId)

Parameters

projectId int

Returns

Task<IReadOnlyList<string>>

SetSecretAsync(int, string, string)

Sets or updates a secret for a project.

Task SetSecretAsync(int projectId, string name, string value)

Parameters

projectId int
name string
value string

Returns

Task

UpdateProjectSettingsAsync(int, string, bool, int, string?, string?, bool, string?)

Updates project settings. Note: RequiredSecrets and AvailableProfiles are auto-detected from build.csando and not set manually.

Task<bool> UpdateProjectSettingsAsync(int projectId, string branchFilter, bool enablePrBuilds, int timeoutMinutes, string? dockerImage, string? profile, bool notifyOnFailure, string? notificationEmail)

Parameters

projectId int
branchFilter string
enablePrBuilds bool
timeoutMinutes int
dockerImage string
profile string
notifyOnFailure bool
notificationEmail string

Returns

Task<bool>