Interface IProjectService
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
ownerIdintgitHubRepoIdlongrepoFullNamestringrepoUrlstringdefaultBranchstringinstallationIdlong?
Returns
DeleteProjectAsync(int)
Deletes a project and all associated data.
Task<bool> DeleteProjectAsync(int projectId)
Parameters
projectIdint
Returns
DeleteSecretAsync(int, string)
Deletes a secret from a project.
Task<bool> DeleteSecretAsync(int projectId, string name)
Parameters
Returns
DetectAndUpdateProfilesAsync(int)
Updates the available profiles list for a project by detecting them from the build script.
Task<IReadOnlyList<string>> DetectAndUpdateProfilesAsync(int projectId)
Parameters
projectIdintProject 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
projectIdintProject ID.
Returns
- Task<IReadOnlyList<string>>
The list of detected required secrets.
GetProjectAsync(int)
Gets a project by ID.
Task<Project?> GetProjectAsync(int projectId)
Parameters
projectIdint
Returns
GetProjectForUserAsync(int, int)
Gets a project by ID, verifying ownership.
Task<Project?> GetProjectForUserAsync(int projectId, int userId)
Parameters
Returns
GetProjectsForUserAsync(int)
Gets all projects for a user.
Task<IReadOnlyList<Project>> GetProjectsForUserAsync(int userId)
Parameters
userIdint
Returns
GetSecretNamesAsync(int)
Gets secret names (not values) for a project.
Task<IReadOnlyList<string>> GetSecretNamesAsync(int projectId)
Parameters
projectIdint
Returns
SetSecretAsync(int, string, string)
Sets or updates a secret for a project.
Task SetSecretAsync(int projectId, string name, string value)
Parameters
Returns
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
projectIdintbranchFilterstringenablePrBuildsbooltimeoutMinutesintdockerImagestringprofilestringnotifyOnFailureboolnotificationEmailstring