feat: several Git repositories per project
A project keeps a list of repositories (api, web, admin…), each with its own secret, instead of a single webhook secret. They all call the same URL; the secret that verifies the signature tells which one it was, and every commit, branch or pull request is linked with its repository's name (shown on the ticket and in the MCP). Rotating or removing one leaves the others alone, and what it linked stays. A project that had turned the single webhook on keeps its secret, as a repository named "principal". API: the enable/disable endpoints and mutations give way to adding a repository, rotating its secret and removing it (REST and GraphQL). The web settings card lists the repositories. Docs, Word and PDF updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,6 +168,8 @@ export interface DevLink {
|
||||
ref: string;
|
||||
state: 'OPEN' | 'MERGED' | 'CLOSED' | null;
|
||||
provider: string;
|
||||
/** The project's name for the repository it came from. */
|
||||
repository: string | null;
|
||||
author: string | null;
|
||||
at: string;
|
||||
}
|
||||
@@ -245,11 +247,22 @@ export interface ImportReport {
|
||||
}
|
||||
|
||||
/** The project's webhook for GitHub, Gitea or GitLab. */
|
||||
export interface GitIntegration {
|
||||
enabled: boolean;
|
||||
/** A repository whose webhooks the project accepts. */
|
||||
export interface GitRepository {
|
||||
id: string;
|
||||
/** The project's name for it: api, web, admin… */
|
||||
name: string;
|
||||
/** Only for owners and admins. */
|
||||
secret: string | null;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface GitIntegration {
|
||||
/** On while there is at least one repository. */
|
||||
enabled: boolean;
|
||||
/** The same for every repository: the secret tells them apart. */
|
||||
webhookPath: string;
|
||||
repositories: GitRepository[];
|
||||
}
|
||||
|
||||
export interface Comment {
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
Comment,
|
||||
Epic,
|
||||
GitIntegration,
|
||||
GitRepository,
|
||||
Automation,
|
||||
AutomationInput,
|
||||
ImportReport,
|
||||
@@ -200,9 +201,19 @@ export abstract class WebhooksGateway {
|
||||
/** The project's Git webhook (owners and admins configure it). */
|
||||
export abstract class GitGateway {
|
||||
abstract integration(projectId: string): Observable<GitIntegration>;
|
||||
/** On with a new secret (also to rotate it). */
|
||||
abstract enable(projectId: string): Observable<GitIntegration>;
|
||||
abstract disable(projectId: string): Observable<void>;
|
||||
/** A repository with its own secret (the first turns the integration on). */
|
||||
abstract addRepository(
|
||||
projectId: string,
|
||||
name: string,
|
||||
): Observable<GitRepository>;
|
||||
abstract rotateSecret(
|
||||
projectId: string,
|
||||
repositoryId: string,
|
||||
): Observable<GitRepository>;
|
||||
abstract removeRepository(
|
||||
projectId: string,
|
||||
repositoryId: string,
|
||||
): Observable<void>;
|
||||
}
|
||||
|
||||
/** Saved views of a project's board (mine and the shared ones). */
|
||||
|
||||
Reference in New Issue
Block a user