Include missing fields in GitLab config schema

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-03-08 19:08:24 +01:00
parent cd07d485c2
commit 277644e098
3 changed files with 36 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/integration': patch
---
Include missing fields in GitLab config schema. This sometimes prevented loading config on the frontend specifically, when using self-hosted GitLab.
+24 -2
View File
@@ -117,15 +117,37 @@ export interface Config {
/** Integration configuration for GitLab */
gitlab?: Array<{
/**
* The hostname of the given GitLab instance
* The host of the target that this matches on, e.g. "gitlab.com".
*
* @visibility frontend
*/
host: string;
/**
* Token used to authenticate requests.
* The base URL of the API of this provider, e.g.
* "https://gitlab.com/api/v4", with no trailing slash.
*
* May be omitted specifically for public GitLab; then it will be deduced.
*
* @visibility frontend
*/
apiBaseUrl?: string;
/**
* The authorization token to use for requests to this provider.
*
* If no token is specified, anonymous access is used.
*
* @visibility secret
*/
token?: string;
/**
* The baseUrl of this provider, e.g. "https://gitlab.com", which is
* passed into the GitLab client.
*
* If no baseUrl is provided, it will default to https://${host}.
*
* @visibility frontend
*/
baseUrl?: string;
}>;
};
}
+7 -10
View File
@@ -25,31 +25,28 @@ const GITLAB_API_BASE_URL = 'https://gitlab.com/api/v4';
*/
export type GitLabIntegrationConfig = {
/**
* The host of the target that this matches on, e.g. "gitlab.com"
* The host of the target that this matches on, e.g. "gitlab.com".
*/
host: string;
/**
* The base URL of the API of this provider, e.g. "https://gitlab.com/api/v4",
* with no trailing slash.
* The base URL of the API of this provider, e.g.
* "https://gitlab.com/api/v4", with no trailing slash.
*
* May be omitted specifically for GitLab; then it will be deduced.
*
* The API will always be preferred if both its base URL and a token are
* present.
* May be omitted specifically for public GitLab; then it will be deduced.
*/
apiBaseUrl: string;
/**
* The authorization token to use for requests this provider.
* The authorization token to use for requests to this provider.
*
* If no token is specified, anonymous access is used.
*/
token?: string;
/**
* The baseUrl of this provider, e.g "https://gitlab.com",
* which is passed into the gitlab client.
* The baseUrl of this provider, e.g. "https://gitlab.com", which is passed
* into the GitLab client.
*
* If no baseUrl is provided, it will default to https://${host}
*/