Merge branch 'master' into feat-integration-gerrit-edit-mode

This commit is contained in:
Andy LADJADJ
2025-04-11 17:07:09 +02:00
3335 changed files with 168684 additions and 56307 deletions
+28
View File
@@ -1,5 +1,33 @@
# @backstage/integration
## 1.16.3-next.0
### Patch Changes
- 9768992: Mark GitHub `webhookSecret` config property as optional. A `webhookSecret` is not required when creating a GitHub App.
- Updated dependencies
- @backstage/config@1.3.2
- @backstage/errors@1.2.7
## 1.16.2
### Patch Changes
- 89db8b8: Gerrit integration now exports `getGitilesAuthenticationUrl`. This enables its usage by the `GerritUrlReader`.
- 4f8b5b6: Allow signing git commits using configured private PGP key in scaffolder
- Updated dependencies
- @backstage/config@1.3.2
- @backstage/errors@1.2.7
## 1.16.2-next.0
### Patch Changes
- 4f8b5b6: Allow signing git commits using configured private PGP key in scaffolder
- Updated dependencies
- @backstage/config@1.3.2
- @backstage/errors@1.2.7
## 1.16.1
### Patch Changes
+36 -1
View File
@@ -62,6 +62,11 @@ export interface Config {
tenantId?: string;
personalAccessToken?: string;
}[];
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/**
@@ -94,6 +99,11 @@ export interface Config {
* @visibility secret
*/
appPassword?: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for Bitbucket Cloud */
@@ -108,6 +118,11 @@ export interface Config {
* @visibility secret
*/
appPassword: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for Bitbucket Server */
@@ -137,6 +152,11 @@ export interface Config {
* @visibility frontend
*/
apiBaseUrl?: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for Gerrit */
@@ -177,6 +197,11 @@ export interface Config {
* @visibility secret
*/
password?: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for GitHub */
@@ -219,7 +244,7 @@ export interface Config {
* The secret used for webhooks
* @visibility secret
*/
webhookSecret: string;
webhookSecret?: string;
/**
* The client ID to use
*/
@@ -274,6 +299,11 @@ export interface Config {
* @visibility frontend
*/
baseUrl?: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for Google Cloud Storage */
@@ -354,6 +384,11 @@ export interface Config {
* @visibility secret
*/
password?: string;
/**
* PGP signing key for signing commits.
* @visibility secret
*/
commitSigningKey?: string;
}>;
/** Integration configuration for Harness Code */
harness?: Array<{
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/integration",
"version": "1.16.1",
"version": "1.16.3-next.0",
"description": "Helpers for managing integrations towards external systems",
"backstage": {
"role": "common-library"
+13 -1
View File
@@ -201,6 +201,7 @@ export type AzureIntegrationConfig = {
token?: string;
credential?: AzureDevOpsCredential;
credentials?: AzureDevOpsCredential[];
commitSigningKey?: string;
};
// @public
@@ -237,6 +238,7 @@ export type BitbucketCloudIntegrationConfig = {
username?: string;
appPassword?: string;
token?: string;
commitSigningKey?: string;
};
// @public @deprecated
@@ -267,6 +269,7 @@ export type BitbucketIntegrationConfig = {
token?: string;
username?: string;
appPassword?: string;
commitSigningKey?: string;
};
// @public
@@ -297,6 +300,7 @@ export type BitbucketServerIntegrationConfig = {
token?: string;
username?: string;
password?: string;
commitSigningKey?: string;
};
// @public @deprecated
@@ -396,6 +400,7 @@ export type GerritIntegrationConfig = {
gitilesBaseUrl: string;
username?: string;
password?: string;
commitSigningKey?: string;
};
// @public
@@ -562,6 +567,11 @@ export function getGitHubRequestOptions(
headers: Record<string, string>;
};
// @public
export function getGitilesAuthenticationUrl(
config: GerritIntegrationConfig,
): string;
// @public
export function getGitLabFileFetchUrl(
url: string,
@@ -631,13 +641,14 @@ export type GiteaIntegrationConfig = {
baseUrl?: string;
username?: string;
password?: string;
commitSigningKey?: string;
};
// @public
export type GithubAppConfig = {
appId: number;
privateKey: string;
webhookSecret: string;
webhookSecret?: string;
clientId: string;
clientSecret: string;
allowedInstallationOwners?: string[];
@@ -745,6 +756,7 @@ export type GitLabIntegrationConfig = {
apiBaseUrl: string;
token?: string;
baseUrl: string;
commitSigningKey?: string;
};
// @public
+6
View File
@@ -57,6 +57,11 @@ export type AzureIntegrationConfig = {
* If no credentials are specified at all, either a default credential (for Azure DevOps) or anonymous access (for Azure DevOps Server) is used.
*/
credentials?: AzureDevOpsCredential[];
/**
* Signing key for commits
*/
commitSigningKey?: string;
};
/**
@@ -349,6 +354,7 @@ export function readAzureIntegrationConfig(
return {
host,
credentials,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
@@ -62,6 +62,11 @@ export type BitbucketIntegrationConfig = {
* See https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/
*/
appPassword?: string;
/**
* Signing key for commits
*/
commitSigningKey?: string;
};
/**
@@ -100,6 +105,7 @@ export function readBitbucketIntegrationConfig(
token,
username,
appPassword,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
@@ -51,6 +51,9 @@ export type BitbucketCloudIntegrationConfig = {
* The access token to use for requests to Bitbucket Cloud (bitbucket.org).
*/
token?: string;
/** PGP private key for signing commits. */
commitSigningKey?: string;
};
/**
@@ -74,6 +77,7 @@ export function readBitbucketCloudIntegrationConfig(
apiBaseUrl,
username,
appPassword,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
@@ -64,6 +64,11 @@ export type BitbucketServerIntegrationConfig = {
* See https://developer.atlassian.com/server/bitbucket/how-tos/command-line-rest/#authentication
*/
password?: string;
/**
* Signing key for commits
*/
commitSigningKey?: string;
};
/**
@@ -99,6 +104,7 @@ export function readBitbucketServerIntegrationConfig(
token,
username,
password,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
@@ -65,6 +65,11 @@ export type GerritIntegrationConfig = {
* The password or http token to use for authentication.
*/
password?: string;
/**
* The signing key to use for signing commits.
*/
commitSigningKey?: string;
};
/**
@@ -123,6 +128,7 @@ export function readGerritIntegrationConfig(
gitilesBaseUrl,
username,
password,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
+1
View File
@@ -315,6 +315,7 @@ export function getAuthenticationPrefix(
* be used.
*
* @param config - A Gerrit provider config.
* @public
*/
export function getGitilesAuthenticationUrl(
config: GerritIntegrationConfig,
+1
View File
@@ -21,6 +21,7 @@ export {
export {
buildGerritGitilesArchiveUrl,
buildGerritGitilesArchiveUrlFromLocation,
getGitilesAuthenticationUrl,
getGerritBranchApiUrl,
getGerritCloneRepoUrl,
getGerritFileContentsApiUrl,
+6
View File
@@ -45,6 +45,11 @@ export type GiteaIntegrationConfig = {
* The password or http token to use for authentication.
*/
password?: string;
/**
* Signing key to to sign commits
*/
commitSigningKey?: string;
};
/**
@@ -79,5 +84,6 @@ export function readGiteaConfig(config: Config): GiteaIntegrationConfig {
baseUrl,
username,
password,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
+2 -2
View File
@@ -92,7 +92,7 @@ export type GithubAppConfig = {
/**
* Webhook secret can be configured at https://github.com/organizations/$org/settings/apps/$AppName
*/
webhookSecret: string;
webhookSecret?: string;
/**
* Found at https://github.com/organizations/$org/settings/apps/$AppName
*/
@@ -128,7 +128,7 @@ export function readGithubIntegrationConfig(
appId: c.getNumber('appId'),
clientId: c.getString('clientId'),
clientSecret: c.getString('clientSecret'),
webhookSecret: c.getString('webhookSecret'),
webhookSecret: c.getOptionalString('webhookSecret'),
privateKey: c.getString('privateKey'),
allowedInstallationOwners: c.getOptionalStringArray(
'allowedInstallationOwners',
+12 -1
View File
@@ -54,6 +54,11 @@ export type GitLabIntegrationConfig = {
* If no baseUrl is provided, it will default to `https://${host}`
*/
baseUrl: string;
/**
* Signing key to sign commits
*/
commitSigningKey?: string;
};
/**
@@ -95,7 +100,13 @@ export function readGitLabIntegrationConfig(
);
}
return { host, token, apiBaseUrl, baseUrl };
return {
host,
token,
apiBaseUrl,
baseUrl,
commitSigningKey: config.getOptionalString('commitSigningKey'),
};
}
/**