From b74962217bbdca9e2f4e27d01c66f2126d761317 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Thu, 25 Aug 2022 18:57:57 -0400 Subject: [PATCH 001/279] Local SSL tutorial Signed-off-by: Nick Marinelli --- .../docs/tutorials/enable-ssl-self-signed.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 contrib/docs/tutorials/enable-ssl-self-signed.md diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md new file mode 100644 index 0000000000..8169e277fb --- /dev/null +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -0,0 +1,46 @@ +# Enabling SSL for Local Testing + +If you need to use an `https:` URL for local testing (i.e. if an OAuth provider requires a "secure" callback URL), you can use a self-signed certificate by following these steps. + +## Backend + +1. Generate a self-signed certificate and key for localhost. One approach uses OpenSSL: + ```bash + mkdir certs ; + openssl req -x509 -newkey rsa:2048 -nodes -keyout certs/localhost.key -out certs/localhost.crt -sha256 -days 3650 -subj '/CN=localhost' ; + ``` +1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address, and copy the contents of the certificate and key files into `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. Your app-config.local.yaml should look something like: + ```yaml + backend: + baseUrl: https://localhost:7007 + https: + certificate: + cert: | + -----BEGIN CERTIFICATE----- + MIIDCTCCAfGgAwIBAgIUZ9VhZckcy690L + ... + -----END CERTIFICATE----- + key: | + -----BEGIN PRIVATE KEY----- + MIIEvAIBADANBgkqhkiG9w0BAQ + ... + -----END PRIVATE KEY----- + ``` +1. Convince your browser to trust the certificate. In Windows this might mean adding the certificate to your Trusted Root CAs, or you may use a browser-specific configuration like Chrome's flag `chrome://flags/#allow-insecure-localhost`. +1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/certs/localhost.crt yarn start-backend` + +## Frontend + +Webpack will generate a self signed certificate automatically in development environments when the protocol in the `baseUrl` is `https`. Therefore, simply add this to your local config: + +```yaml +app: + baseUrl: https://localhost:3000 +backend: + cors: + origin: https://localhost:3000 +``` + +and start the app with `yarn start`. As with the backend instructions above, the certificate must be trusted. + +Depending on what plugins are in use, you may need to override additional URLs to use `https` for those endpoints to work. From 928e31bfdc0fcddf2ef4c5004e0873348c9aca69 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Fri, 26 Aug 2022 15:25:38 -0400 Subject: [PATCH 002/279] adapt for mkcert Signed-off-by: Nick Marinelli --- contrib/docs/tutorials/enable-ssl-self-signed.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 8169e277fb..589e96dc80 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -4,11 +4,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ## Backend -1. Generate a self-signed certificate and key for localhost. One approach uses OpenSSL: - ```bash - mkdir certs ; - openssl req -x509 -newkey rsa:2048 -nodes -keyout certs/localhost.key -out certs/localhost.crt -sha256 -days 3650 -subj '/CN=localhost' ; - ``` +1. Generate a self-signed certificate and key for localhost and configure your system to trust it. [mkcert](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. 1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address, and copy the contents of the certificate and key files into `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. Your app-config.local.yaml should look something like: ```yaml backend: @@ -26,8 +22,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ... -----END PRIVATE KEY----- ``` -1. Convince your browser to trust the certificate. In Windows this might mean adding the certificate to your Trusted Root CAs, or you may use a browser-specific configuration like Chrome's flag `chrome://flags/#allow-insecure-localhost`. -1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/certs/localhost.crt yarn start-backend` +1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/cert.pem yarn start-backend` ## Frontend From 9acd95709ef1342f6d56788aac94dc613ebd52ab Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Fri, 26 Aug 2022 18:25:33 -0400 Subject: [PATCH 003/279] spellcheck workaround? Signed-off-by: Nick Marinelli --- contrib/docs/tutorials/enable-ssl-self-signed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 589e96dc80..18d9752ba2 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -4,7 +4,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ## Backend -1. Generate a self-signed certificate and key for localhost and configure your system to trust it. [mkcert](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. +1. Generate a self-signed certificate and key for localhost and configure your system to trust it. The application ["mkcert"](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. 1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address, and copy the contents of the certificate and key files into `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. Your app-config.local.yaml should look something like: ```yaml backend: From 2ecbd7cbdfca9c11269649501378629e5d5ffef6 Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Tue, 6 Sep 2022 16:59:29 -0400 Subject: [PATCH 004/279] update for #13338 changes, and option Signed-off-by: Nick Marinelli --- .../docs/tutorials/enable-ssl-self-signed.md | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 18d9752ba2..67c7091341 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -5,37 +5,45 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ## Backend 1. Generate a self-signed certificate and key for localhost and configure your system to trust it. The application ["mkcert"](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. -1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address, and copy the contents of the certificate and key files into `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. Your app-config.local.yaml should look something like: +1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address. +1. Add the certificate and key to `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. ```yaml backend: baseUrl: https://localhost:7007 https: certificate: + # You may copy the contents of the file... cert: | -----BEGIN CERTIFICATE----- MIIDCTCCAfGgAwIBAgIUZ9VhZckcy690L ... -----END CERTIFICATE----- - key: | - -----BEGIN PRIVATE KEY----- - MIIEvAIBADANBgkqhkiG9w0BAQ - ... - -----END PRIVATE KEY----- + # ... or use a path + key: + $file: ./certs/localhost-key.pem ``` 1. Start the backend with `NODE_EXTRA_CA_CERTS=/absolute/path/to/cert.pem yarn start-backend` ## Frontend -Webpack will generate a self signed certificate automatically in development environments when the protocol in the `baseUrl` is `https`. Therefore, simply add this to your local config: +1. As with the backend instructions above, a trusted certificate and key are needed. +1. Update `app.baseUrl` and `backend.cors.origin` in app-config.local.yaml to use an `https:` address. +1. Add the certificate and key to `app.https.certificate.cert` and `app.https.certificate.cert`, respectively. -```yaml -app: - baseUrl: https://localhost:3000 -backend: - cors: - origin: https://localhost:3000 -``` + ```yaml + app: + baseUrl: https://localhost:3000 + https: + certificate: + cert: + $file: ./certs/localhost.pem + key: + $file: ./certs/localhost-key.pem + backend: + cors: + origin: https://localhost:3000 + ``` -and start the app with `yarn start`. As with the backend instructions above, the certificate must be trusted. +1. and start the app with `yarn start`. Depending on what plugins are in use, you may need to override additional URLs to use `https` for those endpoints to work. From 8bf6ce022348b9923f9fcc7a01cfe11de89a15ec Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Tue, 6 Sep 2022 17:28:33 -0400 Subject: [PATCH 005/279] further vale appeasement Signed-off-by: Nick Marinelli --- contrib/docs/tutorials/enable-ssl-self-signed.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 67c7091341..27e0c82063 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -4,7 +4,7 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider ## Backend -1. Generate a self-signed certificate and key for localhost and configure your system to trust it. The application ["mkcert"](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. +1. Generate a self-signed certificate and key for localhost and configure your system to trust it. The application [`mkcert`](https://github.com/FiloSottile/mkcert) is a helpful tool to accomplish this. 1. Update `backend.baseUrl` in app-config.local.yaml to use an `https:` address. 1. Add the certificate and key to `backend.https.certificate.cert` and `backend.https.certificate.cert`, respectively. ```yaml From d419784c8bf7faae959ae35cf72aa1342da5616c Mon Sep 17 00:00:00 2001 From: Nick Marinelli Date: Tue, 6 Sep 2022 17:31:43 -0400 Subject: [PATCH 006/279] whitespace Signed-off-by: Nick Marinelli --- contrib/docs/tutorials/enable-ssl-self-signed.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/docs/tutorials/enable-ssl-self-signed.md b/contrib/docs/tutorials/enable-ssl-self-signed.md index 27e0c82063..80f5d36a98 100644 --- a/contrib/docs/tutorials/enable-ssl-self-signed.md +++ b/contrib/docs/tutorials/enable-ssl-self-signed.md @@ -29,7 +29,6 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider 1. As with the backend instructions above, a trusted certificate and key are needed. 1. Update `app.baseUrl` and `backend.cors.origin` in app-config.local.yaml to use an `https:` address. 1. Add the certificate and key to `app.https.certificate.cert` and `app.https.certificate.cert`, respectively. - ```yaml app: baseUrl: https://localhost:3000 @@ -43,7 +42,6 @@ If you need to use an `https:` URL for local testing (i.e. if an OAuth provider cors: origin: https://localhost:3000 ``` - 1. and start the app with `yarn start`. Depending on what plugins are in use, you may need to override additional URLs to use `https` for those endpoints to work. From 0b2a30deada0e2fb206906b33b96f42c71ba2877 Mon Sep 17 00:00:00 2001 From: Matteo Silvestri Date: Wed, 7 Sep 2022 15:34:47 +0200 Subject: [PATCH 007/279] fixing techdocs-cli Docker client creation Docker client does not need to be created when --no-docker option is provided. If you had DOCKER_CERT_PATH environment variable defined the Docker client was looking for certificates and breaking techdocs-cli generate command even with --no-docker option. Signed-off-by: Matteo Silvestri --- .changeset/grumpy-pans-knock.md | 14 ++++++++++++++ .../techdocs-cli/e2e-tests/techdocs-cli.test.ts | 17 +++++++++++++++++ .../src/commands/generate/generate.ts | 13 ++++++++++--- .../src/stages/generate/techdocs.ts | 6 +++--- .../techdocs-node/src/stages/generate/types.ts | 2 +- 5 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 .changeset/grumpy-pans-knock.md diff --git a/.changeset/grumpy-pans-knock.md b/.changeset/grumpy-pans-knock.md new file mode 100644 index 0000000000..74e81e7bec --- /dev/null +++ b/.changeset/grumpy-pans-knock.md @@ -0,0 +1,14 @@ +--- +'@techdocs/cli': patch +'@backstage/plugin-techdocs-node': patch +--- + +fixing techdocs-cli Docker client creation + +Docker client does not need to be created when --no-docker +option is provided. + +If you had DOCKER_CERT_PATH environment variable defined +the Docker client was looking for certificates +and breaking techdocs-cli generate command even with --no-docker +option. diff --git a/packages/techdocs-cli/e2e-tests/techdocs-cli.test.ts b/packages/techdocs-cli/e2e-tests/techdocs-cli.test.ts index e19a8cea2f..15d420af2c 100644 --- a/packages/techdocs-cli/e2e-tests/techdocs-cli.test.ts +++ b/packages/techdocs-cli/e2e-tests/techdocs-cli.test.ts @@ -89,6 +89,23 @@ describe('end-to-end', () => { expect(proc.exit).toEqual(0); }); + it('can generate with DOCKER_* TLS variables and --no-docker option', async () => { + const env = { + DOCKER_HOST: 'tcp://localhost:2376', + DOCKER_TLS_CERTDIR: '/certs', + DOCKER_TLS_VERIFY: '1', + DOCKER_CERT_PATH: '/certs/client', + ...process.env, + }; + const proc = await executeCommand(entryPoint, ['generate', '--no-docker'], { + cwd, + timeout, + env, + }); + expect(proc.stdout).toContain('Successfully generated docs'); + expect(proc.exit).toEqual(0); + }); + it('can serve in mkdocs', async () => { const proc = await executeCommand( entryPoint, diff --git a/packages/techdocs-cli/src/commands/generate/generate.ts b/packages/techdocs-cli/src/commands/generate/generate.ts index 1e4ed220d9..874b904d86 100644 --- a/packages/techdocs-cli/src/commands/generate/generate.ts +++ b/packages/techdocs-cli/src/commands/generate/generate.ts @@ -22,7 +22,10 @@ import { TechdocsGenerator, ParsedLocationAnnotation, } from '@backstage/plugin-techdocs-node'; -import { DockerContainerRunner } from '@backstage/backend-common'; +import { + ContainerRunner, + DockerContainerRunner, +} from '@backstage/backend-common'; import { ConfigReader } from '@backstage/config'; import { convertTechDocsRefToLocationAnnotation, @@ -66,8 +69,12 @@ export default async function generate(opts: OptionValues) { }); // Docker client (conditionally) used by the generators, based on techdocs.generators config. - const dockerClient = new Docker(); - const containerRunner = new DockerContainerRunner({ dockerClient }); + let containerRunner: ContainerRunner | undefined; + + if (opts.docker) { + const dockerClient = new Docker(); + containerRunner = new DockerContainerRunner({ dockerClient }); + } let parsedLocationAnnotation = {} as ParsedLocationAnnotation; if (opts.techdocsRef) { diff --git a/plugins/techdocs-node/src/stages/generate/techdocs.ts b/plugins/techdocs-node/src/stages/generate/techdocs.ts index d80449d58c..252c3b2557 100644 --- a/plugins/techdocs-node/src/stages/generate/techdocs.ts +++ b/plugins/techdocs-node/src/stages/generate/techdocs.ts @@ -55,7 +55,7 @@ export class TechdocsGenerator implements GeneratorBase { */ public static readonly defaultDockerImage = 'spotify/techdocs:v1.1.0'; private readonly logger: Logger; - private readonly containerRunner: ContainerRunner; + private readonly containerRunner?: ContainerRunner; private readonly options: GeneratorConfig; private readonly scmIntegrations: ScmIntegrationRegistry; @@ -77,7 +77,7 @@ export class TechdocsGenerator implements GeneratorBase { constructor(options: { logger: Logger; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; config: Config; scmIntegrations: ScmIntegrationRegistry; }) { @@ -143,7 +143,7 @@ export class TechdocsGenerator implements GeneratorBase { ); break; case 'docker': - await this.containerRunner.runContainer({ + await this.containerRunner!.runContainer({ imageName: this.options.dockerImage ?? TechdocsGenerator.defaultDockerImage, args: ['build', '-d', '/output'], diff --git a/plugins/techdocs-node/src/stages/generate/types.ts b/plugins/techdocs-node/src/stages/generate/types.ts index bdbdb1095d..2b2bbb21c9 100644 --- a/plugins/techdocs-node/src/stages/generate/types.ts +++ b/plugins/techdocs-node/src/stages/generate/types.ts @@ -28,7 +28,7 @@ export type GeneratorRunInType = 'docker' | 'local'; * @public */ export type GeneratorOptions = { - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; logger: Logger; }; From 5ce28340a9214862d4be53f5505ff0ba49e425ef Mon Sep 17 00:00:00 2001 From: Matteo Silvestri Date: Wed, 7 Sep 2022 17:34:54 +0200 Subject: [PATCH 008/279] update plugins/techdocs-node api-report.md Signed-off-by: Matteo Silvestri --- plugins/techdocs-node/api-report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/techdocs-node/api-report.md b/plugins/techdocs-node/api-report.md index 0ac8c3eaae..e27b406478 100644 --- a/plugins/techdocs-node/api-report.md +++ b/plugins/techdocs-node/api-report.md @@ -42,7 +42,7 @@ export type GeneratorBuilder = { // @public export type GeneratorOptions = { - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; logger: Logger; }; @@ -213,7 +213,7 @@ export interface TechDocsDocument extends IndexableDocument { export class TechdocsGenerator implements GeneratorBase { constructor(options: { logger: Logger; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; config: Config; scmIntegrations: ScmIntegrationRegistry; }); From bc329bab90ebb1e409888069155e4bcde1111275 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 11:17:47 +0000 Subject: [PATCH 009/279] fix(deps): update dependency @codemirror/view to v6.2.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b1f3cc567f..dc5dd6dfee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7814,13 +7814,13 @@ __metadata: linkType: hard "@codemirror/view@npm:^6.0.0": - version: 6.2.2 - resolution: "@codemirror/view@npm:6.2.2" + version: 6.2.3 + resolution: "@codemirror/view@npm:6.2.3" dependencies: "@codemirror/state": ^6.0.0 style-mod: ^4.0.0 w3c-keyname: ^2.2.4 - checksum: 6983c51362367d3885961fa233d302e75dfb103cd83ec78e6a044c2420e61466b5e94cfb73a9e840b04765577e8bbb269eb1ad45fa21abd28efda4ae780791db + checksum: 93d6f159c49ffd9276e9b6ba28cef2c41934be7eb68aa49acf1971dede97ee2684bde6daeb7494da8e15f2ef937933c3fa076253127b230c6996db0fe7a79ef2 languageName: node linkType: hard From e46f8893bbe32ea30139edb679235ae64c7f487f Mon Sep 17 00:00:00 2001 From: Christian Marker / Intility AS Date: Tue, 13 Sep 2022 00:03:24 +0200 Subject: [PATCH 010/279] feat: add link buttons to bottom of template card Signed-off-by: Christian Marker / Intility AS --- .../components/TemplateCard/TemplateCard.tsx | 79 ++++++++++++++++--- 1 file changed, 66 insertions(+), 13 deletions(-) diff --git a/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx b/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx index df46a119f2..60de5fef85 100644 --- a/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx +++ b/plugins/scaffolder/src/components/TemplateCard/TemplateCard.tsx @@ -15,6 +15,7 @@ */ import { Entity, + EntityLink, parseEntityRef, RELATION_OWNED_BY, stringifyEntityRef, @@ -46,6 +47,7 @@ import { useTheme, } from '@material-ui/core'; import WarningIcon from '@material-ui/icons/Warning'; +import LanguageIcon from '@material-ui/icons/Language'; import React from 'react'; import { selectedTemplateRouteRef } from '../../routes'; @@ -54,7 +56,12 @@ import { ItemCardHeader, MarkdownContent, } from '@backstage/core-components'; -import { useApi, useRouteRef } from '@backstage/core-plugin-api'; +import { + IconComponent, + useApi, + useApp, + useRouteRef, +} from '@backstage/core-plugin-api'; const useStyles = makeStyles(theme => ({ cardHeader: { @@ -69,7 +76,6 @@ const useStyles = makeStyles(theme => ({ display: '-webkit-box', '-webkit-line-clamp': 10, '-webkit-box-orient': 'vertical', - paddingBottom: '0.8em', }, label: { color: theme.palette.text.secondary, @@ -80,6 +86,14 @@ const useStyles = makeStyles(theme => ({ lineHeight: 1, paddingBottom: '0.2rem', }, + linksLabel: { + padding: '0 16px', + }, + description: { + '& p': { + margin: '0px', + }, + }, leftButton: { marginRight: 'auto', }, @@ -92,6 +106,8 @@ const useStyles = makeStyles(theme => ({ }, })); +const MuiIcon = ({ icon: Icon }: { icon: IconComponent }) => ; + const useDeprecationStyles = makeStyles(theme => ({ deprecationIcon: { position: 'absolute', @@ -115,6 +131,7 @@ type TemplateProps = { title: string; type: string; name: string; + links: EntityLink[]; }; const getTemplateCardProps = ( @@ -127,6 +144,7 @@ const getTemplateCardProps = ( type: template.spec.type ?? '', description: template.metadata.description ?? '-', tags: (template.metadata?.tags as string[]) ?? [], + links: template.metadata.links ?? [], }; }; @@ -155,6 +173,7 @@ const DeprecationWarning = () => { }; export const TemplateCard = ({ template, deprecated }: TemplateCardProps) => { + const app = useApp(); const backstageTheme = useTheme(); const templateRoute = useRouteRef(selectedTemplateRouteRef); const templateProps = getTemplateCardProps(template); @@ -170,6 +189,9 @@ export const TemplateCard = ({ template, deprecated }: TemplateCardProps) => { const { name, namespace } = parseEntityRef(stringifyEntityRef(template)); const href = templateRoute({ templateName: name, namespace }); + const iconResolver = (key?: string): IconComponent => + key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon; + const scmIntegrationsApi = useApi(scmIntegrationsApiRef); const sourceLocation = getEntitySourceLocation(template, scmIntegrationsApi); @@ -184,12 +206,17 @@ export const TemplateCard = ({ template, deprecated }: TemplateCardProps) => { classes={{ root: classes.title }} /> - + Description - + @@ -198,7 +225,11 @@ export const TemplateCard = ({ template, deprecated }: TemplateCardProps) => { - + Tags {templateProps.tags?.map(tag => ( @@ -206,15 +237,37 @@ export const TemplateCard = ({ template, deprecated }: TemplateCardProps) => { ))} + + Links + - {sourceLocation && ( - - - - )} +
+ {sourceLocation && ( + + + + + + )} + {templateProps.links?.map((link, i) => ( + + + + + + ))} +
++ {!loadingPermission && ( ++ ++ )} + + + ); + } + +... +``` + +Here we are using the [`usePermission` hook](https://backstage.io/docs/reference/plugin-permission-react.usepermission) to communicate with the permission policy and receive a decision on whether this user is authorized to create a todo list item. + +It's really that simple! Let's change our policy to test the disabled button: + +```diff +// packages/backend/src/plugins/permission.ts + +... + + if (isPermission(request.permission, todoListCreatePermission)) { + return { +- result: AuthorizeResult.ALLOW, ++ result: AuthorizeResult.DENY, + }; + } + +... +``` + +And now you should see that you are not able to create a todo item from the frontend! + +## Using `RequirePermission` + +Providing a disabled state can be a helpful signal to users, but there may be cases where hiding the element is preferred. For such cases, you can use the provided [`RequirePermission` component](https://backstage.io/docs/reference/plugin-permission-react.requirepermission): + +```diff +// plugins/todo-list/src/components/TodoListPage/TodoListPage.tsx + +... + + import { + alertApiRef, + discoveryApiRef, + fetchApiRef, + useApi, + } from '@backstage/core-plugin-api'; +- import { usePermission } from '@backstage/plugin-permission-react'; ++ import { RequirePermission } from '@backstage/plugin-permission-react'; + import { todoListCreatePermission } from '@internal/plugin-todo-list-common'; + +... + + export const TodoListPage = () => { + +... + + +- +- +- ++ ++ ++ ++ ++ + + + + + +... + + + function AddTodo({ onAdd }: { onAdd: (title: string) => any }) { + const title = useRef(''); +- const { loading: loadingPermission, allowed: canAddTodo } = usePermission({ permission: todoListCreatePermission }); + + return ( + <> + Add todo + + (title.current = e.target.value)} + /> +- {!loadingPermission && ( +- +- )} ++ + + + ); + } + +... +``` + +Now you should find that the component for adding a todo list item does not render at all. Success! diff --git a/microsite/sidebars.json b/microsite/sidebars.json index 8e77594376..41e54ccb29 100644 --- a/microsite/sidebars.json +++ b/microsite/sidebars.json @@ -295,7 +295,8 @@ "permissions/plugin-authors/01-setup", "permissions/plugin-authors/02-adding-a-basic-permission-check", "permissions/plugin-authors/03-adding-a-resource-permission-check", - "permissions/plugin-authors/04-authorizing-access-to-paginated-data" + "permissions/plugin-authors/04-authorizing-access-to-paginated-data", + "permissions/plugin-authors/05-frontend-authorization" ] } ], diff --git a/plugins/example-todo-list-common/api-report.md b/plugins/example-todo-list-common/api-report.md index 15ffb7b139..1e51e560c8 100644 --- a/plugins/example-todo-list-common/api-report.md +++ b/plugins/example-todo-list-common/api-report.md @@ -8,5 +8,8 @@ import { BasicPermission } from '@backstage/plugin-permission-common'; // @public export const tempExamplePermission: BasicPermission; +// @public +export const todoListPermissions: BasicPermission[]; + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/example-todo-list-common/src/permissions.ts b/plugins/example-todo-list-common/src/permissions.ts index 439bf5e8b9..ea0b097376 100644 --- a/plugins/example-todo-list-common/src/permissions.ts +++ b/plugins/example-todo-list-common/src/permissions.ts @@ -25,3 +25,10 @@ export const tempExamplePermission = createPermission({ name: 'temp.example.noop', attributes: {}, }); + +/** + * List of all todo list permissions. + * + * @public + */ +export const todoListPermissions = [tempExamplePermission]; diff --git a/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx b/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx index 7ebb517532..6071502fdb 100644 --- a/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx +++ b/plugins/example-todo-list/src/components/TodoListPage/TodoListPage.tsx @@ -45,17 +45,16 @@ export const TodoListPage = () => { const discoveryApi = useApi(discoveryApiRef); const { fetch } = useApi(fetchApiRef); const alertApi = useApi(alertApiRef); - const title = useRef(''); const [key, refetchTodos] = useReducer(i => i + 1, 0); const [editElement, setEdit] = useState(); - const handleAdd = async () => { + const handleAdd = async (title: string) => { try { const response = await fetch( `${await discoveryApi.getBaseUrl('todolist')}/todos`, { method: 'POST', - body: JSON.stringify({ title: title.current }), + body: JSON.stringify({ title }), headers: { 'Content-Type': 'application/json', }, @@ -117,21 +116,7 @@ export const TodoListPage = () => { - Add todo - - (title.current = e.target.value)} - /> - - + @@ -149,6 +134,30 @@ export const TodoListPage = () => { ); }; +function AddTodo({ onAdd }: { onAdd: (title: string) => any }) { + const title = useRef(''); + + return ( + <> + Add todo + + (title.current = e.target.value)} + /> + + + + ); +} + function EditModal({ todo, onCancel, From ed0ef64fd36385e2111940b71548b2dbdd7afef5 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 22 Sep 2022 15:18:59 +0200 Subject: [PATCH 075/279] backend-tests: increase timeout for setting up test databases Signed-off-by: Patrik Oldsberg --- .../backend-tasks/src/tasks/PluginTaskSchedulerImpl.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-tasks/src/tasks/PluginTaskSchedulerImpl.test.ts b/packages/backend-tasks/src/tasks/PluginTaskSchedulerImpl.test.ts index f6177b57f7..d61948a929 100644 --- a/packages/backend-tasks/src/tasks/PluginTaskSchedulerImpl.test.ts +++ b/packages/backend-tasks/src/tasks/PluginTaskSchedulerImpl.test.ts @@ -45,7 +45,7 @@ describe('PluginTaskManagerImpl', () => { ); jest.useFakeTimers(); - }, 30_000); + }, 60_000); async function init(databaseId: TestDatabaseId) { const knex = await databases.init(databaseId); From b102cdbfc6f15938f45c22167a9026537b87d67f Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Thu, 22 Sep 2022 15:07:48 +0100 Subject: [PATCH 076/279] refactoring some codes, names and dependency Signed-off-by: Alisson Fabiano --- plugins/tech-insights/api-report.md | 26 ++---------- plugins/tech-insights/package.json | 3 +- .../tech-insights/src/api/TechInsightsApi.ts | 7 +--- .../src/api/TechInsightsClient.ts | 41 ++++++++++--------- plugins/tech-insights/src/api/types.ts | 16 +------- plugins/tech-insights/src/index.ts | 2 +- yarn.lock | 26 +++++------- 7 files changed, 42 insertions(+), 79 deletions(-) diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index b40bf9fe92..2d25d6d39d 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -10,7 +10,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { BulkCheckResponse } from '@backstage/plugin-tech-insights-common'; import { CheckResult } from '@backstage/plugin-tech-insights-common'; import { CompoundEntityRef } from '@backstage/catalog-model'; -import { DateTime } from 'luxon'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { IdentityApi } from '@backstage/core-plugin-api'; import { JsonValue } from '@backstage/types'; @@ -54,23 +53,12 @@ export const EntityTechInsightsScorecardContent: (props: { }) => JSX.Element; // @public -export interface InsightFact { +export interface InsightFacts { // (undocumented) [factId: string]: { timestamp: string; version: string; - facts: Record< - string, - | number - | string - | boolean - | DateTime - | number[] - | string[] - | boolean[] - | DateTime[] - | JsonValue - >; + facts: Record; }; } @@ -84,10 +72,7 @@ export interface TechInsightsApi { // (undocumented) getCheckResultRenderers: (types: string[]) => CheckResultRenderer[]; // (undocumented) - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; // (undocumented) runBulkChecks( entities: CompoundEntityRef[], @@ -115,10 +100,7 @@ export class TechInsightsClient implements TechInsightsApi { // (undocumented) getCheckResultRenderers(types: string[]): CheckResultRenderer[]; // (undocumented) - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; // (undocumented) runBulkChecks( entities: CompoundEntityRef[], diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 3903881daa..7d1d091095 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,8 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "@types/luxon": "^3.0.1", - "luxon": "^3.0.3", + "qs": "^6.11.0", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/plugins/tech-insights/src/api/TechInsightsApi.ts b/plugins/tech-insights/src/api/TechInsightsApi.ts index 79754d53b1..166f1d2782 100644 --- a/plugins/tech-insights/src/api/TechInsightsApi.ts +++ b/plugins/tech-insights/src/api/TechInsightsApi.ts @@ -19,7 +19,7 @@ import { CheckResult, BulkCheckResponse, } from '@backstage/plugin-tech-insights-common'; -import { Check, InsightFact } from './types'; +import { Check, InsightFacts } from './types'; import { CheckResultRenderer } from '../components/CheckResultRenderer'; import { CompoundEntityRef } from '@backstage/catalog-model'; @@ -48,8 +48,5 @@ export interface TechInsightsApi { entities: CompoundEntityRef[], checks?: Check[], ): Promise; - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; } diff --git a/plugins/tech-insights/src/api/TechInsightsClient.ts b/plugins/tech-insights/src/api/TechInsightsClient.ts index bcfb045d00..9bdeb119f9 100644 --- a/plugins/tech-insights/src/api/TechInsightsClient.ts +++ b/plugins/tech-insights/src/api/TechInsightsClient.ts @@ -19,15 +19,19 @@ import { BulkCheckResponse, CheckResult, } from '@backstage/plugin-tech-insights-common'; -import { Check, InsightFact } from './types'; +import { Check, InsightFacts } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { ResponseError } from '@backstage/errors'; -import { CompoundEntityRef } from '@backstage/catalog-model'; +import { + CompoundEntityRef, + stringifyEntityRef, +} from '@backstage/catalog-model'; import { CheckResultRenderer, jsonRulesEngineCheckResultRenderer, } from '../components/CheckResultRenderer'; +import qs from 'qs'; /** @public */ export class TechInsightsClient implements TechInsightsApi { @@ -45,18 +49,15 @@ export class TechInsightsClient implements TechInsightsApi { this.renderers = options.renderers; } - async getLatestFacts( + async getFacts( entity: CompoundEntityRef, facts: string[], - ): Promise { - const { namespace, kind, name } = entity; - const entityQuery = `entity=${encodeURIComponent( - kind.toLocaleLowerCase('en-US'), - )}:${encodeURIComponent(namespace)}/${encodeURIComponent(name)}`; - const idsQuery = facts.map(id => `ids[]=${id}`).join('&'); - return await this.api( - `/facts/latest?${entityQuery}&${idsQuery}`, - ); + ): Promise { + const query = qs.stringify({ + entity: stringifyEntityRef(entity), + ids: facts, + }); + return await this.api(`/facts/latest?${query}`); } getCheckResultRenderers(types: string[]): CheckResultRenderer[] { @@ -104,13 +105,15 @@ export class TechInsightsClient implements TechInsightsApi { const url = await this.discoveryApi.getBaseUrl('tech-insights'); const { token } = await this.identityApi.getCredentials(); - return fetch(`${url}${path}`, { - ...init, - headers: { - 'Content-Type': 'application/json', - ...(token && { Authorization: `Bearer ${token}` }), - }, - }).then(async response => { + const request = new Request(`${url}${path}`, init); + if (!request.headers.has('content-type')) { + request.headers.set('content-type', 'application/json'); + } + if (token && !request.headers.has('authorization')) { + request.headers.set('authorization', `Bearer ${token}`); + } + + return fetch(request).then(async response => { if (!response.ok) { throw await ResponseError.fromResponse(response); } diff --git a/plugins/tech-insights/src/api/types.ts b/plugins/tech-insights/src/api/types.ts index b69d4d6264..ac1f2e44ee 100644 --- a/plugins/tech-insights/src/api/types.ts +++ b/plugins/tech-insights/src/api/types.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { DateTime } from 'luxon'; import { JsonValue } from '@backstage/types'; /** @@ -35,21 +34,10 @@ export type Check = { * * @public */ -export interface InsightFact { +export interface InsightFacts { [factId: string]: { timestamp: string; version: string; - facts: Record< - string, - | number - | string - | boolean - | DateTime - | number[] - | string[] - | boolean[] - | DateTime[] - | JsonValue - >; + facts: Record; }; } diff --git a/plugins/tech-insights/src/index.ts b/plugins/tech-insights/src/index.ts index ae2f9d53a7..9e075df038 100644 --- a/plugins/tech-insights/src/index.ts +++ b/plugins/tech-insights/src/index.ts @@ -20,7 +20,7 @@ export { } from './plugin'; export { techInsightsApiRef, TechInsightsClient } from './api'; -export type { TechInsightsApi, Check, InsightFact } from './api'; +export type { TechInsightsApi, Check, InsightFacts } from './api'; export { BooleanCheck } from './components/BooleanCheck'; export { jsonRulesEngineCheckResultRenderer } from './components/CheckResultRenderer'; export type { CheckResultRenderer } from './components/CheckResultRenderer'; diff --git a/yarn.lock b/yarn.lock index 116e774711..03e3a36d0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6934,11 +6934,10 @@ __metadata: "@testing-library/jest-dom": ^5.10.1 "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.0.0 - "@types/luxon": ^3.0.1 "@types/node": ^16.11.26 cross-fetch: ^3.1.5 - luxon: ^3.0.3 msw: ^0.47.0 + qs: ^6.11.0 react-use: ^17.2.4 peerDependencies: "@types/react": ^16.13.1 || ^17.0.0 @@ -14476,13 +14475,6 @@ __metadata: languageName: node linkType: hard -"@types/luxon@npm:^3.0.1": - version: 3.0.1 - resolution: "@types/luxon@npm:3.0.1" - checksum: a81444f9b474ea9b3063ab4cc68b917a2634e38b4e229f86c78c35023a32bf5e8d1044d7c229c011291662c976cb6c4cf109dc3d2077c571790a31779a554178 - languageName: node - linkType: hard - "@types/markdown-it@npm:^12.2.3": version: 12.2.3 resolution: "@types/markdown-it@npm:12.2.3" @@ -29349,13 +29341,6 @@ __metadata: languageName: node linkType: hard -"luxon@npm:^3.0.3": - version: 3.0.3 - resolution: "luxon@npm:3.0.3" - checksum: 67d143f102f520761c4202086579a5cf30b230ea299da27cacb31e9f9d372cadef90f14cbe7e2621b70825b267fe00128b8176ed8b7172b48f77a403a662d5aa - languageName: node - linkType: hard - "lz-string@npm:^1.4.4": version: 1.4.4 resolution: "lz-string@npm:1.4.4" @@ -34244,6 +34229,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:^6.11.0": + version: 6.11.0 + resolution: "qs@npm:6.11.0" + dependencies: + side-channel: ^1.0.4 + checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 + languageName: node + linkType: hard + "qs@npm:~6.5.2": version: 6.5.2 resolution: "qs@npm:6.5.2" From a91bd8e268c40ae94d5b1fd37165ecb51d74f988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 22 Sep 2022 17:03:20 +0200 Subject: [PATCH 077/279] nerf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/swift-phones-cheat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/swift-phones-cheat.md b/.changeset/swift-phones-cheat.md index 97697ad916..6d1653caa3 100644 --- a/.changeset/swift-phones-cheat.md +++ b/.changeset/swift-phones-cheat.md @@ -1,5 +1,5 @@ --- -'@backstage/cli': minor +'@backstage/cli': patch --- Removed `tsx` and `jsx` as supported extensions in backend packages. For most From e89e1f614d15428b95c4e8731a31834739e975b1 Mon Sep 17 00:00:00 2001 From: hram_wh Date: Fri, 23 Sep 2022 13:16:20 +0530 Subject: [PATCH 078/279] changeset added Signed-off-by: hram_wh --- .changeset/warm-days-watch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-days-watch.md diff --git a/.changeset/warm-days-watch.md b/.changeset/warm-days-watch.md new file mode 100644 index 0000000000..b0a211c7a8 --- /dev/null +++ b/.changeset/warm-days-watch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Added support for copy entity URL in entity page context menu From bf983d06019666120a233d9fe1bfd802824eb163 Mon Sep 17 00:00:00 2001 From: hram_wh Date: Fri, 23 Sep 2022 13:22:27 +0530 Subject: [PATCH 079/279] deleted waste changset file Signed-off-by: hram_wh --- .changeset/young-spies-wait.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/young-spies-wait.md diff --git a/.changeset/young-spies-wait.md b/.changeset/young-spies-wait.md deleted file mode 100644 index 1817085d08..0000000000 --- a/.changeset/young-spies-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': major ---- - -Added support for copy entity url in entity page context menu From d589951d9cca05363fbab938bf2bad1eaa9cf150 Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Fri, 23 Sep 2022 09:35:34 +0100 Subject: [PATCH 080/279] chore: bump version as patch Signed-off-by: Alisson Fabiano --- .changeset/lovely-peaches-fold.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lovely-peaches-fold.md b/.changeset/lovely-peaches-fold.md index 729a8c733a..dcff35f4d7 100644 --- a/.changeset/lovely-peaches-fold.md +++ b/.changeset/lovely-peaches-fold.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-tech-insights': minor +'@backstage/plugin-tech-insights': patch --- making available the search for the last FACTS executed From 7506c95e94e94ba8b34e6ef4144cafc59fc15258 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 23 Sep 2022 13:05:55 +0100 Subject: [PATCH 081/279] docs: fix incorrect import in frontend permission integration docs (#13816) Signed-off-by: MT Lewis Signed-off-by: MT Lewis --- docs/permissions/frontend-integration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/permissions/frontend-integration.md b/docs/permissions/frontend-integration.md index 2a429ea120..d7302f9083 100644 --- a/docs/permissions/frontend-integration.md +++ b/docs/permissions/frontend-integration.md @@ -17,7 +17,7 @@ If your Backstage permission policy may return a `DENY` for users requesting the ... -+ import { PermissionedRoute } from '@backstage/plugin-permission-react'; ++ import { RequirePermission } from '@backstage/plugin-permission-react'; + import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; ... From 74022e01639e58e9612ff3abf3cb8b5e2d610195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 23 Sep 2022 14:00:00 +0200 Subject: [PATCH 082/279] stitch relations after deleting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/thick-kings-destroy.md | 5 ++ .../src/service/CatalogBuilder.ts | 7 +- .../service/DefaultEntitiesCatalog.test.ts | 64 ++++++++++++++----- .../src/service/DefaultEntitiesCatalog.ts | 34 +++++++++- 4 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 .changeset/thick-kings-destroy.md diff --git a/.changeset/thick-kings-destroy.md b/.changeset/thick-kings-destroy.md new file mode 100644 index 0000000000..77c6be0d3c --- /dev/null +++ b/.changeset/thick-kings-destroy.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Make sure to stitch entities correctly after deletion, to ensure that their relations are updated. diff --git a/plugins/catalog-backend/src/service/CatalogBuilder.ts b/plugins/catalog-backend/src/service/CatalogBuilder.ts index 25f9fde313..d47ace1454 100644 --- a/plugins/catalog-backend/src/service/CatalogBuilder.ts +++ b/plugins/catalog-backend/src/service/CatalogBuilder.ts @@ -409,7 +409,11 @@ export class CatalogBuilder { parser, policy, }); - const unauthorizedEntitiesCatalog = new DefaultEntitiesCatalog(dbClient); + const stitcher = new Stitcher(dbClient, logger); + const unauthorizedEntitiesCatalog = new DefaultEntitiesCatalog( + dbClient, + stitcher, + ); let permissionEvaluator: PermissionEvaluator; if ('authorizeConditional' in permissions) { @@ -453,7 +457,6 @@ export class CatalogBuilder { permissions: catalogPermissions, rules: this.permissionRules, }); - const stitcher = new Stitcher(dbClient, logger); const locationStore = new DefaultLocationStore(dbClient); const configLocationProvider = new ConfigLocationEntityProvider(config); diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts index 43e208197f..49d4fe9e19 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.test.ts @@ -25,12 +25,15 @@ import { DbRefreshStateRow, DbSearchRow, } from '../database/tables'; +import { Stitcher } from '../stitching/Stitcher'; import { DefaultEntitiesCatalog } from './DefaultEntitiesCatalog'; describe('DefaultEntitiesCatalog', () => { const databases = TestDatabases.create({ ids: ['POSTGRES_13', 'POSTGRES_9', 'SQLITE_3'], }); + const stitch = jest.fn(); + const stitcher: Stitcher = { stitch } as any; async function createDatabase(databaseId: TestDatabaseId) { const knex = await databases.init(databaseId); @@ -122,6 +125,10 @@ describe('DefaultEntitiesCatalog', () => { ); } + afterEach(() => { + jest.resetAllMocks(); + }); + describe('entityAncestry', () => { it.each(databases.eachSupportedId())( 'should return the ancestry with one parent, %p', @@ -151,7 +158,7 @@ describe('DefaultEntitiesCatalog', () => { await addEntity(knex, parent, [{ entity: grandparent }]); await addEntity(knex, root, [{ entity: parent }]); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const result = await catalog.entityAncestry('k:default/root'); expect(result.rootEntityRef).toEqual('k:default/root'); @@ -181,7 +188,7 @@ describe('DefaultEntitiesCatalog', () => { 'should throw error if the entity does not exist, %p', async databaseId => { const { knex } = await createDatabase(databaseId); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); await expect(() => catalog.entityAncestry('k:default/root'), ).rejects.toThrow('No such entity k:default/root'); @@ -224,7 +231,7 @@ describe('DefaultEntitiesCatalog', () => { await addEntity(knex, parent2, [{ entity: grandparent }]); await addEntity(knex, root, [{ entity: parent1 }, { entity: parent2 }]); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const result = await catalog.entityAncestry('k:default/root'); expect(result.rootEntityRef).toEqual('k:default/root'); @@ -280,7 +287,7 @@ describe('DefaultEntitiesCatalog', () => { }; await addEntityToSearch(knex, entity1); await addEntityToSearch(knex, entity2); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const testFilter = { key: 'spec.test', @@ -313,7 +320,7 @@ describe('DefaultEntitiesCatalog', () => { }; await addEntityToSearch(knex, entity1); await addEntityToSearch(knex, entity2); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const testFilter = { not: { @@ -360,7 +367,7 @@ describe('DefaultEntitiesCatalog', () => { await addEntityToSearch(knex, entity2); await addEntityToSearch(knex, entity3); await addEntityToSearch(knex, entity4); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const testFilter1 = { key: 'metadata.org', @@ -415,7 +422,7 @@ describe('DefaultEntitiesCatalog', () => { }; await addEntityToSearch(knex, entity1); await addEntityToSearch(knex, entity2); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const testFilter1 = { key: 'metadata.org', @@ -457,7 +464,7 @@ describe('DefaultEntitiesCatalog', () => { }; await addEntityToSearch(knex, entity1); await addEntityToSearch(knex, entity2); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const testFilter = { key: 'kind', @@ -501,7 +508,7 @@ describe('DefaultEntitiesCatalog', () => { }, [], ); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); const { entities } = await catalog.entities(); @@ -557,10 +564,16 @@ describe('DefaultEntitiesCatalog', () => { metadata: { name: 'root' }, spec: {}, }; - const unrelated: Entity = { + const unrelated1: Entity = { apiVersion: 'a', kind: 'k', - metadata: { name: 'unrelated' }, + metadata: { name: 'unrelated1' }, + spec: {}, + }; + const unrelated2: Entity = { + apiVersion: 'a', + kind: 'k', + metadata: { name: 'unrelated2' }, spec: {}, }; @@ -571,10 +584,23 @@ describe('DefaultEntitiesCatalog', () => { { entity: parent1 }, { entity: parent2 }, ]); - await addEntity(knex, unrelated, []); + await addEntity(knex, unrelated1, []); + await addEntity(knex, unrelated2, []); await knex('refresh_state').update({ result_hash: 'not-changed' }); + await knex('relations').insert({ + originating_entity_id: uid, + type: 't', + source_entity_ref: 'k:default/root', + target_entity_ref: 'k:default/unrelated1', + }); + await knex('relations').insert({ + originating_entity_id: uid, + type: 't', + source_entity_ref: 'k:default/unrelated2', + target_entity_ref: 'k:default/root', + }); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); await catalog.removeEntityByUid(uid); await expect( @@ -586,8 +612,12 @@ describe('DefaultEntitiesCatalog', () => { { entity_ref: 'k:default/grandparent', result_hash: 'not-changed' }, { entity_ref: 'k:default/parent1', result_hash: 'child-was-deleted' }, { entity_ref: 'k:default/parent2', result_hash: 'child-was-deleted' }, - { entity_ref: 'k:default/unrelated', result_hash: 'not-changed' }, + { entity_ref: 'k:default/unrelated1', result_hash: 'not-changed' }, + { entity_ref: 'k:default/unrelated2', result_hash: 'not-changed' }, ]); + expect(stitch).toHaveBeenCalledWith( + new Set(['k:default/unrelated1', 'k:default/unrelated2']), + ); }, ); }); @@ -616,7 +646,7 @@ describe('DefaultEntitiesCatalog', () => { metadata: { name: 'two' }, spec: {}, }); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); await expect(catalog.facets({ facets: ['kind'] })).resolves.toEqual({ facets: { @@ -654,7 +684,7 @@ describe('DefaultEntitiesCatalog', () => { }, spec: {}, }); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); await expect( catalog.facets({ @@ -698,7 +728,7 @@ describe('DefaultEntitiesCatalog', () => { }, spec: {}, }); - const catalog = new DefaultEntitiesCatalog(knex); + const catalog = new DefaultEntitiesCatalog(knex, stitcher); await expect( catalog.facets({ diff --git a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts index fa11903447..dc84b12484 100644 --- a/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts +++ b/plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts @@ -38,8 +38,10 @@ import { DbPageInfo, DbRefreshStateReferencesRow, DbRefreshStateRow, + DbRelationsRow, DbSearchRow, } from '../database/tables'; +import { Stitcher } from '../stitching/Stitcher'; function parsePagination(input?: EntityPagination): { limit?: number; @@ -158,7 +160,10 @@ function parseFilter( } export class DefaultEntitiesCatalog implements EntitiesCatalog { - constructor(private readonly database: Knex) {} + constructor( + private readonly database: Knex, + private readonly stitcher: Stitcher, + ) {} async entities(request?: EntitiesRequest): Promise { const db = this.database; @@ -244,6 +249,7 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog { await this.database('refresh_state') .update({ result_hash: 'child-was-deleted', + next_update_at: this.database.fn.now(), }) .whereIn('entity_ref', function parents(builder) { return builder @@ -256,9 +262,35 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog { .select('refresh_state_references.source_entity_ref'); }); + // Stitch the entities that the deleted one had relations to. If we do not + // do this, the entities in the other end of the relations will still look + // like they have a relation to the entity that was deleted, despite not + // having any corresponding rows in the relations table. + const relationPeers = await this.database + .from('relations') + .innerJoin('refresh_state', { + 'refresh_state.entity_ref': 'relations.target_entity_ref', + }) + .where('relations.originating_entity_id', '=', uid) + .andWhere('refresh_state.entity_id', '!=', uid) + .select({ ref: 'relations.target_entity_ref' }) + .union(other => + other + .from('relations') + .innerJoin('refresh_state', { + 'refresh_state.entity_ref': 'relations.source_entity_ref', + }) + .where('relations.originating_entity_id', '=', uid) + .andWhere('refresh_state.entity_id', '!=', uid) + .select({ ref: 'relations.source_entity_ref' }), + ); + + // Perform the actual deletion await this.database('refresh_state') .where('entity_id', uid) .delete(); + + await this.stitcher.stitch(new Set(relationPeers.map(p => p.ref))); } async entityAncestry(rootRef: string): Promise { From 6ab850318de7b92a3fc77c88520883f6b9836fad Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Fri, 16 Sep 2022 13:17:54 -0400 Subject: [PATCH 083/279] Location url was incorrect Signed-off-by: Taras --- packages/catalog-client/src/CatalogClient.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/catalog-client/src/CatalogClient.test.ts b/packages/catalog-client/src/CatalogClient.test.ts index 6c9c68efa2..5a344f49a3 100644 --- a/packages/catalog-client/src/CatalogClient.test.ts +++ b/packages/catalog-client/src/CatalogClient.test.ts @@ -322,7 +322,7 @@ describe('CatalogClient', () => { name: '', }, }, - 'http://example.com', + 'url:http://example.com', ), ).toMatchObject({ valid: false, @@ -350,7 +350,7 @@ describe('CatalogClient', () => { name: 'good', }, }, - 'http://example.com', + 'url:http://example.com', ), ).toMatchObject({ valid: true, @@ -373,7 +373,7 @@ describe('CatalogClient', () => { name: 'good', }, }, - 'http://example.com', + 'url:http://example.com', ), ).rejects.toThrow(/Request failed with 500 Error/); }); From 9925f5bdbb177c6c3d870afce68838e59402bd76 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 23 Sep 2022 15:20:31 +0100 Subject: [PATCH 084/279] Fix command to create a frontend plugin Signed-off-by: Brian Fletcher --- docs/plugins/create-a-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/create-a-plugin.md b/docs/plugins/create-a-plugin.md index ef415d107a..29607af140 100644 --- a/docs/plugins/create-a-plugin.md +++ b/docs/plugins/create-a-plugin.md @@ -15,7 +15,7 @@ invoking the from the root of your project. ```bash -yarn create-plugin +yarn new --select plugin ``` ![](../assets/getting-started/create-plugin_output.png) From 6103298d0589893700cb3a9e4c94ae94432358c3 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 23 Sep 2022 15:22:19 +0100 Subject: [PATCH 085/279] Fix command to create a backend plugin Signed-off-by: Brian Fletcher --- docs/plugins/backend-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/backend-plugin.md b/docs/plugins/backend-plugin.md index c6f4a50e60..24213c57a9 100644 --- a/docs/plugins/backend-plugin.md +++ b/docs/plugins/backend-plugin.md @@ -13,7 +13,7 @@ A new, bare-bones backend plugin package can be created by issuing the following command in your Backstage repository root: ```sh -yarn create-plugin --backend +yarn new --select backend-plugin ``` Please also see the `--help` flag for the `create-plugin` command for some From 81b063782404917be2df7113ea6b9add10d092c8 Mon Sep 17 00:00:00 2001 From: Brian Fletcher Date: Fri, 23 Sep 2022 15:24:39 +0100 Subject: [PATCH 086/279] Update backend-plugin.md Signed-off-by: Brian Fletcher --- docs/plugins/backend-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/backend-plugin.md b/docs/plugins/backend-plugin.md index 24213c57a9..3eddb9e1c2 100644 --- a/docs/plugins/backend-plugin.md +++ b/docs/plugins/backend-plugin.md @@ -16,7 +16,7 @@ command in your Backstage repository root: yarn new --select backend-plugin ``` -Please also see the `--help` flag for the `create-plugin` command for some +Please also see the `--help` flag for the `new` command for some further options that are available, notably the `--scope` and `--no-private` flags that control naming and publishing of the newly created package. Your repo root `package.json` will probably also have some default values already set up From 312e61a45141ccc7fc24ebebe5d34cc400feed53 Mon Sep 17 00:00:00 2001 From: Taras Date: Fri, 23 Sep 2022 10:51:08 -0400 Subject: [PATCH 087/279] Rename location to locationRef Signed-off-by: Taras --- packages/catalog-client/api-report.md | 4 ++-- packages/catalog-client/src/CatalogClient.ts | 4 ++-- packages/catalog-client/src/types/api.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/catalog-client/api-report.md b/packages/catalog-client/api-report.md index 0ad77ce39c..85fc389af7 100644 --- a/packages/catalog-client/api-report.md +++ b/packages/catalog-client/api-report.md @@ -68,7 +68,7 @@ export interface CatalogApi { ): Promise; validateEntity( entity: Entity, - location: string, + locationRef: string, options?: CatalogRequestOptions, ): Promise; } @@ -130,7 +130,7 @@ export class CatalogClient implements CatalogApi { ): Promise; validateEntity( entity: Entity, - location: string, + locationRef: string, options?: CatalogRequestOptions, ): Promise; } diff --git a/packages/catalog-client/src/CatalogClient.ts b/packages/catalog-client/src/CatalogClient.ts index f2b4186bfb..d67392d80d 100644 --- a/packages/catalog-client/src/CatalogClient.ts +++ b/packages/catalog-client/src/CatalogClient.ts @@ -359,7 +359,7 @@ export class CatalogClient implements CatalogApi { */ async validateEntity( entity: Entity, - location: string, + locationRef: string, options?: CatalogRequestOptions, ): Promise { const response = await this.fetchApi.fetch( @@ -370,7 +370,7 @@ export class CatalogClient implements CatalogApi { ...(options?.token && { Authorization: `Bearer ${options?.token}` }), }, method: 'POST', - body: JSON.stringify({ entity, location }), + body: JSON.stringify({ entity, location: locationRef }), }, ); diff --git a/packages/catalog-client/src/types/api.ts b/packages/catalog-client/src/types/api.ts index f483c3454c..d3d02022f3 100644 --- a/packages/catalog-client/src/types/api.ts +++ b/packages/catalog-client/src/types/api.ts @@ -405,11 +405,11 @@ export interface CatalogApi { * Validate entity and its location. * * @param entity - Entity to validate - * @param location - URL location of the entity + * @param locationRef - Location ref in format `url:http://example.com/file` */ validateEntity( entity: Entity, - location: string, + locationRef: string, options?: CatalogRequestOptions, ): Promise; } From 4f2ac624b4a69cab1097a0933cd2e7ab1bdc65bc Mon Sep 17 00:00:00 2001 From: Taras Date: Fri, 23 Sep 2022 10:59:20 -0400 Subject: [PATCH 088/279] Added changeset for renamed argument Signed-off-by: Taras --- .changeset/plenty-kids-fetch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/plenty-kids-fetch.md diff --git a/.changeset/plenty-kids-fetch.md b/.changeset/plenty-kids-fetch.md new file mode 100644 index 0000000000..6a31b4db20 --- /dev/null +++ b/.changeset/plenty-kids-fetch.md @@ -0,0 +1,5 @@ +--- +'@backstage/catalog-client': patch +--- + +Renamed argument in `validateEntity` from `location` to `locationRef` From b57a21a7fc2d7238f795305c0d52b84a3166d6a8 Mon Sep 17 00:00:00 2001 From: Leonardo Maier Date: Fri, 23 Sep 2022 12:15:56 -0300 Subject: [PATCH 089/279] Refactor tasks to read git config first and then initialize git repo Signed-off-by: Leonardo Maier --- packages/create-app/src/createApp.test.ts | 12 +++-- packages/create-app/src/createApp.ts | 31 ++++++----- packages/create-app/src/lib/tasks.test.ts | 41 ++++++++------- packages/create-app/src/lib/tasks.ts | 63 +++++++++++++++++------ 4 files changed, 92 insertions(+), 55 deletions(-) diff --git a/packages/create-app/src/createApp.test.ts b/packages/create-app/src/createApp.test.ts index 36552ae306..76b5d24b98 100644 --- a/packages/create-app/src/createApp.test.ts +++ b/packages/create-app/src/createApp.test.ts @@ -33,7 +33,7 @@ const checkPathExistsMock = jest.spyOn(tasks, 'checkPathExistsTask'); const templatingMock = jest.spyOn(tasks, 'templatingTask'); const checkAppExistsMock = jest.spyOn(tasks, 'checkAppExistsTask'); const initGitRepositoryMock = jest.spyOn(tasks, 'initGitRepository'); -const checkForGitSetup = jest.spyOn(tasks, 'checkForGitSetup'); +const readGitConfig = jest.spyOn(tasks, 'readGitConfig'); const createTemporaryAppFolderMock = jest.spyOn( tasks, 'createTemporaryAppFolderTask', @@ -58,7 +58,11 @@ describe('command entrypoint', () => { name: 'MyApp', dbType: 'PostgreSQL', }); - checkForGitSetup.mockResolvedValue(true); + readGitConfig.mockResolvedValue({ + name: 'git-user', + email: 'git-email', + defaultBranch: 'git-default-branch', + }); }); afterEach(() => { @@ -91,9 +95,9 @@ describe('command entrypoint', () => { expect(buildAppMock).not.toHaveBeenCalled(); }); - it('should not call `initGitRepository` when `isGitConfigured` is false', async () => { + it('should not call `initGitRepository` when `gitConfig` is undefined', async () => { const cmd = {} as unknown as Command; - checkForGitSetup.mockResolvedValue(false); + readGitConfig.mockResolvedValue(undefined); await createApp(cmd); expect(initGitRepositoryMock).not.toHaveBeenCalled(); }); diff --git a/packages/create-app/src/createApp.ts b/packages/create-app/src/createApp.ts index 74e32eeba2..fd70a4c238 100644 --- a/packages/create-app/src/createApp.ts +++ b/packages/create-app/src/createApp.ts @@ -29,9 +29,11 @@ import { moveAppTask, templatingTask, initGitRepository, - checkForGitSetup, + readGitConfig, } from './lib/tasks'; +const DEFAULT_BRANCH = 'master'; + export default async (opts: OptionValues): Promise => { /* eslint-disable-next-line no-restricted-syntax */ const paths = findPaths(__dirname); @@ -78,7 +80,7 @@ export default async (opts: OptionValues): Promise => { Task.log('Creating the app...'); try { - const isGitConfigured = await checkForGitSetup(); + const gitConfig = await readGitConfig(); if (opts.path) { // Template directly to specified path @@ -86,13 +88,11 @@ export default async (opts: OptionValues): Promise => { Task.section('Checking that supplied path exists'); await checkPathExistsTask(appDir); - if (isGitConfigured) { - Task.section('Initializing git repository'); - await initGitRepository(appDir, answers); - } - Task.section('Preparing files'); - await templatingTask(templateDir, opts.path, answers); + await templatingTask(templateDir, opts.path, { + ...answers, + defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH, + }); } else { // Template to temporary location, and then move files @@ -102,18 +102,21 @@ export default async (opts: OptionValues): Promise => { Task.section('Creating a temporary app directory'); await createTemporaryAppFolderTask(tempDir); - if (isGitConfigured) { - Task.section('Initializing git repository'); - await initGitRepository(tempDir, answers); - } - Task.section('Preparing files'); - await templatingTask(templateDir, tempDir, answers); + await templatingTask(templateDir, tempDir, { + ...answers, + defaultBranch: gitConfig?.defaultBranch ?? DEFAULT_BRANCH, + }); Task.section('Moving to final location'); await moveAppTask(tempDir, appDir, answers.name); } + if (gitConfig) { + Task.section('Initializing git repository'); + await initGitRepository(appDir); + } + if (!opts.skipInstall) { Task.section('Building the app'); await buildAppTask(appDir); diff --git a/packages/create-app/src/lib/tasks.test.ts b/packages/create-app/src/lib/tasks.test.ts index b1cdb293fc..b8d3202976 100644 --- a/packages/create-app/src/lib/tasks.test.ts +++ b/packages/create-app/src/lib/tasks.test.ts @@ -27,7 +27,7 @@ import { moveAppTask, templatingTask, initGitRepository, - checkForGitSetup, + readGitConfig, } from './tasks'; const commandExists = jest.fn(); @@ -286,17 +286,22 @@ describe('tasks', () => { }); }); - describe('checkForGitSetup', () => { - it('should return true if git package is installed and git credentials are set', async () => { + describe('readGitConfig', () => { + it('should return git config if git package is installed and git credentials are set', async () => { mockExec.mockImplementation((_command, callback) => { callback(null, { stdout: 'main' }, 'standard error'); }); commandExists.mockResolvedValue(true); - const isGitConfigured = await checkForGitSetup(); + const gitConfig = await readGitConfig(); - expect(isGitConfigured).toBe(true); + expect(gitConfig).toBeTruthy(); + expect(gitConfig).toEqual({ + name: 'main', + email: 'main', + defaultBranch: 'main', + }); expect(mockExec).toHaveBeenCalledWith( 'git config user.name', expect.any(Function), @@ -305,14 +310,19 @@ describe('tasks', () => { 'git config user.email', expect.any(Function), ); + expect(mockExec).toHaveBeenCalledWith('git init', expect.any(Function)); + expect(mockExec).toHaveBeenCalledWith( + 'git commit --allow-empty -m "Initial commit"', + expect.any(Function), + ); }); it('should return false if git package is not installed', async () => { commandExists.mockResolvedValue(false); - const isGitConfigured = await checkForGitSetup(); + const gitConfig = await readGitConfig(); - expect(isGitConfigured).toBe(false); + expect(gitConfig).toBeUndefined(); }); it('should return false if git package is installed but git credentials are not set', async () => { @@ -322,9 +332,9 @@ describe('tasks', () => { commandExists.mockResolvedValue(true); - const isGitConfigured = await checkForGitSetup(); + const gitConfig = await readGitConfig(); - expect(isGitConfigured).toBe(false); + expect(gitConfig).toBeUndefined(); expect(mockExec).toHaveBeenCalledWith( 'git config user.name', expect.any(Function), @@ -339,18 +349,14 @@ describe('tasks', () => { describe('initGitRepository', () => { it('should initialize a git repository at the given path', async () => { const destinationDir = 'tmp/mockApp/'; - const context = { - defaultBranch: '', - }; mockExec.mockImplementation((_command, callback) => { callback(null, { stdout: 'main' }, 'standard error'); }); - await initGitRepository(destinationDir, context); + await initGitRepository(destinationDir); - expect(context.defaultBranch).toBe('main'); - expect(mockExec).toHaveBeenCalledTimes(3); + expect(mockExec).toHaveBeenCalledTimes(2); expect(mockExec).toHaveBeenNthCalledWith( 1, 'git init', @@ -361,11 +367,6 @@ describe('tasks', () => { 'git commit --allow-empty -m "Initial commit"', expect.any(Function), ); - expect(mockExec).toHaveBeenNthCalledWith( - 3, - 'git branch --format="%(refname:short)"', - expect.any(Function), - ); }); }); }); diff --git a/packages/create-app/src/lib/tasks.ts b/packages/create-app/src/lib/tasks.ts index d1c7b125f4..6b40ecac63 100644 --- a/packages/create-app/src/lib/tasks.ts +++ b/packages/create-app/src/lib/tasks.ts @@ -29,10 +29,17 @@ import { exec as execCb } from 'child_process'; import { packageVersions } from './versions'; import { promisify } from 'util'; import commandExists from 'command-exists'; +import os from 'os'; const TASK_NAME_MAX_LENGTH = 14; const exec = promisify(execCb); +export type GitConfig = { + name?: string; + email?: string; + defaultBranch?: string; +}; + export class Task { static log(name: string = '') { process.stdout.write(`${chalk.green(name)}\n`); @@ -239,11 +246,13 @@ export async function moveAppTask( } /** - * Checks if git package is installed and git credentials exists + * Read git configs by creating a temp folder and initializing a repo * * @throws if `exec` fails */ -export async function checkForGitSetup(): Promise { +export async function readGitConfig(): Promise { + const tempDir = resolvePath(os.tmpdir(), 'git-temp-dir'); + const runCmd = (cmd: string) => exec(cmd).catch(error => { process.stdout.write(error.stderr); @@ -251,26 +260,52 @@ export async function checkForGitSetup(): Promise { throw new Error(`Could not execute command ${chalk.cyan(cmd)}`); }); - const gitCommandExists = await commandExists('git'); + const isGitAvailable = await commandExists('git').catch(() => false); - if (!gitCommandExists) return false; + if (!isGitAvailable) return; - const [gitUsername, gitEmail] = await Promise.all([ - runCmd('git config user.name'), - runCmd('git config user.email'), - ]); + try { + await fs.mkdir(tempDir); - return Boolean(gitUsername.stdout?.trim() && gitEmail.stdout?.trim()); + process.chdir(tempDir); + + const [gitUsername, gitEmail] = await Promise.all([ + runCmd('git config user.name'), + runCmd('git config user.email'), + ]); + + const gitCredentials = Boolean( + gitUsername.stdout?.trim() && gitEmail.stdout?.trim(), + ); + + if (!gitCredentials) return; + + await runCmd('git init'); + await runCmd('git commit --allow-empty -m "Initial commit"'); + + const gitDefaultBranch = await runCmd( + 'git branch --format="%(refname:short)"', + ); + + return { + name: gitUsername.stdout?.trim(), + email: gitEmail.stdout?.trim(), + defaultBranch: gitDefaultBranch.stdout?.trim(), + }; + } catch (error) { + throw new Error(`Failed to read git config, ${error}`); + } finally { + await fs.rm(tempDir, { recursive: true }); + } } /** * Initializes a git repository in the destination folder * * @param dir - source path to initialize git repository in - * @param context - template parameters * @throws if `exec` fails */ -export async function initGitRepository(dir: string, context: any) { +export async function initGitRepository(dir: string) { const runCmd = (cmd: string) => exec(cmd).catch(error => { process.stdout.write(error.stderr); @@ -283,11 +318,5 @@ export async function initGitRepository(dir: string, context: any) { await runCmd('git init'); await runCmd('git commit --allow-empty -m "Initial commit"'); - - const defaultBranch = await runCmd( - 'git branch --format="%(refname:short)"', - ); - - context.defaultBranch = defaultBranch.stdout?.trim() || 'master'; }); } From b681275e6988773994162dba44b53f3dac802eb2 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Fri, 23 Sep 2022 18:54:48 +0200 Subject: [PATCH 090/279] Ignore .git store on Template uploads for editor and increase payload size to 10MB (fixes #12561) Signed-off-by: Axel Hecht --- .changeset/wild-weeks-live.md | 6 ++++++ plugins/scaffolder-backend/src/service/router.ts | 3 ++- .../scaffolder/src/lib/filesystem/WebFileSystemAccess.ts | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/wild-weeks-live.md diff --git a/.changeset/wild-weeks-live.md b/.changeset/wild-weeks-live.md new file mode 100644 index 0000000000..e66b3193d0 --- /dev/null +++ b/.changeset/wild-weeks-live.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-scaffolder-backend': patch +--- + +Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB. diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 28dd1ca413..46fdcbe806 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -148,7 +148,8 @@ export async function createRouter( options: RouterOptions, ): Promise { const router = Router(); - router.use(express.json()); + // Be generous in upload size to support a wide rande of templates in dry-run mode. + router.use(express.json({ limit: '10MB' })); const { logger: parentLogger, diff --git a/plugins/scaffolder/src/lib/filesystem/WebFileSystemAccess.ts b/plugins/scaffolder/src/lib/filesystem/WebFileSystemAccess.ts index 36e7b11de2..8d325e4bfb 100644 --- a/plugins/scaffolder/src/lib/filesystem/WebFileSystemAccess.ts +++ b/plugins/scaffolder/src/lib/filesystem/WebFileSystemAccess.ts @@ -71,6 +71,10 @@ class WebDirectoryAccess implements TemplateDirectoryAccess { if (handle.kind === 'file') { yield new WebFileAccess([...basePath, handle.name].join('/'), handle); } else if (handle.kind === 'directory') { + // Skip git storage directory + if (handle.name === '.git') { + continue; + } yield* this.listDirectoryContents(handle, [...basePath, handle.name]); } } From c73e2780429991ba316a13bf18f839463db9e41d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 24 Sep 2022 11:19:12 +0200 Subject: [PATCH 091/279] Update .changeset/quiet-hats-kick.md Signed-off-by: Patrik Oldsberg --- .changeset/quiet-hats-kick.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/quiet-hats-kick.md b/.changeset/quiet-hats-kick.md index 155d8f232c..a0bbab4cb1 100644 --- a/.changeset/quiet-hats-kick.md +++ b/.changeset/quiet-hats-kick.md @@ -2,4 +2,4 @@ '@backstage/plugin-jenkins-backend': patch --- -fix incorrect jenkins backend config initialization. named config and non named config use extraRequestHeaders +Fixed a bug where `extraRequestHeaders` configuration was ignored. From de96628b0ae0abf6e25b7a0a8a7fe237ed655d29 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 24 Sep 2022 17:00:53 +0200 Subject: [PATCH 092/279] catalog-backend: add initial integration test harness + test Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 399 ++++++++++++++++++ .../DefaultCatalogProcessingEngine.ts | 2 +- 2 files changed, 400 insertions(+), 1 deletion(-) create mode 100644 plugins/catalog-backend/src/integration.test.ts diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts new file mode 100644 index 0000000000..b702dc1180 --- /dev/null +++ b/plugins/catalog-backend/src/integration.test.ts @@ -0,0 +1,399 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Knex } from 'knex'; +import { Logger } from 'winston'; +import { ConfigReader } from '@backstage/config'; +import { JsonObject } from '@backstage/types'; +import { + BuiltinKindsEntityProcessor, + CatalogProcessingEngine, + EntityProvider, +} from './index'; +import { DatabaseManager, getVoidLogger } from '@backstage/backend-common'; +import { PermissionEvaluator } from '@backstage/plugin-permission-common'; +import { Entity, EntityPolicies } from '@backstage/catalog-model'; +import { defaultEntityDataParser } from './modules/util/parse'; +import { DefaultCatalogProcessingOrchestrator } from './processing/DefaultCatalogProcessingOrchestrator'; +import { applyDatabaseMigrations } from './database/migrations'; +import { DefaultProcessingDatabase } from './database/DefaultProcessingDatabase'; +import { ScmIntegrations } from '@backstage/integration'; +import { DefaultCatalogRulesEnforcer } from './ingestion/CatalogRules'; +import { Stitcher } from './stitching/Stitcher'; +import { DefaultEntitiesCatalog } from './service/DefaultEntitiesCatalog'; +import { DefaultCatalogProcessingEngine } from './processing/DefaultCatalogProcessingEngine'; +import { createHash } from 'crypto'; +import { DefaultRefreshService } from './service/DefaultRefreshService'; +import { connectEntityProviders } from './processing/connectEntityProviders'; +import { EntitiesCatalog } from './catalog/types'; +import { RefreshOptions, RefreshService } from './service/types'; +import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; +import { RefreshStateItem } from './database/types'; + +const voidLogger = getVoidLogger(); + +class TestProvider implements EntityProvider { + #connection?: EntityProviderConnection; + + getProviderName(): string { + return 'test'; + } + + async connect(connection: EntityProviderConnection): Promise { + this.#connection = connection; + } + + getConnection() { + if (!this.#connection) { + throw new Error('Provider is not connected yet'); + } + return this.#connection; + } +} + +type ProgressTracker = NonNullable< + ConstructorParameters[7] +>; + +class ProxyProgressTracker implements ProgressTracker { + #inner: ProgressTracker; + + constructor(inner: ProgressTracker) { + this.#inner = inner; + } + + processStart(item: RefreshStateItem) { + return this.#inner.processStart(item, voidLogger); + } + + setTracker(tracker: ProgressTracker) { + this.#inner = tracker; + } +} + +class NoopProgressTracker implements ProgressTracker { + static emptyTracking = { + markFailed() {}, + markProcessorsCompleted() {}, + markSuccessfulWithChanges() {}, + markSuccessfulWithErrors() {}, + markSuccessfulWithNoChanges() {}, + }; + + processStart() { + return NoopProgressTracker.emptyTracking; + } +} + +class WaitingProgressTracker implements ProgressTracker { + #resolve: (errors: Record) => void; + #promise: Promise>; + #counts = new Map(); + #errors = new Map(); + #inFlight = new Array>(); + + constructor(private readonly entityRefs?: Set) { + let resolve: (errors: Record) => void; + this.#promise = new Promise>(_resolve => { + resolve = _resolve; + }); + this.#resolve = resolve!; + } + + processStart(item: RefreshStateItem) { + if (this.entityRefs && !this.entityRefs.has(item.entityRef)) { + return NoopProgressTracker.emptyTracking; + } + + let resolve: () => void; + this.#inFlight.push( + new Promise(_resolve => { + resolve = _resolve; + }), + ); + + const currentCount = this.#counts.get(item.id) ?? 0; + + const onDone = () => { + this.#counts.set(item.id, currentCount + 1); + + if (Array.from(this.#counts.values()).every(c => c >= 2)) { + this.#resolve(Object.fromEntries(this.#errors)); + } + }; + return { + markFailed: (error: Error) => { + this.#errors.set(item.entityRef, error); + onDone(); + resolve(); + }, + markProcessorsCompleted() {}, + markSuccessfulWithChanges: () => { + this.#errors.delete(item.entityRef); + this.#counts.set(item.id, 0); + resolve(); + }, + markSuccessfulWithErrors: () => { + this.#errors.delete(item.entityRef); + onDone(); + resolve(); + }, + markSuccessfulWithNoChanges: () => { + onDone(); + resolve(); + }, + }; + } + + async wait(): Promise> { + return this.#promise; + } + + async waitForFinish(): Promise { + await Promise.all(this.#inFlight.slice()); + } +} + +class TestHarness { + readonly #catalog: EntitiesCatalog; + readonly #engine: CatalogProcessingEngine; + readonly #refresh: RefreshService; + readonly #provider: TestProvider; + readonly #proxyProgressTracker: ProxyProgressTracker; + + static async create(options?: { + config?: JsonObject; + logger?: Logger; + db?: Knex; + permissions?: PermissionEvaluator; + processEntity?(entity: Entity): Promise; + onProcessingError?(event: { + unprocessedEntity: Entity; + errors: Error[]; + }): void; + }) { + const config = new ConfigReader( + options?.config ?? { + backend: { + database: { + client: 'better-sqlite3', + connection: ':memory:', + }, + }, + }, + ); + const logger = options?.logger ?? getVoidLogger(); + const db = + options?.db /* (await TestDatabases.create().init('SQLITE_3')); */ ?? + (await DatabaseManager.fromConfig(config, { logger }) + .forPlugin('catalog') + .getClient()); + + await applyDatabaseMigrations(db); + + const processingDatabase = new DefaultProcessingDatabase({ + database: db, + logger, + refreshInterval: () => 0.05, + }); + + const integrations = ScmIntegrations.fromConfig(config); + const rulesEnforcer = DefaultCatalogRulesEnforcer.fromConfig(config); + const orchestrator = new DefaultCatalogProcessingOrchestrator({ + processors: [ + { + getProcessorName: () => 'test', + async preProcessEntity(entity: Entity) { + if (options?.processEntity) { + return options?.processEntity(entity); + } + return entity; + }, + }, + new BuiltinKindsEntityProcessor(), + ], + integrations, + rulesEnforcer, + logger, + parser: defaultEntityDataParser, + // policy: new SchemaValidEntityPolicy(), + policy: EntityPolicies.allOf([]), + }); + const stitcher = new Stitcher(db, logger); + const catalog = new DefaultEntitiesCatalog(db, stitcher); + const proxyProgressTracker = new ProxyProgressTracker( + new NoopProgressTracker(), + ); + + const engine = new DefaultCatalogProcessingEngine( + logger, + processingDatabase, + orchestrator, + stitcher, + () => createHash('sha1'), + 50, + event => { + options?.onProcessingError?.(event); + }, + proxyProgressTracker, + ); + + const refresh = new DefaultRefreshService({ database: processingDatabase }); + + const provider = new TestProvider(); + + await connectEntityProviders(processingDatabase, [provider]); + + return new TestHarness( + catalog, + engine, + refresh, + provider, + proxyProgressTracker, + ); + } + + constructor( + catalog: EntitiesCatalog, + engine: CatalogProcessingEngine, + refresh: RefreshService, + provider: TestProvider, + proxyProgressTracker: ProxyProgressTracker, + ) { + this.#catalog = catalog; + this.#engine = engine; + this.#refresh = refresh; + this.#provider = provider; + this.#proxyProgressTracker = proxyProgressTracker; + } + + async process(entityRefs?: Set) { + this.#engine.start(); + + const tracker = new WaitingProgressTracker(entityRefs); + this.#proxyProgressTracker.setTracker(tracker); + const errors = await tracker.wait(); + + this.#engine.stop(); + await tracker.waitForFinish(); + + this.#proxyProgressTracker.setTracker(new NoopProgressTracker()); + + return errors; + } + + async setInputEntities(entities: Entity[]) { + return this.#provider.getConnection().applyMutation({ + type: 'full', + entities: entities.map(entity => ({ entity })), + }); + } + + async getOutputEntities(): Promise { + const { entities } = await this.#catalog.entities(); + return entities; + } + + async refresh(options: RefreshOptions) { + return this.#refresh.refresh(options); + } +} + +describe('Catalog Backend Integration', () => { + it('should add entities and update errors', async () => { + let triggerError = false; + + const harness = await TestHarness.create({ + async processEntity(entity: Entity) { + if (triggerError) { + delete entity.spec; + } + return entity; + }, + }); + + await harness.setInputEntities([ + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'test', + annotations: { + 'backstage.io/managed-by-location': 'url:.', + 'backstage.io/managed-by-origin-location': 'url:.', + }, + }, + spec: { + type: 'service', + owner: 'guest', + lifecycle: 'production', + }, + }, + ]); + + await expect(harness.getOutputEntities()).resolves.toEqual([]); + await expect(harness.process()).resolves.toEqual({}); + + await expect(harness.getOutputEntities()).resolves.toEqual([ + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: expect.objectContaining({ name: 'test' }), + spec: expect.objectContaining({ type: 'service' }), + relations: [ + { + target: { kind: 'group', namespace: 'default', name: 'guest' }, + type: 'ownedBy', + targetRef: 'group:default/guest', + }, + ], + }, + ]); + + triggerError = true; + + await expect(harness.process()).resolves.toEqual({}); + + await expect(harness.getOutputEntities()).resolves.toEqual([ + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: expect.objectContaining({ name: 'test' }), + spec: expect.objectContaining({ type: 'service' }), + relations: expect.any(Array), + status: { + items: [ + { + level: 'error', + type: 'backstage.io/catalog-processing', + message: expect.stringMatching( + /InputError: Processor BuiltinKindsEntityProcessor threw an error/, + ), + error: expect.objectContaining({ + cause: expect.objectContaining({ + message: + " must have required property 'spec' - missingProperty: spec", + name: 'TypeError', + }), + name: 'InputError', + }), + }, + ], + }, + }, + ]); + }); +}); diff --git a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingEngine.ts b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingEngine.ts index fb9518c783..4693ffc559 100644 --- a/plugins/catalog-backend/src/processing/DefaultCatalogProcessingEngine.ts +++ b/plugins/catalog-backend/src/processing/DefaultCatalogProcessingEngine.ts @@ -32,7 +32,6 @@ import { startTaskPipeline } from './TaskPipeline'; const CACHE_TTL = 5; export class DefaultCatalogProcessingEngine implements CatalogProcessingEngine { - private readonly tracker = progressTracker(); private stopFunc?: () => void; constructor( @@ -46,6 +45,7 @@ export class DefaultCatalogProcessingEngine implements CatalogProcessingEngine { unprocessedEntity: Entity; errors: Error[]; }) => Promise | void, + private readonly tracker = progressTracker(), ) {} async start() { From 2d4f5a7833a8a782bf8b8e7ad6bd04cdbead2250 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Fri, 16 Sep 2022 18:17:59 +0200 Subject: [PATCH 093/279] make nunjucks' globals configureable Signed-off-by: Kiss Miklos --- .../src/ScaffolderPlugin.ts | 10 ++++++- .../src/lib/templating/SecureTemplater.ts | 29 +++++++++++++++++-- .../actions/builtin/createBuiltinActions.ts | 3 ++ .../actions/builtin/fetch/template.ts | 9 +++++- .../src/scaffolder/dryrun/createDryRunner.ts | 1 + .../tasks/NunjucksWorkflowRunner.ts | 3 ++ .../src/scaffolder/tasks/TaskWorker.ts | 3 ++ .../scaffolder-backend/src/service/router.ts | 5 ++++ 8 files changed, 58 insertions(+), 5 deletions(-) diff --git a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts index b884802a1f..57d7971f50 100644 --- a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts +++ b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts @@ -39,6 +39,7 @@ export type ScaffolderPluginOptions = { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; /** @@ -101,7 +102,12 @@ export const scaffolderPlugin = createBackendPlugin({ httpRouter, catalogClient, }) { - const { additionalTemplateFilters, taskBroker, taskWorkers } = options; + const { + additionalTemplateFilters, + taskBroker, + taskWorkers, + additionalTemplateGlobals, + } = options; const log = loggerToWinstonLogger(logger); const actions = options.actions || [ @@ -112,6 +118,7 @@ export const scaffolderPlugin = createBackendPlugin({ reader, config, additionalTemplateFilters, + additionalTemplateGlobals, }), ]; @@ -130,6 +137,7 @@ export const scaffolderPlugin = createBackendPlugin({ taskBroker, taskWorkers, additionalTemplateFilters, + additionalTemplateGlobals, }); httpRouter.use(router); }, diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts index e82620a90d..1b8e201845 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts @@ -64,6 +64,12 @@ const { render, renderCompat } = (() => { } } + if (typeof additionalTemplateGlobals !== 'undefined') { + for (const [globalName, globalFn] of Object.entries(additionalTemplateGlobals)) { + env.addGlobal(globalName, (...args) => JSON.parse(globalFn(...args))); + } + } + let uninstallCompat = undefined; function render(str, values) { @@ -107,6 +113,7 @@ export interface SecureTemplaterOptions { /* Extra user-provided nunjucks filters */ additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; } export type SecureTemplateRenderer = ( @@ -116,8 +123,12 @@ export type SecureTemplateRenderer = ( export class SecureTemplater { static async loadRenderer(options: SecureTemplaterOptions = {}) { - const { parseRepoUrl, cookiecutterCompat, additionalTemplateFilters } = - options; + const { + parseRepoUrl, + cookiecutterCompat, + additionalTemplateFilters, + additionalTemplateGlobals, + } = options; const sandbox: Record = {}; if (parseRepoUrl) { @@ -134,7 +145,19 @@ export class SecureTemplater { ]), ); } - + if (additionalTemplateGlobals) { + console.log(additionalTemplateGlobals, '!!!!!!!!!!!'); + sandbox.additionalTemplateGlobals = Object.fromEntries( + Object.entries(additionalTemplateGlobals) + .filter(([_, filterFunction]) => !!filterFunction) + .map(([filterName, filterFunction]) => [ + filterName, + (...args: JsonValue[]) => JSON.stringify(filterFunction(...args)), + ]), + ); + } + console.log(sandbox.additionalTemplateGlobals, 'HUH?'); + console.log(sandbox.additionalTemplateFilters, 'HUH?'); const vm = new VM({ sandbox }); const nunjucksSource = await fs.readFile( diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts index fcddf127e2..7581189411 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts @@ -82,6 +82,7 @@ export interface CreateBuiltInActionsOptions { * Template Manifests and also template skeleton files when using `fetch:template`. */ additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; } /** @@ -100,6 +101,7 @@ export const createBuiltinActions = ( catalogClient, config, additionalTemplateFilters, + additionalTemplateGlobals, } = options; const githubCredentialsProvider: GithubCredentialsProvider = @@ -114,6 +116,7 @@ export const createBuiltinActions = ( integrations, reader, additionalTemplateFilters, + additionalTemplateGlobals, }), createPublishGerritAction({ integrations, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts index 1ead7ebcd6..47a85df9ca 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts @@ -39,8 +39,14 @@ export function createFetchTemplateAction(options: { reader: UrlReader; integrations: ScmIntegrations; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }) { - const { reader, integrations, additionalTemplateFilters } = options; + const { + reader, + integrations, + additionalTemplateFilters, + additionalTemplateGlobals, + } = options; return createTemplateAction<{ url: string; @@ -218,6 +224,7 @@ export function createFetchTemplateAction(options: { const renderTemplate = await SecureTemplater.loadRenderer({ cookiecutterCompat: ctx.input.cookiecutterCompat, additionalTemplateFilters, + additionalTemplateGlobals, }); for (const location of allEntriesInTemplate) { diff --git a/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts b/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts index f2c3c13509..36a5a3728a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts @@ -52,6 +52,7 @@ export type TemplateTesterCreateOptions = { actionRegistry: TemplateActionRegistry; workingDirectory: string; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; /** diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index 009ea1357d..eb6683e32b 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -45,6 +45,7 @@ type NunjucksWorkflowRunnerOptions = { integrations: ScmIntegrations; logger: winston.Logger; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; type TemplateContext = { @@ -188,6 +189,7 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { ); const { integrations } = this.options; + console.log(this.options.additionalTemplateGlobals, '@@@%%%%%%%%%%@@@'); const renderTemplate = await SecureTemplater.loadRenderer({ // TODO(blam): let's work out how we can deprecate this. // We shouldn't really need to be exposing these now we can deal with @@ -197,6 +199,7 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { return parseRepoUrl(url, integrations); }, additionalTemplateFilters: this.options.additionalTemplateFilters, + additionalTemplateGlobals: this.options.additionalTemplateGlobals, }); try { diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts index 9defd71c49..bd0e6a6dd4 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts @@ -46,6 +46,7 @@ export type CreateWorkerOptions = { workingDirectory: string; logger: Logger; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; /** @@ -64,6 +65,7 @@ export class TaskWorker { integrations, workingDirectory, additionalTemplateFilters, + additionalTemplateGlobals, } = options; const workflowRunner = new NunjucksWorkflowRunner({ @@ -72,6 +74,7 @@ export class TaskWorker { logger, workingDirectory, additionalTemplateFilters, + additionalTemplateGlobals, }); return new TaskWorker({ diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 28dd1ca413..592e0be79d 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -70,6 +70,7 @@ export interface RouterOptions { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; identity?: IdentityApi; } @@ -160,6 +161,7 @@ export async function createRouter( taskWorkers, scheduler, additionalTemplateFilters, + additionalTemplateGlobals, } = options; const logger = parentLogger.child({ plugin: 'scaffolder' }); @@ -207,6 +209,7 @@ export async function createRouter( logger, workingDirectory, additionalTemplateFilters, + additionalTemplateGlobals, }); workers.push(worker); } @@ -219,6 +222,7 @@ export async function createRouter( reader, config, additionalTemplateFilters, + additionalTemplateGlobals, }); actionsToRegister.forEach(action => actionRegistry.register(action)); @@ -230,6 +234,7 @@ export async function createRouter( logger, workingDirectory, additionalTemplateFilters, + additionalTemplateGlobals, }); router From 155b46255d2bd3a224e4f791c7ef37d13a4b525c Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Fri, 16 Sep 2022 18:25:46 +0200 Subject: [PATCH 094/279] remove console.logs Signed-off-by: Kiss Miklos --- .../scaffolder-backend/src/lib/templating/SecureTemplater.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts index 1b8e201845..ebe32a8c11 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts @@ -156,8 +156,6 @@ export class SecureTemplater { ]), ); } - console.log(sandbox.additionalTemplateGlobals, 'HUH?'); - console.log(sandbox.additionalTemplateFilters, 'HUH?'); const vm = new VM({ sandbox }); const nunjucksSource = await fs.readFile( From 4c571c6f1975b956f2fe266ffd13295cd648c69f Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Thu, 22 Sep 2022 01:15:05 +0200 Subject: [PATCH 095/279] remove console.log Signed-off-by: Kiss Miklos --- plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts index ebe32a8c11..575eae1887 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts @@ -146,7 +146,6 @@ export class SecureTemplater { ); } if (additionalTemplateGlobals) { - console.log(additionalTemplateGlobals, '!!!!!!!!!!!'); sandbox.additionalTemplateGlobals = Object.fromEntries( Object.entries(additionalTemplateGlobals) .filter(([_, filterFunction]) => !!filterFunction) From e640515640701e596033e485dae7d9babea19329 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Thu, 22 Sep 2022 01:21:37 +0200 Subject: [PATCH 096/279] api-report.md Signed-off-by: Kiss Miklos --- plugins/scaffolder-backend/api-report.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 35e3dab0b5..17b119e17b 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -60,6 +60,8 @@ export const createBuiltinActions: ( // @public export interface CreateBuiltInActionsOptions { additionalTemplateFilters?: Record; + // (undocumented) + additionalTemplateGlobals?: Record; catalogClient: CatalogApi; config: Config; integrations: ScmIntegrations; @@ -108,6 +110,7 @@ export function createFetchTemplateAction(options: { reader: UrlReader; integrations: ScmIntegrations; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }): TemplateAction<{ url: string; targetPath?: string | undefined; @@ -448,6 +451,7 @@ export type CreateWorkerOptions = { workingDirectory: string; logger: Logger; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; // @public @@ -538,6 +542,8 @@ export interface RouterOptions { // (undocumented) additionalTemplateFilters?: Record; // (undocumented) + additionalTemplateGlobals?: Record; + // (undocumented) catalogClient: CatalogApi; // (undocumented) config: Config; @@ -593,6 +599,7 @@ export type ScaffolderPluginOptions = { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; + additionalTemplateGlobals?: Record; }; // @public From 253453fa1434ab7e235cbe3028f4472d81110195 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Thu, 22 Sep 2022 01:23:41 +0200 Subject: [PATCH 097/279] add changeset Signed-off-by: Kiss Miklos --- .changeset/dull-rocks-warn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/dull-rocks-warn.md diff --git a/.changeset/dull-rocks-warn.md b/.changeset/dull-rocks-warn.md new file mode 100644 index 0000000000..7bd13ae6a1 --- /dev/null +++ b/.changeset/dull-rocks-warn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Added a new property called `additionalTemplateGlobals` which allowes you to add global functions to the scaffolder nunjucks templates. From 5ca599b381d94d558c96c94bc878783c3f7cfb6e Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Sat, 24 Sep 2022 17:55:39 +0200 Subject: [PATCH 098/279] fix lint stuff Signed-off-by: Kiss Miklos --- .changeset/dull-rocks-warn.md | 2 +- .../src/scaffolder/tasks/NunjucksWorkflowRunner.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.changeset/dull-rocks-warn.md b/.changeset/dull-rocks-warn.md index 7bd13ae6a1..0ccf4f20cb 100644 --- a/.changeset/dull-rocks-warn.md +++ b/.changeset/dull-rocks-warn.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-backend': minor --- -Added a new property called `additionalTemplateGlobals` which allowes you to add global functions to the scaffolder nunjucks templates. +Added a new property called `additionalTemplateGlobals` which allows you to add global functions to the scaffolder nunjucks templates. diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index eb6683e32b..a9ed5bab8a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -189,7 +189,6 @@ export class NunjucksWorkflowRunner implements WorkflowRunner { ); const { integrations } = this.options; - console.log(this.options.additionalTemplateGlobals, '@@@%%%%%%%%%%@@@'); const renderTemplate = await SecureTemplater.loadRenderer({ // TODO(blam): let's work out how we can deprecate this. // We shouldn't really need to be exposing these now we can deal with From c505860ee59eec86c7afe7eee0e0174d72182d8d Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 25 Sep 2022 20:40:42 +0200 Subject: [PATCH 099/279] catalog-backend: integration test, forward more process args and throw on unhandled error Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index b702dc1180..a742d86ba7 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -40,7 +40,11 @@ import { DefaultRefreshService } from './service/DefaultRefreshService'; import { connectEntityProviders } from './processing/connectEntityProviders'; import { EntitiesCatalog } from './catalog/types'; import { RefreshOptions, RefreshService } from './service/types'; -import { EntityProviderConnection } from '@backstage/plugin-catalog-node'; +import { + CatalogProcessorEmit, + EntityProviderConnection, + LocationSpec, +} from '@backstage/plugin-catalog-node'; import { RefreshStateItem } from './database/types'; const voidLogger = getVoidLogger(); @@ -179,7 +183,11 @@ class TestHarness { logger?: Logger; db?: Knex; permissions?: PermissionEvaluator; - processEntity?(entity: Entity): Promise; + processEntity?( + entity: Entity, + location: LocationSpec, + emit: CatalogProcessorEmit, + ): Promise; onProcessingError?(event: { unprocessedEntity: Entity; errors: Error[]; @@ -216,9 +224,13 @@ class TestHarness { processors: [ { getProcessorName: () => 'test', - async preProcessEntity(entity: Entity) { + async preProcessEntity( + entity: Entity, + location: LocationSpec, + emit: CatalogProcessorEmit, + ) { if (options?.processEntity) { - return options?.processEntity(entity); + return options?.processEntity(entity, location, emit); } return entity; }, @@ -246,7 +258,13 @@ class TestHarness { () => createHash('sha1'), 50, event => { - options?.onProcessingError?.(event); + if (options?.onProcessingError) { + options.onProcessingError(event); + } else { + throw new Error( + `Catalog processing error, ${event.errors.join(', ')}`, + ); + } }, proxyProgressTracker, ); From 746d2517455274c26ff3ff45efbd4edf95301d9c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 25 Sep 2022 21:35:24 +0200 Subject: [PATCH 100/279] catalog-backend: integration test, remove builtin kinds processor Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 50 +++++++------------ 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index a742d86ba7..db7bd0a9d2 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -18,11 +18,7 @@ import { Knex } from 'knex'; import { Logger } from 'winston'; import { ConfigReader } from '@backstage/config'; import { JsonObject } from '@backstage/types'; -import { - BuiltinKindsEntityProcessor, - CatalogProcessingEngine, - EntityProvider, -} from './index'; +import { CatalogProcessingEngine, EntityProvider } from './index'; import { DatabaseManager, getVoidLogger } from '@backstage/backend-common'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; import { Entity, EntityPolicies } from '@backstage/catalog-model'; @@ -224,6 +220,9 @@ class TestHarness { processors: [ { getProcessorName: () => 'test', + async validateEntityKind() { + return true; + }, async preProcessEntity( entity: Entity, location: LocationSpec, @@ -235,7 +234,6 @@ class TestHarness { return entity; }, }, - new BuiltinKindsEntityProcessor(), ], integrations, rulesEnforcer, @@ -337,7 +335,7 @@ describe('Catalog Backend Integration', () => { const harness = await TestHarness.create({ async processEntity(entity: Entity) { if (triggerError) { - delete entity.spec; + throw new Error('NOPE'); } return entity; }, @@ -354,11 +352,6 @@ describe('Catalog Backend Integration', () => { 'backstage.io/managed-by-origin-location': 'url:.', }, }, - spec: { - type: 'service', - owner: 'guest', - lifecycle: 'production', - }, }, ]); @@ -370,14 +363,7 @@ describe('Catalog Backend Integration', () => { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', metadata: expect.objectContaining({ name: 'test' }), - spec: expect.objectContaining({ type: 'service' }), - relations: [ - { - target: { kind: 'group', namespace: 'default', name: 'guest' }, - type: 'ownedBy', - targetRef: 'group:default/guest', - }, - ], + relations: [], }, ]); @@ -390,24 +376,24 @@ describe('Catalog Backend Integration', () => { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', metadata: expect.objectContaining({ name: 'test' }), - spec: expect.objectContaining({ type: 'service' }), - relations: expect.any(Array), + relations: [], status: { items: [ { level: 'error', type: 'backstage.io/catalog-processing', - message: expect.stringMatching( - /InputError: Processor BuiltinKindsEntityProcessor threw an error/, - ), - error: expect.objectContaining({ - cause: expect.objectContaining({ - message: - " must have required property 'spec' - missingProperty: spec", - name: 'TypeError', - }), + message: + 'InputError: Processor Object threw an error while preprocessing; caused by Error: NOPE', + error: { name: 'InputError', - }), + message: + 'Processor Object threw an error while preprocessing; caused by Error: NOPE', + cause: { + name: 'Error', + message: 'NOPE', + stack: expect.stringMatching(/^Error: NOPE/), + }, + }, }, ], }, From e1b03e97e6b515547e7aeacb5537efc96bde085f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 25 Sep 2022 21:53:37 +0200 Subject: [PATCH 101/279] catalog-backend: integration test, simplify output entities structure Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index db7bd0a9d2..6659ece759 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -21,7 +21,11 @@ import { JsonObject } from '@backstage/types'; import { CatalogProcessingEngine, EntityProvider } from './index'; import { DatabaseManager, getVoidLogger } from '@backstage/backend-common'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; -import { Entity, EntityPolicies } from '@backstage/catalog-model'; +import { + Entity, + EntityPolicies, + stringifyEntityRef, +} from '@backstage/catalog-model'; import { defaultEntityDataParser } from './modules/util/parse'; import { DefaultCatalogProcessingOrchestrator } from './processing/DefaultCatalogProcessingOrchestrator'; import { applyDatabaseMigrations } from './database/migrations'; @@ -318,9 +322,9 @@ class TestHarness { }); } - async getOutputEntities(): Promise { + async getOutputEntities(): Promise> { const { entities } = await this.#catalog.entities(); - return entities; + return Object.fromEntries(entities.map(e => [stringifyEntityRef(e), e])); } async refresh(options: RefreshOptions) { @@ -355,24 +359,24 @@ describe('Catalog Backend Integration', () => { }, ]); - await expect(harness.getOutputEntities()).resolves.toEqual([]); + await expect(harness.getOutputEntities()).resolves.toEqual({}); await expect(harness.process()).resolves.toEqual({}); - await expect(harness.getOutputEntities()).resolves.toEqual([ - { + await expect(harness.getOutputEntities()).resolves.toEqual({ + 'component:default/test': { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', metadata: expect.objectContaining({ name: 'test' }), relations: [], }, - ]); + }); triggerError = true; await expect(harness.process()).resolves.toEqual({}); - await expect(harness.getOutputEntities()).resolves.toEqual([ - { + await expect(harness.getOutputEntities()).resolves.toEqual({ + 'component:default/test': { apiVersion: 'backstage.io/v1alpha1', kind: 'Component', metadata: expect.objectContaining({ name: 'test' }), @@ -398,6 +402,6 @@ describe('Catalog Backend Integration', () => { ], }, }, - ]); + }); }); }); From a0b1c65f9bcac9eda54b7fb54c1fb56ca1d258f1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 25 Sep 2022 22:29:36 +0200 Subject: [PATCH 102/279] catalog-backend: integration test, add orphan test Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index 6659ece759..f5afa34f30 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -44,6 +44,7 @@ import { CatalogProcessorEmit, EntityProviderConnection, LocationSpec, + processingResult, } from '@backstage/plugin-catalog-node'; import { RefreshStateItem } from './database/types'; @@ -404,4 +405,91 @@ describe('Catalog Backend Integration', () => { }, }); }); + + it('should orphan entities', async () => { + const generatedApis = ['api-1', 'api-2']; + + const harness = await TestHarness.create({ + async processEntity( + entity: Entity, + location: LocationSpec, + emit: CatalogProcessorEmit, + ) { + if (entity.metadata.name === 'test') { + for (const api of generatedApis) { + emit( + processingResult.entity(location, { + apiVersion: 'backstage.io/v1alpha1', + kind: 'API', + metadata: { + name: api, + annotations: { + 'backstage.io/managed-by-location': 'url:.', + 'backstage.io/managed-by-origin-location': 'url:.', + }, + }, + }), + ); + } + } + return entity; + }, + }); + + await harness.setInputEntities([ + { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'test', + annotations: { + 'backstage.io/managed-by-location': 'url:.', + 'backstage.io/managed-by-origin-location': 'url:.', + }, + }, + }, + ]); + + await expect(harness.getOutputEntities()).resolves.toEqual({}); + await expect(harness.process()).resolves.toEqual({}); + + await expect(harness.getOutputEntities()).resolves.toEqual({ + 'component:default/test': { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: expect.objectContaining({ name: 'test' }), + relations: [], + }, + 'api:default/api-1': expect.objectContaining({ + metadata: expect.objectContaining({ name: 'api-1' }), + }), + 'api:default/api-2': expect.objectContaining({ + metadata: expect.objectContaining({ name: 'api-2' }), + }), + }); + + generatedApis.pop(); + + await expect(harness.process()).resolves.toEqual({}); + + await expect(harness.getOutputEntities()).resolves.toEqual({ + 'component:default/test': { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: expect.objectContaining({ name: 'test' }), + relations: [], + }, + 'api:default/api-1': expect.objectContaining({ + metadata: expect.objectContaining({ name: 'api-1' }), + }), + 'api:default/api-2': expect.objectContaining({ + metadata: expect.objectContaining({ + name: 'api-2', + annotations: expect.objectContaining({ + 'backstage.io/orphan': 'true', + }), + }), + }), + }); + }); }); From bd8ab057dc286eaf9b4ee89550d4c36ebd05d767 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Mon, 26 Sep 2022 01:35:21 +0200 Subject: [PATCH 103/279] add option to add any JsonValue for globals Signed-off-by: Kiss Miklos --- packages/backend/src/plugins/scaffolder.ts | 6 ++++ plugins/scaffolder-backend/api-report.md | 17 ++++++---- .../src/ScaffolderPlugin.ts | 4 +-- .../src/lib/templating/SecureTemplater.ts | 31 ++++++++++++++----- .../src/lib/templating/index.ts | 2 +- .../actions/builtin/createBuiltinActions.ts | 4 +-- .../actions/builtin/fetch/template.ts | 3 +- .../src/scaffolder/dryrun/createDryRunner.ts | 4 +-- .../tasks/NunjucksWorkflowRunner.ts | 3 +- .../src/scaffolder/tasks/TaskWorker.ts | 7 +++-- .../scaffolder-backend/src/service/router.ts | 4 +-- 11 files changed, 58 insertions(+), 27 deletions(-) diff --git a/packages/backend/src/plugins/scaffolder.ts b/packages/backend/src/plugins/scaffolder.ts index d079b64c28..eff781cdb7 100644 --- a/packages/backend/src/plugins/scaffolder.ts +++ b/packages/backend/src/plugins/scaffolder.ts @@ -34,5 +34,11 @@ export default async function createPlugin( reader: env.reader, identity: env.identity, scheduler: env.scheduler, + additionalTemplateGlobals: { + company: 'RoadieHQ', + now: () => { + return 'NOW !!!!'; + }, + }, }); } diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 17b119e17b..9dcc45f91b 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -61,7 +61,7 @@ export const createBuiltinActions: ( export interface CreateBuiltInActionsOptions { additionalTemplateFilters?: Record; // (undocumented) - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; catalogClient: CatalogApi; config: Config; integrations: ScmIntegrations; @@ -110,7 +110,7 @@ export function createFetchTemplateAction(options: { reader: UrlReader; integrations: ScmIntegrations; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }): TemplateAction<{ url: string; targetPath?: string | undefined; @@ -429,7 +429,7 @@ export const createPublishGitlabMergeRequestAction: (options: { branchName: string; targetPath: string; token?: string | undefined; - commitAction?: 'update' | 'create' | 'delete' | undefined; + commitAction?: 'update' | 'delete' | 'create' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined; @@ -451,7 +451,7 @@ export type CreateWorkerOptions = { workingDirectory: string; logger: Logger; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; // @public @@ -542,7 +542,7 @@ export interface RouterOptions { // (undocumented) additionalTemplateFilters?: Record; // (undocumented) - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; // (undocumented) catalogClient: CatalogApi; // (undocumented) @@ -599,7 +599,7 @@ export type ScaffolderPluginOptions = { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; // @public @@ -820,4 +820,9 @@ export class TemplateActionRegistry { // @public (undocumented) export type TemplateFilter = (...args: JsonValue[]) => JsonValue | undefined; + +// @public (undocumented) +export type TemplateGlobal = + | ((...args: JsonValue[]) => JsonValue | undefined) + | JsonValue; ``` diff --git a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts index 57d7971f50..09d7bdcbb2 100644 --- a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts +++ b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts @@ -26,7 +26,7 @@ import { } from '@backstage/backend-plugin-api'; import { ScmIntegrations } from '@backstage/integration'; import { catalogServiceRef } from '@backstage/plugin-catalog-node'; -import { TemplateFilter } from './lib'; +import { TemplateFilter, TemplateGlobal } from './lib'; import { createBuiltinActions, TaskBroker, TemplateAction } from './scaffolder'; import { createRouter } from './service/router'; @@ -39,7 +39,7 @@ export type ScaffolderPluginOptions = { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; /** diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts index 575eae1887..2a16ff96c1 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts @@ -65,8 +65,12 @@ const { render, renderCompat } = (() => { } if (typeof additionalTemplateGlobals !== 'undefined') { - for (const [globalName, globalFn] of Object.entries(additionalTemplateGlobals)) { - env.addGlobal(globalName, (...args) => JSON.parse(globalFn(...args))); + for (const [globalName, global] of Object.entries(additionalTemplateGlobals)) { + if (typeof global === 'function') { + env.addGlobal(globalName, (...args) => JSON.parse(global(...args))); + } else { + env.addGlobal(globalName, global); + } } } @@ -104,6 +108,11 @@ const { render, renderCompat } = (() => { /** @public */ export type TemplateFilter = (...args: JsonValue[]) => JsonValue | undefined; +/** @public */ +export type TemplateGlobal = + | ((...args: JsonValue[]) => JsonValue | undefined) + | JsonValue; + export interface SecureTemplaterOptions { /* Optional implementation of the parseRepoUrl filter */ parseRepoUrl?(repoUrl: string): RepoSpec; @@ -113,7 +122,8 @@ export interface SecureTemplaterOptions { /* Extra user-provided nunjucks filters */ additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + /* Extra user-provided nunjucks globals */ + additionalTemplateGlobals?: Record; } export type SecureTemplateRenderer = ( @@ -148,11 +158,16 @@ export class SecureTemplater { if (additionalTemplateGlobals) { sandbox.additionalTemplateGlobals = Object.fromEntries( Object.entries(additionalTemplateGlobals) - .filter(([_, filterFunction]) => !!filterFunction) - .map(([filterName, filterFunction]) => [ - filterName, - (...args: JsonValue[]) => JSON.stringify(filterFunction(...args)), - ]), + .filter(([_, global]) => !!global) + .map(([globalName, global]) => { + if (typeof global === 'function') { + return [ + globalName, + (...args: JsonValue[]) => JSON.stringify(global(...args)), + ]; + } + return [globalName, global]; + }), ); } const vm = new VM({ sandbox }); diff --git a/plugins/scaffolder-backend/src/lib/templating/index.ts b/plugins/scaffolder-backend/src/lib/templating/index.ts index 29d77291a1..1f9e5eb855 100644 --- a/plugins/scaffolder-backend/src/lib/templating/index.ts +++ b/plugins/scaffolder-backend/src/lib/templating/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export type { TemplateFilter } from './SecureTemplater'; +export type { TemplateFilter, TemplateGlobal } from './SecureTemplater'; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts index 7581189411..e388a70f00 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/createBuiltinActions.ts @@ -28,7 +28,7 @@ import { createCatalogWriteAction, } from './catalog'; -import { TemplateFilter } from '../../../lib'; +import { TemplateFilter, TemplateGlobal } from '../../../lib'; import { TemplateAction } from '../types'; import { createDebugLogAction } from './debug'; import { createFetchPlainAction, createFetchTemplateAction } from './fetch'; @@ -82,7 +82,7 @@ export interface CreateBuiltInActionsOptions { * Template Manifests and also template skeleton files when using `fetch:template`. */ additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; } /** diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts index 47a85df9ca..d71997d496 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/fetch/template.ts @@ -26,6 +26,7 @@ import { isBinaryFile } from 'isbinaryfile'; import { TemplateFilter, SecureTemplater, + TemplateGlobal, } from '../../../../lib/templating/SecureTemplater'; /** @@ -39,7 +40,7 @@ export function createFetchTemplateAction(options: { reader: UrlReader; integrations: ScmIntegrations; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }) { const { reader, diff --git a/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts b/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts index 36a5a3728a..17f9092bff 100644 --- a/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/dryrun/createDryRunner.ts @@ -25,7 +25,7 @@ import { SerializedFile, serializeDirectoryContents, } from '../../lib/files'; -import { TemplateFilter } from '../../lib/templating'; +import { TemplateFilter, TemplateGlobal } from '../../lib/templating'; import { createTemplateAction, TemplateActionRegistry } from '../actions'; import { NunjucksWorkflowRunner } from '../tasks/NunjucksWorkflowRunner'; import { TaskSecrets } from '../tasks/types'; @@ -52,7 +52,7 @@ export type TemplateTesterCreateOptions = { actionRegistry: TemplateActionRegistry; workingDirectory: string; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; /** diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index a9ed5bab8a..298ea16484 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -31,6 +31,7 @@ import { TemplateFilter, SecureTemplater, SecureTemplateRenderer, + TemplateGlobal, } from '../../lib/templating/SecureTemplater'; import { TaskSpec, @@ -45,7 +46,7 @@ type NunjucksWorkflowRunnerOptions = { integrations: ScmIntegrations; logger: winston.Logger; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; type TemplateContext = { diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts index bd0e6a6dd4..52ecd1a4dc 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts @@ -20,7 +20,10 @@ import { Logger } from 'winston'; import { TemplateActionRegistry } from '../actions'; import { ScmIntegrations } from '@backstage/integration'; import { assertError } from '@backstage/errors'; -import { TemplateFilter } from '../../lib/templating/SecureTemplater'; +import { + TemplateFilter, + TemplateGlobal, +} from '../../lib/templating/SecureTemplater'; /** * TaskWorkerOptions @@ -46,7 +49,7 @@ export type CreateWorkerOptions = { workingDirectory: string; logger: Logger; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; }; /** diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 592e0be79d..a36ea3c769 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -36,7 +36,7 @@ import Router from 'express-promise-router'; import { validate } from 'jsonschema'; import { Logger } from 'winston'; import { z } from 'zod'; -import { TemplateFilter } from '../lib'; +import { TemplateFilter, TemplateGlobal } from '../lib'; import { createBuiltinActions, DatabaseTaskStore, @@ -70,7 +70,7 @@ export interface RouterOptions { taskWorkers?: number; taskBroker?: TaskBroker; additionalTemplateFilters?: Record; - additionalTemplateGlobals?: Record; + additionalTemplateGlobals?: Record; identity?: IdentityApi; } From 304305dd2080a3e45123400717911ec9f9a9d824 Mon Sep 17 00:00:00 2001 From: Willy Go Date: Mon, 26 Sep 2022 15:32:32 +1000 Subject: [PATCH 104/279] Add `allowAutoMerge` option for `publish:github` action This option allows individual PRs to merge automatically when all merge requirements are met. For more information, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request Signed-off-by: Willy Go --- .changeset/red-pants-rush.md | 5 +++++ .../actions/builtin/github/githubRepoCreate.test.ts | 6 ++++++ .../scaffolder/actions/builtin/github/githubRepoCreate.ts | 4 ++++ .../src/scaffolder/actions/builtin/github/helpers.ts | 3 +++ .../scaffolder/actions/builtin/github/inputProperties.ts | 6 ++++++ .../src/scaffolder/actions/builtin/publish/github.test.ts | 6 ++++++ .../src/scaffolder/actions/builtin/publish/github.ts | 4 ++++ 7 files changed, 34 insertions(+) create mode 100644 .changeset/red-pants-rush.md diff --git a/.changeset/red-pants-rush.md b/.changeset/red-pants-rush.md new file mode 100644 index 0000000000..d2d7a52237 --- /dev/null +++ b/.changeset/red-pants-rush.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +Add `allowAutoMerge` option for `publish:github` action diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts index f04a735bee..5692682882 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.test.ts @@ -108,6 +108,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'private', }); @@ -127,6 +128,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'public', }); @@ -147,6 +149,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'private', }); }); @@ -171,6 +174,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); await action.handler({ @@ -190,6 +194,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); await action.handler({ @@ -210,6 +215,7 @@ describe('github:repo:create', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts index 5bc1fa8702..32443a924e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/githubRepoCreate.ts @@ -50,6 +50,7 @@ export function createGithubRepoCreateAction(options: { allowRebaseMerge?: boolean; allowSquashMerge?: boolean; allowMergeCommit?: boolean; + allowAutoMerge?: boolean; requireCodeOwnerReviews?: boolean; requiredStatusCheckContexts?: string[]; repoVisibility?: 'private' | 'internal' | 'public'; @@ -89,6 +90,7 @@ export function createGithubRepoCreateAction(options: { allowMergeCommit: inputProps.allowMergeCommit, allowSquashMerge: inputProps.allowSquashMerge, allowRebaseMerge: inputProps.allowRebaseMerge, + allowAutoMerge: inputProps.allowAutoMerge, collaborators: inputProps.collaborators, token: inputProps.token, topics: inputProps.topics, @@ -113,6 +115,7 @@ export function createGithubRepoCreateAction(options: { allowMergeCommit = true, allowSquashMerge = true, allowRebaseMerge = true, + allowAutoMerge = false, collaborators, topics, token: providedToken, @@ -143,6 +146,7 @@ export function createGithubRepoCreateAction(options: { allowMergeCommit, allowSquashMerge, allowRebaseMerge, + allowAutoMerge, access, collaborators, topics, diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts index fd3899b18a..65c838e590 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/helpers.ts @@ -102,6 +102,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( allowMergeCommit: boolean, allowSquashMerge: boolean, allowRebaseMerge: boolean, + allowAutoMerge: boolean, access: string | undefined, collaborators: | ( @@ -139,6 +140,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, allow_rebase_merge: allowRebaseMerge, + allow_auto_merge: allowAutoMerge, homepage: homepage, }) : client.rest.repos.createForAuthenticatedUser({ @@ -149,6 +151,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics( allow_merge_commit: allowMergeCommit, allow_squash_merge: allowSquashMerge, allow_rebase_merge: allowRebaseMerge, + allow_auto_merge: allowAutoMerge, homepage: homepage, }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts index 153b2e6941..62dcea826a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts @@ -82,6 +82,11 @@ const allowRebaseMerge = { type: 'boolean', description: `Allow rebase merges. The default value is 'true'`, }; +const allowAutoMerge = { + title: 'Allow Auto Merges', + type: 'boolean', + description: `Allow individual PRs to merge automatically when all merge requirements are met. The default value is 'false'`, +} const collaborators = { title: 'Collaborators', description: 'Provide additional users or teams with permissions', @@ -153,6 +158,7 @@ export { access }; export { allowMergeCommit }; export { allowRebaseMerge }; export { allowSquashMerge }; +export { allowAutoMerge }; export { collaborators }; export { defaultBranch }; export { deleteBranchOnMerge }; diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts index 6a2665bc8d..499c4b0276 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.test.ts @@ -113,6 +113,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'private', }); @@ -132,6 +133,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'public', }); @@ -152,6 +154,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, visibility: 'private', }); }); @@ -176,6 +179,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); await action.handler({ @@ -195,6 +199,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); await action.handler({ @@ -215,6 +220,7 @@ describe('publish:github', () => { allow_squash_merge: true, allow_merge_commit: true, allow_rebase_merge: true, + allow_auto_merge: false, }); }); diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts index 8ce9105237..ef9c61929a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/publish/github.ts @@ -57,6 +57,7 @@ export function createPublishGithubAction(options: { allowRebaseMerge?: boolean; allowSquashMerge?: boolean; allowMergeCommit?: boolean; + allowAutoMerge?: boolean; sourcePath?: string; requireCodeOwnerReviews?: boolean; requiredStatusCheckContexts?: string[]; @@ -104,6 +105,7 @@ export function createPublishGithubAction(options: { allowMergeCommit: inputProps.allowMergeCommit, allowSquashMerge: inputProps.allowSquashMerge, allowRebaseMerge: inputProps.allowRebaseMerge, + allowAutoMerge: inputProps.allowAutoMerge, sourcePath: inputProps.sourcePath, collaborators: inputProps.collaborators, token: inputProps.token, @@ -137,6 +139,7 @@ export function createPublishGithubAction(options: { allowMergeCommit = true, allowSquashMerge = true, allowRebaseMerge = true, + allowAutoMerge = false, collaborators, topics, token: providedToken, @@ -167,6 +170,7 @@ export function createPublishGithubAction(options: { allowMergeCommit, allowSquashMerge, allowRebaseMerge, + allowAutoMerge, access, collaborators, topics, From 72df5f8c512cc0f21fc92add06f28e9807c8feeb Mon Sep 17 00:00:00 2001 From: Willy Go Date: Mon, 26 Sep 2022 16:04:57 +1000 Subject: [PATCH 105/279] Add missing semicolon Signed-off-by: Willy Go --- .../src/scaffolder/actions/builtin/github/inputProperties.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts index 62dcea826a..ef9eaead3c 100644 --- a/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts +++ b/plugins/scaffolder-backend/src/scaffolder/actions/builtin/github/inputProperties.ts @@ -86,7 +86,7 @@ const allowAutoMerge = { title: 'Allow Auto Merges', type: 'boolean', description: `Allow individual PRs to merge automatically when all merge requirements are met. The default value is 'false'`, -} +}; const collaborators = { title: 'Collaborators', description: 'Provide additional users or teams with permissions', From 546ad799c4b9daedbf315d81d043e1bbc96bc563 Mon Sep 17 00:00:00 2001 From: Willy Go Date: Mon, 26 Sep 2022 16:32:31 +1000 Subject: [PATCH 106/279] Update generated api-report.md Signed-off-by: Willy Go --- plugins/scaffolder-backend/api-report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 35e3dab0b5..a148999836 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -193,6 +193,7 @@ export function createGithubRepoCreateAction(options: { allowRebaseMerge?: boolean | undefined; allowSquashMerge?: boolean | undefined; allowMergeCommit?: boolean | undefined; + allowAutoMerge?: boolean | undefined; requireCodeOwnerReviews?: boolean | undefined; requiredStatusCheckContexts?: string[] | undefined; repoVisibility?: 'internal' | 'private' | 'public' | undefined; @@ -358,6 +359,7 @@ export function createPublishGithubAction(options: { allowRebaseMerge?: boolean | undefined; allowSquashMerge?: boolean | undefined; allowMergeCommit?: boolean | undefined; + allowAutoMerge?: boolean | undefined; sourcePath?: string | undefined; requireCodeOwnerReviews?: boolean | undefined; requiredStatusCheckContexts?: string[] | undefined; From a9e59694c00b9c6fc7fcb08a9a9b930f49d35095 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 10:20:37 +0200 Subject: [PATCH 107/279] catalog-backend: fix integration test processing wait Signed-off-by: Patrik Oldsberg --- plugins/catalog-backend/src/integration.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index f5afa34f30..745678fc70 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -131,6 +131,7 @@ class WaitingProgressTracker implements ProgressTracker { ); const currentCount = this.#counts.get(item.id) ?? 0; + this.#counts.set(item.id, currentCount); const onDone = () => { this.#counts.set(item.id, currentCount + 1); From f6f75515f15527fd9c5bb90559a2fc67adb3072a Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 10:32:09 +0200 Subject: [PATCH 108/279] catalog-backend: integration test, add provider replacement test Signed-off-by: Patrik Oldsberg --- .../catalog-backend/src/integration.test.ts | 51 ++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index 745678fc70..e61a7d7038 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -317,10 +317,13 @@ class TestHarness { return errors; } - async setInputEntities(entities: Entity[]) { + async setInputEntities(entities: (Entity & { locationKey?: string })[]) { return this.#provider.getConnection().applyMutation({ type: 'full', - entities: entities.map(entity => ({ entity })), + entities: entities.map(({ locationKey, ...entity }) => ({ + entity, + locationKey, + })), }); } @@ -493,4 +496,48 @@ describe('Catalog Backend Integration', () => { }), }); }); + + it('should not replace matching provided entities', async () => { + const harness = await TestHarness.create(); + + const entityA = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'a', + annotations: { + 'backstage.io/managed-by-location': 'url:.', + 'backstage.io/managed-by-origin-location': 'url:.', + }, + }, + }; + const entityB = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Component', + metadata: { + name: 'b', + annotations: { + 'backstage.io/managed-by-location': 'url:.', + 'backstage.io/managed-by-origin-location': 'url:.', + }, + }, + }; + + const entities = [entityA, { locationKey: 'loc', ...entityB }]; + + await harness.setInputEntities(entities); + await expect(harness.process()).resolves.toEqual({}); + + const outputEntities = await harness.getOutputEntities(); + + await expect(harness.getOutputEntities()).resolves.toEqual({ + 'component:default/a': expect.anything(), + 'component:default/b': expect.anything(), + }); + + await harness.setInputEntities(entities); + await expect(harness.process()).resolves.toEqual({}); + + await expect(harness.getOutputEntities()).resolves.toEqual(outputEntities); + }); }); From bd3d7012a97069124378b6879ef56c0bb23a59b6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 25 Sep 2022 23:52:00 +0200 Subject: [PATCH 109/279] catalog-backend: fix location key check in entity provider delta diff Signed-off-by: Patrik Oldsberg --- .../src/database/DefaultProcessingDatabase.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts index f6fc7fa5fa..3dc5325178 100644 --- a/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts +++ b/plugins/catalog-backend/src/database/DefaultProcessingDatabase.ts @@ -784,7 +784,10 @@ export class DefaultProcessingDatabase implements ProcessingDatabase { if (!oldRef) { // Add any entity that does not exist in the database toAdd.push(upsertItem); - } else if (oldRef.locationKey !== item.deferred.locationKey) { + } else if ( + (oldRef?.locationKey ?? undefined) !== + (item.deferred.locationKey ?? undefined) + ) { // Remove and then re-add any entity that exists, but with a different location key toRemove.push(item.ref); toAdd.push(upsertItem); From 8cb6e101054c323e3c5a4d09aa397e790f620d02 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 10:56:08 +0200 Subject: [PATCH 110/279] changesets: added changeset for catalog provider diffing fix Signed-off-by: Patrik Oldsberg --- .changeset/poor-clouds-ring.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/poor-clouds-ring.md diff --git a/.changeset/poor-clouds-ring.md b/.changeset/poor-clouds-ring.md new file mode 100644 index 0000000000..62ba3928a7 --- /dev/null +++ b/.changeset/poor-clouds-ring.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Fixed a bug where entities provided without a location key would always replace existing entities, rather than updating them. From 12e7d7d535a32e8d3c5d744faf30c81c7279a081 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Mon, 26 Sep 2022 11:03:31 +0200 Subject: [PATCH 111/279] api-report all Signed-off-by: Kiss Miklos --- plugins/scaffolder-backend/api-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index 9dcc45f91b..a5f4db22d2 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -429,7 +429,7 @@ export const createPublishGitlabMergeRequestAction: (options: { branchName: string; targetPath: string; token?: string | undefined; - commitAction?: 'update' | 'delete' | 'create' | undefined; + commitAction?: 'update' | 'create' | 'delete' | undefined; projectid?: string | undefined; removeSourceBranch?: boolean | undefined; assignee?: string | undefined; From 40cde40308ddc9149c1a5f1f93f2f504d6e6b803 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Mon, 26 Sep 2022 11:17:37 +0200 Subject: [PATCH 112/279] remove temp props Signed-off-by: Kiss Miklos --- packages/backend/src/plugins/scaffolder.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/backend/src/plugins/scaffolder.ts b/packages/backend/src/plugins/scaffolder.ts index eff781cdb7..d079b64c28 100644 --- a/packages/backend/src/plugins/scaffolder.ts +++ b/packages/backend/src/plugins/scaffolder.ts @@ -34,11 +34,5 @@ export default async function createPlugin( reader: env.reader, identity: env.identity, scheduler: env.scheduler, - additionalTemplateGlobals: { - company: 'RoadieHQ', - now: () => { - return 'NOW !!!!'; - }, - }, }); } From 42a7e89b06ddbcaaf00d238128946503efeb5608 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Mon, 26 Sep 2022 11:40:18 +0200 Subject: [PATCH 113/279] add test for global addition Signed-off-by: Kiss Miklos --- .../lib/templating/SecureTemplater.test.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.test.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.test.ts index 8b8d7847ac..76643131f5 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.test.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.test.ts @@ -144,6 +144,27 @@ describe('SecureTemplater', () => { ['the input value', 'another extra arg'], ]); }); + it('should make additional globals available when requested', async () => { + const mockGlobal1 = jest.fn(() => 'awesome global function'); + const mockGlobal2 = 'foo'; + const mockGlobal3 = 123456; + const renderWith = await SecureTemplater.loadRenderer({ + additionalTemplateGlobals: { mockGlobal1, mockGlobal2, mockGlobal3 }, + }); + const renderWithout = await SecureTemplater.loadRenderer(); + + const ctx = {}; + + expect(renderWith('${{ mockGlobal1() }}', ctx)).toBe( + 'awesome global function', + ); + expect(renderWith('${{ mockGlobal2 }}', ctx)).toBe('foo'); + expect(renderWith('${{ mockGlobal3 }}', ctx)).toBe('123456'); + + expect(() => renderWithout('${{ mockGlobal1() }}', ctx)).toThrow( + /Error: Unable to call `mockGlobal1`/, + ); + }); it('should not allow helpers to be rewritten', async () => { const render = await SecureTemplater.loadRenderer({ From 1d3d575132a55e08403cd7eb1d5d75360bfbcb51 Mon Sep 17 00:00:00 2001 From: Jan Vilimek Date: Mon, 26 Sep 2022 12:29:16 +0200 Subject: [PATCH 114/279] score-card plugin integrated to example-app Signed-off-by: Jan Vilimek --- .changeset/popular-months-grab.md | 5 +++ app-config.yaml | 5 +++ packages/app/package.json | 1 + packages/app/src/App.tsx | 2 + packages/app/src/components/Root/Root.tsx | 2 + .../app/src/components/catalog/EntityPage.tsx | 8 ++++ yarn.lock | 41 +++++++++++++++---- 7 files changed, 56 insertions(+), 8 deletions(-) create mode 100644 .changeset/popular-months-grab.md diff --git a/.changeset/popular-months-grab.md b/.changeset/popular-months-grab.md new file mode 100644 index 0000000000..6e68d124ad --- /dev/null +++ b/.changeset/popular-months-grab.md @@ -0,0 +1,5 @@ +--- +'example-app': patch +--- + +score-card plugin 0.5.1 integrated diff --git a/app-config.yaml b/app-config.yaml index 22ca1fcaff..57349d213a 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -138,6 +138,11 @@ techdocs: dynatrace: baseUrl: https://your.dynatrace.instance.com +# Score-cards sample configuration. +scorecards: + jsonDataUrl: https://raw.githubusercontent.com/Oriflame/backstage-plugins/main/plugins/score-card/sample-data/ + wikiLinkTemplate: https://link-to-wiki/{id} + sentry: organization: my-company diff --git a/packages/app/package.json b/packages/app/package.json index ad24f23c45..406e908cad 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -67,6 +67,7 @@ "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", "@octokit/rest": "^19.0.3", + "@oriflame/backstage-plugin-score-card": "^0.5.1", "@roadiehq/backstage-plugin-buildkite": "^2.0.8", "@roadiehq/backstage-plugin-github-insights": "^2.0.5", "@roadiehq/backstage-plugin-github-pull-requests": "^2.2.7", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index a6c613ded7..aa1db7cd0e 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -106,6 +106,7 @@ import { RequirePermission } from '@backstage/plugin-permission-react'; import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common'; import { PlaylistIndexPage } from '@backstage/plugin-playlist'; import { TwoColumnLayout } from './components/scaffolder/customScaffolderLayouts'; +import { ScoreBoardPage } from '@oriflame/backstage-plugin-score-card'; const app = createApp({ apis, @@ -272,6 +273,7 @@ const routes = ( } /> } /> } /> + } /> ); diff --git a/packages/app/src/components/Root/Root.tsx b/packages/app/src/components/Root/Root.tsx index 8b5f0932fb..0c142bafbd 100644 --- a/packages/app/src/components/Root/Root.tsx +++ b/packages/app/src/components/Root/Root.tsx @@ -51,6 +51,7 @@ import { import { MyGroupsSidebarItem } from '@backstage/plugin-org'; import GroupIcon from '@material-ui/icons/People'; import { SearchModal } from '../search/SearchModal'; +import Score from '@material-ui/icons/Score'; const useSidebarLogoStyles = makeStyles({ root: { @@ -120,6 +121,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => ( text="Cost Insights" /> + diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx index c2f297a2d7..f7592eb0b9 100644 --- a/packages/app/src/components/catalog/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage.tsx @@ -144,6 +144,7 @@ import { EntityNewRelicDashboardCard, } from '@backstage/plugin-newrelic-dashboard'; import { EntityGoCdContent, isGoCdAvailable } from '@backstage/plugin-gocd'; +import { EntityScoreCardContent } from '@oriflame/backstage-plugin-score-card'; import React, { ReactNode, useMemo, useState } from 'react'; @@ -704,6 +705,13 @@ const systemPage = ( + + + + + + + Date: Mon, 26 Sep 2022 12:35:28 +0200 Subject: [PATCH 115/279] score-card plugin e2e tests Signed-off-by: Jan Vilimek --- .../integration/plugins/score-card.spec.ts | 83 +++++++++++++++++++ cypress/src/support/commands.ts | 5 ++ cypress/src/types.d.ts | 5 ++ 3 files changed, 93 insertions(+) create mode 100644 cypress/src/integration/plugins/score-card.spec.ts diff --git a/cypress/src/integration/plugins/score-card.spec.ts b/cypress/src/integration/plugins/score-card.spec.ts new file mode 100644 index 0000000000..5871a094e1 --- /dev/null +++ b/cypress/src/integration/plugins/score-card.spec.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/// +import 'os'; + +describe('score-card', () => { + describe('Score board', () => { + it('displays the score board based on sample data', () => { + cy.loginAsGuest(); + + cy.visit('/score-board'); + cy.screenshot({ capture: 'viewport' }); + + cy.contains('System scores overview').should('be.visible'); + cy.checkForErrors(); + cy.get('span:contains("1-2 of 2")').should('be.visible'); // beware, there is also a hidden

element + cy.contains('audio-playback').should('be.visible'); + cy.contains('team-c').should('be.visible'); + cy.contains('non-valid-system').should('be.visible'); + cy.contains('Name').should('be.visible'); + cy.contains('Date').should('be.visible'); + cy.contains('Code').should('be.visible'); + cy.contains('Documentation').should('be.visible'); + cy.contains('Operations').should('be.visible'); + cy.contains('Quality').should('be.visible'); + cy.contains('Security').should('be.visible'); + cy.contains('Total').should('be.visible'); + cy.contains('50 %').should('be.visible'); + cy.contains('75 %').should('be.visible'); + cy.log('navigating to score card detail for audio-playback'); + cy.get('a[data-id="audio-playback"]').should('be.visible').click(); + cy.screenshot({ capture: 'viewport' }); + + cy.url().should( + 'include', + '/catalog/default/System/audio-playback/score', + ); + cy.contains('Scoring').should('be.visible'); + cy.contains('Total score: 57 %').should('be.visible'); + cy.contains('Code').should('be.visible'); + cy.contains('90 %').should('be.visible'); + cy.contains('Documentation').should('be.visible'); + cy.contains('75 %').should('be.visible'); + cy.contains('Operations').should('be.visible'); + cy.contains('50 %').should('be.visible'); + cy.contains('Quality').should('be.visible'); + cy.contains('25 %').should('be.visible'); + cy.contains('Security'); + cy.contains('10 %').should('be.visible'); + cy.checkForErrors(); + + cy.log( + 'Clicking on button [>] that is first child of the element (td) with value=Code', + ); + cy.get('[value="Code"] > button:first-child').click(); + cy.checkForErrors(); + cy.screenshot({ capture: 'viewport' }); + + cy.log('Clicking on link for Code'); + cy.contains('hints: Gitflow: 100%').should('be.visible'); + cy.get('a[data-id="2157"]') + .should('be.visible') + .should( + 'have.attr', + 'href', + 'https://TBD/XXX/_wiki/wikis/XXX.wiki/2157', + ); + }); + }); +}); diff --git a/cypress/src/support/commands.ts b/cypress/src/support/commands.ts index 02723ffc90..62e21a5bef 100644 --- a/cypress/src/support/commands.ts +++ b/cypress/src/support/commands.ts @@ -118,3 +118,8 @@ Cypress.Commands.add('waitSectionTwoPage', () => { Cypress.Commands.add('waitHomePage', () => { cy.wait(['@entityMetadata', '@syncEntity', '@techdocsMetadata', '@homeHTML']); }); + +Cypress.Commands.add('checkForErrors', () => { + // when an error occurs there is a

with an "alert" role attribute. This can change ofc => we shall add also some positive ("when error occurs") test + cy.get('div[role="alert"]').should('not.exist'); +}); diff --git a/cypress/src/types.d.ts b/cypress/src/types.d.ts index 181b608a9b..dca22112e9 100644 --- a/cypress/src/types.d.ts +++ b/cypress/src/types.d.ts @@ -77,5 +77,10 @@ declare namespace Cypress { * @example cy.isNotInViewport */ isNotInViewport(element: string): Chainable; + /** + * Check if we have not caused error by our last action + * @example cy.checkForErrors + */ + checkForErrors(): Chainable; } } From a0189412855a0a94a4553377118af27eb33d9e97 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 12:43:24 +0200 Subject: [PATCH 116/279] workflows: allow republish Signed-off-by: Patrik Oldsberg --- .github/workflows/deploy_nightly.yml | 2 +- .github/workflows/deploy_packages.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_nightly.yml b/.github/workflows/deploy_nightly.yml index b82e1a30d4..a4664288da 100644 --- a/.github/workflows/deploy_nightly.yml +++ b/.github/workflows/deploy_nightly.yml @@ -57,7 +57,7 @@ jobs: - name: publish nightly release run: | yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}" - yarn workspaces foreach -v --no-private npm publish --access public --tag nightly + yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag nightly env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 06ed3bc45e..64e5fe813a 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -164,9 +164,9 @@ jobs: run: | yarn config set -H 'npmAuthToken' "${{secrets.NPM_TOKEN}}" if [ -f ".changeset/pre.json" ]; then - yarn workspaces foreach -v --no-private npm publish --access public --tag next + yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish --tag next else - yarn workspaces foreach -v --no-private npm publish --access public + yarn workspaces foreach -v --no-private npm publish --access public --tolerate-republish fi env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From a2c7a91f5640c08e83731a7c130a7679ade20814 Mon Sep 17 00:00:00 2001 From: Jan Vilimek Date: Mon, 26 Sep 2022 12:47:52 +0200 Subject: [PATCH 117/279] changeset for example-app not needed Signed-off-by: Jan Vilimek --- .changeset/popular-months-grab.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .changeset/popular-months-grab.md diff --git a/.changeset/popular-months-grab.md b/.changeset/popular-months-grab.md deleted file mode 100644 index 6e68d124ad..0000000000 --- a/.changeset/popular-months-grab.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'example-app': patch ---- - -score-card plugin 0.5.1 integrated From ad74723fbfa0036d5bf89e6ac9b4245f189c71bd Mon Sep 17 00:00:00 2001 From: Patrick Jungermann Date: Sat, 17 Sep 2022 01:33:53 +0200 Subject: [PATCH 118/279] chore: update Bitbucket Cloud models The latest specification contained some BREAKING CHANGES due to removed fields. All of these fields are not used at other plugins, though. Therefore, this change has no impact on other modules here. Signed-off-by: Patrick Jungermann --- .changeset/lucky-cows-boil.md | 11 + plugins/bitbucket-cloud-common/api-report.md | 39 +- .../bitbucket-cloud.oas.json | 8633 +++++++++-------- plugins/bitbucket-cloud-common/package.json | 2 +- .../scripts/adjust-models.js | 13 + .../scripts/generate-models.sh | 2 +- .../scripts/prepare-schema.js | 14 - .../src/models/index.ts | 37 +- 8 files changed, 4406 insertions(+), 4345 deletions(-) create mode 100644 .changeset/lucky-cows-boil.md diff --git a/.changeset/lucky-cows-boil.md b/.changeset/lucky-cows-boil.md new file mode 100644 index 0000000000..a598b3da95 --- /dev/null +++ b/.changeset/lucky-cows-boil.md @@ -0,0 +1,11 @@ +--- +'@backstage/plugin-bitbucket-cloud-common': minor +--- + +Update Bitbucket Cloud models to latest OAS version. + +The latest specification contained some BREAKING CHANGES +due to removed fields. + +All of these fields are not used at other plugins, though. +Therefore, this change has no impact on other modules here. diff --git a/plugins/bitbucket-cloud-common/api-report.md b/plugins/bitbucket-cloud-common/api-report.md index 367a47b9e3..d66b8b9a70 100644 --- a/plugins/bitbucket-cloud-common/api-report.md +++ b/plugins/bitbucket-cloud-common/api-report.md @@ -33,37 +33,22 @@ export type FilterAndSortOptions = { // @public (undocumented) export namespace Models { export interface Account extends ModelObject { - account_status?: string; // (undocumented) created_on?: string; // (undocumented) display_name?: string; // (undocumented) - has_2fa_enabled?: boolean; - // (undocumented) links?: AccountLinks; - nickname?: string; // (undocumented) username?: string; // (undocumented) uuid?: string; - // (undocumented) - website?: string; } - // (undocumented) export interface AccountLinks { + // (undocumented) + [key: string]: unknown; // (undocumented) avatar?: Link; - // (undocumented) - followers?: Link; - // (undocumented) - following?: Link; - // (undocumented) - html?: Link; - // (undocumented) - repositories?: Link; - // (undocumented) - self?: Link; } export interface Author extends ModelObject { raw?: string; @@ -176,7 +161,7 @@ export namespace Models { // (undocumented) state?: ParticipantStateEnum; // (undocumented) - user?: User; + user?: Account; } const // (undocumented) ParticipantRoleEnum: { @@ -339,11 +324,21 @@ export namespace Models { // (undocumented) readonly text?: string; } - export interface Team extends Account {} - export interface User extends Account { - account_id?: string; + export interface Team extends Account { // (undocumented) - is_staff?: boolean; + links?: TeamLinks; + } + export interface TeamLinks extends AccountLinks { + // (undocumented) + html?: Link; + // (undocumented) + members?: Link; + // (undocumented) + projects?: Link; + // (undocumented) + repositories?: Link; + // (undocumented) + self?: Link; } } diff --git a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json index 01cd910171..843d009265 100644 --- a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json +++ b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json @@ -1,19 +1,22 @@ { "openapi": "3.0.0", "info": { - "termsOfService": "https://www.atlassian.com/legal/customer-agreement", - "version": "2.0", "title": "Bitbucket API", "description": "Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.", + "version": "2.0", + "termsOfService": "https://www.atlassian.com/legal/customer-agreement", "contact": { - "url": "https://support.atlassian.com/bitbucket-cloud/", "name": "Bitbucket Support", + "url": "https://support.atlassian.com/bitbucket-cloud/", "email": "support@bitbucket.org" } }, "paths": { "/addon": { "delete": { + "tags": ["Addon"], + "description": "Deletes the application for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket Marketplace need not use this endpoint as\nupdates for those applications can be sent out via the\nUI of that section.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \"\n```", + "summary": "Delete an app", "responses": { "204": { "description": "Request has succeeded. The application has been deleted for the user." @@ -39,8 +42,6 @@ } } }, - "tags": ["Addon"], - "summary": "Delete an app", "security": [ { "oauth2": [] @@ -51,10 +52,12 @@ { "api_key": [] } - ], - "description": "Deletes the application for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket Marketplace need not use this endpoint as\nupdates for those applications can be sent out via the\nUI of that section.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \"\n```" + ] }, "put": { + "tags": ["Addon"], + "description": "Updates the application installation for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket need not use this endpoint as updates for those\napplications can be sent out via the UI of that section.\n\nPassing an empty body will update the installation using the\nexisting descriptor URL.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{}'\n```\n\nThe new `descriptor` for the installation can be also provided\nin the body directly.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor\": $NEW_DESCRIPTOR}'\n```\n\nIn both these modes the URL of the descriptor cannot be changed. To\nchange the descriptor location and upgrade an installation\nthe request must be made exclusively with a `descriptor_url`.\n\n ```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor_url\": $NEW_URL}'\n```\n\nThe `descriptor_url` must exactly match the marketplace registration\nthat Atlassian has for the application. Contact your Atlassian\ndeveloper advocate to update this registration. Once the registration\nhas been updated you may call this resource for each installation.\n\nNote that the scopes of the application cannot be increased\nin the new descriptor nor reduced to none.", + "summary": "Update an installed app", "responses": { "204": { "description": "Request has succeeded. The installation has been updated to the new descriptor." @@ -90,8 +93,6 @@ } } }, - "tags": ["Addon"], - "summary": "Update an installed app", "security": [ { "oauth2": [] @@ -102,13 +103,15 @@ { "api_key": [] } - ], - "description": "Updates the application installation for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket need not use this endpoint as updates for those\napplications can be sent out via the UI of that section.\n\nPassing an empty body will update the installation using the\nexisting descriptor URL.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{}'\n```\n\nThe new `descriptor` for the installation can be also provided\nin the body directly.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor\": $NEW_DESCRIPTOR}'\n```\n\nIn both these modes the URL of the descriptor cannot be changed. To\nchange the descriptor location and upgrade an installation\nthe request must be made exclusively with a `descriptor_url`.\n\n ```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor_url\": $NEW_URL}'\n```\n\nThe `descriptor_url` must exactly match the marketplace registration\nthat Atlassian has for the application. Contact your Atlassian\ndeveloper advocate to update this registration. Once the registration\nhas been updated you may call this resource for each installation.\n\nNote that the scopes of the application cannot be increased\nin the new descriptor nor reduced to none." + ] }, "parameters": [] }, "/addon/linkers": { "get": { + "tags": ["Addon"], + "description": "Gets a list of all [linkers](/cloud/bitbucket/modules/linker/)\nfor the authenticated application.", + "summary": "List linkers for an app", "responses": { "200": { "description": "Successful." @@ -124,8 +127,6 @@ } } }, - "tags": ["Addon"], - "summary": "List linkers for an app", "security": [ { "oauth2": [] @@ -136,13 +137,15 @@ { "api_key": [] } - ], - "description": "Gets a list of all [linkers](/cloud/bitbucket/modules/linker/)\nfor the authenticated application." + ] }, "parameters": [] }, "/addon/linkers/{linker_key}": { "get": { + "tags": ["Addon"], + "description": "Gets a [linker](/cloud/bitbucket/modules/linker/) specified by `linker_key`\nfor the authenticated application.", + "summary": "Get a linker for an app", "responses": { "200": { "description": "Successful." @@ -168,8 +171,6 @@ } } }, - "tags": ["Addon"], - "summary": "Get a linker for an app", "security": [ { "oauth2": [] @@ -180,8 +181,7 @@ { "api_key": [] } - ], - "description": "Gets a [linker](/cloud/bitbucket/modules/linker/) specified by `linker_key`\nfor the authenticated application." + ] }, "parameters": [ { @@ -197,6 +197,9 @@ }, "/addon/linkers/{linker_key}/values": { "delete": { + "tags": ["Addon"], + "description": "Delete all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application.", + "summary": "Delete all linker values", "responses": { "204": { "description": "Successfully deleted the linker values." @@ -222,8 +225,6 @@ } } }, - "tags": ["Addon"], - "summary": "Delete all linker values", "security": [ { "oauth2": [] @@ -234,10 +235,12 @@ { "api_key": [] } - ], - "description": "Delete all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application." + ] }, "get": { + "tags": ["Addon"], + "description": "Gets a list of all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "List linker values for a linker", "responses": { "200": { "description": "Successful." @@ -263,8 +266,6 @@ } } }, - "tags": ["Addon"], - "summary": "List linker values for a linker", "security": [ { "oauth2": [] @@ -275,10 +276,12 @@ { "api_key": [] } - ], - "description": "Gets a list of all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)" + ] }, "post": { + "tags": ["Addon"], + "description": "Creates a [linker](/cloud/bitbucket/modules/linker/) value for the specified\nlinker of authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "Create a linker value", "responses": { "201": { "description": "Successfully created the linker value." @@ -314,8 +317,6 @@ } } }, - "tags": ["Addon"], - "summary": "Create a linker value", "security": [ { "oauth2": [] @@ -326,10 +327,12 @@ { "api_key": [] } - ], - "description": "Creates a [linker](/cloud/bitbucket/modules/linker/) value for the specified\nlinker of authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)" + ] }, "put": { + "tags": ["Addon"], + "description": "Bulk update [linker](/cloud/bitbucket/modules/linker/) values for the specified\nlinker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "Update a linker value", "responses": { "204": { "description": "Successfully updated the linker values." @@ -365,8 +368,6 @@ } } }, - "tags": ["Addon"], - "summary": "Update a linker value", "security": [ { "oauth2": [] @@ -377,8 +378,7 @@ { "api_key": [] } - ], - "description": "Bulk update [linker](/cloud/bitbucket/modules/linker/) values for the specified\nlinker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)" + ] }, "parameters": [ { @@ -394,6 +394,9 @@ }, "/addon/linkers/{linker_key}/values/{value_id}": { "delete": { + "tags": ["Addon"], + "description": "Delete a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application.", + "summary": "Delete a linker value", "responses": { "204": { "description": "Successfully deleted the linker value." @@ -419,8 +422,6 @@ } } }, - "tags": ["Addon"], - "summary": "Delete a linker value", "security": [ { "oauth2": [] @@ -431,10 +432,12 @@ { "api_key": [] } - ], - "description": "Delete a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application." + ] }, "get": { + "tags": ["Addon"], + "description": "Get a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application.", + "summary": "Get a linker value", "responses": { "200": { "description": "Successful." @@ -460,8 +463,6 @@ } } }, - "tags": ["Addon"], - "summary": "Get a linker value", "security": [ { "oauth2": [] @@ -472,8 +473,7 @@ { "api_key": [] } - ], - "description": "Get a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application." + ] }, "parameters": [ { @@ -498,6 +498,9 @@ }, "/hook_events": { "get": { + "tags": ["Webhooks"], + "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events\n\n{\n \"repository\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\"\n }\n }\n },\n \"workspace\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/workspace\"\n }\n }\n }\n}\n```", + "summary": "Get a webhook resource", "responses": { "200": { "description": "A mapping of resource/subject types pointing to their individual event types.", @@ -510,8 +513,6 @@ } } }, - "tags": ["Webhooks"], - "summary": "Get a webhook resource", "security": [ { "oauth2": [] @@ -522,13 +523,15 @@ { "api_key": [] } - ], - "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events\n\n{\n \"repository\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\"\n }\n }\n },\n \"team\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/team\"\n }\n }\n },\n \"user\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/user\"\n }\n }\n }\n}\n```" + ] }, "parameters": [] }, "/hook_events/{subject_type}": { "get": { + "tags": ["Webhooks"], + "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n**The team and user webhooks are deprecated, and you should use workspace instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nThis is public data that does not require any scopes or authentication.\n\nExample:\n\nNOTE: The following example is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the other `subject_type` objects.\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events/workspace\n{\n \"page\": 1,\n \"pagelen\": 30,\n \"size\": 21,\n \"values\": [\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository push occurs\",\n \"event\": \"repo:push\",\n \"label\": \"Push\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository fork occurs\",\n \"event\": \"repo:fork\",\n \"label\": \"Fork\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository import occurs\",\n \"event\": \"repo:imported\",\n \"label\": \"Import\"\n },\n ...\n {\n \"category\":\"Pull Request\",\n \"label\":\"Approved\",\n \"description\":\"When someone has approved a pull request\",\n \"event\":\"pullrequest:approved\"\n },\n ]\n}\n```", + "summary": "List subscribable webhook types", "responses": { "200": { "description": "A paginated list of webhook types available to subscribe on.", @@ -551,8 +554,6 @@ } } }, - "tags": ["Webhooks"], - "summary": "List subscribable webhook types", "security": [ { "oauth2": [] @@ -563,8 +564,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n**The team and user webhooks are deprecated, and you should use workspace instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nThis is public data that does not require any scopes or authentication.\n\nExample:\n\nNOTE: The following example is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the other `subject_type` objects.\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events/workspace\n{\n \"page\": 1,\n \"pagelen\": 30,\n \"size\": 21,\n \"values\": [\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository push occurs\",\n \"event\": \"repo:push\",\n \"label\": \"Push\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository fork occurs\",\n \"event\": \"repo:fork\",\n \"label\": \"Fork\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository import occurs\",\n \"event\": \"repo:imported\",\n \"label\": \"Import\"\n },\n ...\n {\n \"category\":\"Pull Request\",\n \"label\":\"Approved\",\n \"description\":\"When someone has approved a pull request\",\n \"event\":\"pullrequest:approved\"\n },\n ]\n}\n```" + ] }, "parameters": [ { @@ -574,13 +574,16 @@ "required": true, "schema": { "type": "string", - "enum": ["workspace", "user", "repository", "team"] + "enum": ["repository", "workspace"] } } ] }, "/pullrequests/{selected_user}": { "get": { + "tags": ["Pullrequests"], + "description": "Returns all pull requests authored by the specified user.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List pull requests for a user", "responses": { "200": { "description": "All pull requests authored by the specified user.", @@ -610,12 +613,10 @@ "description": "Only return pull requests that are in this state. This parameter can be repeated.", "schema": { "type": "string", - "enum": ["MERGED", "SUPERSEDED", "OPEN", "DECLINED"] + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] } } ], - "tags": ["Pullrequests"], - "summary": "List pull requests for a user", "security": [ { "oauth2": ["pullrequest"] @@ -626,8 +627,7 @@ { "api_key": [] } - ], - "description": "Returns all pull requests authored by the specified user.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." + ] }, "parameters": [ { @@ -643,6 +643,9 @@ }, "/repositories": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all public repositories.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List public repositories", "responses": { "200": { "description": "All public repositories.", @@ -694,8 +697,6 @@ } } ], - "tags": ["Repositories"], - "summary": "List public repositories", "security": [ { "oauth2": ["repository"] @@ -706,13 +707,105 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all public repositories.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." + ] }, "parameters": [] }, + "/repositories/{workspace_slug}/{repo_slug}/override-settings": { + "get": { + "tags": ["Repositories"], + "description": "", + "summary": "Retrieve the inheritance state for repository settings", + "responses": { + "200": { + "description": "The repository setting inheritance state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository_inheritance_state" + } + } + } + }, + "404": { + "description": "If no repository exists at this location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Repositories"], + "description": "", + "summary": "Set the inheritance state for repository settings\n ", + "responses": { + "204": { + "description": "The repository setting inheritance state was set and no content returned" + }, + "404": { + "description": "If no repository exists at this location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace_slug", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "/repositories/{workspace}": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all repositories owned by the specified\nworkspace.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List repositories in a workspace", "responses": { "200": { "description": "The repositories owned by the specified account.", @@ -775,8 +868,6 @@ } } ], - "tags": ["Repositories"], - "summary": "List repositories in a workspace", "security": [ { "oauth2": ["repository"] @@ -787,8 +878,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all repositories owned by the specified\nworkspace.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." + ] }, "parameters": [ { @@ -804,6 +894,9 @@ }, "/repositories/{workspace}/{repo_slug}": { "delete": { + "tags": ["Repositories"], + "description": "Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks.", + "summary": "Delete a repository", "responses": { "204": { "description": "Indicates successful deletion." @@ -840,8 +933,6 @@ } } ], - "tags": ["Repositories"], - "summary": "Delete a repository", "security": [ { "oauth2": ["repository:delete"] @@ -852,10 +943,12 @@ { "api_key": [] } - ], - "description": "Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks." + ] }, "get": { + "tags": ["Repositories"], + "description": "Returns the object describing this repository.", + "summary": "Get a repository", "responses": { "200": { "description": "The repository object.", @@ -888,8 +981,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Get a repository", "security": [ { "oauth2": ["repository"] @@ -900,10 +991,12 @@ { "api_key": [] } - ], - "description": "Returns the object describing this repository." + ] }, "post": { + "tags": ["Repositories"], + "description": "Creates a new repository.\n\nNote: In order to set the project for the newly created repository,\npass in either the project key or the project UUID as part of the\nrequest body as shown in the examples below:\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"MARS\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nor\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"{ba516952-992a-4c2d-acbd-17d502922f96}\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nThe project must be assigned for all repositories. If the project is not provided,\nthe repository is automatically assigned to the oldest project in the workspace.\n\nNote: In the examples above, the workspace ID `teamsinspace`,\nand/or the repository name `hablanding` can be replaced by UUIDs.", + "summary": "Create a repository", "responses": { "200": { "description": "The newly created repository.", @@ -946,8 +1039,6 @@ }, "description": "The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them." }, - "tags": ["Repositories"], - "summary": "Create a repository", "security": [ { "oauth2": ["repository:admin"] @@ -958,10 +1049,12 @@ { "api_key": [] } - ], - "description": "Creates a new repository.\n\nNote: In order to set the project for the newly created repository,\npass in either the project key or the project UUID as part of the\nrequest body as shown in the examples below:\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"MARS\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nor\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"{ba516952-992a-4c2d-acbd-17d502922f96}\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nThe project must be assigned for all repositories. If the project is not provided,\nthe repository is automatically assigned to the oldest project in the workspace.\n\nNote: In the examples above, the workspace ID `teamsinspace`,\nand/or the repository name `hablanding` can be replaced by UUIDs." + ] }, "put": { + "tags": ["Repositories"], + "description": "Since this endpoint can be used to both update and to create a\nrepository, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the repository endpoint for an example\nof the request body.\n\n#### Update\n\nNote: Changing the `name` of the repository will cause the location to\nbe changed. This is because the URL of the repo is derived from the\nname (a process called slugification). In such a scenario, it is\npossible for the request to fail if the newly created slug conflicts\nwith an existing repository's slug. But if there is no conflict,\nthe new location will be returned in the `Location` header of the\nresponse.", + "summary": "Update a repository", "responses": { "200": { "description": "The existing repository has been updated", @@ -1030,8 +1123,6 @@ }, "description": "The repository that is to be updated.\n\nNote that the elements \"owner\" and \"full_name\" are ignored since the\nURL implies them.\n" }, - "tags": ["Repositories"], - "summary": "Update a repository", "security": [ { "oauth2": ["repository:admin"] @@ -1042,8 +1133,7 @@ { "api_key": [] } - ], - "description": "Since this endpoint can be used to both update and to create a\nrepository, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the repository endpoint for an example\nof the request body.\n\n#### Update\n\nNote: Changing the `name` of the repository will cause the location to\nbe changed. This is because the URL of the repo is derived from the\nname (a process called slugification). In such a scenario, it is\npossible for the request to fail if the newly created slug conflicts\nwith an existing repository's slug. But if there is no conflict,\nthe new location will be returned in the `Location` header of the\nresponse." + ] }, "parameters": [ { @@ -1068,6 +1158,9 @@ }, "/repositories/{workspace}/{repo_slug}/branch-restrictions": { "get": { + "tags": ["Branch restrictions"], + "description": "Returns a paginated list of all branch restrictions on the\nrepository.", + "summary": "List branch restrictions", "responses": { "200": { "description": "A paginated list of branch restrictions", @@ -1130,8 +1223,6 @@ } } ], - "tags": ["Branch restrictions"], - "summary": "List branch restrictions", "security": [ { "oauth2": ["repository:admin"] @@ -1142,10 +1233,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all branch restrictions on the\nrepository." + ] }, "post": { + "tags": ["Branch restrictions"], + "description": "Creates a new branch restriction rule for a repository.\n\n`kind` describes what will be restricted. Allowed values include:\n`push`, `force`, `delete` and `restrict_merges`.\n\nDifferent kinds of branch restrictions have different requirements:\n\n* `push` and `restrict_merges` require `users` and `groups` to be\n specified. Empty lists are allowed, in which case permission is\n denied for everybody.\n\nThe restriction applies to all branches that match. There are\ntwo ways to match a branch. It is configured in `branch_match_kind`:\n\n1. `glob`: Matches a branch against the `pattern`. A `'*'` in\n `pattern` will expand to match zero or more characters, and every\n other character matches itself. For example, `'foo*'` will match\n `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all\n branches.\n2. `branching_model`: Matches a branch against the repository's\n branching model. The `branch_type` controls the type of branch\n to match. Allowed values include: `production`, `development`,\n `bugfix`, `release`, `feature` and `hotfix`.\n\nThe combination of `kind` and match must be unique. This means that\ntwo `glob` restrictions in a repository cannot have the same `kind` and\n`pattern`. Additionally, two `branching_model` restrictions in a\nrepository cannot have the same `kind` and `branch_type`.\n\n`users` and `groups` are lists of users and groups that are except from\nthe restriction. They can only be configured in `push` and\n`restrict_merges` restrictions. The `push` restriction stops a user\npushing to matching branches unless that user is in `users` or is a\nmember of a group in `groups`. The `restrict_merges` stops a user\nmerging pull requests to matching branches unless that user is in\n`users` or is a member of a group in `groups`. Adding new users or\ngroups to an existing restriction should be done via `PUT`.\n\nNote that branch restrictions with overlapping matchers is allowed,\nbut the resulting behavior may be surprising.", + "summary": "Create a branch restriction rule", "responses": { "201": { "description": "A paginated list of branch restrictions", @@ -1199,8 +1292,6 @@ "description": "The new rule", "required": true }, - "tags": ["Branch restrictions"], - "summary": "Create a branch restriction rule", "security": [ { "oauth2": ["repository:admin"] @@ -1211,8 +1302,7 @@ { "api_key": [] } - ], - "description": "Creates a new branch restriction rule for a repository.\n\n`kind` describes what will be restricted. Allowed values include:\n`push`, `force`, `delete` and `restrict_merges`.\n\nDifferent kinds of branch restrictions have different requirements:\n\n* `push` and `restrict_merges` require `users` and `groups` to be\n specified. Empty lists are allowed, in which case permission is\n denied for everybody.\n\nThe restriction applies to all branches that match. There are\ntwo ways to match a branch. It is configured in `branch_match_kind`:\n\n1. `glob`: Matches a branch against the `pattern`. A `'*'` in\n `pattern` will expand to match zero or more characters, and every\n other character matches itself. For example, `'foo*'` will match\n `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all\n branches.\n2. `branching_model`: Matches a branch against the repository's\n branching model. The `branch_type` controls the type of branch\n to match. Allowed values include: `production`, `development`,\n `bugfix`, `release`, `feature` and `hotfix`.\n\nThe combination of `kind` and match must be unique. This means that\ntwo `glob` restrictions in a repository cannot have the same `kind` and\n`pattern`. Additionally, two `branching_model` restrictions in a\nrepository cannot have the same `kind` and `branch_type`.\n\n`users` and `groups` are lists of users and groups that are except from\nthe restriction. They can only be configured in `push` and\n`restrict_merges` restrictions. The `push` restriction stops a user\npushing to matching branches unless that user is in `users` or is a\nmember of a group in `groups`. The `restrict_merges` stops a user\nmerging pull requests to matching branches unless that user is in\n`users` or is a member of a group in `groups`. Adding new users or\ngroups to an existing restriction should be done via `PUT`.\n\nNote that branch restrictions with overlapping matchers is allowed,\nbut the resulting behavior may be surprising." + ] }, "parameters": [ { @@ -1237,6 +1327,9 @@ }, "/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}": { "delete": { + "tags": ["Branch restrictions"], + "description": "Deletes an existing branch restriction rule.", + "summary": "Delete a branch restriction rule", "responses": { "204": { "description": "" @@ -1272,8 +1365,6 @@ } } }, - "tags": ["Branch restrictions"], - "summary": "Delete a branch restriction rule", "security": [ { "oauth2": ["repository:admin"] @@ -1284,10 +1375,12 @@ { "api_key": [] } - ], - "description": "Deletes an existing branch restriction rule." + ] }, "get": { + "tags": ["Branch restrictions"], + "description": "Returns a specific branch restriction rule.", + "summary": "Get a branch restriction rule", "responses": { "200": { "description": "The branch restriction rule", @@ -1330,8 +1423,6 @@ } } }, - "tags": ["Branch restrictions"], - "summary": "Get a branch restriction rule", "security": [ { "oauth2": ["repository:admin"] @@ -1342,10 +1433,12 @@ { "api_key": [] } - ], - "description": "Returns a specific branch restriction rule." + ] }, "put": { + "tags": ["Branch restrictions"], + "description": "Updates an existing branch restriction rule.\n\nFields not present in the request body are ignored.\n\nSee [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details.", + "summary": "Update a branch restriction rule", "responses": { "200": { "description": "The updated branch restriction rule", @@ -1399,8 +1492,6 @@ "description": "The new version of the existing rule", "required": true }, - "tags": ["Branch restrictions"], - "summary": "Update a branch restriction rule", "security": [ { "oauth2": ["repository:admin"] @@ -1411,8 +1502,7 @@ { "api_key": [] } - ], - "description": "Updates an existing branch restriction rule.\n\nFields not present in the request body are ignored.\n\nSee [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details." + ] }, "parameters": [ { @@ -1446,6 +1536,9 @@ }, "/repositories/{workspace}/{repo_slug}/branching-model": { "get": { + "tags": ["Branching model"], + "description": "Return the branching model as applied to the repository. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API.\n\nThe returned object:\n\n1. Always has a `development` property. `development.branch` contains\n the actual repository branch object that is considered to be the\n `development` branch. `development.branch` will not be present\n if it does not exist.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.branch` contains the actual branch object that is\n considered to be the `production` branch. `production.branch` will\n not be present if it does not exist.\n3. Always has a `branch_types` array which contains all enabled branch\n types.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": \"master\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"master\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"production\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model\"\n }\n }\n}\n```", + "summary": "Get the branching model for a repository", "responses": { "200": { "description": "The branching model object", @@ -1488,8 +1581,6 @@ } } }, - "tags": ["Branching model"], - "summary": "Get the branching model for a repository", "security": [ { "oauth2": ["repository"] @@ -1500,8 +1591,7 @@ { "api_key": [] } - ], - "description": "Return the branching model as applied to the repository. This view is\nread-only. The branching model settings can be changed using the\n[settings](branching-model/settings#get) API.\n\nThe returned object:\n\n1. Always has a `development` property. `development.branch` contains\n the actual repository branch object that is considered to be the\n `development` branch. `development.branch` will not be present\n if it does not exist.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.branch` contains the actual branch object that is\n considered to be the `production` branch. `production.branch` will\n not be present if it does not exist.\n3. Always has a `branch_types` array which contains all enabled branch\n types.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": \"master\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"master\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"production\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model\"\n }\n }\n}\n```" + ] }, "parameters": [ { @@ -1526,6 +1616,9 @@ }, "/repositories/{workspace}/{repo_slug}/branching-model/settings": { "get": { + "tags": ["Branching model"], + "description": "Return the branching model configuration for a repository. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may\nfind the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.\n\nExample body:\n\n```\n{\n \"development\": {\n \"is_valid\": true,\n \"name\": null,\n \"use_mainbranch\": true\n },\n \"production\": {\n \"is_valid\": true,\n \"name\": \"production\",\n \"use_mainbranch\": false,\n \"enabled\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"enabled\": true,\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"enabled\": true,\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"enabled\": false,\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model_settings\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model/settings\"\n }\n }\n}\n```", + "summary": "Get the branching model config for a repository", "responses": { "200": { "description": "The branching model configuration", @@ -1568,8 +1661,6 @@ } } }, - "tags": ["Branching model"], - "summary": "Get the branching model config for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -1580,10 +1671,12 @@ { "api_key": [] } - ], - "description": "Return the branching model configuration for a repository. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may\nfind the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.\n\nExample body:\n\n```\n{\n \"development\": {\n \"is_valid\": true,\n \"name\": null,\n \"use_mainbranch\": true\n },\n \"production\": {\n \"is_valid\": true,\n \"name\": \"production\",\n \"use_mainbranch\": false,\n \"enabled\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"enabled\": true,\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"enabled\": true,\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"enabled\": false,\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model_settings\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model/settings\"\n }\n }\n}\n```" + ] }, "put": { + "tags": ["Branching model"], + "description": "Update the branching model configuration for a repository.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. When set to a specific branch it must\ncurrently exist. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nIt is possible for the `development` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. It is\nnot possible to update the settings for `development` if that\nwould leave the branch in an invalid state. Such a request will be\nrejected.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. When set to a specific branch it must currently\nexist. The `enabled` property can be used to enable (`true`) or\ndisable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nIt is possible for the `production` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. A\nrequest that would leave `production` enabled and invalid will be\nrejected. It is possible to update `production` and make it invalid if\nit would also be left disabled.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nExample Body:\n\n```\n {\n \"development\": {\n \"use_mainbranch\": true\n },\n \"production\": {\n \"enabled\": true,\n \"use_mainbranch\": false,\n \"name\": \"production\"\n },\n \"branch_types\": [\n {\n \"kind\": \"bugfix\",\n \"enabled\": true,\n \"prefix\": \"bugfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"release\",\n \"enabled\": false,\n }\n ]\n }\n```\n\nThere is currently a side effect when using this API endpoint. If the\nrepository is inheriting branching model settings from its project,\nupdating the branching model for this repository will disable the\nproject setting inheritance.\n\n\nWe have deprecated this side effect and will remove it on 1 August 2022.", + "summary": "Update the branching model config for a repository", "responses": { "200": { "description": "The updated branching model configuration", @@ -1636,8 +1729,6 @@ } } }, - "tags": ["Branching model"], - "summary": "Update the branching model config for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -1648,8 +1739,7 @@ { "api_key": [] } - ], - "description": "Update the branching model configuration for a repository.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. When set to a specific branch it must\ncurrently exist. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nIt is possible for the `development` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. It is\nnot possible to update the settings for `development` if that\nwould leave the branch in an invalid state. Such a request will be\nrejected.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. When set to a specific branch it must currently\nexist. The `enabled` property can be used to enable (`true`) or\ndisable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nIt is possible for the `production` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. A\nrequest that would leave `production` enabled and invalid will be\nrejected. It is possible to update `production` and make it invalid if\nit would also be left disabled.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nExample Body:\n\n```\n {\n \"development\": {\n \"use_mainbranch\": true\n },\n \"production\": {\n \"enabled\": true,\n \"use_mainbranch\": false,\n \"name\": \"production\"\n },\n \"branch_types\": [\n {\n \"kind\": \"bugfix\",\n \"enabled\": true,\n \"prefix\": \"bugfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"release\",\n \"enabled\": false,\n }\n ]\n }\n```\n\nThere is currently a side effect when using this API endpoint. If the\nrepository is inheriting branching model settings from its project,\nupdating the branching model for this repository will disable the\nproject setting inheritance.\n\n\nWe have deprecated this side effect and will remove it on 1 August 2022." + ] }, "parameters": [ { @@ -1674,6 +1764,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}": { "get": { + "tags": ["Commits"], + "description": "Returns the specified commit.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a1\n{\n \"rendered\": {\n \"message\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"

Add a GEORDI_OUTPUT_DIR setting

\",\n \"type\": \"rendered\"\n }\n },\n \"hash\": \"f7591a13eda445d9a9167f98eb870319f4b6c2d8\",\n \"repository\": {\n \"name\": \"geordi\",\n \"type\": \"repository\",\n \"full_name\": \"bitbucket/geordi\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260\"\n }\n },\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Brodie Rao \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Brodie Rao\",\n \"uuid\": \"{9484702e-c663-4afd-aefb-c93a8cd31c28}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca/613070db-28b0-421f-8dba-ae8a87e2a5c7/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"brodie\",\n \"account_id\": \"557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca\"\n }\n },\n \"summary\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"

Add a GEORDI_OUTPUT_DIR setting

\",\n \"type\": \"rendered\"\n },\n \"participants\": [],\n \"parents\": [\n {\n \"type\": \"commit\",\n \"hash\": \"f06941fec4ef6bcb0c2456927a0cf258fa4f899b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n }\n }\n }\n ],\n \"date\": \"2012-07-16T19:37:54+00:00\",\n \"message\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"type\": \"commit\"\n}\n```", + "summary": "Get a commit", "responses": { "200": { "description": "The commit object", @@ -1696,8 +1789,6 @@ } } }, - "tags": ["Commits"], - "summary": "Get a commit", "security": [ { "oauth2": ["repository"] @@ -1708,8 +1799,7 @@ { "api_key": [] } - ], - "description": "Returns the specified commit.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a1\n{\n \"rendered\": {\n \"message\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"

Add a GEORDI_OUTPUT_DIR setting

\",\n \"type\": \"rendered\"\n }\n },\n \"hash\": \"f7591a13eda445d9a9167f98eb870319f4b6c2d8\",\n \"repository\": {\n \"name\": \"geordi\",\n \"type\": \"repository\",\n \"full_name\": \"bitbucket/geordi\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260\"\n }\n },\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Brodie Rao \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Brodie Rao\",\n \"uuid\": \"{9484702e-c663-4afd-aefb-c93a8cd31c28}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca/613070db-28b0-421f-8dba-ae8a87e2a5c7/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"brodie\",\n \"account_id\": \"557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca\"\n }\n },\n \"summary\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"

Add a GEORDI_OUTPUT_DIR setting

\",\n \"type\": \"rendered\"\n },\n \"participants\": [],\n \"parents\": [\n {\n \"type\": \"commit\",\n \"hash\": \"f06941fec4ef6bcb0c2456927a0cf258fa4f899b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n }\n }\n }\n ],\n \"date\": \"2012-07-16T19:37:54+00:00\",\n \"message\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"type\": \"commit\"\n}\n```" + ] }, "parameters": [ { @@ -1743,6 +1833,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/approve": { "delete": { + "tags": ["Commits"], + "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", + "summary": "Unapprove a commit", "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." @@ -1758,8 +1851,6 @@ } } }, - "tags": ["Commits"], - "summary": "Unapprove a commit", "security": [ { "oauth2": ["repository:write"] @@ -1770,10 +1861,12 @@ { "api_key": [] } - ], - "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits." + ] }, "post": { + "tags": ["Commits"], + "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", + "summary": "Approve a commit", "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the commit.", @@ -1796,8 +1889,6 @@ } } }, - "tags": ["Commits"], - "summary": "Approve a commit", "security": [ { "oauth2": ["repository:write"] @@ -1808,8 +1899,7 @@ { "api_key": [] } - ], - "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits." + ] }, "parameters": [ { @@ -1843,6 +1933,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments": { "get": { + "tags": ["Commits"], + "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.", + "summary": "List a commit's comments", "responses": { "200": { "description": "A paginated list of commit comments.", @@ -1875,8 +1968,6 @@ } } ], - "tags": ["Commits"], - "summary": "List a commit's comments", "security": [ { "oauth2": ["repository"] @@ -1887,10 +1978,12 @@ { "api_key": [] } - ], - "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter." + ] }, "post": { + "tags": ["Commits"], + "description": "Creates new comment on the specified commit.\n\nTo post a reply to an existing comment, include the `parent.id` field:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"},\n \"parent\": {\"id\": 5728901}}'\n```", + "summary": "Create comment for a commit", "responses": { "201": { "description": "The newly created comment.", @@ -1921,8 +2014,6 @@ "description": "The specified comment.", "required": true }, - "tags": ["Commits"], - "summary": "Create comment for a commit", "security": [ { "oauth2": ["repository"] @@ -1933,8 +2024,7 @@ { "api_key": [] } - ], - "description": "Creates new comment on the specified commit.\n\nTo post a reply to an existing comment, include the `parent.id` field:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"},\n \"parent\": {\"id\": 5728901}}'\n```" + ] }, "parameters": [ { @@ -1968,6 +2058,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}": { "get": { + "tags": ["Commits"], + "description": "Returns the specified commit comment.", + "summary": "Get a commit comment", "responses": { "200": { "description": "The commit comment.", @@ -1980,8 +2073,6 @@ } } }, - "tags": ["Commits"], - "summary": "Get a commit comment", "security": [ { "oauth2": ["repository"] @@ -1992,8 +2083,7 @@ { "api_key": [] } - ], - "description": "Returns the specified commit comment." + ] }, "parameters": [ { @@ -2041,48 +2131,51 @@ "description": "An empty response." } }, + "operationId": "updateCommitHostedPropertyValue", + "summary": "Update a commit application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The commit.", "in": "path", "name": "commit", + "description": "The commit.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } @@ -2091,10 +2184,7 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"], - "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", - "summary": "Update a commit application property", - "operationId": "updateCommitHostedPropertyValue" + "tags": ["properties"] }, "delete": { "responses": { @@ -2102,57 +2192,57 @@ "description": "An empty response." } }, + "operationId": "deleteCommitHostedPropertyValue", + "summary": "Delete a commit application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The commit.", "in": "path", "name": "commit", + "description": "The commit.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", - "summary": "Delete a commit application property", - "operationId": "deleteCommitHostedPropertyValue" + "tags": ["properties"] }, "get": { "responses": { @@ -2167,61 +2257,116 @@ } } }, + "operationId": "getCommitHostedPropertyValue", + "summary": "Get a commit application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The commit.", "in": "path", "name": "commit", + "description": "The commit.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", - "summary": "Get a commit application property", - "operationId": "getCommitHostedPropertyValue" + "tags": ["properties"] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { "get": { + "tags": ["Pullrequests"], + "summary": "List pull requests that contain a commit", + "description": "Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.", + "operationId": "getPullrequestsForCommit", + "parameters": [ + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "The repository; either the UUID in curly braces, or the slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "in": "path", + "description": "The SHA1 of the commit", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many pull requests to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 30 + } + } + ], "responses": { "200": { "description": "The paginated list of pull requests.", @@ -2253,66 +2398,44 @@ } } } - }, - "parameters": [ - { - "required": true, - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces", - "in": "path", - "name": "workspace", - "schema": { - "type": "string" - } - }, - { - "required": true, - "description": "The repository; either the UUID in curly braces, or the slug", - "in": "path", - "name": "repo_slug", - "schema": { - "type": "string" - } - }, - { - "required": true, - "description": "The SHA1 of the commit", - "in": "path", - "name": "commit", - "schema": { - "type": "string" - } - }, - { - "description": "Which page to retrieve", - "required": false, - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - }, - { - "description": "How many pull requests to retrieve per page", - "required": false, - "in": "query", - "name": "pagelen", - "schema": { - "type": "integer", - "format": "int32", - "default": 30 - } - } - ], - "tags": ["Pullrequests"], - "summary": "List pull requests that contain a commit", - "operationId": "getPullrequestsForCommit", - "description": "Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details." + } } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports": { "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a paginated list of Reports linked to this commit.", + "summary": "List reports", + "operationId": "getReportsForCommit", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit for which to retrieve reports.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -2324,44 +2447,64 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { + "put": { + "tags": ["Reports", "Commits"], + "description": "Creates or updates a report for the specified commit.\nTo upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"details\": \"This pull request introduces 10 new dependency vulnerabilities.\",\n \"report_type\": \"SECURITY\",\n \"reporter\": \"mySystem\",\n \"link\": \"http://www.mysystem.com/reports/001\",\n \"result\": \"FAILED\",\n \"data\": [\n {\n \"title\": \"Duration (seconds)\",\n \"type\": \"DURATION\",\n \"value\": 14\n },\n {\n \"title\": \"Safe to merge?\",\n \"type\": \"BOOLEAN\",\n \"value\": false\n }\n ]\n}'\n```\n\n### Possible field values:\nreport_type: SECURITY, COVERAGE, TEST, BUG\nresult: PASSED, FAILED, PENDING\ndata.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT\n\n#### Data field formats\n| Type Field | Value Field Type | Value Field Display |\n|:--------------|:------------------|:--------------------|\n| None/ Omitted | Number, String or Boolean (not an array or object) | Plain text |\n| BOOLEAN\t| Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. |\n| DATE | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. |\n| DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. |\n| LINK | Object: `{\"text\": \"Link text here\", \"href\": \"https://link.to.annotation/in/external/tool\"}` | The value will be read as a JSON object containing the fields \"text\" and \"href\" and will be displayed as a clickable link on the report. |\n| NUMBER | Number | The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). |\n| PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. |\n| TEXT | String | The value will be read as a JSON string and will be displayed as-is |\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "createOrUpdateReport", + "summary": "Create or update a report", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The commit for which to retrieve reports.", - "required": true, "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Reports", "Commits"], - "summary": "List reports", - "operationId": "getReportsForCommit", - "description": "Returns a paginated list of Reports linked to this commit." - } - }, - "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { - "put": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report" + } + } + }, + "description": "The report to create or update", + "required": true + }, "responses": { "200": { "description": "OK", @@ -2383,62 +2526,51 @@ } } } - }, + } + }, + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a single Report matching the provided ID.", + "summary": "Get a report", + "operationId": "getReport", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "commit", "description": "The commit the report belongs to.", "required": true, - "name": "commit", "in": "path", "schema": { "type": "string" } }, { + "name": "reportId", "description": "Either the uuid or external-id of the report.", "required": true, - "name": "reportId", "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/report" - } - } - }, - "description": "The report to create or update", - "required": true - }, - "tags": ["Reports", "Commits"], - "summary": "Create or update a report", - "operationId": "createOrUpdateReport", - "description": "Creates or updates a report for the specified commit.\nTo upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"details\": \"This pull request introduces 10 new dependency vulnerabilities.\",\n \"report_type\": \"SECURITY\",\n \"reporter\": \"mySystem\",\n \"link\": \"http://www.mysystem.com/reports/001\",\n \"result\": \"FAILED\",\n \"data\": [\n {\n \"title\": \"Duration (seconds)\",\n \"type\": \"DURATION\",\n \"value\": 14\n },\n {\n \"title\": \"Safe to merge?\",\n \"type\": \"BOOLEAN\",\n \"value\": false\n }\n ]\n}'\n```\n\n### Possible field values:\nreport_type: SECURITY, COVERAGE, TEST, BUG\nresult: PASSED, FAILED, PENDING\ndata.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT\n\n#### Data field formats\n| Type Field | Value Field Type | Value Field Display |\n|:--------------|:------------------|:--------------------|\n| None/ Omitted | Number, String or Boolean (not an array or object) | Plain text |\n| BOOLEAN\t| Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. |\n| DATE | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. |\n| DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. |\n| LINK | Object: `{\"text\": \"Link text here\", \"href\": \"https://link.to.annotation/in/external/tool\"}` | The value will be read as a JSON object containing the fields \"text\" and \"href\" and will be displayed as a clickable link on the report. |\n| NUMBER | Number | The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). |\n| PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. |\n| TEXT | String | The value will be read as a JSON string and will be displayed as-is |\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n" - }, - "get": { "responses": { "200": { "description": "OK", @@ -2460,177 +2592,102 @@ } } } - }, + } + }, + "delete": { + "tags": ["Reports", "Commits"], + "description": "Deletes a single Report matching the provided ID.", + "summary": "Delete a report", + "operationId": "deleteReport", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "commit", "description": "The commit the report belongs to.", "required": true, - "name": "commit", "in": "path", "schema": { "type": "string" } }, { + "name": "reportId", "description": "Either the uuid or external-id of the report.", "required": true, - "name": "reportId", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Reports", "Commits"], - "summary": "Get a report", - "operationId": "getReport", - "description": "Returns a single Report matching the provided ID." - }, - "delete": { "responses": { "204": { "description": "No content" } - }, - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The commit the report belongs to.", - "required": true, - "name": "commit", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "Either the uuid or external-id of the report.", - "required": true, - "name": "reportId", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Reports", "Commits"], - "summary": "Delete a report", - "operationId": "deleteReport", - "description": "Deletes a single Report matching the provided ID." + } } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations": { - "post": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "items": { - "$ref": "#/components/schemas/report_annotation" - }, - "type": "array" - } - } - } - } - }, + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a paginated list of Annotations for a specified report.", + "summary": "List annotations", + "operationId": "getAnnotationsForReport", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "commit", "description": "The commit for which to retrieve reports.", "required": true, - "name": "commit", "in": "path", "schema": { "type": "string" } }, { + "name": "reportId", "description": "Uuid or external-if of the report for which to get annotations for.", "required": true, - "name": "reportId", "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "minItems": 1, - "items": { - "$ref": "#/components/schemas/report_annotation" - }, - "type": "array", - "maxItems": 100 - } - } - }, - "description": "The annotations to create or update", - "required": true - }, - "tags": ["Reports", "Commits"], - "summary": "Bulk create or update annotations", - "operationId": "bulkCreateOrUpdateAnnotations", - "description": "Bulk upload of annotations.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nAdd the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request.\n\n### Sample cURL request:\n```\ncurl --location 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001/annotations' \\\n--header 'Content-Type: application/json' \\\n--data-raw '[\n {\n \"external_id\": \"mysystem-annotation001\",\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security threat.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n },\n {\n \"external_id\": \"mySystem-annotation002\",\n \"title\": \"Bug report\",\n \"annotation_type\": \"BUG\",\n \"result\": \"FAILED\",\n \"summary\": \"This line might introduce a bug.\",\n \"severity\": \"MEDIUM\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java\",\n \"line\": 13\n }\n]'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n" - }, - "get": { "responses": { "200": { "description": "OK", @@ -2642,116 +2699,45 @@ } } } - }, + } + }, + "post": { + "tags": ["Reports", "Commits"], + "description": "Bulk upload of annotations.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nAdd the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request.\n\n### Sample cURL request:\n```\ncurl --location 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001/annotations' \\\n--header 'Content-Type: application/json' \\\n--data-raw '[\n {\n \"external_id\": \"mysystem-annotation001\",\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security threat.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n },\n {\n \"external_id\": \"mySystem-annotation002\",\n \"title\": \"Bug report\",\n \"annotation_type\": \"BUG\",\n \"result\": \"FAILED\",\n \"summary\": \"This line might introduce a bug.\",\n \"severity\": \"MEDIUM\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java\",\n \"line\": 13\n }\n]'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "bulkCreateOrUpdateAnnotations", + "summary": "Bulk create or update annotations", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "commit", "description": "The commit for which to retrieve reports.", "required": true, - "name": "commit", "in": "path", "schema": { "type": "string" } }, { + "name": "reportId", "description": "Uuid or external-if of the report for which to get annotations for.", "required": true, - "name": "reportId", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Reports", "Commits"], - "summary": "List annotations", - "operationId": "getAnnotationsForReport", - "description": "Returns a paginated list of Annotations for a specified report." - } - }, - "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { - "put": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/report_annotation" - } - } - } - }, - "400": { - "description": "The provided Annotation object is malformed or incomplete.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The commit the report belongs to.", - "required": true, - "name": "commit", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "Either the uuid or external-id of the report.", - "required": true, - "name": "reportId", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "Either the uuid or external-id of the annotation.", - "required": true, - "name": "annotationId", "in": "path", "schema": { "type": "string" @@ -2762,19 +2748,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/report_annotation" + "type": "array", + "items": { + "$ref": "#/components/schemas/report_annotation" + }, + "minItems": 1, + "maxItems": 100 } } }, - "description": "The annotation to create or update", + "description": "The annotations to create or update", "required": true }, - "tags": ["Reports", "Commits"], - "summary": "Create or update an annotation", - "operationId": "createOrUpdateAnnotation", - "description": "Creates or updates an individual annotation for the specified report.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nJust as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mySystem-001/annotations/mysystem-annotation001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security thread.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n}'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n" - }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/report_annotation" + } + } + } + } + } + } + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a single Annotation matching the provided ID.", + "summary": "Get an annotation", + "operationId": "getAnnotation", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "annotationId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -2796,120 +2851,158 @@ } } } - }, + } + }, + "put": { + "tags": ["Reports", "Commits"], + "description": "Creates or updates an individual annotation for the specified report.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nJust as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mySystem-001/annotations/mysystem-annotation001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security thread.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n}'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "createOrUpdateAnnotation", + "summary": "Create or update an annotation", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "commit", "description": "The commit the report belongs to.", "required": true, - "name": "commit", "in": "path", "schema": { "type": "string" } }, { + "name": "reportId", "description": "Either the uuid or external-id of the report.", "required": true, - "name": "reportId", "in": "path", "schema": { "type": "string" } }, { + "name": "annotationId", "description": "Either the uuid or external-id of the annotation.", "required": true, - "name": "annotationId", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Reports", "Commits"], - "summary": "Get an annotation", - "operationId": "getAnnotation", - "description": "Returns a single Annotation matching the provided ID." + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report_annotation" + } + } + }, + "description": "The annotation to create or update", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report_annotation" + } + } + } + }, + "400": { + "description": "The provided Annotation object is malformed or incomplete.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Reports", "Commits"], + "description": "Deletes a single Annotation matching the provided ID.", + "summary": "Delete an annotation", + "operationId": "deleteAnnotation", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the annotation belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "annotationId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "No content" } - }, - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The commit the annotation belongs to.", - "required": true, - "name": "commit", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "Either the uuid or external-id of the annotation.", - "required": true, - "name": "reportId", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "Either the uuid or external-id of the annotation.", - "required": true, - "name": "annotationId", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Reports", "Commits"], - "summary": "Delete an annotation", - "operationId": "deleteAnnotation", - "description": "Deletes a single Annotation matching the provided ID." + } } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses": { "get": { + "tags": ["Commit statuses"], + "description": "Returns all statuses (e.g. build results) for a specific commit.", + "summary": "List commit statuses for a commit", "responses": { "200": { "description": "A paginated list of all commit statuses for this commit.", @@ -2955,8 +3048,6 @@ } } ], - "tags": ["Commit statuses"], - "summary": "List commit statuses for a commit", "security": [ { "oauth2": ["repository"] @@ -2967,8 +3058,7 @@ { "api_key": [] } - ], - "description": "Returns all statuses (e.g. build results) for a specific commit." + ] }, "parameters": [ { @@ -3002,6 +3092,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build": { "post": { + "tags": ["Commit statuses"], + "description": "Creates a new build status against the specified commit.\n\nIf the specified key already exists, the existing status object will\nbe overwritten.\n\nExample:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{\n \"key\": \"MY-BUILD\",\n \"state\": \"SUCCESSFUL\",\n \"description\": \"42 tests passed\",\n \"url\": \"https://www.example.org/my-build-result\"\n }'\n```\n\nWhen creating a new commit status, you can use a URI template for the URL.\nTemplates are URLs that contain variable names that Bitbucket will\nevaluate at runtime whenever the URL is displayed anywhere similar to\nparameter substitution in\n[Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).\nFor example, one could use `https://foo.com/builds/{repository.full_name}`\nwhich Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.\nThe context variables available are `repository` and `commit`.", + "summary": "Create a build status for a commit", "responses": { "201": { "description": "The newly created build status object.", @@ -3037,8 +3130,6 @@ }, "description": "The new commit status object." }, - "tags": ["Commit statuses"], - "summary": "Create a build status for a commit", "security": [ { "oauth2": ["repository"] @@ -3049,8 +3140,7 @@ { "api_key": [] } - ], - "description": "Creates a new build status against the specified commit.\n\nIf the specified key already exists, the existing status object will\nbe overwritten.\n\nExample:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{\n \"key\": \"MY-BUILD\",\n \"state\": \"SUCCESSFUL\",\n \"description\": \"42 tests passed\",\n \"url\": \"https://www.example.org/my-build-result\"\n }'\n```\n\nWhen creating a new commit status, you can use a URI template for the URL.\nTemplates are URLs that contain variable names that Bitbucket will\nevaluate at runtime whenever the URL is displayed anywhere similar to\nparameter substitution in\n[Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).\nFor example, one could use `https://foo.com/builds/{repository.full_name}`\nwhich Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.\nThe context variables available are `repository` and `commit`." + ] }, "parameters": [ { @@ -3084,6 +3174,9 @@ }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}": { "get": { + "tags": ["Commit statuses"], + "description": "Returns the specified build status for a commit.", + "summary": "Get a build status for a commit", "responses": { "200": { "description": "The build status object with the specified key.", @@ -3109,8 +3202,6 @@ } } }, - "tags": ["Commit statuses"], - "summary": "Get a build status for a commit", "security": [ { "oauth2": ["repository"] @@ -3121,10 +3212,12 @@ { "api_key": [] } - ], - "description": "Returns the specified build status for a commit." + ] }, "put": { + "tags": ["Commit statuses"], + "description": "Used to update the current status of a build status object on the\nspecific commit.\n\nThis operation can also be used to change other properties of the\nbuild status:\n\n* `state`\n* `name`\n* `description`\n* `url`\n* `refname`\n\nThe `key` cannot be changed.", + "summary": "Update a build status for a commit", "responses": { "200": { "description": "The updated build status object.", @@ -3160,8 +3253,6 @@ }, "description": "The updated build status object" }, - "tags": ["Commit statuses"], - "summary": "Update a build status for a commit", "security": [ { "oauth2": ["repository"] @@ -3172,8 +3263,7 @@ { "api_key": [] } - ], - "description": "Used to update the current status of a build status object on the\nspecific commit.\n\nThis operation can also be used to change other properties of the\nbuild status:\n\n* `state`\n* `name`\n* `description`\n* `url`\n* `refname`\n\nThe `key` cannot be changed." + ] }, "parameters": [ { @@ -3216,6 +3306,9 @@ }, "/repositories/{workspace}/{repo_slug}/commits": { "get": { + "tags": ["Commits"], + "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", + "summary": "List commits", "responses": { "200": { "description": "A paginated list of commits", @@ -3238,8 +3331,6 @@ } } }, - "tags": ["Commits"], - "summary": "List commits", "security": [ { "oauth2": ["repository"] @@ -3250,10 +3341,12 @@ { "api_key": [] } - ], - "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead." + ] }, "post": { + "tags": ["Commits"], + "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", + "summary": "List commits with include/exclude", "responses": { "200": { "description": "A paginated list of commits", @@ -3276,8 +3369,6 @@ } } }, - "tags": ["Commits"], - "summary": "List commits with include/exclude", "security": [ { "oauth2": ["repository"] @@ -3288,8 +3379,7 @@ { "api_key": [] } - ], - "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**" + ] }, "parameters": [ { @@ -3314,6 +3404,9 @@ }, "/repositories/{workspace}/{repo_slug}/commits/{revision}": { "get": { + "tags": ["Commits"], + "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master\n\nReturns all commits on ref `dev` or `foo`, except those that are reachable on\n`master` (similar to `git log dev foo ^master`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `dev` or `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master\n\nReturns all commits that are on refs `dev` or `foo`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", + "summary": "List commits for revision", "responses": { "200": { "description": "A paginated list of commits", @@ -3336,8 +3429,6 @@ } } }, - "tags": ["Commits"], - "summary": "List commits for revision", "security": [ { "oauth2": ["repository"] @@ -3348,10 +3439,12 @@ { "api_key": [] } - ], - "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master\n\nReturns all commits on ref `dev` or `foo`, except those that are reachable on\n`master` (similar to `git log dev foo ^master`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `dev` or `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master\n\nReturns all commits that are on refs `dev` or `foo`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead." + ] }, "post": { + "tags": ["Commits"], + "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", + "summary": "List commits for revision using include/exclude", "responses": { "200": { "description": "A paginated list of commits", @@ -3374,8 +3467,6 @@ } } }, - "tags": ["Commits"], - "summary": "List commits for revision using include/exclude", "security": [ { "oauth2": ["repository"] @@ -3386,8 +3477,7 @@ { "api_key": [] } - ], - "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**" + ] }, "parameters": [ { @@ -3421,6 +3511,9 @@ }, "/repositories/{workspace}/{repo_slug}/components": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List components", "responses": { "200": { "description": "The components that have been defined in the issue tracker.", @@ -3443,8 +3536,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "List components", "security": [ { "oauth2": ["issue"] @@ -3455,8 +3546,7 @@ { "api_key": [] } - ], - "description": "Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled." + ] }, "parameters": [ { @@ -3481,6 +3571,9 @@ }, "/repositories/{workspace}/{repo_slug}/components/{component_id}": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker component object.", + "summary": "Get a component for issues", "responses": { "200": { "description": "The specified component object.", @@ -3503,8 +3596,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get a component for issues", "security": [ { "oauth2": ["issue"] @@ -3515,8 +3606,7 @@ { "api_key": [] } - ], - "description": "Returns the specified issue tracker component object." + ] }, "parameters": [ { @@ -3550,9 +3640,19 @@ }, "/repositories/{workspace}/{repo_slug}/default-reviewers": { "get": { + "tags": ["Pullrequests"], + "description": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.", + "summary": "List default reviewers", "responses": { "200": { - "description": "The paginated list of default reviewers" + "description": "The paginated list of default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_accounts" + } + } + } }, "403": { "description": "If the authenticated user does not have access to view the default reviewers", @@ -3565,8 +3665,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "List default reviewers", "security": [ { "oauth2": ["pullrequest"] @@ -3577,8 +3675,7 @@ { "api_key": [] } - ], - "description": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created." + ] }, "parameters": [ { @@ -3603,6 +3700,9 @@ }, "/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}": { "delete": { + "tags": ["Pullrequests"], + "description": "Removes a default reviewer from the repository.", + "summary": "Remove a user from the default reviewers", "responses": { "204": { "description": "The specified user successfully removed from the default reviewers" @@ -3628,8 +3728,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Remove a user from the default reviewers", "security": [ { "oauth2": ["repository:admin"] @@ -3640,13 +3738,22 @@ { "api_key": [] } - ], - "description": "Removes a default reviewer from the repository." + ] }, "get": { + "tags": ["Pullrequests"], + "description": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer.", + "summary": "Get a default reviewer", "responses": { "200": { - "description": "The specified user is a default reviewer" + "description": "The specified user is a default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } }, "403": { "description": "If the authenticated user does not have access to check if the specified user is a default reviewer", @@ -3669,8 +3776,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Get a default reviewer", "security": [ { "oauth2": ["pullrequest"] @@ -3681,13 +3786,22 @@ { "api_key": [] } - ], - "description": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer." + ] }, "put": { + "tags": ["Pullrequests"], + "description": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect.", + "summary": "Add a user to the default reviewers", "responses": { "200": { - "description": "The specified user was successfully added to the default reviewers" + "description": "The specified user was successfully added to the default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } }, "400": { "description": "If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers", @@ -3720,8 +3834,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Add a user to the default reviewers", "security": [ { "oauth2": ["repository:admin"] @@ -3732,8 +3844,7 @@ { "api_key": [] } - ], - "description": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect." + ] }, "parameters": [ { @@ -3767,6 +3878,9 @@ }, "/repositories/{workspace}/{repo_slug}/deploy-keys": { "get": { + "tags": ["Deployments"], + "description": "Returns all deploy-keys belonging to a repository.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys\n\nOutput:\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```", + "summary": "List repository deploy keys", "responses": { "200": { "description": "Deploy keys matching the repository", @@ -3792,8 +3906,6 @@ } } }, - "tags": ["Deployments"], - "summary": "List deploy keys", "security": [ { "oauth2": ["repository", "repository:admin"] @@ -3804,10 +3916,12 @@ { "api_key": [] } - ], - "description": "Returns all deploy-keys belonging to a repository.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys\n\nOutput:\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```" + ] }, "post": { + "tags": ["Deployments"], + "description": "Create a new deploy key in a repository. Note: If authenticating a deploy key\nwith an OAuth consumer, any changes to the OAuth consumer will subsequently\ninvalidate the deploy key.\n\n\nExample:\n```\n$ curl -XPOST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n\nOutput:\n{\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mydeploykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n}\n```", + "summary": "Add a repository deploy key", "responses": { "200": { "description": "The deploy key that was created", @@ -3836,8 +3950,6 @@ } } }, - "tags": ["Deployments"], - "summary": "Add a deploy key", "security": [ { "oauth2": ["repository", "repository:admin"] @@ -3848,8 +3960,7 @@ { "api_key": [] } - ], - "description": "Create a new deploy key in a repository. Note: If authenticating a deploy key\nwith an OAuth consumer, any changes to the OAuth consumer will subsequently\ninvalidate the deploy key.\n\n\nExample:\n```\n$ curl -XPOST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n\nOutput:\n{\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mydeploykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n}\n```" + ] }, "parameters": [ { @@ -3874,6 +3985,9 @@ }, "/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}": { "delete": { + "tags": ["Deployments"], + "description": "This deletes a deploy key from a repository.\n\nExample:\n```\n$ curl -XDELETE \\\n-H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\n```", + "summary": "Delete a repository deploy key", "responses": { "204": { "description": "The key has been deleted" @@ -3892,8 +4006,6 @@ } } }, - "tags": ["Deployments"], - "summary": "Delete a deploy key", "security": [ { "oauth2": ["repository", "repository:admin"] @@ -3904,10 +4016,12 @@ { "api_key": [] } - ], - "description": "This deletes a deploy key from a repository.\n\nExample:\n```\n$ curl -XDELETE \\\n-H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\n```" + ] }, "get": { + "tags": ["Deployments"], + "description": "Returns the deploy key belonging to a specific key.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\n\nOutput:\n{\n \"comment\": \"mleu@C02W454JHTD8\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"mykey\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```", + "summary": "Get a repository deploy key", "responses": { "200": { "description": "Deploy key matching the key ID", @@ -3933,8 +4047,6 @@ } } }, - "tags": ["Deployments"], - "summary": "Get a deploy key", "security": [ { "oauth2": ["repository", "repository:admin"] @@ -3945,10 +4057,12 @@ { "api_key": [] } - ], - "description": "Returns the deploy key belonging to a specific key.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\n\nOutput:\n{\n \"comment\": \"mleu@C02W454JHTD8\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"mykey\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```" + ] }, "put": { + "tags": ["Deployments"], + "description": "Create a new deploy key in a repository.\n\nThe same key needs to be passed in but the comment and label can change.\n\nExample:\n```\n$ curl -XPUT \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \\\n'{\n \"label\": \"newlabel\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment\",\n}'\n\nOutput:\n{\n \"comment\": \"newcomment\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"newlabel\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```", + "summary": "Update a repository deploy key", "responses": { "200": { "description": "The newly updated deploy key.", @@ -3984,8 +4098,6 @@ } } }, - "tags": ["Deployments"], - "summary": "Update a deploy key", "security": [ { "oauth2": ["repository", "repository:admin"] @@ -3996,8 +4108,7 @@ { "api_key": [] } - ], - "description": "Create a new deploy key in a repository.\n\nThe same key needs to be passed in but the comment and label can change.\n\nExample:\n```\n$ curl -XPUT \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \\\n'{\n \"label\": \"newlabel\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment\",\n}'\n\nOutput:\n{\n \"comment\": \"newcomment\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"newlabel\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```" + ] }, "parameters": [ { @@ -4031,6 +4142,30 @@ }, "/repositories/{workspace}/{repo_slug}/deployments/": { "get": { + "tags": ["Deployments"], + "description": "Find deployments", + "summary": "List deployments", + "operationId": "getDeploymentsForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "The matching deployments.", @@ -4042,35 +4177,44 @@ } } } - }, - "description": "Find deployments", + } + } + }, + "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}": { + "get": { + "tags": ["Deployments"], + "description": "Retrieve a deployment", + "summary": "Get a deployment", + "operationId": "getDeploymentForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "deployment_uuid", + "description": "The deployment UUID.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Deployments"], - "summary": "List deployments", - "operationId": "getDeploymentsForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}": { - "get": { "responses": { "200": { "description": "The deployment.", @@ -4092,46 +4236,105 @@ } } } - }, - "description": "Retrieve a deployment", + } + } + }, + "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables": { + "get": { + "tags": ["Pipelines"], + "description": "Find deployment environment level variables.", + "summary": "List variables for an environment", + "operationId": "getDeploymentVariables", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The deployment UUID.", + "name": "environment_uuid", + "description": "The environment.", "required": true, - "name": "deployment_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Deployments"], - "summary": "Get a deployment", - "operationId": "getDeploymentForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables": { + "responses": { + "200": { + "description": "The retrieved deployment variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_deployment_variable" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "description": "Create a deployment environment level variable.", + "summary": "Create a variable for an environment", + "operationId": "createDeploymentVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_variable" + } + } + }, + "description": "The variable to create", + "required": true + }, "responses": { "201": { + "description": "The variable was created.", "headers": { "Location": { "description": "The URL of the newly created variable.", @@ -4140,7 +4343,6 @@ } } }, - "description": "The variable was created.", "content": { "application/json": { "schema": { @@ -4169,31 +4371,47 @@ } } } - }, - "description": "Create a deployment environment level variable.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { + "put": { + "tags": ["Pipelines"], + "description": "Update a deployment environment level variable.", + "summary": "Update a variable for an environment", + "operationId": "updateDeploymentVariable", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "environment_uuid", "description": "The environment.", "required": true, - "name": "environment_uuid", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to update.", + "required": true, "in": "path", "schema": { "type": "string" @@ -4208,63 +4426,9 @@ } } }, - "description": "The variable to create", + "description": "The updated deployment variable.", "required": true }, - "tags": ["Pipelines"], - "summary": "Create a variable for an environment", - "operationId": "createDeploymentVariable" - }, - "get": { - "responses": { - "200": { - "description": "The retrieved deployment variables.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_deployment_variable" - } - } - } - } - }, - "description": "Find deployment environment level variables.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The environment.", - "required": true, - "name": "environment_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List variables for an environment", - "operationId": "getDeploymentVariables" - } - }, - "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { - "put": { "responses": { "200": { "description": "The deployment variable was updated.", @@ -4286,62 +4450,51 @@ } } } - }, - "description": "Update a deployment environment level variable.", + } + }, + "delete": { + "tags": ["Pipelines"], + "description": "Delete a deployment environment level variable.", + "summary": "Delete a variable for an environment", + "operationId": "deleteDeploymentVariable", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "environment_uuid", "description": "The environment.", "required": true, - "name": "environment_uuid", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to update.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/deployment_variable" - } - } - }, - "description": "The updated deployment variable.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Update a variable for an environment", - "operationId": "updateDeploymentVariable" - }, - "delete": { "responses": { "204": { "description": "The variable was deleted." @@ -4356,53 +4509,14 @@ } } } - }, - "description": "Delete a deployment environment level variable.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The environment.", - "required": true, - "name": "environment_uuid", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the variable to delete.", - "required": true, - "name": "variable_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "Delete a variable for an environment", - "operationId": "deleteDeploymentVariable" + } } }, "/repositories/{workspace}/{repo_slug}/diff/{spec}": { "get": { + "tags": ["Commits"], + "description": "Produces a raw git-style diff.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Comparison to patches\n\nWhile similar to patches, diffs:\n\n* Don't have a commit header (username, commit message, etc)\n* Support the optional `path=foo/bar.py` query param to filter\n the diff to just that one file diff\n\n#### Response\n\nThe raw diff is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`.", + "summary": "Compare two commits", "responses": { "200": { "description": "The raw diff" @@ -4483,8 +4597,6 @@ } } ], - "tags": ["Commits"], - "summary": "Compare two commits", "security": [ { "oauth2": ["repository"] @@ -4495,8 +4607,7 @@ { "api_key": [] } - ], - "description": "Produces a raw git-style diff.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Comparison to patches\n\nWhile similar to patches, diffs:\n\n* Don't have a commit header (username, commit message, etc)\n* Support the optional `path=foo/bar.py` query param to filter\n the diff to just that one file diff\n\n#### Response\n\nThe raw diff is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`." + ] }, "parameters": [ { @@ -4530,6 +4641,9 @@ }, "/repositories/{workspace}/{repo_slug}/diffstat/{spec}": { "get": { + "tags": ["Commits"], + "description": "Produces a response in JSON format with a record for every path\nmodified, including information on the type of the change and the\nnumber of lines added and removed.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Sample output\n```\ncurl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964\n{\n \"pagelen\": 500,\n \"values\": [\n {\n \"type\": \"diffstat\",\n \"status\": \"modified\",\n \"lines_removed\": 1,\n \"lines_added\": 2,\n \"old\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py\"\n }\n }\n },\n \"new\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py\"\n }\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```", + "summary": "Compare two commit diff stats", "responses": { "200": { "description": "The diff stats", @@ -4552,8 +4666,6 @@ } } }, - "tags": ["Commits"], - "summary": "Compare two commit diff stats", "security": [ { "oauth2": ["repository"] @@ -4564,8 +4676,7 @@ { "api_key": [] } - ], - "description": "Produces a response in JSON format with a record for every path\nmodified, including information on the type of the change and the\nnumber of lines added and removed.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Sample output\n```\ncurl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964\n{\n \"pagelen\": 500,\n \"values\": [\n {\n \"type\": \"diffstat\",\n \"status\": \"modified\",\n \"lines_removed\": 1,\n \"lines_added\": 2,\n \"old\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py\"\n }\n }\n },\n \"new\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py\"\n }\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```" + ] }, "parameters": [ { @@ -4644,6 +4755,9 @@ }, "/repositories/{workspace}/{repo_slug}/downloads": { "get": { + "tags": ["Downloads"], + "description": "Returns a list of download links associated with the repository.", + "summary": "List download artifacts", "responses": { "200": { "description": "Returns a paginated list of the downloads associated with the repository." @@ -4659,8 +4773,6 @@ } } }, - "tags": ["Downloads"], - "summary": "List download artifacts", "security": [ { "oauth2": ["repository"] @@ -4671,10 +4783,12 @@ { "api_key": [] } - ], - "description": "Returns a list of download links associated with the repository." + ] }, "post": { + "tags": ["Downloads"], + "description": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced.", + "summary": "Upload a download artifact", "responses": { "201": { "description": "The artifact was uploaded sucessfully." @@ -4710,8 +4824,6 @@ } } }, - "tags": ["Downloads"], - "summary": "Upload a download artifact", "security": [ { "oauth2": ["repository:write"] @@ -4722,8 +4834,7 @@ { "api_key": [] } - ], - "description": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced." + ] }, "parameters": [ { @@ -4748,6 +4859,9 @@ }, "/repositories/{workspace}/{repo_slug}/downloads/{filename}": { "delete": { + "tags": ["Downloads"], + "description": "Deletes the specified download artifact from the repository.", + "summary": "Delete a download artifact", "responses": { "204": { "description": "The specified download artifact was deleted." @@ -4773,8 +4887,6 @@ } } }, - "tags": ["Downloads"], - "summary": "Delete a download artifact", "security": [ { "oauth2": ["repository:write"] @@ -4785,10 +4897,12 @@ { "api_key": [] } - ], - "description": "Deletes the specified download artifact from the repository." + ] }, "get": { + "tags": ["Downloads"], + "description": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World", + "summary": "Get a download artifact link", "responses": { "302": { "description": "Redirects to the url of the specified download artifact." @@ -4814,8 +4928,6 @@ } } }, - "tags": ["Downloads"], - "summary": "Get a download artifact link", "security": [ { "oauth2": ["repository"] @@ -4826,8 +4938,7 @@ { "api_key": [] } - ], - "description": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World" + ] }, "parameters": [ { @@ -4859,10 +4970,164 @@ } ] }, + "/repositories/{workspace}/{repo_slug}/effective-branching-model": { + "get": { + "tags": ["Branching model"], + "description": "", + "summary": "Get the effective, or currently applied, branching model for a repository", + "responses": { + "200": { + "description": "The effective branching model object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/effective_repo_branching_model" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have read access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "/repositories/{workspace}/{repo_slug}/environments/": { + "get": { + "tags": ["Deployments"], + "description": "Find environments", + "summary": "List environments", + "operationId": "getEnvironmentsForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The matching environments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_environments" + } + } + } + } + } + }, "post": { + "tags": ["Deployments"], + "description": "Create an environment.", + "summary": "Create an environment", + "operationId": "createEnvironment", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_environment" + } + } + }, + "description": "The environment to create.", + "required": true + }, "responses": { "201": { + "description": "The environment was created.", "headers": { "Location": { "description": "The URL of the newly created environment.", @@ -4871,7 +5136,6 @@ } } }, - "description": "The environment was created.", "content": { "application/json": { "schema": { @@ -4900,84 +5164,44 @@ } } } - }, - "description": "Create an environment.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/deployment_environment" - } - } - }, - "description": "The environment to create.", - "required": true - }, - "tags": ["Deployments"], - "summary": "Create an environment", - "operationId": "createEnvironment" - }, - "get": { - "responses": { - "200": { - "description": "The matching environments.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_environments" - } - } - } - } - }, - "description": "Find environments", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Deployments"], - "summary": "List environments", - "operationId": "getEnvironmentsForRepository" + } } }, "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}": { "get": { + "tags": ["Deployments"], + "summary": "Get an environment", + "description": "Retrieve an environment", + "operationId": "getEnvironmentForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "The environment.", @@ -4999,42 +5223,42 @@ } } } - }, - "description": "Retrieve an environment", + } + }, + "delete": { + "tags": ["Deployments"], + "description": "Delete an environment", + "summary": "Delete an environment", + "operationId": "deleteEnvironmentForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "environment_uuid", "description": "The environment UUID.", "required": true, - "name": "environment_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Deployments"], - "summary": "Get an environment", - "operationId": "getEnvironmentForRepository" - }, - "delete": { "responses": { "204": { "description": "The environment was deleted." @@ -5049,44 +5273,44 @@ } } } - }, - "description": "Delete an environment", + } + } + }, + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/": { + "post": { + "tags": ["Deployments"], + "description": "Update an environment", + "summary": "Update an environment", + "operationId": "updateEnvironmentForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "environment_uuid", "description": "The environment UUID.", "required": true, - "name": "environment_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Deployments"], - "summary": "Delete an environment", - "operationId": "deleteEnvironmentForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/": { - "post": { "responses": { "202": { "description": "The environment update request was accepted." @@ -5101,44 +5325,14 @@ } } } - }, - "description": "Update an environment", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The environment UUID.", - "required": true, - "name": "environment_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Deployments"], - "summary": "Update an environment", - "operationId": "updateEnvironmentForRepository" + } } }, "/repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}": { "get": { + "tags": ["Source", "Repositories"], + "description": "Returns a paginated list of commits that modified the specified file.\n\nCommits are returned in reverse chronological order. This is roughly\nequivalent to the following commands:\n\n $ git log --follow --date-order \n\nBy default, Bitbucket will follow renames and the path name in the\nreturned entries reflects that. This can be turned off using the\n`?renames=false` query parameter.\n\nResults are returned in descending chronological order by default, and\nlike most endpoints you can\n[filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to\nonly provide exactly the data you want.\n\nFor example, if you wanted to find commits made before 2011-05-18\nagainst a file named `README.rst`, but you only wanted the path and\ndate, your query would look like this:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\\\n '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'\n{\n \"values\": [\n {\n \"commit\": {\n \"date\": \"2011-05-17T07:32:09+00:00\"\n },\n \"path\": \"README.rst\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:33:28+00:00\"\n },\n \"path\": \"README.txt\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:15:39+00:00\"\n },\n \"path\": \"README.txt\"\n }\n ]\n}\n```\n\nIn the response you can see that the file was renamed to `README.rst`\nby the commit made on 2011-05-16, and was previously named `README.txt`.", + "summary": "List commits that modified a file", "responses": { "200": { "description": "A paginated list of commits that modified the specified file", @@ -5190,8 +5384,6 @@ } } ], - "tags": ["Source", "Repositories"], - "summary": "List commits that modified a file", "security": [ { "oauth2": ["repository"] @@ -5202,8 +5394,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of commits that modified the specified file.\n\nCommits are returned in reverse chronological order. This is roughly\nequivalent to the following commands:\n\n $ git log --follow --date-order \n\nBy default, Bitbucket will follow renames and the path name in the\nreturned entries reflects that. This can be turned off using the\n`?renames=false` query parameter.\n\nResults are returned in descending chronological order by default, and\nlike most endpoints you can\n[filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to\nonly provide exactly the data you want.\n\nFor example, if you wanted to find commits made before 2011-05-18\nagainst a file named `README.rst`, but you only wanted the path and\ndate, your query would look like this:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\\\n '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'\n{\n \"values\": [\n {\n \"commit\": {\n \"date\": \"2011-05-17T07:32:09+00:00\"\n },\n \"path\": \"README.rst\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:33:28+00:00\"\n },\n \"path\": \"README.txt\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:15:39+00:00\"\n },\n \"path\": \"README.txt\"\n }\n ]\n}\n```\n\nIn the response you can see that the file was renamed to `README.rst`\nby the commit made on 2011-05-16, and was previously named `README.txt`." + ] }, "parameters": [ { @@ -5246,6 +5437,9 @@ }, "/repositories/{workspace}/{repo_slug}/forks": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all the forks of the specified\nrepository.", + "summary": "List repository forks", "responses": { "200": { "description": "All forks.", @@ -5288,8 +5482,6 @@ } } ], - "tags": ["Repositories"], - "summary": "List repository forks", "security": [ { "oauth2": ["repository"] @@ -5300,10 +5492,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all the forks of the specified\nrepository." + ] }, "post": { + "tags": ["Repositories"], + "description": "Creates a new fork of the specified repository.\n\n#### Forking a repository\n\nTo create a fork, specify the workspace explicitly as part of the\nrequest body:\n\n```\n$ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \\\n -H 'Content-Type: application/json' -d '{\n \"name\": \"bbql_fork\",\n \"workspace\": {\n \"slug\": \"atlassian\"\n }\n}'\n```\n\nTo fork a repository into the same workspace, also specify a new `name`.\n\nWhen you specify a value for `name`, it will also affect the `slug`.\nThe `slug` is reflected in the repository URL of the new fork. It is\nderived from `name` by substituting non-ASCII characters, removes\nwhitespace, and changes characters to lower case. For example,\n`My repo` would turn into `my_repo`.\n\nYou need contributor access to create new forks within a workspace.\n\n\n#### Change the properties of a new fork\n\nBy default the fork inherits most of its properties from the parent.\nHowever, since the optional POST body document follows the normal\n`repository` JSON schema and you can override the new fork's\nproperties.\n\nProperties that can be overridden include:\n\n* description\n* fork_policy\n* language\n* mainbranch\n* is_private (note that a private repo's fork_policy might prohibit\n the creation of public forks, in which `is_private=False` would fail)\n* has_issues (to initialize or disable the new repo's issue tracker --\n note that the actual contents of the parent repository's issue\n tracker are not copied during forking)\n* has_wiki (to initialize or disable the new repo's wiki --\n note that the actual contents of the parent repository's wiki are not\n copied during forking)\n* project (when forking into a private project, the fork's `is_private`\n must be `true`)\n\nProperties that cannot be modified include:\n\n* scm\n* parent\n* full_name", + "summary": "Fork a repository", "responses": { "201": { "description": "The newly created fork.", @@ -5334,8 +5528,6 @@ }, "description": "A repository object. This can be left blank." }, - "tags": ["Repositories"], - "summary": "Fork a repository", "security": [ { "oauth2": ["repository:write"] @@ -5346,8 +5538,7 @@ { "api_key": [] } - ], - "description": "Creates a new fork of the specified repository.\n\n#### Forking a repository\n\nTo create a fork, specify the workspace explicitly as part of the\nrequest body:\n\n```\n$ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \\\n -H 'Content-Type: application/json' -d '{\n \"name\": \"bbql_fork\",\n \"workspace\": {\n \"slug\": \"atlassian\"\n }\n}'\n```\n\nTo fork a repository into the same workspace, also specify a new `name`.\n\nWhen you specify a value for `name`, it will also affect the `slug`.\nThe `slug` is reflected in the repository URL of the new fork. It is\nderived from `name` by substituting non-ASCII characters, removes\nwhitespace, and changes characters to lower case. For example,\n`My repo` would turn into `my_repo`.\n\nYou need contributor access to create new forks within a workspace.\n\n\n#### Change the properties of a new fork\n\nBy default the fork inherits most of its properties from the parent.\nHowever, since the optional POST body document follows the normal\n`repository` JSON schema and you can override the new fork's\nproperties.\n\nProperties that can be overridden include:\n\n* description\n* fork_policy\n* language\n* mainbranch\n* is_private (note that a private repo's fork_policy might prohibit\n the creation of public forks, in which `is_private=False` would fail)\n* has_issues (to initialize or disable the new repo's issue tracker --\n note that the actual contents of the parent repository's issue\n tracker are not copied during forking)\n* has_wiki (to initialize or disable the new repo's wiki --\n note that the actual contents of the parent repository's wiki are not\n copied during forking)\n* project (when forking into a private project, the fork's `is_private`\n must be `true`)\n\nProperties that cannot be modified include:\n\n* scm\n* parent\n* full_name" + ] }, "parameters": [ { @@ -5372,6 +5563,9 @@ }, "/repositories/{workspace}/{repo_slug}/hooks": { "get": { + "tags": ["Repositories", "Webhooks"], + "description": "Returns a paginated list of webhooks installed on this repository.", + "summary": "List webhooks for a repository", "responses": { "200": { "description": "The paginated list of installed webhooks.", @@ -5404,8 +5598,6 @@ } } }, - "tags": ["Repositories", "Webhooks"], - "summary": "List webhooks for a repository", "security": [ { "oauth2": ["webhook"] @@ -5416,10 +5608,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of webhooks installed on this repository." + ] }, "post": { + "tags": ["Repositories", "Webhooks"], + "description": "Creates a new webhook on the specified repository.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nNote that this call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nAlso note that the `url` must properly resolve and cannot be an\ninternal, non-routed address.", + "summary": "Create a webhook for a repository", "responses": { "201": { "description": "If the webhook was registered successfully.", @@ -5460,8 +5654,6 @@ } } }, - "tags": ["Repositories", "Webhooks"], - "summary": "Create a webhook for a repository", "security": [ { "oauth2": ["webhook"] @@ -5472,8 +5664,7 @@ { "api_key": [] } - ], - "description": "Creates a new webhook on the specified repository.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nNote that this call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nAlso note that the `url` must properly resolve and cannot be an\ninternal, non-routed address." + ] }, "parameters": [ { @@ -5498,6 +5689,9 @@ }, "/repositories/{workspace}/{repo_slug}/hooks/{uid}": { "delete": { + "tags": ["Repositories", "Webhooks"], + "description": "Deletes the specified webhook subscription from the given\nrepository.", + "summary": "Delete a webhook for a repository", "responses": { "204": { "description": "When the webhook was deleted successfully" @@ -5523,8 +5717,6 @@ } } }, - "tags": ["Repositories", "Webhooks"], - "summary": "Delete a webhook for a repository", "security": [ { "oauth2": ["webhook"] @@ -5535,10 +5727,12 @@ { "api_key": [] } - ], - "description": "Deletes the specified webhook subscription from the given\nrepository." + ] }, "get": { + "tags": ["Repositories", "Webhooks"], + "description": "Returns the webhook with the specified id installed on the specified\nrepository.", + "summary": "Get a webhook for a repository", "responses": { "200": { "description": "The webhook subscription object.", @@ -5561,8 +5755,6 @@ } } }, - "tags": ["Repositories", "Webhooks"], - "summary": "Get a webhook for a repository", "security": [ { "oauth2": ["webhook"] @@ -5573,10 +5765,12 @@ { "api_key": [] } - ], - "description": "Returns the webhook with the specified id installed on the specified\nrepository." + ] }, "put": { + "tags": ["Repositories", "Webhooks"], + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", + "summary": "Update a webhook for a repository", "responses": { "200": { "description": "The webhook subscription object.", @@ -5609,8 +5803,6 @@ } } }, - "tags": ["Repositories", "Webhooks"], - "summary": "Update a webhook for a repository", "security": [ { "oauth2": ["webhook"] @@ -5621,8 +5813,7 @@ { "api_key": [] } - ], - "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`" + ] }, "parameters": [ { @@ -5656,6 +5847,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the issues in the issue tracker.", + "summary": "List issues", "responses": { "200": { "description": "A paginated list of the issues matching any filter criteria that were provided.", @@ -5678,8 +5872,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "List issues", "security": [ { "oauth2": ["issue"] @@ -5690,10 +5882,12 @@ { "api_key": [] } - ], - "description": "Returns the issues in the issue tracker." + ] }, "post": { + "tags": ["Issue tracker"], + "description": "Creates a new issue.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.\n\nThe authenticated user is used for the issue's `reporter` field.", + "summary": "Create an issue", "responses": { "201": { "description": "The newly created issue.", @@ -5755,8 +5949,6 @@ "description": "The new issue. The only required element is `title`. All other elements can be omitted from the body.", "required": true }, - "tags": ["Issue tracker"], - "summary": "Create an issue", "security": [ { "oauth2": ["issue:write"] @@ -5767,8 +5959,7 @@ { "api_key": [] } - ], - "description": "Creates a new issue.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.\n\nThe authenticated user is used for the issue's `reporter` field." + ] }, "parameters": [ { @@ -5793,6 +5984,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/export": { "post": { + "tags": ["Issue tracker"], + "description": "A POST request to this endpoint initiates a new background celery task that archives the repo's issues.\n\nFor example, you can run:\n\ncurl -u -X POST http://api.bitbucket.org/2.0/repositories///\nissues/export\n\nWhen the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the\n'Location' response header. This url is the endpoint for where the user can obtain their zip files.\"", + "summary": "Export issues", "responses": { "202": { "description": "The export job has been accepted" @@ -5838,8 +6032,6 @@ }, "description": "The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export." }, - "tags": ["Issue tracker"], - "summary": "Export issues", "security": [ { "oauth2": ["issue", "repository:admin"] @@ -5850,8 +6042,7 @@ { "api_key": [] } - ], - "description": "A POST request to this endpoint initiates a new background celery task that archives the repo's issues.\n\nFor example, you can run:\n\ncurl -u -X POST http://api.bitbucket.org/2.0/repositories///\nissues/export\n\nWhen the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the\n'Location' response header. This url is the endpoint for where the user can obtain their zip files.\"" + ] }, "parameters": [ { @@ -5876,6 +6067,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip": { "get": { + "tags": ["Issue tracker"], + "description": "This endpoint is used to poll for the progress of an issue export\njob and return the zip file after the job is complete.\nAs long as the job is running, this will return a 200 response\nwith in the response body a description of the current status.\n\nAfter the job has been scheduled, but before it starts executing, this\nendpoint's response is:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Initializing\",\n \"total\": 0,\n \"count\": 0,\n \"pct\": 0\n}\n\n\nThen once it starts running, it becomes:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"STARTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 11,\n \"pct\": 73\n}\n\nOnce the job has successfully completed, it returns a stream of the zip file.", + "summary": "Check issue export status", "responses": { "202": { "description": "Export job accepted", @@ -5918,8 +6112,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Check issue export status", "security": [ { "oauth2": ["issue", "repository:admin"] @@ -5930,8 +6122,7 @@ { "api_key": [] } - ], - "description": "This endpoint is used to poll for the progress of an issue export\njob and return the zip file after the job is complete.\nAs long as the job is running, this will return a 200 response\nwith in the response body a description of the current status.\n\nAfter the job has been scheduled, but before it starts executing, this\nendpoint's response is:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Initializing\",\n \"total\": 0,\n \"count\": 0,\n \"pct\": 0\n}\n\n\nThen once it starts running, it becomes:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"STARTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 11,\n \"pct\": 73\n}\n\nOnce the job has successfully completed, it returns a stream of the zip file." + ] }, "parameters": [ { @@ -5974,6 +6165,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/import": { "get": { + "tags": ["Issue tracker"], + "description": "When using GET, this endpoint reports the status of the current import task. Request example:\n\n```\n$ curl -u -X GET https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nAfter the job has been scheduled, but before it starts executing, this endpoint's response is:\n\n```\n< HTTP/1.1 202 Accepted\n{\n \"type\": \"issue_job_status\",\n \"status\": \"PENDING\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```\n\nOnce it starts running, it is a 202 response with status STARTED and progress filled.\n\nAfter it is finished, it becomes a 200 response with status SUCCESS or FAILURE.", + "summary": "Check issue import status", "responses": { "200": { "description": "Import job complete with either FAILURE or SUCCESS status", @@ -6026,8 +6220,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Check issue import status", "security": [ { "oauth2": ["issue:write", "repository:admin"] @@ -6038,10 +6230,12 @@ { "api_key": [] } - ], - "description": "When using GET, this endpoint reports the status of the current import task. Request example:\n\n```\n$ curl -u -X GET https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nAfter the job has been scheduled, but before it starts executing, this endpoint's response is:\n\n```\n< HTTP/1.1 202 Accepted\n{\n \"type\": \"issue_job_status\",\n \"status\": \"PENDING\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```\n\nOnce it starts running, it is a 202 response with status STARTED and progress filled.\n\nAfter it is finished, it becomes a 200 response with status SUCCESS or FAILURE." + ] }, "post": { + "tags": ["Issue tracker"], + "description": "A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All\nexisting issues will be deleted and replaced by the contents of the imported zip file.\n\nImports are done through a multipart/form-data POST. There is one valid and required form field, with the name\n\"archive,\" which needs to be a file field:\n\n```\n$ curl -u -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nWhen the import job is accepted, here is example output:\n\n```\n< HTTP/1.1 202 Accepted\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```", + "summary": "Import issues", "responses": { "202": { "description": "Import job accepted", @@ -6094,8 +6288,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Import issues", "security": [ { "oauth2": ["issue:write", "repository:admin"] @@ -6106,8 +6298,7 @@ { "api_key": [] } - ], - "description": "A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All\nexisting issues will be deleted and replaced by the contents of the imported zip file.\n\nImports are done through a multipart/form-data POST. There is one valid and required form field, with the name\n\"archive,\" which needs to be a file field:\n\n```\n$ curl -u -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nWhen the import job is accepted, here is example output:\n\n```\n< HTTP/1.1 202 Accepted\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```" + ] }, "parameters": [ { @@ -6132,6 +6323,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}": { "delete": { + "tags": ["Issue tracker"], + "description": "Deletes the specified issue. This requires write access to the\nrepository.", + "summary": "Delete an issue", "responses": { "200": { "description": "The issue object.", @@ -6164,8 +6358,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Delete an issue", "security": [ { "oauth2": ["issue:write"] @@ -6176,10 +6368,12 @@ { "api_key": [] } - ], - "description": "Deletes the specified issue. This requires write access to the\nrepository." + ] }, "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue.", + "summary": "Get an issue", "responses": { "200": { "description": "The issue object.", @@ -6222,8 +6416,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get an issue", "security": [ { "oauth2": ["issue"] @@ -6234,10 +6426,12 @@ { "api_key": [] } - ], - "description": "Returns the specified issue." + ] }, "put": { + "tags": ["Issue tracker"], + "description": "Modifies the issue.\n\n```\n$ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \\\n -u evzijst -s -X PUT -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Updated title\",\n \"assignee\": {\n \"account_id\": \"5d5355e8c6b9320d9ea5b28d\"\n },\n \"priority\": \"minor\",\n \"version\": {\n \"name\": \"1.0\"\n },\n \"component\": null\n}'\n```\n\nThis example changes the `title`, `assignee`, `priority` and the\n`version`. It also removes the value of the `component` from the issue\nby setting the field to `null`. Any field not present keeps its existing\nvalue.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change.", + "summary": "Update an issue", "responses": { "200": { "description": "The updated issue object.", @@ -6270,8 +6464,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Update an issue", "security": [ { "oauth2": ["issue:write"] @@ -6282,8 +6474,7 @@ { "api_key": [] } - ], - "description": "Modifies the issue.\n\n```\n$ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \\\n -u evzijst -s -X PUT -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Updated title\",\n \"assignee\": {\n \"username\": \"evzijst\"\n },\n \"priority\": \"minor\",\n \"version\": {\n \"name\": \"1.0\"\n },\n \"component\": null\n}'\n```\n\nThis example changes the `title`, `assignee`, `priority` and the\n`version`. It also removes the value of the `component` from the issue\nby setting the field to `null`. Any field not present keeps its existing\nvalue.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change." + ] }, "parameters": [ { @@ -6317,6 +6508,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments": { "get": { + "tags": ["Issue tracker"], + "description": "Returns all attachments for this issue.\n\nThis returns the files' meta data. This does not return the files'\nactual contents.\n\nThe files are always ordered by their upload date.", + "summary": "List attachments for an issue", "responses": { "200": { "description": "A paginated list of all attachments for this issue.", @@ -6342,8 +6536,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "List attachments for an issue", "security": [ { "oauth2": ["issue"] @@ -6354,10 +6546,12 @@ { "api_key": [] } - ], - "description": "Returns all attachments for this issue.\n\nThis returns the files' meta data. This does not return the files'\nactual contents.\n\nThe files are always ordered by their upload date." + ] }, "post": { + "tags": ["Issue tracker"], + "description": "Upload new issue attachments.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more file fields.\n\nWhen a file is uploaded with the same name as an existing attachment,\nthen the existing file will be replaced.", + "summary": "Upload an attachment to an issue", "responses": { "201": { "description": "An empty response document.", @@ -6387,8 +6581,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Upload an attachment to an issue", "security": [ { "oauth2": ["issue:write"] @@ -6399,8 +6591,7 @@ { "api_key": [] } - ], - "description": "Upload new issue attachments.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more file fields.\n\nWhen a file is uploaded with the same name as an existing attachment,\nthen the existing file will be replaced." + ] }, "parameters": [ { @@ -6434,6 +6625,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}": { "delete": { + "tags": ["Issue tracker"], + "description": "Deletes an attachment.", + "summary": "Delete an attachment for an issue", "responses": { "204": { "description": "Indicates that the deletion was successful" @@ -6452,8 +6646,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Delete an attachment for an issue", "security": [ { "oauth2": ["issue:write"] @@ -6464,10 +6656,12 @@ { "api_key": [] } - ], - "description": "Deletes an attachment." + ] }, "get": { + "tags": ["Issue tracker"], + "description": "Returns the contents of the specified file attachment.\n\nNote that this endpoint does not return a JSON response, but instead\nreturns a redirect pointing to the actual file that in turn will return\nthe raw contents.\n\nThe redirect URL contains a one-time token that has a limited lifetime.\nAs a result, the link should not be persisted, stored, or shared.", + "summary": "Get attachment for an issue", "responses": { "302": { "description": "A redirect to the file's contents", @@ -6493,8 +6687,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get attachment for an issue", "security": [ { "oauth2": ["issue"] @@ -6505,8 +6697,7 @@ { "api_key": [] } - ], - "description": "Returns the contents of the specified file attachment.\n\nNote that this endpoint does not return a JSON response, but instead\nreturns a redirect pointing to the actual file that in turn will return\nthe raw contents.\n\nThe redirect URL contains a one-time token that has a limited lifetime.\nAs a result, the link should not be persisted, stored, or shared." + ] }, "parameters": [ { @@ -6549,6 +6740,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the list of all changes that have been made to the specified\nissue. Changes are returned in chronological order with the oldest\nchange first.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change.\n\nNote that this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api)\nfor details.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes - | jq .\n\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"changes\": {\n \"priority\": {\n \"new\": \"trivial\",\n \"old\": \"major\"\n },\n \"assignee\": {\n \"new\": \"\",\n \"old\": \"evzijst\"\n },\n \"assignee_account_id\": {\n \"new\": \"\",\n \"old\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"kind\": {\n \"new\": \"enhancement\",\n \"old\": \"bug\"\n }\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/issues/1#comment-2\"\n }\n },\n \"issue\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1\"\n }\n },\n \"type\": \"issue\",\n \"id\": 1,\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"dogslow\",\n \"full_name\": \"evzijst/dogslow\",\n \"uuid\": \"{988b17c6-1a47-4e70-84ee-854d5f012bf6}\"\n },\n \"title\": \"Updated title\"\n },\n \"created_on\": \"2018-03-03T00:35:28.353630+00:00\",\n \"user\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"evzijst\",\n \"type\": \"user\",\n \"uuid\": \"{aaa7972b-38af-4fb1-802d-6e3854c95778}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/evzijst/avatar/32/\"\n }\n }\n },\n \"message\": {\n \"raw\": \"Removed assignee, changed kind and priority.\",\n \"markup\": \"markdown\",\n \"html\": \"

Removed assignee, changed kind and priority.

\",\n \"type\": \"rendered\"\n },\n \"type\": \"issue_change\",\n \"id\": 2\n }\n ],\n \"page\": 1\n}\n```\n\nChanges support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) that\ncan be used to search for specific changes. For instance, to see\nwhen an issue transitioned to \"resolved\":\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \\\n -G --data-urlencode='q=changes.state.new = \"resolved\"'\n```\n\nThis resource is only available on repositories that have the issue\ntracker enabled.\n\nN.B.\n\nThe `changes.assignee` and `changes.assignee_account_id` fields are not\na `user` object. Instead, they contain the raw `username` and\n`account_id` of the user. This is to protect the integrity of the audit\nlog even after a user account gets deleted.\n\nThe `changes.assignee` field is deprecated will disappear in the\nfuture. Use `changes.assignee_account_id` instead.", + "summary": "List changes on an issue", "responses": { "200": { "description": "Returns all the issue changes that were made on the specified issue.", @@ -6591,8 +6785,6 @@ } } ], - "tags": ["Issue tracker"], - "summary": "List changes on an issue", "security": [ { "oauth2": ["issue"] @@ -6603,10 +6795,12 @@ { "api_key": [] } - ], - "description": "Returns the list of all changes that have been made to the specified\nissue. Changes are returned in chronological order with the oldest\nchange first.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change.\n\nNote that this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api)\nfor details.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes - | jq .\n\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"changes\": {\n \"priority\": {\n \"new\": \"trivial\",\n \"old\": \"major\"\n },\n \"assignee\": {\n \"new\": \"\",\n \"old\": \"evzijst\"\n },\n \"assignee_account_id\": {\n \"new\": \"\",\n \"old\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"kind\": {\n \"new\": \"enhancement\",\n \"old\": \"bug\"\n }\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/issues/1#comment-2\"\n }\n },\n \"issue\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1\"\n }\n },\n \"type\": \"issue\",\n \"id\": 1,\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"dogslow\",\n \"full_name\": \"evzijst/dogslow\",\n \"uuid\": \"{988b17c6-1a47-4e70-84ee-854d5f012bf6}\"\n },\n \"title\": \"Updated title\"\n },\n \"created_on\": \"2018-03-03T00:35:28.353630+00:00\",\n \"user\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"evzijst\",\n \"type\": \"user\",\n \"uuid\": \"{aaa7972b-38af-4fb1-802d-6e3854c95778}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/evzijst/avatar/32/\"\n }\n }\n },\n \"message\": {\n \"raw\": \"Removed assignee, changed kind and priority.\",\n \"markup\": \"markdown\",\n \"html\": \"

Removed assignee, changed kind and priority.

\",\n \"type\": \"rendered\"\n },\n \"type\": \"issue_change\",\n \"id\": 2\n }\n ],\n \"page\": 1\n}\n```\n\nChanges support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) that\ncan be used to search for specific changes. For instance, to see\nwhen an issue transitioned to \"resolved\":\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \\\n -G --data-urlencode='q=changes.state.new = \"resolved\"'\n```\n\nThis resource is only available on repositories that have the issue\ntracker enabled.\n\nN.B.\n\nThe `changes.assignee` and `changes.assignee_account_id` fields are not\na `user` object. Instead, they contain the raw `username` and\n`account_id` of the user. This is to protect the integrity of the audit\nlog even after a user account gets deleted.\n\nThe `changes.assignee` field is deprecated will disappear in the\nfuture. Use `changes.assignee_account_id` instead." + ] }, "post": { + "tags": ["Issue tracker"], + "description": "Makes a change to the specified issue.\n\nFor example, to change an issue's state and assignee, create a new\nchange object that modifies these fields:\n\n```\ncurl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \\\n -s -u evzijst -X POST -H \"Content-Type: application/json\" \\\n -d '{\n \"changes\": {\n \"assignee_account_id\": {\n \"new\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"state\": {\n \"new\": 'resolved\"\n }\n }\n \"message\": {\n \"raw\": \"This is now resolved.\"\n }\n }'\n```\n\nThe above example also includes a custom comment to go alongside the\nchange. This comment will also be visible on the issue page in the UI.\n\nThe fields of the `changes` object are strings, not objects. This\nallows for immutable change log records, even after user accounts,\nmilestones, or other objects recorded in a change entry, get renamed or\ndeleted.\n\nThe `assignee_account_id` field stores the account id. When POSTing a\nnew change and changing the assignee, the client should therefore use\nthe user's account_id in the `changes.assignee_account_id.new` field.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.", + "summary": "Modify the state of an issue", "responses": { "201": { "description": "The newly created issue change.", @@ -6668,8 +6862,6 @@ "description": "The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body.", "required": true }, - "tags": ["Issue tracker"], - "summary": "Modify the state of an issue", "security": [ { "oauth2": ["issue:write"] @@ -6680,8 +6872,7 @@ { "api_key": [] } - ], - "description": "Makes a change to the specified issue.\n\nFor example, to change an issue's state and assignee, create a new\nchange object that modifies these fields:\n\n```\ncurl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \\\n -s -u evzijst -X POST -H \"Content-Type: application/json\" \\\n -d '{\n \"changes\": {\n \"assignee_account_id\": {\n \"new\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"state\": {\n \"new\": 'resolved\"\n }\n }\n \"message\": {\n \"raw\": \"This is now resolved.\"\n }\n }'\n```\n\nThe above example also includes a custom comment to go alongside the\nchange. This comment will also be visible on the issue page in the UI.\n\nThe fields of the `changes` object are strings, not objects. This\nallows for immutable change log records, even after user accounts,\nmilestones, or other objects recorded in a change entry, get renamed or\ndeleted.\n\nThe `assignee_account_id` field stores the account id. When POSTing a\nnew change and changing the assignee, the client should therefore use\nthe user's account_id in the `changes.assignee_account_id.new` field.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization." + ] }, "parameters": [ { @@ -6715,6 +6906,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue change object.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "Get issue change object", "responses": { "200": { "description": "The specified issue change object.", @@ -6737,8 +6931,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get issue change object", "security": [ { "oauth2": ["issue"] @@ -6749,8 +6941,7 @@ { "api_key": [] } - ], - "description": "Returns the specified issue change object.\n\nThis resource is only available on repositories that have the issue\ntracker enabled." + ] }, "parameters": [ { @@ -6793,6 +6984,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments": { "get": { + "tags": ["Issue tracker"], + "description": "Returns a paginated list of all comments that were made on the\nspecified issue.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List comments on an issue", "responses": { "200": { "description": "A paginated list of issue comments.", @@ -6816,8 +7010,6 @@ } } ], - "tags": ["Issue tracker"], - "summary": "List comments on an issue", "security": [ { "oauth2": ["issue"] @@ -6828,10 +7020,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all comments that were made on the\nspecified issue.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." + ] }, "post": { + "tags": ["Issue tracker"], + "description": "Creates a new issue comment.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}}'\n```", + "summary": "Create a comment on an issue", "responses": { "201": { "description": "The newly created comment.", @@ -6866,8 +7060,6 @@ "description": "The new issue comment object.", "required": true }, - "tags": ["Issue tracker"], - "summary": "Create a comment on an issue", "security": [ { "oauth2": ["issue:write"] @@ -6878,8 +7070,7 @@ { "api_key": [] } - ], - "description": "Creates a new issue comment.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}}'\n```" + ] }, "parameters": [ { @@ -6913,16 +7104,14 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}": { "delete": { + "tags": ["Issue tracker"], + "description": "Deletes the specified comment.", + "summary": "Delete a comment on an issue", "responses": { "204": { "description": "Indicates successful deletion." } }, - "requestBody": { - "$ref": "#/components/requestBodies/issue_comment" - }, - "tags": ["Issue tracker"], - "summary": "Delete a comment on an issue", "security": [ { "oauth2": ["issue:write"] @@ -6933,10 +7122,12 @@ { "api_key": [] } - ], - "description": "Deletes the specified comment." + ] }, "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue comment object.", + "summary": "Get a comment on an issue", "responses": { "200": { "description": "The issue comment.", @@ -6949,8 +7140,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get a comment on an issue", "security": [ { "oauth2": ["issue"] @@ -6961,10 +7150,12 @@ { "api_key": [] } - ], - "description": "Returns the specified issue comment object." + ] }, "put": { + "tags": ["Issue tracker"], + "description": "Updates the content of the specified issue comment. Note that only\nthe `content.raw` field can be modified.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}'\n```", + "summary": "Update a comment on an issue", "responses": { "200": { "description": "The updated issue comment.", @@ -6988,10 +7179,16 @@ } }, "requestBody": { - "$ref": "#/components/requestBodies/issue_comment" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_comment" + } + } + }, + "description": "The updated comment.", + "required": true }, - "tags": ["Issue tracker"], - "summary": "Update a comment on an issue", "security": [ { "oauth2": ["issue:write"] @@ -7002,8 +7199,7 @@ { "api_key": [] } - ], - "description": "Updates the content of the specified issue comment. Note that only\nthe `content.raw` field can be modified.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}'\n```" + ] }, "parameters": [ { @@ -7046,6 +7242,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote": { "delete": { + "tags": ["Issue tracker"], + "description": "Retract your vote.", + "summary": "Remove vote for an issue", "responses": { "default": { "description": "Unexpected error.", @@ -7058,8 +7257,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Remove vote for an issue", "security": [ { "oauth2": ["account:write", "issue:write"] @@ -7070,10 +7267,12 @@ { "api_key": [] } - ], - "description": "Retract your vote." + ] }, "get": { + "tags": ["Issue tracker"], + "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't.", + "summary": "Check if current user voted for an issue", "responses": { "204": { "description": "If the authenticated user has not voted for this issue.", @@ -7106,8 +7305,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Check if current user voted for an issue", "security": [ { "oauth2": ["account", "issue"] @@ -7118,10 +7315,12 @@ { "api_key": [] } - ], - "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't." + ] }, "put": { + "tags": ["Issue tracker"], + "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful.", + "summary": "Vote for an issue", "responses": { "204": { "description": "Indicating the authenticated user has cast their vote successfully.", @@ -7154,8 +7353,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Vote for an issue", "security": [ { "oauth2": ["account:write", "issue"] @@ -7166,8 +7363,7 @@ { "api_key": [] } - ], - "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful." + ] }, "parameters": [ { @@ -7201,6 +7397,9 @@ }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch": { "delete": { + "tags": ["Issue tracker"], + "description": "Stop watching this issue.", + "summary": "Stop watching an issue", "responses": { "204": { "description": "Indicates that the authenticated user successfully stopped watching this issue.", @@ -7233,8 +7432,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Stop watching an issue", "security": [ { "oauth2": ["account:write", "issue:write"] @@ -7245,10 +7442,12 @@ { "api_key": [] } - ], - "description": "Stop watching this issue." + ] }, "get": { + "tags": ["Issue tracker"], + "description": "Indicated whether or not the authenticated user is watching this\nissue.", + "summary": "Check if current user is watching a issue", "responses": { "204": { "description": "If the authenticated user is watching this issue.", @@ -7281,8 +7480,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Check if current user is watching a issue", "security": [ { "oauth2": ["account", "issue"] @@ -7293,10 +7490,12 @@ { "api_key": [] } - ], - "description": "Indicated whether or not the authenticated user is watching this\nissue." + ] }, "put": { + "tags": ["Issue tracker"], + "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful.", + "summary": "Watch an issue", "responses": { "204": { "description": "Indicates that the authenticated user successfully started watching this issue.", @@ -7329,8 +7528,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Watch an issue", "security": [ { "oauth2": ["account:write", "issue"] @@ -7341,8 +7538,7 @@ { "api_key": [] } - ], - "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful." + ] }, "parameters": [ { @@ -7376,6 +7572,9 @@ }, "/repositories/{workspace}/{repo_slug}/merge-base/{revspec}": { "get": { + "tags": ["Commits"], + "description": "Returns the best common ancestor between two commits, specified in a revspec\nof 2 commits (e.g. 3a8b42..9ff173).\n\nIf more than one best common ancestor exists, only one will be returned. It is\nunspecified which will be returned.", + "summary": "Get the common ancestor between two commits", "responses": { "200": { "description": "The merge base of the provided spec.", @@ -7418,8 +7617,6 @@ } } }, - "tags": ["Commits"], - "summary": "Get the common ancestor between two commits", "security": [ { "oauth2": ["repository"] @@ -7430,8 +7627,7 @@ { "api_key": [] } - ], - "description": "Returns the best common ancestor between two commits, specified in a revspec\nof 2 commits (e.g. 3a8b42..9ff173).\n\nIf more than one best common ancestor exists, only one will be returned. It is\nunspecified which will be returned." + ] }, "parameters": [ { @@ -7465,6 +7661,9 @@ }, "/repositories/{workspace}/{repo_slug}/milestones": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List milestones", "responses": { "200": { "description": "The milestones that have been defined in the issue tracker.", @@ -7487,8 +7686,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "List milestones", "security": [ { "oauth2": ["issue"] @@ -7499,8 +7696,7 @@ { "api_key": [] } - ], - "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled." + ] }, "parameters": [ { @@ -7525,6 +7721,9 @@ }, "/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker milestone object.", + "summary": "Get a milestone", "responses": { "200": { "description": "The specified milestone object.", @@ -7547,8 +7746,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get a milestone", "security": [ { "oauth2": ["issue"] @@ -7559,8 +7756,7 @@ { "api_key": [] } - ], - "description": "Returns the specified issue tracker milestone object." + ] }, "parameters": [ { @@ -7594,6 +7790,9 @@ }, "/repositories/{workspace}/{repo_slug}/patch/{spec}": { "get": { + "tags": ["Commits"], + "description": "Produces a raw patch for a single commit (diffed against its first\nparent), or a patch-series for a revspec of 2 commits (e.g.\n`3a8b42..9ff173` where the first commit represents the source and the\nsecond commit the destination).\n\nIn case of the latter (diffing a revspec), a patch series is returned\nfor the commits on the source branch (`3a8b42` and its ancestors in\nour example).\n\nWhile similar to diffs, patches:\n\n* Have a commit header (username, commit message, etc)\n* Do not support the `path=foo/bar.py` query parameter\n\nThe raw patch is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`.", + "summary": "Get a patch for two commits", "responses": { "200": { "description": "The raw patches" @@ -7609,8 +7808,6 @@ } } }, - "tags": ["Commits"], - "summary": "Get a patch for two commits", "security": [ { "oauth2": ["repository"] @@ -7621,8 +7818,7 @@ { "api_key": [] } - ], - "description": "Produces a raw patch for a single commit (diffed against its first\nparent), or a patch-series for a revspec of 2 commits (e.g.\n`3a8b42..9ff173` where the first commit represents the source and the\nsecond commit the destination).\n\nIn case of the latter (diffing a revspec), a patch series is returned\nfor the commits on the source branch (`3a8b42` and its ancestors in\nour example).\n\nWhile similar to diffs, patches:\n\n* Have a commit header (username, commit message, etc)\n* Do not support the `path=foo/bar.py` query parameter\n\nThe raw patch is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`." + ] }, "parameters": [ { @@ -7656,6 +7852,9 @@ }, "/repositories/{workspace}/{repo_slug}/permissions-config/groups": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of explicit group permissions for the given repository.\nThis endpoint does not support BBQL features.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\nHTTP/1.1 200\nLocation: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Administrators\",\n \"slug\": \"administrators\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/administrators\"\n }\n }\n },\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/developers\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "summary": "List explicit group permissions for a repository", "responses": { "200": { "description": "Paginated of explicit group permissions on the repository.", @@ -7698,8 +7897,6 @@ } } }, - "tags": ["Repositories"], - "summary": "List explicit group permissions for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -7710,8 +7907,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of explicit group permissions for the given repository.\nThis endpoint does not support BBQL features.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\nHTTP/1.1 200\nLocation: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Administrators\",\n \"slug\": \"administrators\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/administrators\"\n }\n }\n },\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/developers\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```" + ] }, "parameters": [ { @@ -7736,6 +7932,9 @@ }, "/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}": { "delete": { + "tags": ["Repositories"], + "description": "Deletes the repository group permission between the requested repository and group, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nExample:\n\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial\n/geordi/permissions-config/groups/developers\n\n\nHTTP/1.1 204", + "summary": "Delete an explicit group permission for a repository", "responses": { "204": { "description": "Group permission deleted" @@ -7771,8 +7970,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Delete an explicit group permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -7783,10 +7980,12 @@ { "api_key": [] } - ], - "description": "Deletes the repository group permission between the requested repository and group, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nExample:\n\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial\n/geordi/permissions-config/groups/developers\n\n\nHTTP/1.1 204" + ] }, "get": { + "tags": ["Repositories"], + "description": "Returns the group permission for a given group slug and repository\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```", + "summary": "Get an explicit group permission for a repository", "responses": { "200": { "description": "Group permission for group slug and repository", @@ -7829,8 +8028,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Get an explicit group permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -7841,10 +8038,12 @@ { "api_key": [] } - ], - "description": "Returns the group permission for a given group slug and repository\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```" + ] }, "put": { + "tags": ["Repositories"], + "description": "Updates the group permission if it exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method supported for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\"\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n-d\n'{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```", + "summary": "Update an explicit group permission for a repository", "responses": { "200": { "description": "Group permission updated", @@ -7897,8 +8096,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Update an explicit group permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -7909,8 +8106,7 @@ { "api_key": [] } - ], - "description": "Updates the group permission if it exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method supported for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\"\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n-d\n'{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```" + ] }, "parameters": [ { @@ -7944,6 +8140,9 @@ }, "/repositories/{workspace}/{repo_slug}/permissions-config/users": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of explicit user permissions for the given repository.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n },\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "summary": "List explicit user permissions for a repository", "responses": { "200": { "description": "Paginated of explicit user permissions on the repository.", @@ -7986,8 +8185,6 @@ } } }, - "tags": ["Repositories"], - "summary": "List explicit user permissions for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -7998,8 +8195,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of explicit user permissions for the given repository.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n },\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```" + ] }, "parameters": [ { @@ -8024,6 +8220,9 @@ }, "/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}": { "delete": { + "tags": ["Repositories"], + "description": "Deletes the repository user permission between the requested repository and user, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\n\n\nHTTP/1.1 204\n```", + "summary": "Delete an explicit user permission for a repository", "responses": { "204": { "description": "The repository user permission was deleted and no content returned." @@ -8059,8 +8258,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Delete an explicit user permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -8071,10 +8268,12 @@ { "api_key": [] } - ], - "description": "Deletes the repository user permission between the requested repository and user, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\n\n\nHTTP/1.1 204\n```" + ] }, "get": { + "tags": ["Repositories"], + "description": "Returns the explicit user permission for a given user and repository.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```", + "summary": "Get an explicit user permission for a repository", "responses": { "200": { "description": "Explicit user permission for user and repository", @@ -8117,8 +8316,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Get an explicit user permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -8129,10 +8326,12 @@ { "api_key": [] } - ], - "description": "Returns the explicit user permission for a given user and repository.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```" + ] }, "put": { + "tags": ["Repositories"], + "description": "Updates the explicit user permission for a given user and repository. The selected user must be a member of\nthe workspace, and cannot be the workspace owner.\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl -X PUT -H \"Content-Type: application/json\" 'https://api.bitbucket.org/2.0/repositories/\natlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n-d '{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```", + "summary": "Update an explicit user permission for a repository", "responses": { "200": { "description": "Explicit user permission updated", @@ -8185,8 +8384,6 @@ } } }, - "tags": ["Repositories"], - "summary": "Update an explicit user permission for a repository", "security": [ { "oauth2": ["repository:admin"] @@ -8197,8 +8394,7 @@ { "api_key": [] } - ], - "description": "Updates the explicit user permission for a given user and repository. The selected user must be a member of\nthe workspace, and cannot be the workspace owner.\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl -X PUT -H \"Content-Type: application/json\" 'https://api.bitbucket.org/2.0/repositories/\natlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n-d '{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```" + ] }, "parameters": [ { @@ -8232,6 +8428,30 @@ }, "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/": { "get": { + "tags": ["Pipelines"], + "summary": "List caches", + "description": "Retrieve the repository pipelines caches.", + "operationId": "getRepositoryPipelineCaches", + "parameters": [ + { + "name": "workspace", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "The list of caches for the given repository.", @@ -8253,35 +8473,44 @@ } } } - }, - "description": "Retrieve the repository pipelines caches.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { + "delete": { + "tags": ["Pipelines"], + "summary": "Delete a cache", + "description": "Delete a repository cache.", + "operationId": "deleteRepositoryPipelineCache", "parameters": [ { + "name": "workspace", "description": "The account.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cache_uuid", + "description": "The UUID of the cache to delete.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "List caches", - "operationId": "getRepositoryPipelineCaches" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { - "delete": { "responses": { "204": { "description": "The cache was deleted." @@ -8296,44 +8525,44 @@ } } } - }, - "description": "Delete a repository cache.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { + "get": { + "tags": ["Pipelines"], + "summary": "Get cache content URI", + "description": "Retrieve the URI of the content of the specified cache.", + "operationId": "getRepositoryPipelineCacheContentURI", "parameters": [ { + "name": "workspace", "description": "The account.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the cache to delete.", - "required": true, "name": "cache_uuid", + "description": "The UUID of the cache.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Delete a cache", - "operationId": "deleteRepositoryPipelineCache" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { - "get": { "responses": { "200": { "description": "The cache content uri.", @@ -8355,46 +8584,87 @@ } } } - }, - "description": "Retrieve the URI of the content of the specified cache.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/": { + "get": { + "tags": ["Pipelines"], + "summary": "List pipelines", + "description": "Find pipelines", + "operationId": "getPipelinesForRepository", "parameters": [ { - "description": "The account.", - "required": true, "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the cache.", - "required": true, - "name": "cache_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get cache content URI", - "operationId": "getRepositoryPipelineCacheContentURI" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/": { + "responses": { + "200": { + "description": "The matching pipelines.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipelines" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "summary": "Run a pipeline", + "description": "Endpoint to create and initiate a pipeline.\nThere are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.\n# Trigger a Pipeline for a branch\nOne way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline.\nThe specified branch will be used to determine which pipeline definition from the `bitbucket-pipelines.yml` file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a Pipeline for a commit on a branch or tag\nYou can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark).\nThe specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.\n\nThe following reference types are supported:\n\n* `branch`\n* `named_branch`\n* `bookmark`\n * `tag`\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ce5b7431602f7cbba007062eeb55225c6e18e956\"\n },\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\":\"custom\",\n \"pattern\":\"Deploy to production\"\n },\n \"type\":\"pipeline_commit_target\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit on a branch or tag\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit in the context of a specified reference.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n },\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\",\n \"ref_type\": \"branch\"\n }\n }'\n```\n\n\n# Trigger a custom pipeline with variables\nIn addition to triggering a custom pipeline that is defined in your `bitbucket-pipelines.yml` file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n \"target\": {\n \"type\": \"pipeline_ref_target\",\n \"ref_type\": \"branch\",\n \"ref_name\": \"master\",\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n }\n },\n \"variables\": [\n {\n \"key\": \"var1key\",\n \"value\": \"var1value\",\n \"secured\": true\n },\n {\n \"key\": \"var2key\",\n \"value\": \"var2value\"\n }\n ]\n }'\n```\n\n# Trigger a pull request pipeline\n\nYou can also initiate a pipeline for a specific pull request.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n\t\"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n\t \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \t \"hash\" : \"9f848b7\"\n },\n \"commit\": {\n \t\"hash\" : \"1a372fc\"\n },\n \"pullrequest\" : {\n \t\"id\" : \"3\"\n },\n\t \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n", + "operationId": "createPipelineForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline" + } + } + }, + "description": "The pipeline to initiate.", + "required": true + }, "responses": { "201": { + "description": "The initiated pipeline.", "headers": { "Location": { "description": "The URL of the newly created pipeline.", @@ -8403,7 +8673,6 @@ } } }, - "description": "The initiated pipeline.", "content": { "application/json": { "schema": { @@ -8432,84 +8701,44 @@ } } } - }, - "description": "Endpoint to create and initiate a pipeline.\nThere are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.\n# Trigger a Pipeline for a branch\nOne way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline.\nThe specified branch will be used to determine which pipeline definition from the `bitbucket-pipelines.yml` file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a Pipeline for a commit on a branch or tag\nYou can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark).\nThe specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.\n\nThe following reference types are supported:\n\n* `branch`\n* `named_branch`\n* `bookmark`\n * `tag`\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ce5b7431602f7cbba007062eeb55225c6e18e956\"\n },\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\":\"custom\",\n \"pattern\":\"Deploy to production\"\n },\n \"type\":\"pipeline_commit_target\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit on a branch or tag\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit in the context of a specified reference.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n },\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\",\n \"ref_type\": \"branch\"\n }\n }'\n```\n\n\n# Trigger a custom pipeline with variables\nIn addition to triggering a custom pipeline that is defined in your `bitbucket-pipelines.yml` file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n \"target\": {\n \"type\": \"pipeline_ref_target\",\n \"ref_type\": \"branch\",\n \"ref_name\": \"master\",\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n }\n },\n \"variables\": [\n {\n \"key\": \"var1key\",\n \"value\": \"var1value\",\n \"secured\": true\n },\n {\n \"key\": \"var2key\",\n \"value\": \"var2value\"\n }\n ]\n }'\n```\n\n# Trigger a pull request pipeline\n\nYou can also initiate a pipeline for a specific pull request.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n\t\"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n\t \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \t \"hash\" : \"9f848b7\"\n },\n \"commit\": {\n \t\"hash\" : \"1a372fc\"\n },\n \"pullrequest\" : {\n \t\"id\" : \"3\"\n },\n\t \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline" - } - } - }, - "description": "The pipeline to initiate.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Run a pipeline", - "operationId": "createPipelineForRepository" - }, - "get": { - "responses": { - "200": { - "description": "The matching pipelines.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipelines" - } - } - } - } - }, - "description": "Find pipelines", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List pipelines", - "operationId": "getPipelinesForRepository" + } } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}": { "get": { + "tags": ["Pipelines"], + "summary": "Get a pipeline", + "description": "Retrieve a specified pipeline", + "operationId": "getPipelineForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The pipeline UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "The pipeline.", @@ -8531,44 +8760,44 @@ } } } - }, - "description": "Retrieve a specified pipeline", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/": { + "get": { + "tags": ["Pipelines"], + "summary": "List steps for a pipeline", + "description": "Find steps for the given pipeline.", + "operationId": "getPipelineStepsForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The pipeline UUID.", - "required": true, "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a pipeline", - "operationId": "getPipelineForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/": { - "get": { "responses": { "200": { "description": "The steps.", @@ -8580,44 +8809,53 @@ } } } - }, - "description": "Find steps for the given pipeline.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a step of a pipeline", + "description": "Retrieve a given step of a pipeline.", + "operationId": "getPipelineStepForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "List steps for a pipeline", - "operationId": "getPipelineStepsForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { - "get": { "responses": { "200": { "description": "The step.", @@ -8639,53 +8877,53 @@ } } } - }, - "description": "Retrieve a given step of a pipeline.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { + "get": { + "tags": ["Pipelines"], + "summary": "Get log file for a step", + "description": "Retrieve the log file for a given step of a pipeline.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.", + "operationId": "getPipelineStepLogForRepository", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } }, { + "name": "step_uuid", "description": "The UUID of the step.", "required": true, - "name": "step_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a step of a pipeline", - "operationId": "getPipelineStepForRepository" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { - "get": { "responses": { "200": { "description": "The raw log file for this pipeline step." @@ -8720,53 +8958,62 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get the logs for the build container or a service container for a given step of a pipeline.", + "description": "Retrieve the log file for a build container or service container.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.", + "operationId": "getPipelineContainerLog", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } }, { + "name": "step_uuid", "description": "The UUID of the step.", "required": true, - "name": "step_uuid", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "log_uuid", + "description": "For the main build container specify the step UUID; for a service container specify the service container UUID", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get log file for a step", - "operationId": "getPipelineStepLogForRepository", - "description": "Retrieve the log file for a given step of a pipeline.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files." - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { - "get": { "responses": { "200": { "description": "The raw log file for the build container or service container." @@ -8781,62 +9028,52 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a summary of test reports for a given step of a pipeline.", + "operationId": "getPipelineTestReports", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } }, { + "name": "step_uuid", "description": "The UUID of the step.", "required": true, - "name": "step_uuid", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "For the main build container specify the step UUID; for a service container specify the service container UUID", - "required": true, - "name": "log_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get the logs for the build container or a service container for a given step of a pipeline.", - "operationId": "getPipelineContainerLog", - "description": "Retrieve the log file for a build container or service container.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files." - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { - "get": { "responses": { "200": { "description": "A summary of test reports for this pipeline step." @@ -8851,52 +9088,52 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { + "get": { + "tags": ["Pipelines"], + "summary": "Get test cases for a given step of a pipeline.", + "operationId": "getPipelineTestReportTestCases", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } }, { + "name": "step_uuid", "description": "The UUID of the step.", "required": true, - "name": "step_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a summary of test reports for a given step of a pipeline.", - "operationId": "getPipelineTestReports" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { - "get": { "responses": { "200": { "description": "Test cases for this pipeline step." @@ -8911,52 +9148,61 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { + "get": { + "tags": ["Pipelines"], + "summary": "Get test case reasons (output) for a given test case in a step of a pipeline.", + "operationId": "getPipelineTestReportTestCaseReasons", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } }, { + "name": "step_uuid", "description": "The UUID of the step.", "required": true, - "name": "step_uuid", + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "test_case_uuid", + "description": "The UUID of the test case.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get test cases for a given step of a pipeline.", - "operationId": "getPipelineTestReportTestCases" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { - "get": { "responses": { "200": { "description": "Test case reasons (output)." @@ -8971,61 +9217,44 @@ } } } - }, + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { + "post": { + "tags": ["Pipelines"], + "summary": "Stop a pipeline", + "description": "Signal the stop of a pipeline and all of its steps that not have completed yet.", + "operationId": "stopPipeline", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "pipeline_uuid", "description": "The UUID of the pipeline.", "required": true, - "name": "pipeline_uuid", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the step.", - "required": true, - "name": "step_uuid", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the test case.", - "required": true, - "name": "test_case_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get test case reasons (output) for a given test case in a step of a pipeline.", - "operationId": "getPipelineTestReportTestCaseReasons" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { - "post": { "responses": { "204": { "description": "The pipeline has been signaled to stop." @@ -9050,47 +9279,38 @@ } } } - }, - "description": "Signal the stop of a pipeline and all of its steps that not have completed yet.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config": { + "get": { + "tags": ["Pipelines"], + "summary": "Get configuration", + "description": "Retrieve the repository pipelines configuration.", + "operationId": "getRepositoryPipelineConfig", "parameters": [ { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, "name": "workspace", + "description": "The account.", + "required": true, "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the pipeline.", - "required": true, - "name": "pipeline_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Stop a pipeline", - "operationId": "stopPipeline" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config": { - "put": { "responses": { "200": { - "description": "The repository pipelines configuration was updated.", + "description": "The repository pipelines configuration.", "content": { "application/json": { "schema": { @@ -9099,22 +9319,27 @@ } } } - }, + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update configuration", "description": "Update the pipelines configuration for a repository.", + "operationId": "updateRepositoryPipelineConfig", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" @@ -9132,14 +9357,9 @@ "description": "The updated repository pipelines configuration.", "required": true }, - "tags": ["Pipelines"], - "summary": "Update configuration", - "operationId": "updateRepositoryPipelineConfig" - }, - "get": { "responses": { "200": { - "description": "The repository pipelines configuration.", + "description": "The repository pipelines configuration was updated.", "content": { "application/json": { "schema": { @@ -9148,35 +9368,46 @@ } } } - }, - "description": "Retrieve the repository pipelines configuration.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { + "put": { + "tags": ["Pipelines"], + "summary": "Update the next build number", + "description": "Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.", + "operationId": "updateRepositoryBuildNumber", "parameters": [ { - "description": "The account.", - "required": true, "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get configuration", - "operationId": "getRepositoryPipelineConfig" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { - "put": { + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_build_number" + } + } + }, + "description": "The build number to update.", + "required": true + }, "responses": { "200": { "description": "The build number has been configured.", @@ -9208,22 +9439,29 @@ } } } - }, - "description": "Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/": { + "post": { + "tags": ["Pipelines"], + "summary": "Create a schedule", + "description": "Create a schedule for the given repository.", + "operationId": "createRepositoryPipelineSchedule", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" @@ -9234,20 +9472,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/pipeline_build_number" + "$ref": "#/components/schemas/pipeline_schedule" } } }, - "description": "The build number to update.", + "description": "The schedule to create.", "required": true }, - "tags": ["Pipelines"], - "summary": "Update the next build number", - "operationId": "updateRepositoryBuildNumber" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/": { - "post": { "responses": { "201": { "description": "The created schedule.", @@ -9289,44 +9520,33 @@ } } } - }, - "description": "Create a schedule for the given repository.", + } + }, + "get": { + "tags": ["Pipelines"], + "summary": "List schedules", + "description": "Retrieve the configured schedules for the given repository.", + "operationId": "getRepositoryPipelineSchedules", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_schedule" - } - } - }, - "description": "The schedule to create.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Create a schedule", - "operationId": "createRepositoryPipelineSchedule" - }, - "get": { "responses": { "200": { "description": "The list of schedules.", @@ -9348,103 +9568,44 @@ } } } - }, - "description": "Retrieve the configured schedules for the given repository.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List schedules", - "operationId": "getRepositoryPipelineSchedules" + } } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { - "put": { - "responses": { - "200": { - "description": "The schedule is updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_schedule" - } - } - } - }, - "404": { - "description": "The account, repository or schedule was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "description": "Update a schedule.", + "get": { + "tags": ["Pipelines"], + "summary": "Get a schedule", + "description": "Retrieve a schedule by its UUID.", + "operationId": "getRepositoryPipelineSchedule", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "schedule_uuid", "description": "The uuid of the schedule.", "required": true, - "name": "schedule_uuid", "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_schedule" - } - } - }, - "description": "The schedule to update.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Update a schedule", - "operationId": "updateRepositoryPipelineSchedule" - }, - "get": { "responses": { "200": { "description": "The requested schedule.", @@ -9466,42 +9627,110 @@ } } } - }, - "description": "Retrieve a schedule by its UUID.", + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a schedule", + "description": "Update a schedule.", + "operationId": "updateRepositoryPipelineSchedule", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "schedule_uuid", "description": "The uuid of the schedule.", "required": true, - "name": "schedule_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a schedule", - "operationId": "getRepositoryPipelineSchedule" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule" + } + } + }, + "description": "The schedule to update.", + "required": true + }, + "responses": { + "200": { + "description": "The schedule is updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule" + } + } + } + }, + "404": { + "description": "The account, repository or schedule was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "summary": "Delete a schedule", + "description": "Delete a schedule.", + "operationId": "deleteRepositoryPipelineSchedule", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "schedule_uuid", + "description": "The uuid of the schedule.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The schedule was deleted." @@ -9516,44 +9745,44 @@ } } } - }, - "description": "Delete a schedule.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/": { + "get": { + "tags": ["Pipelines"], + "summary": "List executions of a schedule", + "description": "Retrieve the executions of a given schedule.", + "operationId": "getRepositoryPipelineScheduleExecutions", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { + "name": "schedule_uuid", "description": "The uuid of the schedule.", "required": true, - "name": "schedule_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Delete a schedule", - "operationId": "deleteRepositoryPipelineSchedule" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/": { - "get": { "responses": { "200": { "description": "The list of executions of a schedule.", @@ -9575,103 +9804,35 @@ } } } - }, - "description": "Retrieve the executions of a given schedule.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The uuid of the schedule.", - "required": true, - "name": "schedule_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List executions of a schedule", - "operationId": "getRepositoryPipelineScheduleExecutions" + } } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { - "put": { - "responses": { - "200": { - "description": "The SSH key pair was created or updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_ssh_key_pair" - } - } - } - }, - "404": { - "description": "The account, repository or SSH key pair was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "description": "Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.", + "get": { + "tags": ["Pipelines"], + "summary": "Get SSH key pair", + "description": "Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.", + "operationId": "getRepositoryPipelineSshKeyPair", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_ssh_key_pair" - } - } - }, - "description": "The created or updated SSH key pair.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Update SSH key pair", - "operationId": "updateRepositoryPipelineKeyPair" - }, - "get": { "responses": { "200": { "description": "The SSH key pair.", @@ -9693,33 +9854,92 @@ } } } - }, - "description": "Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.", + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update SSH key pair", + "description": "Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.", + "operationId": "updateRepositoryPipelineKeyPair", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get SSH key pair", - "operationId": "getRepositoryPipelineSshKeyPair" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_ssh_key_pair" + } + } + }, + "description": "The created or updated SSH key pair.", + "required": true + }, + "responses": { + "200": { + "description": "The SSH key pair was created or updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_ssh_key_pair" + } + } + } + }, + "404": { + "description": "The account, repository or SSH key pair was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "summary": "Delete SSH key pair", + "description": "Delete the repository SSH key pair.", + "operationId": "deleteRepositoryPipelineKeyPair", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The SSH key pair was deleted." @@ -9734,37 +9954,87 @@ } } } - }, - "description": "Delete the repository SSH key pair.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/": { + "get": { + "tags": ["Pipelines"], + "summary": "List known hosts", + "description": "Find repository level known hosts.", + "operationId": "getRepositoryPipelineKnownHosts", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Delete SSH key pair", - "operationId": "deleteRepositoryPipelineKeyPair" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/": { + "responses": { + "200": { + "description": "The retrieved known hosts.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_known_hosts" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "summary": "Create a known host", + "description": "Create a repository level known host.", + "operationId": "createRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + }, + "description": "The known host to create.", + "required": true + }, "responses": { "201": { + "description": "The known host was created.", "headers": { "Location": { "description": "The URL of the newly created pipeline known host.", @@ -9773,7 +10043,6 @@ } } }, - "description": "The known host was created.", "content": { "application/json": { "schema": { @@ -9802,152 +10071,44 @@ } } } - }, - "description": "Create a repository level known host.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_known_host" - } - } - }, - "description": "The known host to create.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Create a known host", - "operationId": "createRepositoryPipelineKnownHost" - }, - "get": { - "responses": { - "200": { - "description": "The retrieved known hosts.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_known_hosts" - } - } - } - } - }, - "description": "Find repository level known hosts.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List known hosts", - "operationId": "getRepositoryPipelineKnownHosts" + } } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}": { - "put": { - "responses": { - "200": { - "description": "The known host was updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_known_host" - } - } - } - }, - "404": { - "description": "The account, repository or known host with the given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "description": "Update a repository level known host.", + "get": { + "tags": ["Pipelines"], + "summary": "Get a known host", + "description": "Retrieve a repository level known host.", + "operationId": "getRepositoryPipelineKnownHost", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the known host to update.", - "required": true, "name": "known_host_uuid", + "description": "The UUID of the known host to retrieve.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_known_host" - } - } - }, - "description": "The updated known host.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Update a known host", - "operationId": "updateRepositoryPipelineKnownHost" - }, - "get": { "responses": { "200": { "description": "The known host.", @@ -9969,42 +10130,110 @@ } } } - }, - "description": "Retrieve a repository level known host.", + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a known host", + "description": "Update a repository level known host.", + "operationId": "updateRepositoryPipelineKnownHost", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the known host to retrieve.", - "required": true, "name": "known_host_uuid", + "description": "The UUID of the known host to update.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a known host", - "operationId": "getRepositoryPipelineKnownHost" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + }, + "description": "The updated known host.", + "required": true + }, + "responses": { + "200": { + "description": "The known host was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + } + }, + "404": { + "description": "The account, repository or known host with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "summary": "Delete a known host", + "description": "Delete a repository level known host.", + "operationId": "deleteRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "known_host_uuid", + "description": "The UUID of the known host to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The known host was deleted." @@ -10019,46 +10248,87 @@ } } } - }, - "description": "Delete a repository level known host.", + } + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for a repository", + "description": "Find repository level variables.", + "operationId": "getRepositoryPipelineVariables", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the known host to delete.", - "required": true, - "name": "known_host_uuid", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Delete a known host", - "operationId": "deleteRepositoryPipelineKnownHost" - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/": { + "responses": { + "200": { + "description": "The retrieved variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "summary": "Create a variable for a repository", + "description": "Create a repository level variable.", + "operationId": "createRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The variable to create.", + "required": true + }, "responses": { "201": { + "description": "The variable was created.", "headers": { "Location": { "description": "The URL of the newly created pipeline variable.", @@ -10067,7 +10337,6 @@ } } }, - "description": "The variable was created.", "content": { "application/json": { "schema": { @@ -10096,152 +10365,44 @@ } } } - }, - "description": "Create a repository level variable.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - }, - "description": "The variable to create.", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Create a variable for a repository", - "operationId": "createRepositoryPipelineVariable" - }, - "get": { - "responses": { - "200": { - "description": "The retrieved variables.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_variables" - } - } - } - } - }, - "description": "Find repository level variables.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List variables for a repository", - "operationId": "getRepositoryPipelineVariables" + } } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}": { - "put": { - "responses": { - "200": { - "description": "The variable was updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - } - }, - "404": { - "description": "The account, repository or variable with the given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "description": "Update a repository level variable.", + "get": { + "tags": ["Pipelines"], + "summary": "Get a variable for a repository", + "description": "Retrieve a repository level variable.", + "operationId": "getRepositoryPipelineVariable", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to update.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - }, - "description": "The updated variable", - "required": true - }, - "tags": ["Pipelines"], - "summary": "Update a variable for a repository", - "operationId": "updateRepositoryPipelineVariable" - }, - "get": { "responses": { "200": { "description": "The variable.", @@ -10263,42 +10424,110 @@ } } } - }, - "description": "Retrieve a repository level variable.", + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a variable for a repository", + "description": "Update a repository level variable.", + "operationId": "updateRepositoryPipelineVariable", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { + "name": "repo_slug", "description": "The repository.", "required": true, - "name": "repo_slug", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to retrieve.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to update.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get a variable for a repository", - "operationId": "getRepositoryPipelineVariable" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The updated variable", + "required": true + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account, repository or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "summary": "Delete a variable for a repository", + "description": "Delete a repository level variable.", + "operationId": "deleteRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The variable was deleted." @@ -10313,40 +10542,7 @@ } } } - }, - "description": "Delete a repository level variable.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The repository.", - "required": true, - "name": "repo_slug", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the variable to delete.", - "required": true, - "name": "variable_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "Delete a variable for a repository", - "operationId": "deleteRepositoryPipelineVariable" + } } }, "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}": { @@ -10356,39 +10552,42 @@ "description": "An empty response." } }, + "operationId": "updateRepositoryHostedPropertyValue", + "summary": "Update a repository application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } @@ -10397,10 +10596,7 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"], - "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", - "summary": "Update a repository application property", - "operationId": "updateRepositoryHostedPropertyValue" + "tags": ["properties"] }, "delete": { "responses": { @@ -10408,48 +10604,48 @@ "description": "An empty response." } }, + "operationId": "deleteRepositoryHostedPropertyValue", + "summary": "Delete a repository application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", - "summary": "Delete a repository application property", - "operationId": "deleteRepositoryHostedPropertyValue" + "tags": ["properties"] }, "get": { "responses": { @@ -10464,52 +10660,55 @@ } } }, + "operationId": "getRepositoryHostedPropertyValue", + "summary": "Get a repository application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", - "summary": "Get a repository application property", - "operationId": "getRepositoryHostedPropertyValue" + "tags": ["properties"] } }, "/repositories/{workspace}/{repo_slug}/pullrequests": { "get": { + "tags": ["Pullrequests"], + "description": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List pull requests", "responses": { "200": { "description": "All pull requests on the specified repository.", @@ -10542,12 +10741,10 @@ "description": "Only return pull requests that are in this state. This parameter can be repeated.", "schema": { "type": "string", - "enum": ["MERGED", "SUPERSEDED", "OPEN", "DECLINED"] + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] } } ], - "tags": ["Pullrequests"], - "summary": "List pull requests", "security": [ { "oauth2": ["pullrequest"] @@ -10558,10 +10755,12 @@ { "api_key": [] } - ], - "description": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." + ] }, "post": { + "tags": ["Pullrequests"], + "description": "Creates a new pull request where the destination repository is\nthis repository and the author is the authenticated user.\n\nThe minimum required fields to create a pull request are `title` and\n`source`, specified by a branch name.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \\\n -u my-username:my-password \\\n --request POST \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n }'\n```\n\nIf the pull request's `destination` is not specified, it will default\nto the `repository.mainbranch`. To open a pull request to a\ndifferent branch, say from a feature branch to a staging branch,\nspecify a `destination` (same format as the `source`):\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"destination\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n}\n```\n\nReviewers can be specified by adding an array of user objects as the\n`reviewers` property.\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"reviewers\": [\n {\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n }\n ]\n}\n```\n\nOther fields:\n\n* `description` - a string\n* `close_source_branch` - boolean that specifies if the source branch should be closed upon merging", + "summary": "Create a pull request", "responses": { "201": { "description": "The newly created pull request.", @@ -10612,8 +10811,6 @@ }, "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title." }, - "tags": ["Pullrequests"], - "summary": "Create a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -10624,8 +10821,7 @@ { "api_key": [] } - ], - "description": "Creates a new pull request where the destination repository is\nthis repository and the author is the authenticated user.\n\nThe minimum required fields to create a pull request are `title` and\n`source`, specified by a branch name.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \\\n -u my-username:my-password \\\n --request POST \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n }'\n```\n\nIf the pull request's `destination` is not specified, it will default\nto the `repository.mainbranch`. To open a pull request to a\ndifferent branch, say from a feature branch to a staging branch,\nspecify a `destination` (same format as the `source`):\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"destination\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n}\n```\n\nReviewers can be specified by adding an array of user objects as the\n`reviewers` property.\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"reviewers\": [\n {\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n }\n ]\n}\n```\n\nOther fields:\n\n* `description` - a string\n* `close_source_branch` - boolean that specifies if the source branch should be closed upon merging" + ] }, "parameters": [ { @@ -10650,6 +10846,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/activity": { "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", + "summary": "List a pull request activity log", "responses": { "200": { "description": "The pull request activity log" @@ -10668,8 +10867,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "List a pull request activity log", "security": [ { "oauth2": ["pullrequest"] @@ -10680,8 +10877,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```" + ] }, "parameters": [ { @@ -10706,6 +10902,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}": { "get": { + "tags": ["Pullrequests"], + "description": "Returns the specified pull request.", + "summary": "Get a pull request", "responses": { "200": { "description": "The pull request object", @@ -10731,8 +10930,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Get a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -10743,10 +10940,12 @@ { "api_key": [] } - ], - "description": "Returns the specified pull request." + ] }, "put": { + "tags": ["Pullrequests"], + "description": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated.", + "summary": "Update a pull request", "responses": { "200": { "description": "The updated pull request", @@ -10799,8 +10998,6 @@ }, "description": "The pull request that is to be updated." }, - "tags": ["Pullrequests"], - "summary": "Update a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -10811,8 +11008,7 @@ { "api_key": [] } - ], - "description": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated." + ] }, "parameters": [ { @@ -10846,6 +11042,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity": { "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", + "summary": "List a pull request activity log", "responses": { "200": { "description": "The pull request activity log" @@ -10864,8 +11063,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "List a pull request activity log", "security": [ { "oauth2": ["pullrequest"] @@ -10876,8 +11073,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```" + ] }, "parameters": [ { @@ -10911,6 +11107,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve": { "delete": { + "tags": ["Pullrequests"], + "description": "Redact the authenticated user's approval of the specified pull\nrequest.", + "summary": "Unapprove a pull request", "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." @@ -10936,8 +11135,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Unapprove a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -10948,10 +11145,12 @@ { "api_key": [] } - ], - "description": "Redact the authenticated user's approval of the specified pull\nrequest." + ] }, "post": { + "tags": ["Pullrequests"], + "description": "Approve the specified pull request as the authenticated user.", + "summary": "Approve a pull request", "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the pull request.", @@ -10984,8 +11183,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Approve a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -10996,8 +11193,7 @@ { "api_key": [] } - ], - "description": "Approve the specified pull request as the authenticated user." + ] }, "parameters": [ { @@ -11031,6 +11227,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments": { "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's comments.\n\nThis includes both global, inline comments and replies.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails.", + "summary": "List comments on a pull request", "responses": { "200": { "description": "A paginated list of comments made on the given pull request, in chronological order.", @@ -11063,8 +11262,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "List comments on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11075,10 +11272,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of the pull request's comments.\n\nThis includes both global, inline comments and replies.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails." + ] }, "post": { + "tags": ["Pullrequests"], + "description": "Creates a new pull request comment.\n\nReturns the newly created pull request comment.", + "summary": "Create a comment on a pull request", "responses": { "201": { "description": "The newly created comment.", @@ -11130,8 +11329,6 @@ "description": "The comment object.", "required": true }, - "tags": ["Pullrequests"], - "summary": "Create a comment on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11142,8 +11339,7 @@ { "api_key": [] } - ], - "description": "Creates a new pull request comment.\n\nReturns the newly created pull request comment." + ] }, "parameters": [ { @@ -11177,6 +11373,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}": { "delete": { + "tags": ["Pullrequests"], + "description": "Deletes a specific pull request comment.", + "summary": "Delete a comment on a pull request", "responses": { "204": { "description": "Successful deletion." @@ -11202,8 +11401,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Delete a comment on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11214,10 +11411,12 @@ { "api_key": [] } - ], - "description": "Deletes a specific pull request comment." + ] }, "get": { + "tags": ["Pullrequests"], + "description": "Returns a specific pull request comment.", + "summary": "Get a comment on a pull request", "responses": { "200": { "description": "The comment.", @@ -11250,8 +11449,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Get a comment on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11262,10 +11459,12 @@ { "api_key": [] } - ], - "description": "Returns a specific pull request comment." + ] }, "put": { + "tags": ["Pullrequests"], + "description": "Updates a specific pull request comment.", + "summary": "Update a comment on a pull request", "responses": { "200": { "description": "The updated comment.", @@ -11309,8 +11508,6 @@ "description": "The contents of the updated comment.", "required": true }, - "tags": ["Pullrequests"], - "summary": "Update a comment on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11321,8 +11518,7 @@ { "api_key": [] } - ], - "description": "Updates a specific pull request comment." + ] }, "parameters": [ { @@ -11365,6 +11561,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits": { "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted.", + "summary": "List commits on a pull request", "responses": { "200": { "description": "A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists." @@ -11390,8 +11589,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "List commits on a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11402,8 +11599,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted." + ] }, "parameters": [ { @@ -11437,6 +11633,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline": { "post": { + "tags": ["Pullrequests"], + "description": "Declines the pull request.", + "summary": "Decline a pull request", "responses": { "200": { "description": "The pull request was successfully declined.", @@ -11459,8 +11658,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Decline a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -11471,8 +11668,7 @@ { "api_key": [] } - ], - "description": "Declines the pull request." + ] }, "parameters": [ { @@ -11506,13 +11702,14 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff": { "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)\nwith the revspec that corresponds to the pull request.", + "summary": "List changes in a pull request", "responses": { "302": { "description": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the\nrevspec that corresponds to the pull request.\n" } }, - "tags": ["Pullrequests"], - "summary": "List changes in a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11523,8 +11720,7 @@ { "api_key": [] } - ], - "description": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)\nwith the revspec that corresponds to the pull request." + ] }, "parameters": [ { @@ -11558,13 +11754,14 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat": { "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)\nwith the revspec that corresponds to the pull request.", + "summary": "Get the diff stat for a pull request", "responses": { "302": { "description": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with\nthe revspec that corresponds to pull request.\n" } }, - "tags": ["Pullrequests"], - "summary": "Get the diff stat for a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11575,8 +11772,7 @@ { "api_key": [] } - ], - "description": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)\nwith the revspec that corresponds to the pull request." + ] }, "parameters": [ { @@ -11610,6 +11806,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge": { "post": { + "tags": ["Pullrequests"], + "description": "Merges the pull request.", + "summary": "Merge a pull request", "responses": { "200": { "description": "The pull request object.", @@ -11655,8 +11854,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Merge a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -11667,8 +11864,7 @@ { "api_key": [] } - ], - "description": "Merges the pull request." + ] }, "parameters": [ { @@ -11702,6 +11898,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}": { "get": { + "tags": ["Pullrequests"], + "description": "When merging a pull request takes too long, the client receives a\ntask ID along with a 202 status code. The task ID can be used in a call\nto this endpoint to check the status of a merge task.\n\n```\ncurl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\n```\n\nIf the merge task is not yet finished, a PENDING status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"PENDING\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n }\n}\n```\n\nIf the merge was successful, a SUCCESS status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"SUCCESS\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n },\n \"merge_result\": \n}\n```\n\nIf the merge task failed, an error will be returned.\n\n```\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"\"\n }\n}\n```", + "summary": "Get the merge task status for a pull request", "responses": { "200": { "description": "Returns a task status if the merge is either pending or successful, and if it is successful, a pull request" @@ -11713,8 +11912,6 @@ "description": "The user making the request does not have permission to the repo and is different from the user who queued the task" } }, - "tags": ["Pullrequests"], - "summary": "Get the merge task status for a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11725,8 +11922,7 @@ { "api_key": [] } - ], - "description": "When merging a pull request takes too long, the client receives a\ntask ID along with a 202 status code. The task ID can be used in a call\nto this endpoint to check the status of a merge task.\n\n```\ncurl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\n```\n\nIf the merge task is not yet finished, a PENDING status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"PENDING\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n }\n}\n```\n\nIf the merge was successful, a SUCCESS status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"SUCCESS\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n },\n \"merge_result\": \n}\n```\n\nIf the merge task failed, an error will be returned.\n\n```\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"\"\n }\n}\n```" + ] }, "parameters": [ { @@ -11769,13 +11965,14 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch": { "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)\nwith the revspec that corresponds to pull request.", + "summary": "Get the patch for a pull request", "responses": { "302": { "description": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with\nthe revspec that corresponds to pull request.\n" } }, - "tags": ["Pullrequests"], - "summary": "Get the patch for a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11786,8 +11983,7 @@ { "api_key": [] } - ], - "description": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)\nwith the revspec that corresponds to pull request." + ] }, "parameters": [ { @@ -11821,6 +12017,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes": { "delete": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Remove change request for a pull request", "responses": { "204": { "description": "An empty response indicating the authenticated user's request for change has been withdrawn." @@ -11846,8 +12045,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Remove change request for a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -11858,10 +12055,12 @@ { "api_key": [] } - ], - "description": "" + ] }, "post": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Request changes for a pull request", "responses": { "200": { "description": "The `participant` object recording that the authenticated user requested changes on the pull request.", @@ -11894,8 +12093,6 @@ } } }, - "tags": ["Pullrequests"], - "summary": "Request changes for a pull request", "security": [ { "oauth2": ["pullrequest:write"] @@ -11906,8 +12103,7 @@ { "api_key": [] } - ], - "description": "" + ] }, "parameters": [ { @@ -11941,6 +12137,9 @@ }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses": { "get": { + "tags": ["Pullrequests", "Commit statuses"], + "description": "Returns all statuses (e.g. build results) for the given pull\nrequest.", + "summary": "List commit statuses for a pull request", "responses": { "200": { "description": "A paginated list of all commit statuses for this pull request.", @@ -11986,8 +12185,6 @@ } } ], - "tags": ["Pullrequests", "Commit statuses"], - "summary": "List commit statuses for a pull request", "security": [ { "oauth2": ["pullrequest"] @@ -11998,8 +12195,7 @@ { "api_key": [] } - ], - "description": "Returns all statuses (e.g. build results) for the given pull\nrequest." + ] }, "parameters": [ { @@ -12038,48 +12234,51 @@ "description": "An empty response." } }, + "operationId": "updatePullRequestHostedPropertyValue", + "summary": "Update a pull request application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The pull request ID.", "in": "path", "name": "pullrequest_id", + "description": "The pull request ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } @@ -12088,10 +12287,7 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"], - "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", - "summary": "Update a pull request application property", - "operationId": "updatePullRequestHostedPropertyValue" + "tags": ["properties"] }, "delete": { "responses": { @@ -12099,57 +12295,57 @@ "description": "An empty response." } }, + "operationId": "deletePullRequestHostedPropertyValue", + "summary": "Delete a pull request application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The pull request ID.", "in": "path", "name": "pullrequest_id", + "description": "The pull request ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", - "summary": "Delete a pull request application property", - "operationId": "deletePullRequestHostedPropertyValue" + "tags": ["properties"] }, "get": { "responses": { @@ -12164,61 +12360,64 @@ } } }, + "operationId": "getPullRequestHostedPropertyValue", + "summary": "Get a pull request application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", "parameters": [ { "required": true, - "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", "schema": { "type": "string" } }, { "required": true, - "description": "The repository.", "in": "path", "name": "repo_slug", + "description": "The repository.", "schema": { "type": "string" } }, { "required": true, - "description": "The pull request ID.", "in": "path", "name": "pullrequest_id", + "description": "The pull request ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", - "summary": "Get a pull request application property", - "operationId": "getPullRequestHostedPropertyValue" + "tags": ["properties"] } }, "/repositories/{workspace}/{repo_slug}/refs": { "get": { + "tags": ["Refs"], + "description": "Returns the branches and tags in the repository.\n\nBy default, results will be in the order the underlying source control system returns them and identical to\nthe ordering one sees when running \"$ git show-ref\". Note that this follows simple\nlexical ordering of the ref names.\n\nThis can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are\nsorted [\"branch1\", \"branch10\", \"branch2\", \"v10\", \"v11\", \"v9\"] instead of [\"branch1\", \"branch2\",\n\"branch10\", \"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "summary": "List branches and tags", "responses": { "200": { "description": "A paginated list of refs matching any filter criteria that were provided.", @@ -12269,8 +12468,6 @@ } } ], - "tags": ["Refs"], - "summary": "List branches and tags", "security": [ { "oauth2": ["repository"] @@ -12281,8 +12478,7 @@ { "api_key": [] } - ], - "description": "Returns the branches and tags in the repository.\n\nBy default, results will be in the order the underlying source control system returns them and identical to\nthe ordering one sees when running \"$ git show-ref\". Note that this follows simple\nlexical ordering of the ref names.\n\nThis can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are\nsorted [\"branch1\", \"branch10\", \"branch2\", \"v10\", \"v11\", \"v9\"] instead of [\"branch1\", \"branch2\",\n\"branch10\", \"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings." + ] }, "parameters": [ { @@ -12307,6 +12503,9 @@ }, "/repositories/{workspace}/{repo_slug}/refs/branches": { "get": { + "tags": ["Refs"], + "description": "Returns a list of all open branches within the specified repository.\n Results will be in the order the source control manager returns them.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1 | jq .\n {\n \"pagelen\": 1,\n \"size\": 187,\n \"values\": [\n {\n \"name\": \"issue-9.3/AUI-5343-assistive-class\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e5d1cde9069fcb9f0af90403a4de2150c125a148\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Marcin Konopka \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Marcin Konopka\",\n \"uuid\": \"{47cc24f4-2a05-4420-88fe-0417535a110a}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png\"\n }\n },\n \"nickname\": \"Marcin Konopka\",\n \"type\": \"user\",\n \"account_id\": \"60113d2b47a9540069f4de03\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"87f7fc92b00464ae47b13ef65c91884e4ac9be51\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n }\n }\n }\n ],\n \"date\": \"2021-04-13T13:44:49+00:00\",\n \"message\": \"wip\n\",\n \"type\": \"commit\"\n }\n }\n ],\n \"page\": 1,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2\"\n }\n ```\n\n Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)\n that can be used to search for specific branches. For instance, to find\n all branches that have \"stab\" in their name:\n\n ```\n curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'\n ```\n\n By default, results will be in the order the underlying source control system returns them and identical to\n the ordering one sees when running \"$ git branch --list\". Note that this follows simple\n lexical ordering of the ref names.\n\n This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\n sorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\n Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name,\n Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "summary": "List open branches", "responses": { "200": { "description": "A paginated list of branches matching any filter criteria that were provided.", @@ -12357,8 +12556,6 @@ } } ], - "tags": ["Refs"], - "summary": "List open branches", "security": [ { "oauth2": ["repository"] @@ -12369,10 +12566,12 @@ { "api_key": [] } - ], - "description": "Returns a list of all open branches within the specified repository.\n Results will be in the order the source control manager returns them.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1 | jq .\n {\n \"pagelen\": 1,\n \"size\": 187,\n \"values\": [\n {\n \"name\": \"issue-9.3/AUI-5343-assistive-class\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e5d1cde9069fcb9f0af90403a4de2150c125a148\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Marcin Konopka \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Marcin Konopka\",\n \"uuid\": \"{47cc24f4-2a05-4420-88fe-0417535a110a}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png\"\n }\n },\n \"nickname\": \"Marcin Konopka\",\n \"type\": \"user\",\n \"account_id\": \"60113d2b47a9540069f4de03\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"87f7fc92b00464ae47b13ef65c91884e4ac9be51\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n }\n }\n }\n ],\n \"date\": \"2021-04-13T13:44:49+00:00\",\n \"message\": \"wip\n\",\n \"type\": \"commit\"\n }\n }\n ],\n \"page\": 1,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2\"\n }\n ```\n\n Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)\n that can be used to search for specific branches. For instance, to find\n all branches that have \"stab\" in their name:\n\n ```\n curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'\n ```\n\n By default, results will be in the order the underlying source control system returns them and identical to\n the ordering one sees when running \"$ git branch --list\". Note that this follows simple\n lexical ordering of the ref names.\n\n This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\n sorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\n Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name,\n Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings." + ] }, "post": { + "tags": ["Refs"], + "description": "Creates a new branch in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \\\n-s -u seanfarley -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"smf/create-feature\",\n \"target\" : {\n \"hash\" : \"default\",\n }\n}'\n```\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads). This endpoint does support using short hash prefixes for\nthe commit hash, but it may return a 400 response if the provided\nprefix is ambiguous. Using a full commit hash is the preferred\napproach.", + "summary": "Create a branch", "responses": { "201": { "description": "The newly created branch object.", @@ -12405,8 +12604,6 @@ } } }, - "tags": ["Refs"], - "summary": "Create a branch", "security": [ { "oauth2": ["repository:write"] @@ -12417,8 +12614,7 @@ { "api_key": [] } - ], - "description": "Creates a new branch in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \\\n-s -u seanfarley -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"smf/create-feature\",\n \"target\" : {\n \"hash\" : \"default\",\n }\n}'\n```\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads). This endpoint does support using short hash prefixes for\nthe commit hash, but it may return a 400 response if the provided\nprefix is ambiguous. Using a full commit hash is the preferred\napproach." + ] }, "parameters": [ { @@ -12443,6 +12639,9 @@ }, "/repositories/{workspace}/{repo_slug}/refs/branches/{name}": { "delete": { + "tags": ["Refs"], + "description": "Delete a branch in the specified repository.\n\nThe main branch is not allowed to be deleted and will return a 400\nresponse.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads).", + "summary": "Delete a branch", "responses": { "204": { "description": "Indicates that the specified branch was successfully deleted." @@ -12468,8 +12667,6 @@ } } }, - "tags": ["Refs"], - "summary": "Delete a branch", "security": [ { "oauth2": ["repository:write"] @@ -12480,10 +12677,12 @@ { "api_key": [] } - ], - "description": "Delete a branch in the specified repository.\n\nThe main branch is not allowed to be deleted and will return a 400\nresponse.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads)." + ] }, "get": { + "tags": ["Refs"], + "description": "Returns a branch object within the specified repository.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master | jq .\n {\n \"name\": \"master\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/master\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e7d158ff7ed5538c28f94cd97a9ad569680fc94e\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"psre-renovate-bot \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"psre-renovate-bot\",\n \"uuid\": \"{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png\"\n }\n },\n \"nickname\": \"Renovate Bot\",\n \"type\": \"user\",\n \"account_id\": \"5d5355e8c6b9320d9ea5b28d\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"eab868a309e75733de80969a7bed1ec6d4651e06\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06\"\n }\n }\n }\n ],\n \"date\": \"2021-04-12T06:44:38+00:00\",\n \"message\": \"Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883)\n\nchore(deps): update babel monorepo to v7.13.15 (master)\n\nApproved-by: Chris \"Daz\" Darroch\n\",\n \"type\": \"commit\"\n }\n }\n ```\n\n This call requires authentication. Private repositories require the\n caller to authenticate with an account that has appropriate\n authorization.\n\n For Git, the branch name should not include any prefixes (e.g.\n refs/heads).", + "summary": "Get a branch", "responses": { "200": { "description": "The branch object.", @@ -12516,8 +12715,6 @@ } } }, - "tags": ["Refs"], - "summary": "Get a branch", "security": [ { "oauth2": ["repository"] @@ -12528,8 +12725,7 @@ { "api_key": [] } - ], - "description": "Returns a branch object within the specified repository.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master | jq .\n {\n \"name\": \"master\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/master\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e7d158ff7ed5538c28f94cd97a9ad569680fc94e\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"psre-renovate-bot \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"psre-renovate-bot\",\n \"uuid\": \"{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png\"\n }\n },\n \"nickname\": \"Renovate Bot\",\n \"type\": \"user\",\n \"account_id\": \"5d5355e8c6b9320d9ea5b28d\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"eab868a309e75733de80969a7bed1ec6d4651e06\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06\"\n }\n }\n }\n ],\n \"date\": \"2021-04-12T06:44:38+00:00\",\n \"message\": \"Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883)\n\nchore(deps): update babel monorepo to v7.13.15 (master)\n\nApproved-by: Chris \"Daz\" Darroch\n\",\n \"type\": \"commit\"\n }\n }\n ```\n\n This call requires authentication. Private repositories require the\n caller to authenticate with an account that has appropriate\n authorization.\n\n For Git, the branch name should not include any prefixes (e.g.\n refs/heads)." + ] }, "parameters": [ { @@ -12563,6 +12759,9 @@ }, "/repositories/{workspace}/{repo_slug}/refs/tags": { "get": { + "tags": ["Refs"], + "description": "Returns the tags in the repository.\n\nBy default, results will be in the order the underlying source control system returns them and identical to\nthe ordering one sees when running \"$ git tag --list\". Note that this follows simple\nlexical ordering of the ref names.\n\nThis can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\nsorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "summary": "List tags", "responses": { "200": { "description": "A paginated list of tags matching any filter criteria that were provided.", @@ -12613,8 +12812,6 @@ } } ], - "tags": ["Refs"], - "summary": "List tags", "security": [ { "oauth2": ["repository"] @@ -12625,10 +12822,12 @@ { "api_key": [] } - ], - "description": "Returns the tags in the repository.\n\nBy default, results will be in the order the underlying source control system returns them and identical to\nthe ordering one sees when running \"$ git tag --list\". Note that this follows simple\nlexical ordering of the ref names.\n\nThis can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\nsorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings." + ] }, "post": { + "tags": ["Refs"], + "description": "Creates a new tag in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \\\n-s -u jdoe -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"new-tag-name\",\n \"target\" : {\n \"hash\" : \"a1b2c3d4e5f6\",\n }\n}'\n```\n\nThis endpoint does support using short hash prefixes for the commit\nhash, but it may return a 400 response if the provided prefix is\nambiguous. Using a full commit hash is the preferred approach.", + "summary": "Create a tag", "responses": { "201": { "description": "The newly created tag.", @@ -12661,8 +12860,6 @@ }, "required": true }, - "tags": ["Refs"], - "summary": "Create a tag", "security": [ { "oauth2": ["repository:write"] @@ -12673,8 +12870,7 @@ { "api_key": [] } - ], - "description": "Creates a new tag in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \\\n-s -u jdoe -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"new-tag-name\",\n \"target\" : {\n \"hash\" : \"a1b2c3d4e5f6\",\n }\n}'\n```\n\nThis endpoint does support using short hash prefixes for the commit\nhash, but it may return a 400 response if the provided prefix is\nambiguous. Using a full commit hash is the preferred approach." + ] }, "parameters": [ { @@ -12699,6 +12895,9 @@ }, "/repositories/{workspace}/{repo_slug}/refs/tags/{name}": { "delete": { + "tags": ["Refs"], + "description": "Delete a tag in the specified repository.\n\nThe tag name should not include any prefixes (e.g. refs/tags).", + "summary": "Delete a tag", "responses": { "204": { "description": "Indicates the specified tag was successfully deleted." @@ -12724,8 +12923,6 @@ } } }, - "tags": ["Refs"], - "summary": "Delete a tag", "security": [ { "oauth2": ["repository:write"] @@ -12736,10 +12933,12 @@ { "api_key": [] } - ], - "description": "Delete a tag in the specified repository.\n\nThe tag name should not include any prefixes (e.g. refs/tags)." + ] }, "get": { + "tags": ["Refs"], + "description": "Returns the specified tag.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .\n{\n \"name\": \"3.8\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/tag/3.8\"\n }\n },\n \"tagger\": {\n \"raw\": \"Matt Mackall \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"mpmselenic\",\n \"nickname\": \"mpmselenic\",\n \"display_name\": \"Matt Mackall\",\n \"type\": \"user\",\n \"uuid\": \"{a4934530-db4c-419c-a478-9ab4964c2ee7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/mpmselenic\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/mpmselenic/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/mpmselenic/avatar/32/\"\n }\n }\n }\n },\n \"date\": \"2016-05-01T18:52:25+00:00\",\n \"message\": \"Added tag 3.8 for changeset f85de28eae32\",\n \"type\": \"tag\",\n \"target\": {\n \"hash\": \"f85de28eae32e7d3064b1a1321309071bbaaa069\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"hg\",\n \"full_name\": \"seanfarley/hg\",\n \"uuid\": \"{c75687fb-e99d-4579-9087-190dbd406d30}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Sean Farley \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"seanfarley\",\n \"nickname\": \"seanfarley\",\n \"display_name\": \"Sean Farley\",\n \"type\": \"user\",\n \"uuid\": \"{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/seanfarley\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/seanfarley/avatar/32/\"\n }\n }\n }\n },\n \"parents\": [\n {\n \"hash\": \"9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n }\n }\n }\n ],\n \"date\": \"2016-05-01T04:21:17+00:00\",\n \"message\": \"debian: alphabetize build deps\",\n \"type\": \"commit\"\n }\n}\n```", + "summary": "Get a tag", "responses": { "200": { "description": "The tag object.", @@ -12772,8 +12971,6 @@ } } }, - "tags": ["Refs"], - "summary": "Get a tag", "security": [ { "oauth2": ["repository"] @@ -12784,8 +12981,7 @@ { "api_key": [] } - ], - "description": "Returns the specified tag.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .\n{\n \"name\": \"3.8\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/tag/3.8\"\n }\n },\n \"tagger\": {\n \"raw\": \"Matt Mackall \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"mpmselenic\",\n \"nickname\": \"mpmselenic\",\n \"display_name\": \"Matt Mackall\",\n \"type\": \"user\",\n \"uuid\": \"{a4934530-db4c-419c-a478-9ab4964c2ee7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/mpmselenic\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/mpmselenic/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/mpmselenic/avatar/32/\"\n }\n }\n }\n },\n \"date\": \"2016-05-01T18:52:25+00:00\",\n \"message\": \"Added tag 3.8 for changeset f85de28eae32\",\n \"type\": \"tag\",\n \"target\": {\n \"hash\": \"f85de28eae32e7d3064b1a1321309071bbaaa069\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"hg\",\n \"full_name\": \"seanfarley/hg\",\n \"uuid\": \"{c75687fb-e99d-4579-9087-190dbd406d30}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Sean Farley \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"seanfarley\",\n \"nickname\": \"seanfarley\",\n \"display_name\": \"Sean Farley\",\n \"type\": \"user\",\n \"uuid\": \"{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/seanfarley\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/seanfarley/avatar/32/\"\n }\n }\n }\n },\n \"parents\": [\n {\n \"hash\": \"9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n }\n }\n }\n ],\n \"date\": \"2016-05-01T04:21:17+00:00\",\n \"message\": \"debian: alphabetize build deps\",\n \"type\": \"commit\"\n }\n}\n```" + ] }, "parameters": [ { @@ -12819,6 +13015,9 @@ }, "/repositories/{workspace}/{repo_slug}/src": { "get": { + "tags": ["Source", "Repositories"], + "description": "This endpoint redirects the client to the directory listing of the\nroot directory on the main branch.\n\nThis is equivalent to directly hitting\n[/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D)\nwithout having to know the name or SHA1 of the repo's main branch.\n\nTo create new commits, [POST to this endpoint](#post)", + "summary": "Get the root directory of the main branch", "responses": { "200": { "description": "If the path matches a file, then the raw contents of the file are\nreturned (unless the `format=meta` query parameter was provided,\nin which case a json document containing the file's meta data is\nreturned). If the path matches a directory, then a paginated\nlist of file and directory entries is returned (if the\n`format=meta` query parameter was provided, then the json document\ncontaining the directory's meta data is returned).\n", @@ -12853,8 +13052,6 @@ } } ], - "tags": ["Source", "Repositories"], - "summary": "Get the root directory of the main branch", "security": [ { "oauth2": ["repository"] @@ -12865,10 +13062,12 @@ { "api_key": [] } - ], - "description": "This endpoint redirects the client to the directory listing of the\nroot directory on the main branch.\n\nThis is equivalent to directly hitting\n[/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D)\nwithout having to know the name or SHA1 of the repo's main branch.\n\nTo create new commits, [POST to this endpoint](#post)" + ] }, "post": { + "tags": ["Source", "Repositories"], + "description": "This endpoint is used to create new commits in the repository by\nuploading files.\n\nTo add a new file to a repository:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F /repo/path/to/image.png=@image.png\n```\n\nThis will create a new commit on top of the main branch, inheriting the\ncontents of the main branch, but adding (or overwriting) the\n`image.png` file to the repository in the `/repo/path/to` directory.\n\nTo create a commit that deletes files, use the `files` parameter:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F files=/file/to/delete/1.txt \\\n -F files=/file/to/delete/2.txt\n```\n\nYou can add/modify/delete multiple files in a request. Rename/move a\nfile by deleting the old path and adding the content at the new path.\n\nThis endpoint accepts `multipart/form-data` (as in the examples above),\nas well as `application/x-www-form-urlencoded`.\n\n#### multipart/form-data\n\nA `multipart/form-data` post contains a series of \"form fields\" that\nidentify both the individual files that are being uploaded, as well as\nadditional, optional meta data.\n\nFiles are uploaded in file form fields (those that have a\n`Content-Disposition` parameter) whose field names point to the remote\npath in the repository where the file should be stored. Path field\nnames are always interpreted to be absolute from the root of the\nrepository, regardless whether the client uses a leading slash (as the\nabove `curl` example did).\n\nFile contents are treated as bytes and are not decoded as text.\n\nThe commit message, as well as other non-file meta data for the\nrequest, is sent along as normal form field elements. Meta data fields\nshare the same namespace as the file objects. For `multipart/form-data`\nbodies that should not lead to any ambiguity, as the\n`Content-Disposition` header will contain the `filename` parameter to\ndistinguish between a file named \"message\" and the commit message field.\n\n#### application/x-www-form-urlencoded\n\nIt is also possible to upload new files using a simple\n`application/x-www-form-urlencoded` POST. This can be convenient when\nuploading pure text files:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \\\n --data-urlencode \"/path/to/me.txt=Lorem ipsum.\" \\\n --data-urlencode \"message=Initial commit\" \\\n --data-urlencode \"author=Erik van Zijst \"\n```\n\nThere could be a field name clash if a client were to upload a file\nnamed \"message\", as this filename clashes with the meta data property\nfor the commit message. To avoid this and to upload files whose names\nclash with the meta data properties, use a leading slash for the files,\ne.g. `curl --data-urlencode \"/message=file contents\"`.\n\nWhen an explicit slash is omitted for a file whose path matches that of\na meta data parameter, then it is interpreted as meta data, not as a\nfile.\n\n#### Executables and links\n\nWhile this API aims to facilitate the most common use cases, it is\npossible to perform some more advanced operations like creating a new\nsymlink in the repository, or creating an executable file.\n\nFiles can be supplied with a `x-attributes` value in the\n`Content-Disposition` header. For example, to upload an executable\nfile, as well as create a symlink from `README.txt` to `README`:\n\n```\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"bin/shutdown.sh\"\nContent-Disposition: attachment; filename=\"shutdown.sh\"; x-attributes:\"executable\"\n\n#!/bin/sh\nhalt\n\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"/README.txt\"\nContent-Disposition: attachment; filename=\"README.txt\"; x-attributes:\"link\"\n\nREADME\n--===============1438169132528273974==--\n```\n\nLinks are files that contain the target path and have\n`x-attributes:\"link\"` set.\n\nWhen overwriting links with files, or vice versa, the newly uploaded\nfile determines both the new contents, as well as the attributes. That\nmeans uploading a file without specifying `x-attributes=\"link\"` will\ncreate a regular file, even if the parent commit hosted a symlink at\nthe same path.\n\nThe same applies to executables. When modifying an existing executable\nfile, the form-data file element must include\n`x-attributes=\"executable\"` in order to preserve the executable status\nof the file.\n\nNote that this API does not support the creation or manipulation of\nsubrepos / submodules.", + "summary": "Create a commit by uploading a file", "responses": { "201": { "description": "\n" @@ -12941,8 +13140,6 @@ } } ], - "tags": ["Source", "Repositories"], - "summary": "Create a commit by uploading a file", "security": [ { "oauth2": ["repository:write"] @@ -12953,8 +13150,7 @@ { "api_key": [] } - ], - "description": "This endpoint is used to create new commits in the repository by\nuploading files.\n\nTo add a new file to a repository:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F /repo/path/to/image.png=@image.png\n```\n\nThis will create a new commit on top of the main branch, inheriting the\ncontents of the main branch, but adding (or overwriting) the\n`image.png` file to the repository in the `/repo/path/to` directory.\n\nTo create a commit that deletes files, use the `files` parameter:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F files=/file/to/delete/1.txt \\\n -F files=/file/to/delete/2.txt\n```\n\nYou can add/modify/delete multiple files in a request. Rename/move a\nfile by deleting the old path and adding the content at the new path.\n\nThis endpoint accepts `multipart/form-data` (as in the examples above),\nas well as `application/x-www-form-urlencoded`.\n\n#### multipart/form-data\n\nA `multipart/form-data` post contains a series of \"form fields\" that\nidentify both the individual files that are being uploaded, as well as\nadditional, optional meta data.\n\nFiles are uploaded in file form fields (those that have a\n`Content-Disposition` parameter) whose field names point to the remote\npath in the repository where the file should be stored. Path field\nnames are always interpreted to be absolute from the root of the\nrepository, regardless whether the client uses a leading slash (as the\nabove `curl` example did).\n\nFile contents are treated as bytes and are not decoded as text.\n\nThe commit message, as well as other non-file meta data for the\nrequest, is sent along as normal form field elements. Meta data fields\nshare the same namespace as the file objects. For `multipart/form-data`\nbodies that should not lead to any ambiguity, as the\n`Content-Disposition` header will contain the `filename` parameter to\ndistinguish between a file named \"message\" and the commit message field.\n\n#### application/x-www-form-urlencoded\n\nIt is also possible to upload new files using a simple\n`application/x-www-form-urlencoded` POST. This can be convenient when\nuploading pure text files:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \\\n --data-urlencode \"/path/to/me.txt=Lorem ipsum.\" \\\n --data-urlencode \"message=Initial commit\" \\\n --data-urlencode \"author=Erik van Zijst \"\n```\n\nThere could be a field name clash if a client were to upload a file\nnamed \"message\", as this filename clashes with the meta data property\nfor the commit message. To avoid this and to upload files whose names\nclash with the meta data properties, use a leading slash for the files,\ne.g. `curl --data-urlencode \"/message=file contents\"`.\n\nWhen an explicit slash is omitted for a file whose path matches that of\na meta data parameter, then it is interpreted as meta data, not as a\nfile.\n\n#### Executables and links\n\nWhile this API aims to facilitate the most common use cases, it is\npossible to perform some more advanced operations like creating a new\nsymlink in the repository, or creating an executable file.\n\nFiles can be supplied with a `x-attributes` value in the\n`Content-Disposition` header. For example, to upload an executable\nfile, as well as create a symlink from `README.txt` to `README`:\n\n```\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"bin/shutdown.sh\"\nContent-Disposition: attachment; filename=\"shutdown.sh\"; x-attributes:\"executable\"\n\n#!/bin/sh\nhalt\n\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"/README.txt\"\nContent-Disposition: attachment; filename=\"README.txt\"; x-attributes:\"link\"\n\nREADME\n--===============1438169132528273974==--\n```\n\nLinks are files that contain the target path and have\n`x-attributes:\"link\"` set.\n\nWhen overwriting links with files, or vice versa, the newly uploaded\nfile determines both the new contents, as well as the attributes. That\nmeans uploading a file without specifying `x-attributes=\"link\"` will\ncreate a regular file, even if the parent commit hosted a symlink at\nthe same path.\n\nThe same applies to executables. When modifying an existing executable\nfile, the form-data file element must include\n`x-attributes=\"executable\"` in order to preserve the executable status\nof the file.\n\nNote that this API does not support the creation or manipulation of\nsubrepos / submodules." + ] }, "parameters": [ { @@ -12979,6 +13175,9 @@ }, "/repositories/{workspace}/{repo_slug}/src/{commit}/{path}": { "get": { + "tags": ["Source", "Repositories"], + "description": "This endpoints is used to retrieve the contents of a single file,\nor the contents of a directory at a specified revision.\n\n#### Raw file contents\n\nWhen `path` points to a file, this endpoint returns the raw contents.\nThe response's Content-Type is derived from the filename\nextension (not from the contents). The file contents are not processed\nand no character encoding/recoding is performed and as a result no\ncharacter encoding is included as part of the Content-Type.\n\nThe `Content-Disposition` header will be \"attachment\" to prevent\nbrowsers from running executable files.\n\nIf the file is managed by LFS, then a 301 redirect pointing to\nAtlassian's media services platform is returned.\n\nThe response includes an ETag that is based on the contents of the file\nand its attributes. This means that an empty `__init__.py` always\nreturns the same ETag, regardless on the directory it lives in, or the\ncommit it is on.\n\n#### File meta data\n\nWhen the request for a file path includes the query parameter\n`?format=meta`, instead of returning the file's raw contents, Bitbucket\ninstead returns the JSON object describing the file's properties:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta\n{\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n}\n```\n\nFile objects contain an `attributes` element that contains a list of\npossible modifiers. Currently defined values are:\n\n* `link` -- indicates that the entry is a symbolic link. The contents\n of the file represent the path the link points to.\n* `executable` -- indicates that the file has the executable bit set.\n* `subrepository` -- indicates that the entry points to a submodule or\n subrepo. The contents of the file is the SHA1 of the repository\n pointed to.\n* `binary` -- indicates whether Bitbucket thinks the file is binary.\n\nThis endpoint can provide an alternative to how a HEAD request can be\nused to check for the existence of a file, or a file's size without\nincurring the overhead of receiving its full contents.\n\n\n#### Directory listings\n\nWhen `path` points to a directory instead of a file, the response is a\npaginated list of directory and file objects in the same order as the\nunderlying SCM system would return them.\n\nFor example:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n }\n },\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nWhen listing the contents of the repo's root directory, the use of a\ntrailing slash at the end of the URL is required.\n\nThe response by default is not recursive, meaning that only the direct contents of\na path are returned. The response does not recurse down into\nsubdirectories. In order to \"walk\" the entire directory tree, the\nclient can either parse each response and follow the `self` links of each\n`commit_directory` object, or can specify a `max_depth` to recurse to.\n\nThe max_depth parameter will do a breadth-first search to return the contents of the subdirectories\nup to the depth specified. Breadth-first search was chosen as it leads to the least amount of\nfile system operations for git. If the `max_depth` parameter is specified to be too\nlarge, the call will time out and return a 555.\n\nEach returned object is either a `commit_file`, or a `commit_directory`,\nboth of which contain a `path` element. This path is the absolute path\nfrom the root of the repository. Each object also contains a `commit`\nobject which embeds the commit the file is on. Note that this is merely\nthe commit that was used in the URL. It is *not* the commit that last\nmodified the file.\n\nDirectory objects have 2 representations. Their `self` link returns the\npaginated contents of the directory. The `meta` link on the other hand\nreturns the actual `directory` object itself, e.g.:\n\n```javascript\n{\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": { ... }\n}\n```\n\n#### Querying, filtering and sorting\n\nLike most API endpoints, this API supports the Bitbucket\nquerying/filtering syntax and so you could filter a directory listing\nto only include entries that match certain criteria. For instance, to\nlist all binary files over 1kb use the expression:\n\n`size > 1024 and attributes = \"binary\"`\n\nwhich after urlencoding yields the query string:\n\n`?q=size%3E1024+and+attributes%3D%22binary%22`\n\nTo change the ordering of the response, use the `?sort` parameter:\n\n`.../src/eefd5ef/?sort=-size`\n\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails.", + "summary": "Get file or directory contents", "responses": { "200": { "description": "If the path matches a file, then the raw contents of the file are\nreturned. If the `format=meta` query parameter is provided,\na json document containing the file's meta data is\nreturned. If the `format=rendered` query parameter is provided,\nthe contents of the file in HTML-formated rendered markup is returned.\nIf the path matches a directory, then a paginated\nlist of file and directory entries is returned (if the\n`format=meta` query parameter was provided, then the json document\ncontaining the directory's meta data is returned.)\n", @@ -13050,8 +13249,6 @@ } } ], - "tags": ["Source", "Repositories"], - "summary": "Get file or directory contents", "security": [ { "oauth2": ["repository"] @@ -13062,8 +13259,7 @@ { "api_key": [] } - ], - "description": "This endpoints is used to retrieve the contents of a single file,\nor the contents of a directory at a specified revision.\n\n#### Raw file contents\n\nWhen `path` points to a file, this endpoint returns the raw contents.\nThe response's Content-Type is derived from the filename\nextension (not from the contents). The file contents are not processed\nand no character encoding/recoding is performed and as a result no\ncharacter encoding is included as part of the Content-Type.\n\nThe `Content-Disposition` header will be \"attachment\" to prevent\nbrowsers from running executable files.\n\nIf the file is managed by LFS, then a 301 redirect pointing to\nAtlassian's media services platform is returned.\n\nThe response includes an ETag that is based on the contents of the file\nand its attributes. This means that an empty `__init__.py` always\nreturns the same ETag, regardless on the directory it lives in, or the\ncommit it is on.\n\n#### File meta data\n\nWhen the request for a file path includes the query parameter\n`?format=meta`, instead of returning the file's raw contents, Bitbucket\ninstead returns the JSON object describing the file's properties:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta\n{\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n}\n```\n\nFile objects contain an `attributes` element that contains a list of\npossible modifiers. Currently defined values are:\n\n* `link` -- indicates that the entry is a symbolic link. The contents\n of the file represent the path the link points to.\n* `executable` -- indicates that the file has the executable bit set.\n* `subrepository` -- indicates that the entry points to a submodule or\n subrepo. The contents of the file is the SHA1 of the repository\n pointed to.\n* `binary` -- indicates whether Bitbucket thinks the file is binary.\n\nThis endpoint can provide an alternative to how a HEAD request can be\nused to check for the existence of a file, or a file's size without\nincurring the overhead of receiving its full contents.\n\n\n#### Directory listings\n\nWhen `path` points to a directory instead of a file, the response is a\npaginated list of directory and file objects in the same order as the\nunderlying SCM system would return them.\n\nFor example:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n }\n },\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nWhen listing the contents of the repo's root directory, the use of a\ntrailing slash at the end of the URL is required.\n\nThe response by default is not recursive, meaning that only the direct contents of\na path are returned. The response does not recurse down into\nsubdirectories. In order to \"walk\" the entire directory tree, the\nclient can either parse each response and follow the `self` links of each\n`commit_directory` object, or can specify a `max_depth` to recurse to.\n\nThe max_depth parameter will do a breadth-first search to return the contents of the subdirectories\nup to the depth specified. Breadth-first search was chosen as it leads to the least amount of\nfile system operations for git. If the `max_depth` parameter is specified to be too\nlarge, the call will time out and return a 555.\n\nEach returned object is either a `commit_file`, or a `commit_directory`,\nboth of which contain a `path` element. This path is the absolute path\nfrom the root of the repository. Each object also contains a `commit`\nobject which embeds the commit the file is on. Note that this is merely\nthe commit that was used in the URL. It is *not* the commit that last\nmodified the file.\n\nDirectory objects have 2 representations. Their `self` link returns the\npaginated contents of the directory. The `meta` link on the other hand\nreturns the actual `directory` object itself, e.g.:\n\n```javascript\n{\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": { ... }\n}\n```\n\n#### Querying, filtering and sorting\n\nLike most API endpoints, this API supports the Bitbucket\nquerying/filtering syntax and so you could filter a directory listing\nto only include entries that match certain criteria. For instance, to\nlist all binary files over 1kb use the expression:\n\n`size > 1024 and attributes = \"binary\"`\n\nwhich after urlencoding yields the query string:\n\n`?q=size%3E1024+and+attributes%3D%22binary%22`\n\nTo change the ordering of the response, use the `?sort` parameter:\n\n`.../src/eefd5ef/?sort=-size`\n\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails." + ] }, "parameters": [ { @@ -13106,6 +13302,9 @@ }, "/repositories/{workspace}/{repo_slug}/versions": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the versions that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List defined versions for issues", "responses": { "200": { "description": "The versions that have been defined in the issue tracker.", @@ -13128,8 +13327,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "List defined versions for issues", "security": [ { "oauth2": ["issue"] @@ -13140,8 +13337,7 @@ { "api_key": [] } - ], - "description": "Returns the versions that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled." + ] }, "parameters": [ { @@ -13166,6 +13362,9 @@ }, "/repositories/{workspace}/{repo_slug}/versions/{version_id}": { "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker version object.", + "summary": "Get a defined version for issues", "responses": { "200": { "description": "The specified version object.", @@ -13188,8 +13387,6 @@ } } }, - "tags": ["Issue tracker"], - "summary": "Get a defined version for issues", "security": [ { "oauth2": ["issue"] @@ -13200,8 +13397,7 @@ { "api_key": [] } - ], - "description": "Returns the specified issue tracker version object." + ] }, "parameters": [ { @@ -13235,13 +13431,21 @@ }, "/repositories/{workspace}/{repo_slug}/watchers": { "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all the watchers on the specified\nrepository.", + "summary": "List repositories watchers", "responses": { "200": { - "description": "A paginated list of all the watchers on the specified repository." + "description": "A paginated list of all the watchers on the specified repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_accounts" + } + } + } } }, - "tags": ["Repositories"], - "summary": "List repositories watchers", "security": [ { "oauth2": ["repository"] @@ -13252,8 +13456,7 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of all the watchers on the specified\nrepository." + ] }, "parameters": [ { @@ -13278,6 +13481,9 @@ }, "/snippets": { "get": { + "tags": ["Snippets"], + "description": "Returns all snippets. Like pull requests, repositories and workspaces, the\nfull set of snippets is defined by what the current user has access to.\n\nThis includes all snippets owned by any of the workspaces the user is a member of,\nor snippets by other users that the current user is either watching or has collaborated\non (for instance by commenting on it).\n\nTo limit the set of returned snippets, apply the\n`?role=[owner|contributor|member]` query parameter where the roles are\ndefined as follows:\n\n* `owner`: all snippets owned by the current user\n* `contributor`: all snippets owned by, or watched by the current user\n* `member`: created in a workspaces or watched by the current user\n\nWhen no role is specified, all public snippets are returned, as well as all\nprivately owned snippets watched or commented on.\n\nThe returned response is a normal paginated JSON list. This endpoint\nonly supports `application/json` responses and no\n`multipart/form-data` or `multipart/related`. As a result, it is not\npossible to include the file contents.", + "summary": "List snippets", "responses": { "200": { "description": "A paginated list of snippets.", @@ -13312,8 +13518,6 @@ } } ], - "tags": ["Snippets"], - "summary": "List snippets", "security": [ { "oauth2": ["snippet"] @@ -13324,10 +13528,12 @@ { "api_key": [] } - ], - "description": "Returns all snippets. Like pull requests, repositories and workspaces, the\nfull set of snippets is defined by what the current user has access to.\n\nThis includes all snippets owned by any of the workspaces the user is a member of,\nor snippets by other users that the current user is either watching or has collaborated\non (for instance by commenting on it).\n\nTo limit the set of returned snippets, apply the\n`?role=[owner|contributor|member]` query parameter where the roles are\ndefined as follows:\n\n* `owner`: all snippets owned by the current user\n* `contributor`: all snippets owned by, or watched by the current user\n* `member`: created in a workspaces or watched by the current user\n\nWhen no role is specified, all public snippets are returned, as well as all\nprivately owned snippets watched or commented on.\n\nThe returned response is a normal paginated JSON list. This endpoint\nonly supports `application/json` responses and no\n`multipart/form-data` or `multipart/related`. As a result, it is not\npossible to include the file contents." + ] }, "post": { + "tags": ["Snippets"], + "description": "Creates a new snippet under the authenticated user's account.\n\nSnippets can contain multiple files. Both text and binary files are\nsupported.\n\nThe simplest way to create a new snippet from a local file:\n\n $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png\n\nCreating snippets through curl has a few limitations and so let's look\nat a more complicated scenario.\n\nSnippets are created with a multipart POST. Both `multipart/form-data`\nand `multipart/related` are supported. Both allow the creation of\nsnippets with both meta data (title, etc), as well as multiple text\nand binary files.\n\nThe main difference is that `multipart/related` can use rich encoding\nfor the meta data (currently JSON).\n\n\nmultipart/related (RFC-2387)\n----------------------------\n\nThis is the most advanced and efficient way to create a paste.\n\n POST /2.0/snippets/evzijst HTTP/1.1\n Content-Length: 1188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My snippet\",\n \"is_private\": true,\n \"scm\": \"git\",\n \"files\": {\n \"foo.txt\": {},\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nThe request contains multiple parts and is structured as follows.\n\nThe first part is the JSON document that describes the snippet's\nproperties or meta data. It either has to be the first part, or the\nrequest's `Content-Type` header must contain the `start` parameter to\npoint to it.\n\nThe remaining parts are the files of which there can be zero or more.\nEach file part should contain the `Content-ID` MIME header through\nwhich the JSON meta data's `files` element addresses it. The value\nshould be the name of the file.\n\n`Content-Disposition` is an optional MIME header. The header's\noptional `filename` parameter can be used to specify the file name\nthat Bitbucket should use when writing the file to disk. When present,\n`filename` takes precedence over the value of `Content-ID`.\n\nWhen the JSON body omits the `files` element, the remaining parts are\nnot ignored. Instead, each file is added to the new snippet as if its\nname was explicitly linked (the use of the `files` elements is\nmandatory for some operations like deleting or renaming files).\n\n\nmultipart/form-data\n-------------------\n\nThe use of JSON for the snippet's meta data is optional. Meta data can\nalso be supplied as regular form fields in a more conventional\n`multipart/form-data` request:\n\n $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title=\"My snippet\" -F file=@foo.txt -F file=@image.png\n\n POST /2.0/snippets HTTP/1.1\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"image.png\"\n Content-Type: application/octet-stream\n\n ?PNG\n\n IHDR?1??I.....\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My snippet\n ------------------------------63a4b224c59f--\n\nHere the meta data properties are included as flat, top-level form\nfields. The file attachments use the `file` field name. To attach\nmultiple files, simply repeat the field.\n\nThe advantage of `multipart/form-data` over `multipart/related` is\nthat it can be easier to build clients.\n\nEssentially all properties are optional, `title` and `files` included.\n\n\nSharing and Visibility\n----------------------\n\nSnippets can be either public (visible to anyone on Bitbucket, as well\nas anonymous users), or private (visible only to members of the workspace).\nThis is controlled through the snippet's `is_private` element:\n\n* **is_private=false** -- everyone, including anonymous users can view\n the snippet\n* **is_private=true** -- only workspace members can view the snippet\n\nTo create the snippet under a workspace, just append the workspace ID\nto the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post).", + "summary": "Create a snippet", "responses": { "201": { "description": "The newly created snippet object.", @@ -13361,8 +13567,6 @@ "requestBody": { "$ref": "#/components/requestBodies/snippet" }, - "tags": ["Snippets"], - "summary": "Create a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -13373,13 +13577,15 @@ { "api_key": [] } - ], - "description": "Creates a new snippet under the authenticated user's account.\n\nSnippets can contain multiple files. Both text and binary files are\nsupported.\n\nThe simplest way to create a new snippet from a local file:\n\n $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png\n\nCreating snippets through curl has a few limitations and so let's look\nat a more complicated scenario.\n\nSnippets are created with a multipart POST. Both `multipart/form-data`\nand `multipart/related` are supported. Both allow the creation of\nsnippets with both meta data (title, etc), as well as multiple text\nand binary files.\n\nThe main difference is that `multipart/related` can use rich encoding\nfor the meta data (currently JSON).\n\n\nmultipart/related (RFC-2387)\n----------------------------\n\nThis is the most advanced and efficient way to create a paste.\n\n POST /2.0/snippets/evzijst HTTP/1.1\n Content-Length: 1188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My snippet\",\n \"is_private\": true,\n \"scm\": \"git\",\n \"files\": {\n \"foo.txt\": {},\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nThe request contains multiple parts and is structured as follows.\n\nThe first part is the JSON document that describes the snippet's\nproperties or meta data. It either has to be the first part, or the\nrequest's `Content-Type` header must contain the `start` parameter to\npoint to it.\n\nThe remaining parts are the files of which there can be zero or more.\nEach file part should contain the `Content-ID` MIME header through\nwhich the JSON meta data's `files` element addresses it. The value\nshould be the name of the file.\n\n`Content-Disposition` is an optional MIME header. The header's\noptional `filename` parameter can be used to specify the file name\nthat Bitbucket should use when writing the file to disk. When present,\n`filename` takes precedence over the value of `Content-ID`.\n\nWhen the JSON body omits the `files` element, the remaining parts are\nnot ignored. Instead, each file is added to the new snippet as if its\nname was explicitly linked (the use of the `files` elements is\nmandatory for some operations like deleting or renaming files).\n\n\nmultipart/form-data\n-------------------\n\nThe use of JSON for the snippet's meta data is optional. Meta data can\nalso be supplied as regular form fields in a more conventional\n`multipart/form-data` request:\n\n $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title=\"My snippet\" -F file=@foo.txt -F file=@image.png\n\n POST /2.0/snippets HTTP/1.1\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"image.png\"\n Content-Type: application/octet-stream\n\n ?PNG\n\n IHDR?1??I.....\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My snippet\n ------------------------------63a4b224c59f--\n\nHere the meta data properties are included as flat, top-level form\nfields. The file attachments use the `file` field name. To attach\nmultiple files, simply repeat the field.\n\nThe advantage of `multipart/form-data` over `multipart/related` is\nthat it can be easier to build clients.\n\nEssentially all properties are optional, `title` and `files` included.\n\n\nSharing and Visibility\n----------------------\n\nSnippets can be either public (visible to anyone on Bitbucket, as well\nas anonymous users), or private (visible only to members of the workspace).\nThis is controlled through the snippet's `is_private` element:\n\n* **is_private=false** -- everyone, including anonymous users can view\n the snippet\n* **is_private=true** -- only workspace members can view the snippet\n\nTo create the snippet under a workspace, just append the workspace ID\nto the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post)." + ] }, "parameters": [] }, "/snippets/{workspace}": { "get": { + "tags": ["Snippets"], + "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered\nby the snippet owner and only those that are owned by `{workspace}` are\nreturned.", + "summary": "List snippets in a workspace", "responses": { "200": { "description": "A paginated list of snippets.", @@ -13414,8 +13620,6 @@ } } ], - "tags": ["Snippets"], - "summary": "List snippets in a workspace", "security": [ { "oauth2": ["snippet"] @@ -13426,10 +13630,12 @@ { "api_key": [] } - ], - "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered\nby the snippet owner and only those that are owned by `{workspace}` are\nreturned." + ] }, "post": { + "tags": ["Snippets"], + "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be\ncreated under the workspace specified in the path parameter\n`{workspace}`.", + "summary": "Create a snippet for a workspace", "responses": { "201": { "description": "The newly created snippet object.", @@ -13473,8 +13679,6 @@ "requestBody": { "$ref": "#/components/requestBodies/snippet" }, - "tags": ["Snippets"], - "summary": "Create a snippet for a workspace", "security": [ { "oauth2": ["snippet:write"] @@ -13485,8 +13689,7 @@ { "api_key": [] } - ], - "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be\ncreated under the workspace specified in the path parameter\n`{workspace}`." + ] }, "parameters": [ { @@ -13502,6 +13705,9 @@ }, "/snippets/{workspace}/{encoded_id}": { "delete": { + "tags": ["Snippets"], + "description": "Deletes a snippet and returns an empty response.", + "summary": "Delete a snippet", "responses": { "204": { "description": "If the snippet was deleted successfully." @@ -13537,8 +13743,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Delete a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -13549,10 +13753,12 @@ { "api_key": [] } - ], - "description": "Deletes a snippet and returns an empty response." + ] }, "get": { + "tags": ["Snippets"], + "description": "Retrieves a single snippet.\n\nSnippets support multiple content types:\n\n* application/json\n* multipart/related\n* multipart/form-data\n\n\napplication/json\n----------------\n\nThe default content type of the response is `application/json`.\nSince JSON is always `utf-8`, it cannot reliably contain file contents\nfor files that are not text. Therefore, JSON snippet documents only\ncontain the filename and links to the file contents.\n\nThis means that in order to retrieve all parts of a snippet, N+1\nrequests need to be made (where N is the number of files in the\nsnippet).\n\n\nmultipart/related\n-----------------\n\nTo retrieve an entire snippet in a single response, use the\n`Accept: multipart/related` HTTP request header.\n\n $ curl -H \"Accept: multipart/related\" https://api.bitbucket.org/2.0/snippets/evzijst/1\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 2214\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers\"\n },\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits\"\n }\n },\n \"id\": kypj,\n \"title\": \"My snippet\",\n \"created_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"updated_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"is_private\": false,\n \"files\": {\n \"foo.txt\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt\"\n }\n }\n },\n \"image.png\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-image.png\"\n }\n }\n }\n ],\n \"owner\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n },\n \"creator\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nmultipart/form-data\n-------------------\n\nAs with creating new snippets, `multipart/form-data` can be used as an\nalternative to `multipart/related`. However, the inherently flat\nstructure of form-data means that only basic, root-level properties\ncan be returned, while nested elements like `links` are omitted:\n\n $ curl -H \"Accept: multipart/form-data\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n Content-Type: text/plain; charset=\"utf-8\"\n\n My snippet\n ------------------------------63a4b224c59f--\n Content-Disposition: attachment; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: attachment; name=\"file\"; filename=\"image.png\"\n Content-Transfer-Encoding: base64\n Content-Type: application/octet-stream\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n ------------------------------5957323a6b76--", + "summary": "Get a snippet", "responses": { "200": { "description": "The snippet object.", @@ -13655,8 +13861,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a snippet", "security": [ { "oauth2": ["snippet"] @@ -13667,10 +13871,12 @@ { "api_key": [] } - ], - "description": "Retrieves a single snippet.\n\nSnippets support multiple content types:\n\n* application/json\n* multipart/related\n* multipart/form-data\n\n\napplication/json\n----------------\n\nThe default content type of the response is `application/json`.\nSince JSON is always `utf-8`, it cannot reliably contain file contents\nfor files that are not text. Therefore, JSON snippet documents only\ncontain the filename and links to the file contents.\n\nThis means that in order to retrieve all parts of a snippet, N+1\nrequests need to be made (where N is the number of files in the\nsnippet).\n\n\nmultipart/related\n-----------------\n\nTo retrieve an entire snippet in a single response, use the\n`Accept: multipart/related` HTTP request header.\n\n $ curl -H \"Accept: multipart/related\" https://api.bitbucket.org/2.0/snippets/evzijst/1\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 2214\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers\"\n },\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits\"\n }\n },\n \"id\": kypj,\n \"title\": \"My snippet\",\n \"created_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"updated_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"is_private\": false,\n \"files\": {\n \"foo.txt\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt\"\n }\n }\n },\n \"image.png\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-image.png\"\n }\n }\n }\n ],\n \"owner\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n },\n \"creator\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nmultipart/form-data\n-------------------\n\nAs with creating new snippets, `multipart/form-data` can be used as an\nalternative to `multipart/related`. However, the inherently flat\nstructure of form-data means that only basic, root-level properties\ncan be returned, while nested elements like `links` are omitted:\n\n $ curl -H \"Accept: multipart/form-data\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n Content-Type: text/plain; charset=\"utf-8\"\n\n My snippet\n ------------------------------63a4b224c59f--\n Content-Disposition: attachment; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: attachment; name=\"file\"; filename=\"image.png\"\n Content-Transfer-Encoding: base64\n Content-Type: application/octet-stream\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n ------------------------------5957323a6b76--" + ] }, "put": { + "tags": ["Snippets"], + "description": "Used to update a snippet. Use this to add and delete files and to\nchange a snippet's title.\n\nTo update a snippet, one can either PUT a full snapshot, or only the\nparts that need to be changed.\n\nThe contract for PUT on this API is that properties missing from the\nrequest remain untouched so that snippets can be efficiently\nmanipulated with differential payloads.\n\nTo delete a property (e.g. the title, or a file), include its name in\nthe request, but omit its value (use `null`).\n\nAs in Git, explicit renaming of files is not supported. Instead, to\nrename a file, delete it and add it again under another name. This can\nbe done atomically in a single request. Rename detection is left to\nthe SCM.\n\nPUT supports three different content types for both request and\nresponse bodies:\n\n* `application/json`\n* `multipart/related`\n* `multipart/form-data`\n\nThe content type used for the request body can be different than that\nused for the response. Content types are specified using standard HTTP\nheaders.\n\nUse the `Content-Type` and `Accept` headers to select the desired\nrequest and response format.\n\n\napplication/json\n----------------\n\nAs with creation and retrieval, the content type determines what\nproperties can be manipulated. `application/json` does not support\nfile contents and is therefore limited to a snippet's meta data.\n\nTo update the title, without changing any of its files:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": \"Updated title\"}'\n\n\nTo delete the title:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": null}'\n\nNot all parts of a snippet can be manipulated. The owner and creator\nfor instance are immutable.\n\n\nmultipart/related\n-----------------\n\n`multipart/related` can be used to manipulate all of a snippet's\nproperties. The body is identical to a POST. properties omitted from\nthe request are left unchanged. Since the `start` part contains JSON,\nthe mechanism for manipulating the snippet's meta data is identical\nto `application/json` requests.\n\nTo update one of a snippet's file contents, while also changing its\ntitle:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 288\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My updated snippet\",\n \"files\": {\n \"foo.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n Updated file contents.\n\n --===============1438169132528273974==--\n\nHere only the parts that are changed are included in the body. The\nother files remain untouched.\n\nNote the use of the `files` list in the JSON part. This list contains\nthe files that are being manipulated. This list should have\ncorresponding multiparts in the request that contain the new contents\nof these files.\n\nIf a filename in the `files` list does not have a corresponding part,\nit will be deleted from the snippet, as shown below:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==--\n\nTo simulate a rename, delete a file and add the same file under\nanother name:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 212\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"foo.txt\": {},\n \"bar.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"bar.txt\"\n Content-Disposition: attachment; filename=\"bar.txt\"\n\n foo\n\n --===============1438169132528273974==--\n\n\nmultipart/form-data\n-----------------\n\nAgain, one can also use `multipart/form-data` to manipulate file\ncontents and meta data atomically.\n\n $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title=\"My updated snippet\" -F file=@foo.txt\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 351\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My updated snippet\n ------------------------------63a4b224c59f\n\nTo delete a file, omit its contents while including its name in the\n`files` field:\n\n $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 149\n Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86\n\n ------------------------------ef8871065a86\n Content-Disposition: form-data; name=\"files\"\n\n image.png\n ------------------------------ef8871065a86--\n\nThe explicit use of the `files` element in `multipart/related` and\n`multipart/form-data` is only required when deleting files.\nThe default mode of operation is for file parts to be processed,\nregardless of whether or not they are listed in `files`, as a\nconvenience to the client.", + "summary": "Update a snippet", "responses": { "200": { "description": "The updated snippet object.", @@ -13753,8 +13959,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Update a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -13765,8 +13969,7 @@ { "api_key": [] } - ], - "description": "Used to update a snippet. Use this to add and delete files and to\nchange a snippet's title.\n\nTo update a snippet, one can either PUT a full snapshot, or only the\nparts that need to be changed.\n\nThe contract for PUT on this API is that properties missing from the\nrequest remain untouched so that snippets can be efficiently\nmanipulated with differential payloads.\n\nTo delete a property (e.g. the title, or a file), include its name in\nthe request, but omit its value (use `null`).\n\nAs in Git, explicit renaming of files is not supported. Instead, to\nrename a file, delete it and add it again under another name. This can\nbe done atomically in a single request. Rename detection is left to\nthe SCM.\n\nPUT supports three different content types for both request and\nresponse bodies:\n\n* `application/json`\n* `multipart/related`\n* `multipart/form-data`\n\nThe content type used for the request body can be different than that\nused for the response. Content types are specified using standard HTTP\nheaders.\n\nUse the `Content-Type` and `Accept` headers to select the desired\nrequest and response format.\n\n\napplication/json\n----------------\n\nAs with creation and retrieval, the content type determines what\nproperties can be manipulated. `application/json` does not support\nfile contents and is therefore limited to a snippet's meta data.\n\nTo update the title, without changing any of its files:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": \"Updated title\"}'\n\n\nTo delete the title:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": null}'\n\nNot all parts of a snippet can be manipulated. The owner and creator\nfor instance are immutable.\n\n\nmultipart/related\n-----------------\n\n`multipart/related` can be used to manipulate all of a snippet's\nproperties. The body is identical to a POST. properties omitted from\nthe request are left unchanged. Since the `start` part contains JSON,\nthe mechanism for manipulating the snippet's meta data is identical\nto `application/json` requests.\n\nTo update one of a snippet's file contents, while also changing its\ntitle:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 288\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My updated snippet\",\n \"files\": {\n \"foo.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n Updated file contents.\n\n --===============1438169132528273974==--\n\nHere only the parts that are changed are included in the body. The\nother files remain untouched.\n\nNote the use of the `files` list in the JSON part. This list contains\nthe files that are being manipulated. This list should have\ncorresponding multiparts in the request that contain the new contents\nof these files.\n\nIf a filename in the `files` list does not have a corresponding part,\nit will be deleted from the snippet, as shown below:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==--\n\nTo simulate a rename, delete a file and add the same file under\nanother name:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 212\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"foo.txt\": {},\n \"bar.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"bar.txt\"\n Content-Disposition: attachment; filename=\"bar.txt\"\n\n foo\n\n --===============1438169132528273974==--\n\n\nmultipart/form-data\n-----------------\n\nAgain, one can also use `multipart/form-data` to manipulate file\ncontents and meta data atomically.\n\n $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title=\"My updated snippet\" -F file=@foo.txt\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 351\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My updated snippet\n ------------------------------63a4b224c59f\n\nTo delete a file, omit its contents while including its name in the\n`files` field:\n\n $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 149\n Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86\n\n ------------------------------ef8871065a86\n Content-Disposition: form-data; name=\"files\"\n\n image.png\n ------------------------------ef8871065a86--\n\nThe explicit use of the `files` element in `multipart/related` and\n`multipart/form-data` is only required when deleting files.\nThe default mode of operation is for file parts to be processed,\nregardless of whether or not they are listed in `files`, as a\nconvenience to the client." + ] }, "parameters": [ { @@ -13791,6 +13994,9 @@ }, "/snippets/{workspace}/{encoded_id}/comments": { "get": { + "tags": ["Snippets"], + "description": "Used to retrieve a paginated list of all comments for a specific\nsnippet.\n\nThis resource works identical to commit and pull request comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.", + "summary": "List comments on a snippet", "responses": { "200": { "description": "A paginated list of snippet comments, ordered by creation date.", @@ -13823,8 +14029,6 @@ } } }, - "tags": ["Snippets"], - "summary": "List comments on a snippet", "security": [ { "oauth2": ["snippet"] @@ -13835,10 +14039,12 @@ { "api_key": [] } - ], - "description": "Used to retrieve a paginated list of all comments for a specific\nsnippet.\n\nThis resource works identical to commit and pull request comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter." + ] }, "post": { + "tags": ["Snippets"], + "description": "Creates a new comment.\n\nThe only required field in the body is `content.raw`.\n\nTo create a threaded reply to an existing comment, include `parent.id`.", + "summary": "Create a comment on a snippet", "responses": { "201": { "description": "The newly created comment.", @@ -13853,7 +14059,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/snippet" + "$ref": "#/components/schemas/snippet_comment" } } } @@ -13883,15 +14089,13 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/snippet" + "$ref": "#/components/schemas/snippet_comment" } } }, "description": "The contents of the new comment.", "required": true }, - "tags": ["Snippets"], - "summary": "Create a comment on a snippet", "security": [ { "oauth2": ["snippet"] @@ -13902,8 +14106,7 @@ { "api_key": [] } - ], - "description": "Creates a new comment.\n\nThe only required field in the body is `content.raw`.\n\nTo create a threaded reply to an existing comment, include `parent.id`." + ] }, "parameters": [ { @@ -13928,6 +14131,9 @@ }, "/snippets/{workspace}/{encoded_id}/comments/{comment_id}": { "delete": { + "tags": ["Snippets"], + "description": "Deletes a snippet comment.\n\nComments can only be removed by the comment author, snippet creator, or workspace admin.", + "summary": "Delete a comment on a snippet", "responses": { "204": { "description": "Indicates the comment was deleted successfully." @@ -13953,8 +14159,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Delete a comment on a snippet", "security": [ { "oauth2": ["snippet"] @@ -13965,10 +14169,12 @@ { "api_key": [] } - ], - "description": "Deletes a snippet comment.\n\nComments can only be removed by the comment author, snippet creator, or workspace admin." + ] }, "get": { + "tags": ["Snippets"], + "description": "Returns the specific snippet comment.", + "summary": "Get a comment on a snippet", "responses": { "200": { "description": "The specified comment.", @@ -14001,8 +14207,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a comment on a snippet", "security": [ { "oauth2": ["snippet"] @@ -14013,13 +14217,22 @@ { "api_key": [] } - ], - "description": "Returns the specific snippet comment." + ] }, "put": { + "tags": ["Snippets"], + "description": "Updates a comment.\n\nThe only required field in the body is `content.raw`.\n\nComments can only be updated by their author.", + "summary": "Update a comment on a snippet", "responses": { "200": { - "description": "The updated comment object." + "description": "The updated comment object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + } }, "403": { "description": "If the authenticated user does not have access to the snippet.", @@ -14042,8 +14255,17 @@ } } }, - "tags": ["Snippets"], - "summary": "Update a comment on a snippet", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + }, + "description": "The contents to update the comment to.", + "required": true + }, "security": [ { "oauth2": ["snippet"] @@ -14054,8 +14276,7 @@ { "api_key": [] } - ], - "description": "Updates a comment.\n\nComments can only be updated by their author." + ] }, "parameters": [ { @@ -14089,6 +14310,9 @@ }, "/snippets/{workspace}/{encoded_id}/commits": { "get": { + "tags": ["Snippets"], + "description": "Returns the changes (commits) made on this snippet.", + "summary": "List snippet changes", "responses": { "200": { "description": "The paginated list of snippet commits.", @@ -14121,8 +14345,6 @@ } } }, - "tags": ["Snippets"], - "summary": "List snippet changes", "security": [ { "oauth2": ["snippet"] @@ -14133,8 +14355,7 @@ { "api_key": [] } - ], - "description": "Returns the changes (commits) made on this snippet." + ] }, "parameters": [ { @@ -14159,6 +14380,9 @@ }, "/snippets/{workspace}/{encoded_id}/commits/{revision}": { "get": { + "tags": ["Snippets"], + "description": "Returns the changes made on this snippet in this commit.", + "summary": "Get a previous snippet change", "responses": { "200": { "description": "The specified snippet commit.", @@ -14191,8 +14415,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a previous snippet change", "security": [ { "oauth2": ["snippet"] @@ -14203,8 +14425,7 @@ { "api_key": [] } - ], - "description": "Returns the changes made on this snippet in this commit." + ] }, "parameters": [ { @@ -14238,6 +14459,9 @@ }, "/snippets/{workspace}/{encoded_id}/files/{path}": { "get": { + "tags": ["Snippets"], + "description": "Convenience resource for getting to a snippet's raw files without the\nneed for first having to retrieve the snippet itself and having to pull\nout the versioned file links.", + "summary": "Get a snippet's raw file at HEAD", "responses": { "302": { "description": "A redirect to the most recent revision of the specified file.", @@ -14271,8 +14495,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a snippet's raw file at HEAD", "security": [ { "oauth2": ["snippet"] @@ -14283,8 +14505,7 @@ { "api_key": [] } - ], - "description": "Convenience resource for getting to a snippet's raw files without the\nneed for first having to retrieve the snippet itself and having to pull\nout the versioned file links." + ] }, "parameters": [ { @@ -14318,16 +14539,12 @@ }, "/snippets/{workspace}/{encoded_id}/watch": { "delete": { + "tags": ["Snippets"], + "description": "Used to stop watching a specific snippet. Returns 204 (No Content)\nto indicate success.", + "summary": "Stop watching a snippet", "responses": { "204": { - "description": "Indicates the user stopped watching the snippet successfully.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_users" - } - } - } + "description": "Indicates the user stopped watching the snippet successfully." }, "401": { "description": "If the request was not authenticated.", @@ -14350,8 +14567,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Stop watching a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -14362,20 +14577,15 @@ { "api_key": [] } - ], - "description": "Used to stop watching a specific snippet. Returns 204 (No Content)\nto indicate success." + ] }, "get": { + "tags": ["Snippets"], + "description": "Used to check if the current user is watching a specific snippet.\n\nReturns 204 (No Content) if the user is watching the snippet and 404 if\nnot.\n\nHitting this endpoint anonymously always returns a 404.", + "summary": "Check if the current user is watching a snippet", "responses": { "204": { - "description": "If the authenticated user is watching the snippet.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_users" - } - } - } + "description": "If the authenticated user is watching the snippet." }, "404": { "description": "If the snippet does not exist, or if the authenticated user is not watching the snippet.", @@ -14388,8 +14598,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Check if the current user is watching a snippet", "security": [ { "oauth2": ["snippet"] @@ -14400,20 +14608,15 @@ { "api_key": [] } - ], - "description": "Used to check if the current user is watching a specific snippet.\n\nReturns 204 (No Content) if the user is watching the snippet and 404 if\nnot.\n\nHitting this endpoint anonymously always returns a 404." + ] }, "put": { + "tags": ["Snippets"], + "description": "Used to start watching a specific snippet. Returns 204 (No Content).", + "summary": "Watch a snippet", "responses": { "204": { - "description": "Indicates the authenticated user is now watching the snippet.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_users" - } - } - } + "description": "Indicates the authenticated user is now watching the snippet." }, "401": { "description": "If the request was not authenticated.", @@ -14436,8 +14639,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Watch a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -14448,8 +14649,7 @@ { "api_key": [] } - ], - "description": "Used to start watching a specific snippet. Returns 204 (No Content)." + ] }, "parameters": [ { @@ -14474,13 +14674,16 @@ }, "/snippets/{workspace}/{encoded_id}/watchers": { "get": { + "tags": ["Snippets"], + "description": "Returns a paginated list of all users watching a specific snippet.", + "summary": "List users watching a snippet", "responses": { "200": { "description": "The paginated list of users watching this snippet", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginated_users" + "$ref": "#/components/schemas/paginated_accounts" } } } @@ -14496,8 +14699,6 @@ } } }, - "tags": ["Snippets"], - "summary": "List users watching a snippet", "security": [ { "oauth2": ["snippet"] @@ -14509,7 +14710,6 @@ "api_key": [] } ], - "description": "Returns a paginated list of all users watching a specific snippet.", "deprecated": true }, "parameters": [ @@ -14535,6 +14735,9 @@ }, "/snippets/{workspace}/{encoded_id}/{node_id}": { "delete": { + "tags": ["Snippets"], + "description": "Deletes the snippet.\n\nNote that this only works for versioned URLs that point to the latest\ncommit of the snippet. Pointing to an older commit results in a 405\nstatus code.\n\nTo delete a snippet, regardless of whether or not concurrent changes\nare being made to it, use `DELETE /snippets/{encoded_id}` instead.", + "summary": "Delete a previous revision of a snippet", "responses": { "204": { "description": "If the snippet was deleted successfully." @@ -14580,8 +14783,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Delete a previous revision of a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -14592,10 +14793,12 @@ { "api_key": [] } - ], - "description": "Deletes the snippet.\n\nNote that this only works for versioned URLs that point to the latest\ncommit of the snippet. Pointing to an older commit results in a 405\nstatus code.\n\nTo delete a snippet, regardless of whether or not concurrent changes\nare being made to it, use `DELETE /snippets/{encoded_id}` instead." + ] }, "get": { + "tags": ["Snippets"], + "description": "Identical to `GET /snippets/encoded_id`, except that this endpoint\ncan be used to retrieve the contents of the snippet as it was at an\nolder revision, while `/snippets/encoded_id` always returns the\nsnippet's current revision.\n\nNote that only the snippet's file contents are versioned, not its\nmeta data properties like the title.\n\nOther than that, the two endpoints are identical in behavior.", + "summary": "Get a previous revision of a snippet", "responses": { "200": { "description": "The snippet object.", @@ -14678,8 +14881,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a previous revision of a snippet", "security": [ { "oauth2": ["snippet"] @@ -14690,10 +14891,12 @@ { "api_key": [] } - ], - "description": "Identical to `GET /snippets/encoded_id`, except that this endpoint\ncan be used to retrieve the contents of the snippet as it was at an\nolder revision, while `/snippets/encoded_id` always returns the\nsnippet's current revision.\n\nNote that only the snippet's file contents are versioned, not its\nmeta data properties like the title.\n\nOther than that, the two endpoints are identical in behavior." + ] }, "put": { + "tags": ["Snippets"], + "description": "Identical to `UPDATE /snippets/encoded_id`, except that this endpoint\ntakes an explicit commit revision. Only the snippet's \"HEAD\"/\"tip\"\n(most recent) version can be updated and requests on all other,\nolder revisions fail by returning a 405 status.\n\nUsage of this endpoint over the unrestricted `/snippets/encoded_id`\ncould be desired if the caller wants to be sure no concurrent\nmodifications have taken place between the moment of the UPDATE\nrequest and the original GET.\n\nThis can be considered a so-called \"Compare And Swap\", or CAS\noperation.\n\nOther than that, the two endpoints are identical in behavior.", + "summary": "Update a previous revision of a snippet", "responses": { "200": { "description": "The updated snippet object.", @@ -14796,8 +14999,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Update a previous revision of a snippet", "security": [ { "oauth2": ["snippet:write"] @@ -14808,8 +15009,7 @@ { "api_key": [] } - ], - "description": "Identical to `UPDATE /snippets/encoded_id`, except that this endpoint\ntakes an explicit commit revision. Only the snippet's \"HEAD\"/\"tip\"\n(most recent) version can be updated and requests on all other,\nolder revisions fail by returning a 405 status.\n\nUsage of this endpoint over the unrestricted `/snippets/encoded_id`\ncould be desired if the caller wants to be sure no concurrent\nmodifications have taken place between the moment of the UPDATE\nrequest and the original GET.\n\nThis can be considered a so-called \"Compare And Swap\", or CAS\noperation.\n\nOther than that, the two endpoints are identical in behavior." + ] }, "parameters": [ { @@ -14843,6 +15043,9 @@ }, "/snippets/{workspace}/{encoded_id}/{node_id}/files/{path}": { "get": { + "tags": ["Snippets"], + "description": "Retrieves the raw contents of a specific file in the snippet. The\n`Content-Disposition` header will be \"attachment\" to avoid issues with\nmalevolent executable files.\n\nThe file's mime type is derived from its filename and returned in the\n`Content-Type` header.\n\nNote that for text files, no character encoding is included as part of\nthe content type.", + "summary": "Get a snippet's raw file", "responses": { "200": { "description": "Returns the contents of the specified file.", @@ -14882,8 +15085,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get a snippet's raw file", "security": [ { "oauth2": ["snippet"] @@ -14894,8 +15095,7 @@ { "api_key": [] } - ], - "description": "Retrieves the raw contents of a specific file in the snippet. The\n`Content-Disposition` header will be \"attachment\" to avoid issues with\nmalevolent executable files.\n\nThe file's mime type is derived from its filename and returned in the\n`Content-Type` header.\n\nNote that for text files, no character encoding is included as part of\nthe content type." + ] }, "parameters": [ { @@ -14938,6 +15138,9 @@ }, "/snippets/{workspace}/{encoded_id}/{revision}/diff": { "get": { + "tags": ["Snippets"], + "description": "Returns the diff of the specified commit against its first parent.\n\nNote that this resource is different in functionality from the `patch`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the diff is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this.", + "summary": "Get snippet changes between versions", "responses": { "200": { "description": "The raw diff contents." @@ -14973,8 +15176,6 @@ } } ], - "tags": ["Snippets"], - "summary": "Get snippet changes between versions", "security": [ { "oauth2": ["snippet"] @@ -14985,8 +15186,7 @@ { "api_key": [] } - ], - "description": "Returns the diff of the specified commit against its first parent.\n\nNote that this resource is different in functionality from the `patch`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the diff is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this." + ] }, "parameters": [ { @@ -15020,6 +15220,9 @@ }, "/snippets/{workspace}/{encoded_id}/{revision}/patch": { "get": { + "tags": ["Snippets"], + "description": "Returns the patch of the specified commit against its first\nparent.\n\nNote that this resource is different in functionality from the `diff`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the patch is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this.", + "summary": "Get snippet patch between versions", "responses": { "200": { "description": "The raw patch contents." @@ -15045,8 +15248,6 @@ } } }, - "tags": ["Snippets"], - "summary": "Get snippet patch between versions", "security": [ { "oauth2": ["snippet"] @@ -15057,8 +15258,7 @@ { "api_key": [] } - ], - "description": "Returns the patch of the specified commit against its first\nparent.\n\nNote that this resource is different in functionality from the `diff`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the patch is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this." + ] }, "parameters": [ { @@ -15090,497 +15290,60 @@ } ] }, - "/teams": { - "get": { - "responses": { - "200": { - "description": "A paginated list of teams.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_teams" - } - } - } - }, - "401": { - "description": "When the request wasn't authenticated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "parameters": [ - { - "name": "role", - "in": "query", - "description": "\nFilters the teams based on the authenticated user's role on each team.\n\n* **member**: returns a list of all the teams which the caller is a member of\n at least one team group or repository owned by the team\n* **contributor**: returns a list of teams which the caller has write access\n to at least one repository owned by the team\n* **admin**: returns a list teams which the caller has team administrator access\n", - "required": false, - "schema": { - "type": "string", - "enum": ["admin", "contributor", "member"] - } - } - ], - "tags": ["Teams"], - "summary": "List teams a user is part of", - "security": [ - { - "oauth2": ["team"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns all the teams that the authenticated user is associated\nwith.\n\n**This endpoint has been removed.\nYou should use the [workspaces](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-get) endpoint instead.\nFor more information, see [this post](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [] - }, - "/teams/{username}": { - "get": { - "responses": { - "200": { - "description": "The team object", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/team" - } - } - } - }, - "404": { - "description": "If no team exists for the specified name or UUID, or if the specified account is a personal account, not a team account.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Teams"], - "summary": "Get a team", - "security": [ - { - "oauth2": [] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Gets the public information associated with a team.\n\nIf the team's profile is private, `location`, `website` and\n`created_on` elements are omitted.\n\n**This endpoint has been removed.\nYou should use the [workspace](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-get) endpoint instead.\nFor more information, see [this post](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/followers": { - "get": { - "responses": { - "200": { - "description": "A paginated list of user objects.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_users" - } - } - } - }, - "404": { - "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Teams"], - "summary": "List team followers", - "security": [ - { - "oauth2": [] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns the list of accounts that are following this team.\n\n**This endpoint has been removed. There is no replacement endpoint.\nFor more information, see [this post](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/following": { - "get": { - "responses": { - "200": { - "description": "A paginated list of user objects.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_users" - } - } - } - }, - "404": { - "description": "If no team exists for the specified name, or if the specified account is a personal account, not a team account.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Teams"], - "summary": "List accounts a team is following", - "security": [ - { - "oauth2": ["account"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns the list of accounts this team is following.\n\n**This endpoint has been removed. There is no replacement endpoint.\nFor more information, see [this post](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/members": { - "get": { - "responses": { - "200": { - "description": "All members", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - }, - "404": { - "description": "When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Teams"], - "summary": "List team members", - "security": [ - { - "oauth2": ["account"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns all members of the specified team. Any member of any of the\nteam's groups is considered a member of the team. This includes users\nin groups that may not actually have access to any of the team's\nrepositories.\n\n**This operation has been removed due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/)\nfor details.\nYou should use the [workspaces](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get) endpoint as a replacement.**", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/permissions": { - "get": { - "responses": { - "200": { - "description": "Repositories owned by a team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_team_permissions" - } - } - } - }, - "403": { - "description": "The requesting user isn't an admin of the team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "parameters": [ - { - "name": "q", - "in": "query", - "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", - "required": false, - "schema": { - "type": "string" - } - } - ], - "tags": ["Teams"], - "summary": "List team permissions for a user ", - "security": [ - { - "oauth2": ["team"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns an object for each team permission a user on the team has.\n\n**This endpoint has been removed.\nYou should use the [workspace permissions](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-member-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nPermissions returned are effective permissions — if a user is a member of\nmultiple groups with distinct roles, only the highest level is returned.\n\nPermissions can be:\n\n* `admin`\n* `collaborator`\n\nOnly users with admin permission for the team may access this resource.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"permission\": \"admin\",\n \"type\": \"team_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"team\": {\n \"display_name\": \"Atlassian Bitbucket\",\n \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\"\n }\n },\n {\n \"permission\": \"collaborator\",\n \"type\": \"team_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"seanaty\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"team\": {\n \"display_name\": \"Atlassian Bitbucket\",\n \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\"\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nteam, user, or permission by adding the following query string\nparameters:\n\n* `q=user.uuid=\"{d301aafa-d676-4ee0-88be-962be7417567}\"` or `q=permission=\"admin\"`\n* `sort=team.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/permissions/repositories": { - "get": { - "responses": { - "200": { - "description": "List of team's repository permissions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_repository_permissions" - } - } - } - }, - "403": { - "description": "The requesting user isn't an admin of the team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "parameters": [ - { - "name": "q", - "in": "query", - "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", - "required": false, - "schema": { - "type": "string" - } - } - ], - "tags": ["Teams"], - "summary": "List repository permissions for a team", - "security": [ - { - "oauth2": ["repository", "team"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns an object for each repository permission for all of a\nteam’s repositories.\n\n**This endpoint has been removed.\nYou should use the [workspace repository permissions](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-permissions-repositories-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nIf the username URL parameter refers to a user account instead of\na team account, an object containing the repository permissions\nof all the username's repositories will be returned.\n\nPermissions returned are effective permissions — the highest level of\npermission the user has. This does not include public repositories that\nusers are not granted any specific permission in, and does not\ndistinguish between explicit and implicit privileges.\n\nOnly users with admin permission for the team may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby repository, user, or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/permissions/repositories/{repo_slug}": { - "get": { - "responses": { - "200": { - "description": "List of repository's repository permissions.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_repository_permissions" - } - } - } - }, - "403": { - "description": "The requesting user isn't an admin of the repository.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "parameters": [ - { - "name": "q", - "in": "query", - "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", - "required": false, - "schema": { - "type": "string" - } - } - ], - "tags": ["Teams"], - "summary": "List repository permissions for a team", - "security": [ - { - "oauth2": ["repository"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns an object for each repository permission of a given repository.\n\n**This endpoint has been removed.\nYou should use the [workspace repository permissions](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-permissions-repositories-repo-slug-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nIf the username URL parameter refers to a user account instead of\na team account, an object containing the repository permissions\nof the username's repository will be returned.\n\nPermissions returned are effective permissions — the highest level of\npermission the user has. This does not include public repositories that\nusers are not granted any specific permission in, and does not\ndistinguish between explicit and implicit privileges.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/teams/atlassian_tutorial/permissions/repositories/geordi\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby user, or permission by adding the following query string parameters:\n\n* `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", - "deprecated": true - }, - "parameters": [ - { - "name": "repo_slug", - "in": "path", - "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, "/teams/{username}/pipelines_config/variables/": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for an account", + "deprecated": true, + "description": "Find account level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariablesForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The found account level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Create a variable for a user", + "description": "Create an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "createPipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, "responses": { "201": { + "description": "The created variable.", "headers": { "Location": { "description": "The URL of the newly created pipeline variable.", @@ -15589,7 +15352,6 @@ } } }, - "description": "The created variable.", "content": { "application/json": { "schema": { @@ -15618,112 +15380,36 @@ } } } - }, - "parameters": [ - { - "description": "The account.", - "required": true, - "name": "username", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable2" - }, - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Create a variable for a user", - "operationId": "createPipelineVariableForTeam", - "description": "Create an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." - }, - "get": { - "responses": { - "200": { - "description": "The found account level variables.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_variables" - } - } - } - } - }, - "parameters": [ - { - "description": "The account.", - "required": true, - "name": "username", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "List variables for an account", - "operationId": "getPipelineVariablesForTeam", - "description": "Find account level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + } } }, "/teams/{username}/pipelines_config/variables/{variable_uuid}": { - "put": { - "responses": { - "200": { - "description": "The variable was updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - } - }, - "404": { - "description": "The account or the variable was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Get a variable for a team", + "description": "Retrieve a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariableForTeam", "parameters": [ { + "name": "username", "description": "The account.", "required": true, - "name": "username", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable" - }, - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Update a variable for a team", - "operationId": "updatePipelineVariableForTeam", - "description": "Update a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." - }, - "get": { "responses": { "200": { "description": "The variable.", @@ -15745,34 +15431,86 @@ } } } - }, + } + }, + "put": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Update a variable for a team", + "description": "Update a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "updatePipelineVariableForTeam", "parameters": [ { + "name": "username", "description": "The account.", "required": true, - "name": "username", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to retrieve.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Get a variable for a team", - "operationId": "getPipelineVariableForTeam", - "description": "Retrieve a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Delete a variable for a team", + "description": "Delete a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "deletePipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The variable was deleted" @@ -15787,349 +15525,57 @@ } } } - }, - "parameters": [ - { - "description": "The account.", - "required": true, - "name": "username", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the variable to delete.", - "required": true, - "name": "variable_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Delete a variable for a team", - "operationId": "deletePipelineVariableForTeam", - "description": "Delete a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + } } }, - "/teams/{username}/projects/": { - "get": { - "responses": { - "200": { - "description": "A paginated list of projects that belong to the specified team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_projects" - } - } - } - }, - "403": { - "description": "The requesting user isn't authorized to read the list of projects for the specified team.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - }, - "404": { - "description": "A team doesn't exist at this location.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Projects"], - "summary": "List a projects for a team", - "security": [ - { - "oauth2": ["project"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "**This endpoint has been removed.\nYou should use the [workspace projects](/cloud/bitbucket/rest/api-group-projects/#api-workspaces-workspace-projects-project-key-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "post": { - "responses": { - "201": { - "description": "A new project has been created.", - "headers": { - "Location": { - "description": "The location of the newly created project", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/project" - } - } - } - }, - "403": { - "description": "The requesting user isn't authorized to create the project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - }, - "404": { - "description": "A team doesn't exist at this location.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/project" - }, - "tags": ["Projects"], - "summary": "Create a project for a team", - "security": [ - { - "oauth2": ["project:write"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Creates a new project.\n\n**This endpoint has been removed.\nYou should use the [workspace projects](/cloud/bitbucket/rest/api-group-projects/#api-workspaces-workspace-projects-post) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nNote that the avatar has to be embedded as either a data-url\nor a URL to an external image as shown in the examples below:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```\n\nor even:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"http://i.imgur.com/72tRx4w.gif\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/teams/{username}/projects/{project_key}": { - "delete": { - "responses": { - "204": { - "description": "Successful deletion." - }, - "403": { - "description": "The requesting user isn't authorized to delete the project or the project isn't empty.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - }, - "404": { - "description": "A project isn't hosted at this location.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Projects"], - "summary": "Delete a project", - "security": [ - { - "oauth2": ["project:write"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "**This endpoint has been removed.\nYou should use the [workspace project](/cloud/bitbucket/rest/api-group-projects/#api-workspaces-workspace-projects-project-key-delete) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "get": { - "responses": { - "200": { - "description": "The project object.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/project" - } - } - } - }, - "403": { - "description": "The requesting user isn't authorized to access the project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - }, - "404": { - "description": "A project isn't hosted at this location.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Projects"], - "summary": "Get a project", - "security": [ - { - "oauth2": ["project"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "**This endpoint has been removed.\nYou should use the [workspace project](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-projects-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "put": { - "responses": { - "200": { - "description": "The existing project is has been updated.", - "headers": { - "Location": { - "description": "The location of the project. This header is only provided\nwhen the project key is updated.", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/project" - } - } - } - }, - "201": { - "description": "A new project has been created.", - "headers": { - "Location": { - "description": "The location of the newly created project", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/project" - } - } - } - }, - "403": { - "description": "The requesting user isn't authorized to update or create the project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - }, - "404": { - "description": "A team doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "requestBody": { - "$ref": "#/components/requestBodies/project" - }, - "tags": ["Projects"], - "summary": "Update a project", - "security": [ - { - "oauth2": ["project:write"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Since this endpoint can be used to both update and to create a\nproject, the request body depends on the intent.\n\n**This endpoint has been removed.\nYou should use the [workspace project](/cloud/bitbucket/rest/api-group-projects/#api-workspaces-workspace-projects-project-key-put) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\n#### Creation\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The `key` should not be specified in the body of request\n(since it is already present in the URL). The `name` is required,\neverything else is optional.\n\n#### Update\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The key is not required in the body (since it is already in\nthe URL). The key may be specified in the body, if the intent is\nto change the key itself. In such a scenario, the location of the\nproject is changed and is returned in the `Location` header of the\nresponse.", - "deprecated": true - }, - "parameters": [ - { - "name": "project_key", - "in": "path", - "description": "The project in question. This can either be the actual `key` assigned\nto the project or the `UUID` (surrounded by curly-braces (`{}`)).\n", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, "/teams/{username}/search/code": { "get": { + "tags": ["Search"], + "summary": "Search for code in a team's repositories", + "description": "Search for code in the repositories of the specified team.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "operationId": "searchTeam", + "parameters": [ + { + "name": "username", + "in": "path", + "description": "The account to search in; either the username or the UUID in curly braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], "responses": { "200": { "description": "Successful search", @@ -16171,106 +15617,21 @@ } } } - }, - "parameters": [ - { - "required": true, - "description": "The account to search in; either the username or the UUID in curly braces", - "in": "path", - "name": "username", - "schema": { - "type": "string" - } - }, - { - "required": true, - "description": "The search query", - "in": "query", - "name": "search_query", - "schema": { - "type": "string" - } - }, - { - "description": "Which page of the search results to retrieve", - "required": false, - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - }, - { - "description": "How many search results to retrieve per page", - "required": false, - "in": "query", - "name": "pagelen", - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - } - ], - "tags": ["Search"], - "summary": "Search for code in a team's repositories", - "operationId": "searchTeam", - "description": "Search for code in the repositories of the specified team.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n" - } - }, - "/teams/{workspace}/repositories": { - "get": { - "responses": { - "default": { - "description": "Unexpected error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Users", "Teams"], - "summary": "List workspace repositories", - "security": [ - { - "oauth2": ["repository"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "All repositories in the given workspace. This includes any private\nrepositories the calling user has access to.\n\n**This endpoint has been removed.\nYou should use the [repository list](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get) endpoint instead.\nFor more information, see the [deprecation announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "workspace", - "in": "path", - "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", - "required": true, - "schema": { - "type": "string" - } } - ] + } }, "/user": { "get": { + "tags": ["Users"], + "description": "Returns the currently logged in user.", + "summary": "Get current user", "responses": { "200": { "description": "The current user.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" } } } @@ -16286,8 +15647,6 @@ } } }, - "tags": ["Users"], - "summary": "Get current user", "security": [ { "oauth2": ["account"] @@ -16298,13 +15657,15 @@ { "api_key": [] } - ], - "description": "Returns the currently logged in user." + ] }, "parameters": [] }, "/user/emails": { "get": { + "tags": ["Users"], + "description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed.", + "summary": "List email addresses for current user", "responses": { "default": { "description": "Unexpected error.", @@ -16317,8 +15678,6 @@ } } }, - "tags": ["Users"], - "summary": "List email addresses for current user", "security": [ { "oauth2": ["email"] @@ -16329,13 +15688,15 @@ { "api_key": [] } - ], - "description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed." + ] }, "parameters": [] }, "/user/emails/{email}": { "get": { + "tags": ["Users"], + "description": "Returns details about a specific one of the authenticated user's\nemail addresses.\n\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not.", + "summary": "Get an email address for current user", "responses": { "default": { "description": "Unexpected error.", @@ -16348,8 +15709,6 @@ } } }, - "tags": ["Users"], - "summary": "Get an email address for current user", "security": [ { "oauth2": ["email"] @@ -16360,8 +15719,7 @@ { "api_key": [] } - ], - "description": "Returns details about a specific one of the authenticated user's\nemail addresses.\n\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not." + ] }, "parameters": [ { @@ -16377,6 +15735,9 @@ }, "/user/permissions/repositories": { "get": { + "tags": ["Repositories"], + "description": "Returns an object for each repository the caller has explicit access\nto and their effective permission — the highest level of permission the\ncaller has. This does not return public repositories that the user was\nnot granted any specific permission in, and does not distinguish between\nexplicit and implicit privileges.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nrepository or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=repository.name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "summary": "List repository permissions for a user", "responses": { "200": { "description": "Repository permissions for the repositories a caller has explicit access to.", @@ -16409,8 +15770,6 @@ } } ], - "tags": ["Repositories"], - "summary": "List repository permissions for a user", "security": [ { "oauth2": ["account", "repository"] @@ -16421,65 +15780,15 @@ { "api_key": [] } - ], - "description": "Returns an object for each repository the caller has explicit access\nto and their effective permission — the highest level of permission the\ncaller has. This does not return public repositories that the user was\nnot granted any specific permission in, and does not distinguish between\nexplicit and implicit privileges.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nrepository or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=repository.name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`." - }, - "parameters": [] - }, - "/user/permissions/teams": { - "get": { - "responses": { - "200": { - "description": "Team permissions for the teams a caller is a member of.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_team_permissions" - } - } - } - } - }, - "parameters": [ - { - "name": "q", - "in": "query", - "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", - "required": false, - "schema": { - "type": "string" - } - } - ], - "tags": ["Teams"], - "summary": "List team permissions for the user", - "security": [ - { - "oauth2": ["account"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "Returns an object for each team the caller is a member of, and their\neffective role — the highest level of privilege the caller has. If a\nuser is a member of multiple groups with distinct roles, only the\nhighest level is returned.\n\n**This endpoint has been removed.\nYou should use the [workspace permissions](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-get) endpoint instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nPermissions can be:\n\n* `admin`\n* `collaborator`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/teams\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"permission\": \"admin\",\n \"type\": \"team_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"team\": {\n \"display_name\": \"Atlassian Bitbucket\",\n \"uuid\": \"{4cc6108a-a241-4db0-96a5-64347ac04f87}\"\n }\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nteam or permission by adding the following query string parameters:\n\n* `q=team.uuid=\"{4cc6108a-a241-4db0-96a5-64347ac04f87}\"` or `q=permission=\"admin\"`\n* `sort=team.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", - "deprecated": true + ] }, "parameters": [] }, "/user/permissions/workspaces": { "get": { + "tags": ["Workspaces"], + "description": "Returns an object for each workspace the caller is a member of, and\ntheir effective role - the highest level of privilege the caller has.\nIf a user is a member of multiple groups with distinct roles, only the\nhighest level is returned.\n\nPermissions can be:\n\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"type\": \"workspace_membership\",\n \"permission\": \"owner\",\n \"last_accessed\": \"2019-03-07T12:35:02.900024+00:00\",\n \"added_on\": \"2018-10-11T17:42:02.961424+00:00\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=workspace.slug=\"bbworkspace1\"` or `q=permission=\"owner\"`\n* `sort=workspace.slug`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "summary": "List workspaces for the current user", "responses": { "200": { "description": "All of the workspace memberships for the authenticated user.", @@ -16522,8 +15831,6 @@ } } ], - "tags": ["Workspaces"], - "summary": "List workspaces for the current user", "security": [ { "oauth2": ["account"] @@ -16534,20 +15841,22 @@ { "api_key": [] } - ], - "description": "Returns an object for each workspace the caller is a member of, and\ntheir effective role - the highest level of privilege the caller has.\nIf a user is a member of multiple groups with distinct roles, only the\nhighest level is returned.\n\nPermissions can be:\n\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"type\": \"workspace_membership\",\n \"permission\": \"owner\",\n \"last_accessed\": \"2019-03-07T12:35:02.900024+00:00\",\n \"added_on\": \"2018-10-11T17:42:02.961424+00:00\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=workspace.slug=\"bbworkspace1\"` or `q=permission=\"owner\"`\n* `sort=workspace.slug`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`." + ] }, "parameters": [] }, "/users/{selected_user}": { "get": { + "tags": ["Users"], + "description": "Gets the public information associated with a user account.\n\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.\n\nNote that the user object returned by this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details.", + "summary": "Get a user", "responses": { "200": { "description": "The user object", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" } } } @@ -16563,8 +15872,6 @@ } } }, - "tags": ["Users"], - "summary": "Get a user", "security": [ { "oauth2": [] @@ -16575,8 +15882,7 @@ { "api_key": [] } - ], - "description": "Gets the public information associated with a user account.\n\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.\n\nNote that the user object returned by this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details." + ] }, "parameters": [ { @@ -16591,9 +15897,59 @@ ] }, "/users/{selected_user}/pipelines_config/variables/": { + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "List variables for a user", + "description": "Find user level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariablesForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The found user level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Create a variable for a user", + "description": "Create a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "createPipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, "responses": { "201": { + "description": "The created variable.", "headers": { "Location": { "description": "The URL of the newly created pipeline variable.", @@ -16602,7 +15958,6 @@ } } }, - "description": "The created variable.", "content": { "application/json": { "schema": { @@ -16631,112 +15986,36 @@ } } } - }, - "parameters": [ - { - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", - "required": true, - "name": "selected_user", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable2" - }, - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Create a variable for a user", - "operationId": "createPipelineVariableForUser", - "description": "Create a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." - }, - "get": { - "responses": { - "200": { - "description": "The found user level variables.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_variables" - } - } - } - } - }, - "parameters": [ - { - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", - "required": true, - "name": "selected_user", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "List variables for a user", - "operationId": "getPipelineVariablesForUser", - "description": "Find user level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + } } }, "/users/{selected_user}/pipelines_config/variables/{variable_uuid}": { - "put": { - "responses": { - "200": { - "description": "The variable was updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - } - }, - "404": { - "description": "The account or the variable was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Get a variable for a user", + "description": "Retrieve a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariableForUser", "parameters": [ { + "name": "selected_user", "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "required": true, - "name": "selected_user", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable" - }, - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Update a variable for a user", - "operationId": "updatePipelineVariableForUser", - "description": "Update a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." - }, - "get": { "responses": { "200": { "description": "The variable.", @@ -16758,34 +16037,86 @@ } } } - }, + } + }, + "put": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Update a variable for a user", + "description": "Update a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "updatePipelineVariableForUser", "parameters": [ { + "name": "selected_user", "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "required": true, - "name": "selected_user", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to retrieve.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Get a variable for a user", - "operationId": "getPipelineVariableForUser", - "description": "Retrieve a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Delete a variable for a user", + "description": "Delete an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "deletePipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The variable was deleted" @@ -16800,32 +16131,7 @@ } } } - }, - "parameters": [ - { - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", - "required": true, - "name": "selected_user", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the variable to delete.", - "required": true, - "name": "variable_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "deprecated": true, - "summary": "Delete a variable for a user", - "operationId": "deletePipelineVariableForUser", - "description": "Delete an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/)." + } } }, "/users/{selected_user}/properties/{app_key}/{property_name}": { @@ -16835,30 +16141,33 @@ "description": "An empty response." } }, + "operationId": "updateUserHostedPropertyValue", + "summary": "Update a user application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", "parameters": [ { "required": true, - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "in": "path", "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } @@ -16867,10 +16176,7 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"], - "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", - "summary": "Update a user application property", - "operationId": "updateUserHostedPropertyValue" + "tags": ["properties"] }, "delete": { "responses": { @@ -16878,39 +16184,39 @@ "description": "An empty response." } }, + "operationId": "deleteUserHostedPropertyValue", + "summary": "Delete a user application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", "parameters": [ { "required": true, - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "in": "path", "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", - "summary": "Delete a user application property", - "operationId": "deleteUserHostedPropertyValue" + "tags": ["properties"] }, "get": { "responses": { @@ -16925,43 +16231,89 @@ } } }, + "operationId": "retrieveUserHostedPropertyValue", + "summary": "Get a user application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", "parameters": [ { "required": true, - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "in": "path", "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", "schema": { "type": "string" } }, { "required": true, - "description": "The key of the Connect app.", "in": "path", "name": "app_key", + "description": "The key of the Connect app.", "schema": { "type": "string" } }, { "required": true, - "description": "The name of the property.", "in": "path", "name": "property_name", + "description": "The name of the property.", "schema": { "type": "string" } } ], - "tags": ["properties"], - "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", - "summary": "Get a user application property", - "operationId": "retrieveUserHostedPropertyValue" + "tags": ["properties"] } }, "/users/{selected_user}/search/code": { "get": { + "tags": ["Search"], + "summary": "Search for code in a user's repositories", + "description": "Search for code in the repositories of the specified user.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "operationId": "searchAccount", + "parameters": [ + { + "name": "selected_user", + "in": "path", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], "responses": { "200": { "description": "Successful search", @@ -17003,57 +16355,14 @@ } } } - }, - "parameters": [ - { - "required": true, - "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", - "in": "path", - "name": "selected_user", - "schema": { - "type": "string" - } - }, - { - "required": true, - "description": "The search query", - "in": "query", - "name": "search_query", - "schema": { - "type": "string" - } - }, - { - "description": "Which page of the search results to retrieve", - "required": false, - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - }, - { - "description": "How many search results to retrieve per page", - "required": false, - "in": "query", - "name": "pagelen", - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - } - ], - "tags": ["Search"], - "summary": "Search for code in a user's repositories", - "operationId": "searchAccount", - "description": "Search for code in the repositories of the specified user.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n" + } } }, "/users/{selected_user}/ssh-keys": { "get": { + "tags": ["Ssh"], + "description": "Returns a paginated list of the user's SSH public keys.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n{\n \"page\": 1,\n \"pagelen\": 10,\n \"size\": 1,\n \"values\": [\n {\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n }\n ]\n}\n```", + "summary": "List SSH keys", "responses": { "200": { "description": "A list of the SSH keys associated with the account.", @@ -17079,8 +16388,6 @@ } } }, - "tags": ["Ssh"], - "summary": "List SSH keys", "security": [ { "oauth2": ["account"] @@ -17091,10 +16398,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of the user's SSH public keys.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n{\n \"page\": 1,\n \"pagelen\": 10,\n \"size\": 1,\n \"values\": [\n {\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n }\n ]\n}\n```" + ] }, "post": { + "tags": ["Ssh"], + "description": "Adds a new SSH public key to the specified user account and returns the resulting key.\n\nExample:\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "summary": "Add a new SSH key", "responses": { "201": { "description": "The newly created SSH key.", @@ -17140,8 +16449,6 @@ }, "description": "The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis)." }, - "tags": ["Ssh"], - "summary": "Add a new SSH key", "security": [ { "oauth2": ["account:write"] @@ -17152,8 +16459,7 @@ { "api_key": [] } - ], - "description": "Adds a new SSH public key to the specified user account and returns the resulting key.\n\nExample:\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```" + ] }, "parameters": [ { @@ -17169,6 +16475,9 @@ }, "/users/{selected_user}/ssh-keys/{key_id}": { "delete": { + "tags": ["Ssh"], + "description": "Deletes a specific SSH public key from a user's account\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n```", + "summary": "Delete a SSH key", "responses": { "204": { "description": "The key has been deleted" @@ -17197,8 +16506,6 @@ } } }, - "tags": ["Ssh"], - "summary": "Delete a SSH key", "security": [ { "oauth2": ["account:write"] @@ -17209,10 +16516,12 @@ { "api_key": [] } - ], - "description": "Deletes a specific SSH public key from a user's account\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n```" + ] }, "get": { + "tags": ["Ssh"], + "description": "Returns a specific SSH public key belonging to a user.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{fbe4bbab-f6f7-4dde-956b-5c58323c54b3}\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "summary": "Get a SSH key", "responses": { "200": { "description": "The specific SSH key matching the user and UUID", @@ -17238,8 +16547,6 @@ } } }, - "tags": ["Ssh"], - "summary": "Get a SSH key", "security": [ { "oauth2": ["account"] @@ -17250,10 +16557,12 @@ { "api_key": [] } - ], - "description": "Returns a specific SSH public key belonging to a user.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{fbe4bbab-f6f7-4dde-956b-5c58323c54b3}\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```" + ] }, "put": { + "tags": ["Ssh"], + "description": "Updates a specific SSH public key on a user's account\n\nNote: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\" -d '{\"label\": \"Work key\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n\n{\n \"comment\": \"\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"Work key\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "summary": "Update a SSH key", "responses": { "200": { "description": "The newly updated SSH key.", @@ -17299,8 +16608,6 @@ }, "description": "The updated SSH key object" }, - "tags": ["Ssh"], - "summary": "Update a SSH key", "security": [ { "oauth2": ["account:write"] @@ -17311,8 +16618,7 @@ { "api_key": [] } - ], - "description": "Updates a specific SSH public key on a user's account\n\nNote: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\" -d '{\"label\": \"Work key\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n\n{\n \"comment\": \"\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"Work key\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```" + ] }, "parameters": [ { @@ -17335,102 +16641,11 @@ } ] }, - "/users/{username}/members": { - "get": { - "responses": { - "200": { - "description": "All members", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - }, - "404": { - "description": "When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Users"], - "summary": "List team users", - "security": [ - { - "oauth2": ["account"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "**This endpoint has been removed.\nYou should use the [workspaces](/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get) endpoint instead.\nFor more information, see [this post](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "username", - "in": "path", - "description": "This can either be the username or the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`. An account\nis either a team or user.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/users/{workspace}/repositories": { - "get": { - "responses": { - "default": { - "description": "Unexpected error.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "tags": ["Users", "Teams"], - "summary": "List workspace repositories", - "security": [ - { - "oauth2": ["repository"] - }, - { - "basic": [] - }, - { - "api_key": [] - } - ], - "description": "All repositories in the given workspace. This includes any private\nrepositories the calling user has access to.\n\n**This endpoint has been removed.\nYou should use the [repository list](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get) endpoint instead.\nFor more information, see the [deprecation announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**", - "deprecated": true - }, - "parameters": [ - { - "name": "workspace", - "in": "path", - "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, "/workspaces": { "get": { + "tags": ["Workspaces"], + "description": "Returns a list of workspaces accessible by the authenticated user.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"links\": {\n \"owners\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bbworkspace1\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/bbworkspace1\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bbworkspace1/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801\"\n },\n \"members\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members\"\n },\n \"projects\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects\"\n }\n },\n \"created_on\": \"2018-11-14T19:15:05.058566+00:00\",\n \"type\": \"workspace\",\n \"slug\": \"bbworkspace1\",\n \"is_private\": true,\n \"name\": \"Atlassian Bitbucket\"\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=slug=\"bbworkspace1\"` or `q=is_private=true`\n* `sort=created_on`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**", + "summary": "List workspaces for user", "responses": { "200": { "description": "The list of workspaces accessible by the authenticated user.", @@ -17483,8 +16698,6 @@ } } ], - "tags": ["Workspaces"], - "summary": "List workspaces for user", "security": [ { "oauth2": ["account"] @@ -17495,13 +16708,15 @@ { "api_key": [] } - ], - "description": "Returns a list of workspaces accessible by the authenticated user.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"links\": {\n \"owners\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bbworkspace1\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/bbworkspace1\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bbworkspace1/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801\"\n },\n \"members\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members\"\n },\n \"projects\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects\"\n }\n },\n \"created_on\": \"2018-11-14T19:15:05.058566+00:00\",\n \"type\": \"workspace\",\n \"slug\": \"bbworkspace1\",\n \"is_private\": true,\n \"name\": \"Atlassian Bitbucket\"\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=slug=\"bbworkspace1\"` or `q=is_private=true`\n* `sort=created_on`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**" + ] }, "parameters": [] }, "/workspaces/{workspace}": { "get": { + "tags": ["Workspaces"], + "description": "Returns the requested workspace.", + "summary": "Get a workspace", "responses": { "200": { "description": "The workspace.", @@ -17524,8 +16739,6 @@ } } }, - "tags": ["Workspaces"], - "summary": "Get a workspace", "security": [ { "oauth2": [] @@ -17536,8 +16749,7 @@ { "api_key": [] } - ], - "description": "Returns the requested workspace." + ] }, "parameters": [ { @@ -17553,6 +16765,9 @@ }, "/workspaces/{workspace}/hooks": { "get": { + "tags": ["Workspaces", "Webhooks"], + "description": "Returns a paginated list of webhooks installed on this workspace.", + "summary": "List webhooks for a workspace", "responses": { "200": { "description": "The paginated list of installed webhooks.", @@ -17585,8 +16800,6 @@ } } }, - "tags": ["Workspaces", "Webhooks"], - "summary": "List webhooks for a workspace", "security": [ { "oauth2": ["webhook"] @@ -17597,10 +16810,12 @@ { "api_key": [] } - ], - "description": "Returns a paginated list of webhooks installed on this workspace." + ] }, "post": { + "tags": ["Workspaces", "Webhooks"], + "description": "Creates a new webhook on the specified workspace.\n\nWorkspace webhooks are fired for events from all repositories contained\nby that workspace.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nThis call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nThe `url` must properly resolve and cannot be an internal, non-routed address.\n\nOnly workspace owners can install webhooks on workspaces.", + "summary": "Create a webhook for a workspace", "responses": { "201": { "description": "If the webhook was registered successfully.", @@ -17641,8 +16856,6 @@ } } }, - "tags": ["Workspaces", "Webhooks"], - "summary": "Create a webhook for a workspace", "security": [ { "oauth2": ["webhook"] @@ -17653,8 +16866,7 @@ { "api_key": [] } - ], - "description": "Creates a new webhook on the specified workspace.\n\nWorkspace webhooks are fired for events from all repositories contained\nby that workspace.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nThis call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nThe `url` must properly resolve and cannot be an internal, non-routed address.\n\nOnly workspace owners can install webhooks on workspaces." + ] }, "parameters": [ { @@ -17670,6 +16882,9 @@ }, "/workspaces/{workspace}/hooks/{uid}": { "delete": { + "tags": ["Workspaces", "Webhooks"], + "description": "Deletes the specified webhook subscription from the given workspace.", + "summary": "Delete a webhook for a workspace", "responses": { "204": { "description": "When the webhook was deleted successfully" @@ -17695,8 +16910,6 @@ } } }, - "tags": ["Workspaces", "Webhooks"], - "summary": "Delete a webhook for a workspace", "security": [ { "oauth2": ["webhook"] @@ -17707,10 +16920,12 @@ { "api_key": [] } - ], - "description": "Deletes the specified webhook subscription from the given workspace." + ] }, "get": { + "tags": ["Workspaces", "Webhooks"], + "description": "Returns the webhook with the specified id installed on the given\nworkspace.", + "summary": "Get a webhook for a workspace", "responses": { "200": { "description": "The webhook subscription object.", @@ -17733,8 +16948,6 @@ } } }, - "tags": ["Workspaces", "Webhooks"], - "summary": "Get a webhook for a workspace", "security": [ { "oauth2": ["webhook"] @@ -17745,10 +16958,12 @@ { "api_key": [] } - ], - "description": "Returns the webhook with the specified id installed on the given\nworkspace." + ] }, "put": { + "tags": ["Workspaces", "Webhooks"], + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", + "summary": "Update a webhook for a workspace", "responses": { "200": { "description": "The webhook subscription object.", @@ -17781,8 +16996,6 @@ } } }, - "tags": ["Workspaces", "Webhooks"], - "summary": "Update a webhook for a workspace", "security": [ { "oauth2": ["webhook"] @@ -17793,8 +17006,7 @@ { "api_key": [] } - ], - "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`" + ] }, "parameters": [ { @@ -17819,6 +17031,9 @@ }, "/workspaces/{workspace}/members": { "get": { + "tags": ["Workspaces"], + "description": "Returns all members of the requested workspace.", + "summary": "List users in a workspace", "responses": { "200": { "description": "The list of users that are part of a workspace.", @@ -17841,8 +17056,6 @@ } } }, - "tags": ["Workspaces"], - "summary": "List users in a workspace", "security": [ { "oauth2": ["account"] @@ -17853,8 +17066,7 @@ { "api_key": [] } - ], - "description": "Returns all members of the requested workspace." + ] }, "parameters": [ { @@ -17870,6 +17082,9 @@ }, "/workspaces/{workspace}/members/{member}": { "get": { + "tags": ["Workspaces"], + "description": "Returns the workspace membership, which includes\na `User` object for the member and a `Workspace` object\nfor the requested workspace.", + "summary": "Get user membership for a workspace", "responses": { "200": { "description": "The user that is part of a workspace.", @@ -17902,8 +17117,6 @@ } } }, - "tags": ["Workspaces"], - "summary": "Get user membership for a workspace", "security": [ { "oauth2": ["account"] @@ -17914,8 +17127,7 @@ { "api_key": [] } - ], - "description": "Returns the workspace membership, which includes\na `User` object for the member and a `Workspace` object\nfor the requested workspace." + ] }, "parameters": [ { @@ -17940,6 +17152,9 @@ }, "/workspaces/{workspace}/permissions": { "get": { + "tags": ["Workspaces"], + "description": "Returns the list of members in a workspace\nand their permission levels.\nPermission can be:\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl -X https://api.bitbucket.org/2.0/workspaces/bbworkspace1/permissions\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"permission\": \"owner\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n },\n {\n \"permission\": \"member\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"seanaty\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by\npermission by adding the following query string parameters:\n\n* `q=permission=\"owner\"`", + "summary": "List user permissions in a workspace", "responses": { "200": { "description": "The list of users that are part of a workspace, along with their permission.", @@ -17973,8 +17188,6 @@ } } ], - "tags": ["Workspaces"], - "summary": "List user permissions in a workspace", "security": [ { "oauth2": ["account"] @@ -17985,8 +17198,7 @@ { "api_key": [] } - ], - "description": "Returns the list of members in a workspace\nand their permission levels.\nPermission can be:\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl -X https://api.bitbucket.org/2.0/workspaces/bbworkspace1/permissions\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"permission\": \"owner\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n },\n {\n \"permission\": \"member\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"seanaty\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by\npermission by adding the following query string parameters:\n\n* `q=permission=\"owner\"`" + ] }, "parameters": [ { @@ -18002,6 +17214,9 @@ }, "/workspaces/{workspace}/permissions/repositories": { "get": { + "tags": ["Workspaces"], + "description": "Returns an object for each repository permission for all of a\nworkspace's repositories.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the team may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Jeff Zeng\",\n \"uuid\": \"{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"whee\",\n \"full_name\": \"atlassian_tutorial/whee\",\n \"uuid\": \"{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 3\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby repository, user, or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "summary": "List all repository permissions for a workspace", "responses": { "200": { "description": "List of workspace's repository permissions.", @@ -18044,8 +17259,6 @@ } } ], - "tags": ["Workspaces"], - "summary": "List all repository permissions for a workspace", "security": [ { "oauth2": ["account"] @@ -18056,8 +17269,7 @@ { "api_key": [] } - ], - "description": "Returns an object for each repository permission for all of a\nworkspace's repositories.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the team may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Jeff Zeng\",\n \"uuid\": \"{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"whee\",\n \"full_name\": \"atlassian_tutorial/whee\",\n \"uuid\": \"{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 3\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby repository, user, or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`." + ] }, "parameters": [ { @@ -18073,6 +17285,9 @@ }, "/workspaces/{workspace}/permissions/repositories/{repo_slug}": { "get": { + "tags": ["Workspaces"], + "description": "Returns an object for the repository permission of each user in the\nrequested repository.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories/geordi\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby user, or permission by adding the following query string parameters:\n\n* `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "summary": "List a repository permissions for a workspace", "responses": { "200": { "description": "The repository permission for all users in this repository.", @@ -18115,8 +17330,6 @@ } } ], - "tags": ["Workspaces"], - "summary": "List a repository permissions for a workspace", "security": [ { "oauth2": ["repository"] @@ -18127,8 +17340,7 @@ { "api_key": [] } - ], - "description": "Returns an object for the repository permission of each user in the\nrequested repository.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories/geordi\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby user, or permission by adding the following query string parameters:\n\n* `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`." + ] }, "parameters": [ { @@ -18153,6 +17365,21 @@ }, "/workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration": { "get": { + "tags": ["Pipelines"], + "summary": "Get OpenID configuration for OIDC in Pipelines", + "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/", + "operationId": "getOIDCConfiguration", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "The OpenID configuration" @@ -18167,26 +17394,26 @@ } } } - }, + } + } + }, + "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { + "get": { + "tags": ["Pipelines"], + "summary": "Get keys for OIDC in Pipelines", + "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/", + "operationId": "getOIDCKeys", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get OpenID configuration for OIDC in Pipelines", - "operationId": "getOIDCConfiguration", - "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/" - } - }, - "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { - "get": { "responses": { "200": { "description": "The keys in JSON web key format" @@ -18201,28 +17428,61 @@ } } } - }, + } + } + }, + "/workspaces/{workspace}/pipelines-config/variables": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for a workspace", + "description": "Find workspace level variables.", + "operationId": "getPipelineVariablesForWorkspace", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get keys for OIDC in Pipelines", - "operationId": "getOIDCKeys", - "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/" - } - }, - "/workspaces/{workspace}/pipelines-config/variables": { + "responses": { + "200": { + "description": "The found workspace level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + } + }, "post": { + "tags": ["Pipelines"], + "summary": "Create a variable for a workspace", + "description": "Create a workspace level variable.", + "operationId": "createPipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, "responses": { "201": { + "description": "The created variable.", "headers": { "Location": { "description": "The URL of the newly created pipeline variable.", @@ -18231,7 +17491,6 @@ } } }, - "description": "The created variable.", "content": { "application/json": { "schema": { @@ -18260,109 +17519,35 @@ } } } - }, - "description": "Create a workspace level variable.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable2" - }, - "tags": ["Pipelines"], - "summary": "Create a variable for a workspace", - "operationId": "createPipelineVariableForWorkspace" - }, - "get": { - "responses": { - "200": { - "description": "The found workspace level variables.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_variables" - } - } - } - } - }, - "description": "Find workspace level variables.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "List variables for a workspace", - "operationId": "getPipelineVariablesForWorkspace" + } } }, "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}": { - "put": { - "responses": { - "200": { - "description": "The variable was updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_variable" - } - } - } - }, - "404": { - "description": "The workspace or the variable was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - }, - "description": "Update a workspace level variable.", + "get": { + "tags": ["Pipelines"], + "summary": "Get variable for a workspace", + "description": "Retrieve a workspace level variable.", + "operationId": "getPipelineVariableForWorkspace", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "requestBody": { - "$ref": "#/components/requestBodies/pipeline_variable" - }, - "tags": ["Pipelines"], - "summary": "Update variable for a workspace", - "operationId": "updatePipelineVariableForWorkspace" - }, - "get": { "responses": { "200": { "description": "The variable.", @@ -18384,33 +17569,84 @@ } } } - }, - "description": "Retrieve a workspace level variable.", + } + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update variable for a workspace", + "description": "Update a workspace level variable.", + "operationId": "updatePipelineVariableForWorkspace", "parameters": [ { + "name": "workspace", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", "required": true, - "name": "workspace", "in": "path", "schema": { "type": "string" } }, { - "description": "The UUID of the variable to retrieve.", - "required": true, "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, "in": "path", "schema": { "type": "string" } } ], - "tags": ["Pipelines"], - "summary": "Get variable for a workspace", - "operationId": "getPipelineVariableForWorkspace" + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The workspace or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } }, "delete": { + "tags": ["Pipelines"], + "summary": "Delete a variable for a workspace", + "description": "Delete a workspace level variable.", + "operationId": "deletePipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "responses": { "204": { "description": "The variable was deleted" @@ -18425,35 +17661,14 @@ } } } - }, - "description": "Delete a workspace level variable.", - "parameters": [ - { - "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", - "required": true, - "name": "workspace", - "in": "path", - "schema": { - "type": "string" - } - }, - { - "description": "The UUID of the variable to delete.", - "required": true, - "name": "variable_uuid", - "in": "path", - "schema": { - "type": "string" - } - } - ], - "tags": ["Pipelines"], - "summary": "Delete a variable for a workspace", - "operationId": "deletePipelineVariableForWorkspace" + } } }, "/workspaces/{workspace}/projects": { "get": { + "tags": ["Workspaces"], + "description": "Returns the list of projects in this workspace.", + "summary": "List projects in a workspace", "responses": { "200": { "description": "The list of projects in this workspace.", @@ -18476,8 +17691,6 @@ } } }, - "tags": ["Workspaces"], - "summary": "List projects in a workspace", "security": [ { "oauth2": ["project"] @@ -18488,10 +17701,12 @@ { "api_key": [] } - ], - "description": "Returns the list of projects in this workspace." + ] }, "post": { + "tags": ["Projects"], + "description": "Creates a new project.\n\nNote that the avatar has to be embedded as either a data-url\nor a URL to an external image as shown in the examples below:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```\n\nor even:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"http://i.imgur.com/72tRx4w.gif\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```", + "summary": "Create a project in a workspace", "responses": { "201": { "description": "A new project has been created.", @@ -18535,11 +17750,9 @@ "requestBody": { "$ref": "#/components/requestBodies/project" }, - "tags": ["Projects"], - "summary": "Create a project in a workspace", "security": [ { - "oauth2": ["project:write"] + "oauth2": ["project:admin"] }, { "basic": [] @@ -18547,8 +17760,7 @@ { "api_key": [] } - ], - "description": "Creates a new project.\n\nNote that the avatar has to be embedded as either a data-url\nor a URL to an external image as shown in the examples below:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```\n\nor even:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"http://i.imgur.com/72tRx4w.gif\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```" + ] }, "parameters": [ { @@ -18564,6 +17776,9 @@ }, "/workspaces/{workspace}/projects/{project_key}": { "delete": { + "tags": ["Projects"], + "description": "Deletes this project. This is an irreversible operation.\n\nYou cannot delete a project that still contains repositories.\nTo delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete)\nor transfer the repositories first.\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/bbworkspace1/PROJ\n```", + "summary": "Delete a project for a workspace", "responses": { "204": { "description": "Successful deletion." @@ -18589,11 +17804,9 @@ } } }, - "tags": ["Projects"], - "summary": "Delete a project for a workspace", "security": [ { - "oauth2": ["project:write"] + "oauth2": ["project:admin"] }, { "basic": [] @@ -18601,10 +17814,12 @@ { "api_key": [] } - ], - "description": "Deletes this project. This is an irreversible operation.\n\nYou cannot delete a project that still contains repositories.\nTo delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete)\nor transfer the repositories first.\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/bbworkspace1/PROJ\n```" + ] }, "get": { + "tags": ["Projects", "Workspaces"], + "description": "Returns the requested project.", + "summary": "Get a project for a workspace", "responses": { "200": { "description": "The project that is part of a workspace.", @@ -18647,8 +17862,6 @@ } } }, - "tags": ["Projects", "Workspaces"], - "summary": "Get a project for a workspace", "security": [ { "oauth2": ["project"] @@ -18659,10 +17872,12 @@ { "api_key": [] } - ], - "description": "Returns the requested project." + ] }, "put": { + "tags": ["Projects"], + "description": "Since this endpoint can be used to both update and to create a\nproject, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The `key` should not be specified in the body of request\n(since it is already present in the URL). The `name` is required,\neverything else is optional.\n\n#### Update\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The key is not required in the body (since it is already in\nthe URL). The key may be specified in the body, if the intent is\nto change the key itself. In such a scenario, the location of the\nproject is changed and is returned in the `Location` header of the\nresponse.", + "summary": "Update a project for a workspace", "responses": { "200": { "description": "The existing project is has been updated.", @@ -18724,11 +17939,9 @@ "requestBody": { "$ref": "#/components/requestBodies/project" }, - "tags": ["Projects"], - "summary": "Update a project for a workspace", "security": [ { - "oauth2": ["project:write"] + "oauth2": ["project:admin"] }, { "basic": [] @@ -18736,8 +17949,7 @@ { "api_key": [] } - ], - "description": "Since this endpoint can be used to both update and to create a\nproject, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The `key` should not be specified in the body of request\n(since it is already present in the URL). The `name` is required,\neverything else is optional.\n\n#### Update\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The key is not required in the body (since it is already in\nthe URL). The key may be specified in the body, if the intent is\nto change the key itself. In such a scenario, the location of the\nproject is changed and is returned in the `Location` header of the\nresponse." + ] }, "parameters": [ { @@ -18760,8 +17972,793 @@ } ] }, + "/workspaces/{workspace}/projects/{project_key}/branching-model": { + "get": { + "tags": ["Branching model"], + "description": "Return the branching model set at the project level. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)\nAPI.\n\nThe returned object:\n\n1. Always has a `development` property. `development.name` is\n the user-specified branch that can be inherited by an individual repository's\n branching model.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.name` is the user-specified branch that can be\n inherited by an individual repository's branching model.\n3. Always has a `branch_types` array which contains all enabled branch\n types.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": \"master\",\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"use_mainbranch\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"project_branching_model\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model\"\n }\n }\n}\n```", + "summary": "Get the branching model for a project", + "responses": { + "200": { + "description": "The branching model object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_branching_model" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have read access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/branching-model/settings": { + "get": { + "tags": ["Branching model"], + "description": "Return the branching model configuration for a project. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may find the\n[active model API](#api-workspaces-workspace-projects-project-key-branching-model-get)\nmore useful.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": null,\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"use_mainbranch\": false,\n \"enabled\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"enabled\": true,\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"enabled\": true,\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"enabled\": false,\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model_settings\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model/settings\"\n }\n }\n}\n```", + "summary": "Get the branching model config for a project", + "responses": { + "200": { + "description": "The branching model configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branching_model_settings" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Branching model"], + "description": "Update the branching model configuration for a project.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. The `enabled` property can be used to enable (`true`)\nor disable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nExample Body:\n\n```\n {\n \"development\": {\n \"use_mainbranch\": true\n },\n \"production\": {\n \"enabled\": true,\n \"use_mainbranch\": false,\n \"name\": \"production\"\n },\n \"branch_types\": [\n {\n \"kind\": \"bugfix\",\n \"enabled\": true,\n \"prefix\": \"bugfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"release\",\n \"enabled\": false,\n }\n ]\n }\n```", + "summary": "Update the branching model config for a project", + "responses": { + "200": { + "description": "The updated branching model configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branching_model_settings" + } + } + } + }, + "400": { + "description": "If the request contains an invalid branching model configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/default-reviewers": { + "get": { + "tags": ["Projects"], + "description": "Return a list of all default reviewers for a project. This is a list of users that will be added as default\nreviewers to pull requests for any repository within the project.\n\nExample:\n```\n$ curl https://bitbucket.org/!api/2.0/.../projects/.../default-reviewers | jq .\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"user\": {\n \"display_name\": \"Davis Lee\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\"\n },\n {\n \"user\": {\n \"display_name\": \"Jorge Rodriguez\",\n \"uuid\": \"{1aa43376-260d-4a0b-9660-f62672b9655d}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "summary": "List the default reviewers in a project", + "responses": { + "200": { + "description": "The list of project default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_default_reviewer_and_type" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the workspace or project does not exist at this location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}": { + "delete": { + "tags": ["Projects"], + "description": "Removes a default reviewer from the project.\n\nExample:\n```\n$ curl https://bitbucket.org/!api/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n\nHTTP/1.1 204\n```", + "summary": "Remove the specific user from the project's default reviewers", + "responses": { + "204": { + "description": "The specified user was removed from the list of project default reviewers" + }, + "400": { + "description": "If the specified user is not a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the specified default reviewer.\n\nExample:\n```\n$ curl https://bitbucket.org/!api/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n{\n \"display_name\": \"Davis Lee\",\n \"type\": \"user\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n}\n```", + "summary": "Get a default reviewer", + "responses": { + "200": { + "description": "The specified user that is a default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user" + } + } + } + }, + "400": { + "description": "If the specified user is not a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Adds the specified user to the project's list of default reviewers. The method is\nidempotent. Accepts an optional body containing the `uuid` of the user to be added.\n\nExample:\n```\n$ curl -XPUT https://bitbucket.org/!api/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n-d { 'uuid': '{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}' }\n\nHTTP/1.1 204\n```", + "summary": "Add the specific user as a default reviewer for the project", + "responses": { + "204": { + "description": "The specified user was added as a project default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user" + } + } + } + }, + "400": { + "description": "If the specified user cannot be added as a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This can either be the actual `key` assigned\nto the project or the `UUID` (surrounded by curly-braces (`{}`)).\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user", + "in": "path", + "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/deploy-keys": { + "get": { + "tags": ["Deployments"], + "description": "Returns all deploy keys belonging to a project.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys\n\nOutput:\n{\n \"pagelen\":10,\n \"values\":[\n {\n \"comment\":\"thakseth@C02W454JHTD8\",\n \"last_used\":null,\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\"\n }\n },\n \"label\":\"test\",\n \"project\":{\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\"\n }\n },\n \"type\":\"project\",\n \"name\":\"cooperative standard\",\n \"key\":\"TEST_PROJECT\",\n \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\"\n },\n \"created_on\":\"2021-07-28T21:20:19.491721+00:00\",\n \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\",\n \"type\":\"project_deploy_key\",\n \"id\":1234\n }\n ],\n \"page\":1,\n \"size\":1\n}\n```", + "summary": "List project deploy keys", + "responses": { + "200": { + "description": "Deploy keys matching the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_project_deploy_keys" + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Deployments"], + "description": "Create a new deploy key in a project.\n\nExample:\n```\n$ curl -XPOST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/!api/2.0/workspaces/jzeng/projects/JZ/deploy-keys/ -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n\nOutput:\n{\n \"comment\": \"mleu@C02W454JHTD8\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": \"https://jzeng.devbucket.org/!api/2.0/workspaces/testadfsa/projects/ASDF/deploy-keys/5/\"\n }\n },\n \"label\": \"myprojectkey\",\n \"project\": {\n ...\n },\n \"created_on\": \"2021-08-10T05:28:00.570859+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"type\": \"project_deploy_key\",\n \"id\": 5\n}\n```", + "summary": "Create a project deploy key", + "responses": { + "200": { + "description": "The project deploy key that was created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_deploy_key" + } + } + } + }, + "400": { + "description": "Invalid deploy key inputs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}": { + "delete": { + "tags": ["Deployments"], + "description": "This deletes a deploy key from a project.\n\nExample:\n```\n$ curl -XDELETE \\\n-H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/1234\n```", + "summary": "Delete a deploy key from a project", + "responses": { + "204": { + "description": "The project deploy key has been deleted" + }, + "403": { + "description": "If the current user does not have permission to delete a key for the specified project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace, project, or project deploy key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Deployments"], + "description": "Returns the deploy key belonging to a specific key ID.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\n\nOutput:\n{\n \"pagelen\":10,\n \"values\":[\n {\n \"comment\":\"thakseth@C02W454JHTD8\",\n \"last_used\":null,\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\"\n }\n },\n \"label\":\"test\",\n \"project\":{\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\"\n }\n },\n \"type\":\"project\",\n \"name\":\"cooperative standard\",\n \"key\":\"TEST_PROJECT\",\n \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\"\n },\n \"created_on\":\"2021-07-28T21:20:19.491721+00:00\",\n \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\",\n \"type\":\"project_deploy_key\",\n \"id\":1234\n }\n ],\n}\n```", + "summary": "Get a project deploy key", + "responses": { + "200": { + "description": "Project deploy key matching the key ID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_deploy_key" + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The key ID matching the project deploy key.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, "/workspaces/{workspace}/search/code": { "get": { + "tags": ["Search"], + "summary": "Search for code in a workspace", + "description": "Search for code in the repositories of the specified workspace.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "operationId": "searchWorkspace", + "parameters": [ + { + "name": "workspace", + "in": "path", + "description": "The workspace to search in; either the slug or the UUID in curly braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], "responses": { "200": { "description": "Successful search", @@ -18803,53 +18800,7 @@ } } } - }, - "parameters": [ - { - "required": true, - "description": "The workspace to search in; either the slug or the UUID in curly braces", - "in": "path", - "name": "workspace", - "schema": { - "type": "string" - } - }, - { - "required": true, - "description": "The search query", - "in": "query", - "name": "search_query", - "schema": { - "type": "string" - } - }, - { - "description": "Which page of the search results to retrieve", - "required": false, - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } - }, - { - "description": "How many search results to retrieve per page", - "required": false, - "in": "query", - "name": "pagelen", - "schema": { - "type": "integer", - "format": "int32", - "default": 10 - } - } - ], - "tags": ["Search"], - "summary": "Search for code in a workspace", - "operationId": "searchWorkspace", - "description": "Search for code in the repositories of the specified workspace.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n" + } } } }, @@ -18943,64 +18894,64 @@ "description": "A workspace is where you create repositories, collaborate on\nyour code, and organize different streams of work in your Bitbucket\nCloud account. Workspaces replace the use of teams and users in API\ncalls.\n" } ], - "x-revision": "4ec1005c9aa8", + "x-revision": "50c586d353cb", "x-atlassian-narrative": { "documents": [ { - "body": "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Oauth 2](#oauth-2)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Scopes](#scopes)\n* [Basic auth](#basic-auth)\n* [App passwords](#app-passwords)\n\n---\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\nvalid OAuth 2 clients. The only thing you need to do is edit your\nexisting consumer and configure a callback URL.\n\nOnce that is in place, you'll have the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer tokens, we support three of RFC-6749's grant\nflows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens.\nNote that Resource Owner Password Credentials Grant (4.3) is no longer supported.\n\n\n#### 1. Authorization Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\nThe callback includes the `?code={}` query parameter that you can swap\nfor an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=authorization_code -d code={code}\n\n\n#### 2. Implicit Grant (4.2)\n\nThis flow is useful for browser-based add-ons that operate without server-side backends.\n\nRequest the end user for authorization by directing the browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token\n\nThat will redirect to your preconfigured callback URL with a fragment\ncontaining the access token\n(`#access_token={token}&token_type=bearer`) where your page's js can\npull it out of the URL.\n\n\n#### 3. Client Credentials Grant (4.4)\n\nSomewhat like our existing \"2-LO\" flow for OAuth 1. Obtain an access\ntoken that represents not an end user, but the owner of the\nclient/consumer:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=client_credentials\n\n\n#### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting access token represents the\naccount for which the add-on is installed.\n\nMake sure you send the JWT token in the Authorization request header\nusing the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\nOnce you have an access token, as per RFC-6750, you can use it in a request in any of\nthe following ways (in decreasing order of desirability):\n\n1. Send it in a request header: `Authorization: Bearer {access_token}`\n2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`\n3. Put it in the query string of a non-POST: `?access_token={access_token}`\n\n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\ndifferent:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\nThe literal string `x-token-auth` as a substitute for username is\nrequired (note the difference with GitHub where the actual token is in\nthe username field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour. When this happens you'll get 401\nresponses.\n\nMost access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a\nrefresh token that can then be used to generate a new access token,\nwithout the need for end user participation:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token -d refresh_token={refresh_token}\n\n\n### Scopes\n\nBitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.\n\nScopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on\nto explicitly accept all scopes.\n\nOur best practice suggests you add the scopes your add-on needs, but no more than it needs.\n\nInvalid scope strings will cause the descriptor to be rejected and the installation to fail.\n\nFollowing is the set of all currently available scopes.\n\n#### repository\n\nGives the add-on read access to all the repositories the authorizing user has access to.\nNote that this scope does not give access to a repository's pull requests.\n\n* access to the repo's source code\n* clone over https\n* access the the file browsing API\n* download zip archives of the repo's contents\n* the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit pages)\n\n#### repository:write\n\nGives the add-on write (not admin) access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope implies `repository`, which does not need to be requested separately.\nThis scope alone does not give access to the pull requests API.\n\n* push access over https\n* fork repos\n\n#### repository:admin\n\nGives the add-on admin access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope does not imply `repository` or `repository:write`. It gives access to the admin features of a repo only, not direct access to its contents. Of course it can be (mis)used to grant read access to another user account who can then clone the repo, but repos that need to read of write source code would also request explicit read or write.\nThis scope comes with access to the following functionality:\n\n* view and manipulate committer mappings\n* list and edit deploy keys\n* ability to delete the repo\n* view and edit repo permissions\n* view and edit branch permissions\n* import and export the issue tracker\n* enable and disable the issue tracker\n* list and edit issue tracker version, milestones and components\n* enable and disable the wiki\n* list and edit default reviewers\n* list and edit repo links (Jira/Bamboo/Custom)\n* list and edit the repository web hooks\n* initiate a repo ownership transfer\n\n#### snippet\n\nGives the add-on read access to all the snippets the authorizing user has access to.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\n\n* view any snippet\n* create snippet comments\n\n#### snippet:write\n\nGives the add-on write access to all the snippets the authorizing user can edit.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis implies the Snippet Read scope which does not need to be requested separately.\n\n* edit snippets\n* delete snippets\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.\n\n* view, list and search issues\n* create new issues\n* comment on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis implies `issue`, but adds the ability to transition and delete issues.\nThis scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nGives access to wikis. No distinction is made between read and write as wikis are always editable by anyone.\nThis scope does not imply any other scopes and does not give implicit access to the repository the wiki is attached to.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### pullrequest\n\nGives the add-on read access to pull requests.\nThis scope implies `repository`, giving read access to the pull request's destination repository.\n\n* see and list pull requests\n* create and resolve tasks\n\n#### pullrequest:write\n\nImplies `pullrequest` but adds the ability to create, merge and decline pull requests.\nThis scope implies `repository:write`, giving write access to the pull request's destination repository. This is necessary to facilitate merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* comment on pull requests\n* approve pull requests\n\n#### email\n\nAbility to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider to add-ons or external applications.\n\n#### account\n\nAbility to see all the user's account information. Note that this does not include any ability to mutate any of the data.\n\n* see all email addresses\n* language\n* location\n* website\n* full name\n* SSH keys\n* user groups\n\n#### account:write\n\nAbility to change properties on the user's account.\n\n* delete the authorizing user's account\n* manage the user's groups\n* manupilate a user's email addresses\n* change username, display name and avatar\n\n#### team\n\nThe ability to find out what teams the current user is part of. This is covered by the teams endpoint.\n\n* information about all the groups and teams I am a member or admin of\n\n\n#### team:write\n\nImplies `team`, but adds the ability to manage the teams that the authorizing user is an admin on.\n\n* manage team permissions\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook\nrelated operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources you can access, without needing further scopes. This means that\na client can list all existing webhook subscriptions on repository\n`foo/bar` (assuming the principal user has access to this repo). The\nadditional `repository` scope is not required for this.\n\nLikewise, existing webhook subscriptions for a repo's issue tracker can be\nretrieved without holding the `issue` scope. All that is required is the\n`webhook` scope.\n\nHowever, to create a webhook for `issue:created`, the client will need to\nhave both the `webhook` as well as `issue` scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions\n\n### pipeline\n\nGives read-only access to pipelines, steps, deployment environments and variables.\n\n### pipeline:write\n\nGives write access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\nThis scope is not needed to trigger a build via a push. The act to doing push will trigger the build. The token doing the push only needs repository:write scope.\n\nThis does not give write access to create variables.\n\n### pipeline:variable\n\nGives write access to create variables in pipelines at the various levels:\n* Workspace\n* Repository\n* Deployment\n\n### runner\n\nGives read-only access to pipelines runners setup against a workspace or repository.\n\n### runner:write\n\nGives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.\n\n### Basic auth\n\nBasic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.\n\n### App passwords\n\nApp passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree.\n\nSome important points about app passwords:\n\n* You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one.\n* You cannot use them to log into your Bitbucket account.\n* You cannot use app passwords to manage team actions.\n\n App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's.\n\n* You can use them for API call authentication, even if you don't have two-step verification enabled.\n* You can set permission scopes (specific access rights) for each app password.\n\n#### Create an app password\n\nTo create an app password:\n\n1. Select **Avatar > Bitbucket settings**.\n2. [Click **App passwords** in the Access management section.](https://bitbucket.org/account/settings/app-passwords/)\n3. Click **Create app password**.\n4. Give the app password a name related to the application that will use the password.\n5. Select the specific access and permissions you want this application password to have.\n6. Copy the generated password and either record or paste it into the application you want to give access. The password is only displayed this one time.\n\nThat's all there is to creating an app password. See your applications documentation for how to apply the app password for a specific application.", - "title": "Authentication methods", "anchor": "authentication", + "title": "Authentication methods", "description": "How to authenticate API actions", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZT4KICA8ZyBjbGFzcz0iY2xzLTEiPgogICAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+CiAgICAgIDxnIGlkPSJPYmplY3RzIj4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik00Mi4wNjcyLDBoLjYxMTRhOCw4LDAsMCwxLDgsOFYyMy4yMzM4YTAsMCwwLDAsMSwwLDBIMzQuMDY3MmEwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDQyLjA2NzIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMDguMjIsMGguNjExNGE4LDgsMCwwLDEsOCw4VjIzLjIzMzhhMCwwLDAsMCwxLDAsMEgxMDAuMjJhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSwxMDguMjIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzQuMzcyMiwwaC42MTE0YTgsOCwwLDAsMSw4LDhWMjMuMjMzOGEwLDAsMCwwLDEsMCwwSDE2Ni4zNzIyYTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMTc0LjM3MjIsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM0LjA2NzIiIHk9IjIzLjIzMzgiIHdpZHRoPSIxNjMuNTgiIGhlaWdodD0iMTYzLjU4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNDIuMDY3MiwwSDU5LjI5YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDM0LjA2NzJhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTA3LjI0NTgsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDk5LjI0NThhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTcyLjQyNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDE2NC40MjQ0YTAsMCwwLDAsMSwwLDBWOGE4LDgsMCwwLDEsOC04WiIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTcuNDU1OCIgeT0iMjMuMjMzOCIgd2lkdGg9IjE2My41OCIgaGVpZ2h0PSIxNjMuNTgiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM1Ljc1OTYiIHk9IjU2LjgwNjUiIHdpZHRoPSIzMy4yMjI4IiBoZWlnaHQ9IjE1LjYwMzgiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjEzMS4yMDE2IiB5PSIxMzYuOTYxNSIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTU3LjM3MDksNzEuNjAzNmg3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwYTQ0LjM3NDgsNDQuMzc0OCwwLDAsMS00NC4zNzQ4LTQ0LjM3NDhWODAuNjAzNkE5LDksMCwwLDEsNTcuMzcwOSw3MS42MDM2WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNSIgZD0iTTY2LjM3MSw2Ni42NjE3aDcwLjc1YTksOSwwLDAsMSw5LDl2MzUuMzc0OWE0NC4zNzQ4LDQ0LjM3NDgsMCwwLDEtNDQuMzc0OCw0NC4zNzQ4aDBBNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLDU3LjM3MSwxMTEuMDM2NlY3NS42NjE3YTksOSwwLDAsMSw5LTlaIi8+CiAgICAgICAgPHBhdGggaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIGQ9Ik02MS4zNzEsNjYuNjYxN2g3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwQTQ0LjM3NDgsNDQuMzc0OCwwLDAsMSw1Mi4zNzEsMTExLjAzNjZWNzUuNjYxN0E5LDksMCwwLDEsNjEuMzcxLDY2LjY2MTdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNOTYuNzQ1OSwxNDcuNzQ0MWEzNi43NDg3LDM2Ljc0ODcsMCwwLDEtMzYuNzA3NC0zNi43MDc0Vjc4LjA1ODRhMy43MzMzLDMuNzMzMywwLDAsMSwzLjcyOS0zLjcyOWg2NS45NTYzYTMuNzMzMywzLjczMzMsMCwwLDEsMy43MjksMy43Mjl2MzIuOTc4NEEzNi43NDg2LDM2Ljc0ODYsMCwwLDEsOTYuNzQ1OSwxNDcuNzQ0MVoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMDAuNjg5MywxNjMuMzE2N1YxMTEuMDk3M2EzLjk0NDMsMy45NDQzLDAsMCwwLTcuODg4NywwdjUyLjIyYTIyLjUyNTIsMjIuNTI1MiwwLDAsMC0xOC41NDc5LDIyLjE0YzAsLjQ1Ni4wMTc4LjkwNzguMDQ0NywxLjM1NzFIODIuMjFjLS4wNDE0LS40NDc0LS4wNjg4LS44OTktLjA2ODgtMS4zNTcxYTE0LjYyLDE0LjYyLDAsMCwxLDE0LjU5NzQtMTQuNjA0MWwuMDA2MS4wMDA2LjAwNjgtLjAwMDdBMTQuNjIxMSwxNC42MjExLDAsMCwxLDExMS4zNSwxODUuNDU2NmMwLC40NTgxLS4wMjczLjkxLS4wNjg4LDEuMzU3MWg3LjkxMjhjLjAyNjktLjQ0OTMuMDQ0Ny0uOTAxMS4wNDQ3LTEuMzU3MUEyMi41MjU5LDIyLjUyNTksMCwwLDAsMTAwLjY4OTMsMTYzLjMxNjdaIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIzNi40NzAyIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIxNTguMTIxNyIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTQ3LjgxMyIgeT0iMzYuNDcwMiIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTUwLjA2NDMiIHk9IjE1Ny41NTEzIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHBhdGggaWQ9Il9QYXRoXyIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtOCIgZD0iTTEwNy41MjU0LDEwMS4wMDI3YTExLjc3OTQsMTEuNzc5NCwwLDEsMC0xOS44Niw4LjU1NDhBNC4wNDE3LDQuMDQxNywwLDAsMSw4OC44NSwxMTMuNjJsLTIuMTA0LDcuMjY4MWEzLDMsMCwwLDAsMi44ODE3LDMuODM0MmgxMi4yMzcxYTMsMywwLDAsMCwyLjg4MTctMy44MzQybC0yLjA5NTktNy4yNGE0LjA3NDMsNC4wNzQzLDAsMCwxLDEuMTgwOC00LjA5NDVBMTEuNzE3MiwxMS43MTcyLDAsMCwwLDEwNy41MjU0LDEwMS4wMDI3WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTEwNC43NDYxLDEyMC44ODc3bC0yLjA5NTktNy4yNGE0LjA3NDQsNC4wNzQ0LDAsMCwxLDEuMTgwOC00LjA5NDUsMTEuNzYyOSwxMS43NjI5LDAsMCwwLTUuMDYtMTkuOTMxMywxMS45MSwxMS45MSwwLDAsMC04Ljc5OCwxMC45OTQ5LDExLjcxODUsMTEuNzE4NSwwLDAsMCwzLjY5MjksOC45NDFBNC4wNDE2LDQuMDQxNiwwLDAsMSw5NC44NSwxMTMuNjJsLTMuMjE0LDExLjEwMjNoMTAuMjI4OEEzLDMsMCwwLDAsMTA0Ljc0NjEsMTIwLjg4NzdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTgxLjc5NzUsMTAwLjMxYTMuOTQzOSwzLjk0MzksMCwwLDAtMy45NDQzLTMuOTQ0M0g0MS4wNDE3YTMuOTQ0MywzLjk0NDMsMCwwLDAsMCw3Ljg4ODdINzcuODUzMkEzLjk0MzksMy45NDM5LDAsMCwwLDgxLjc5NzUsMTAwLjMxWiIvPgogICAgICAgIDxwYXRoIGlkPSJfUGF0aF8yIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0xMSIgZD0iTTQxLjA0MTYsMTA0LjI1MzlIOTYuODUzMmEzLjk0NDMsMy45NDQzLDAsMCwwLDAtNy44ODg3SDQxLjA0MTZhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTEwIiBkPSJNODEuNzk3NSwxMDAuMzFhMy45NDM5LDMuOTQzOSwwLDAsMC0zLjk0NDMtMy45NDQzSDQxLjA0MTdhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N0g3Ny44NTMyQTMuOTQzOSwzLjk0MzksMCwwLDAsODEuNzk3NSwxMDAuMzFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo=" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZT4KICA8ZyBjbGFzcz0iY2xzLTEiPgogICAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+CiAgICAgIDxnIGlkPSJPYmplY3RzIj4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik00Mi4wNjcyLDBoLjYxMTRhOCw4LDAsMCwxLDgsOFYyMy4yMzM4YTAsMCwwLDAsMSwwLDBIMzQuMDY3MmEwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDQyLjA2NzIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMDguMjIsMGguNjExNGE4LDgsMCwwLDEsOCw4VjIzLjIzMzhhMCwwLDAsMCwxLDAsMEgxMDAuMjJhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSwxMDguMjIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzQuMzcyMiwwaC42MTE0YTgsOCwwLDAsMSw4LDhWMjMuMjMzOGEwLDAsMCwwLDEsMCwwSDE2Ni4zNzIyYTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMTc0LjM3MjIsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM0LjA2NzIiIHk9IjIzLjIzMzgiIHdpZHRoPSIxNjMuNTgiIGhlaWdodD0iMTYzLjU4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNDIuMDY3MiwwSDU5LjI5YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDM0LjA2NzJhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTA3LjI0NTgsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDk5LjI0NThhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTcyLjQyNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDE2NC40MjQ0YTAsMCwwLDAsMSwwLDBWOGE4LDgsMCwwLDEsOC04WiIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTcuNDU1OCIgeT0iMjMuMjMzOCIgd2lkdGg9IjE2My41OCIgaGVpZ2h0PSIxNjMuNTgiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM1Ljc1OTYiIHk9IjU2LjgwNjUiIHdpZHRoPSIzMy4yMjI4IiBoZWlnaHQ9IjE1LjYwMzgiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjEzMS4yMDE2IiB5PSIxMzYuOTYxNSIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTU3LjM3MDksNzEuNjAzNmg3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwYTQ0LjM3NDgsNDQuMzc0OCwwLDAsMS00NC4zNzQ4LTQ0LjM3NDhWODAuNjAzNkE5LDksMCwwLDEsNTcuMzcwOSw3MS42MDM2WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNSIgZD0iTTY2LjM3MSw2Ni42NjE3aDcwLjc1YTksOSwwLDAsMSw5LDl2MzUuMzc0OWE0NC4zNzQ4LDQ0LjM3NDgsMCwwLDEtNDQuMzc0OCw0NC4zNzQ4aDBBNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLDU3LjM3MSwxMTEuMDM2NlY3NS42NjE3YTksOSwwLDAsMSw5LTlaIi8+CiAgICAgICAgPHBhdGggaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIGQ9Ik02MS4zNzEsNjYuNjYxN2g3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwQTQ0LjM3NDgsNDQuMzc0OCwwLDAsMSw1Mi4zNzEsMTExLjAzNjZWNzUuNjYxN0E5LDksMCwwLDEsNjEuMzcxLDY2LjY2MTdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNOTYuNzQ1OSwxNDcuNzQ0MWEzNi43NDg3LDM2Ljc0ODcsMCwwLDEtMzYuNzA3NC0zNi43MDc0Vjc4LjA1ODRhMy43MzMzLDMuNzMzMywwLDAsMSwzLjcyOS0zLjcyOWg2NS45NTYzYTMuNzMzMywzLjczMzMsMCwwLDEsMy43MjksMy43Mjl2MzIuOTc4NEEzNi43NDg2LDM2Ljc0ODYsMCwwLDEsOTYuNzQ1OSwxNDcuNzQ0MVoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMDAuNjg5MywxNjMuMzE2N1YxMTEuMDk3M2EzLjk0NDMsMy45NDQzLDAsMCwwLTcuODg4NywwdjUyLjIyYTIyLjUyNTIsMjIuNTI1MiwwLDAsMC0xOC41NDc5LDIyLjE0YzAsLjQ1Ni4wMTc4LjkwNzguMDQ0NywxLjM1NzFIODIuMjFjLS4wNDE0LS40NDc0LS4wNjg4LS44OTktLjA2ODgtMS4zNTcxYTE0LjYyLDE0LjYyLDAsMCwxLDE0LjU5NzQtMTQuNjA0MWwuMDA2MS4wMDA2LjAwNjgtLjAwMDdBMTQuNjIxMSwxNC42MjExLDAsMCwxLDExMS4zNSwxODUuNDU2NmMwLC40NTgxLS4wMjczLjkxLS4wNjg4LDEuMzU3MWg3LjkxMjhjLjAyNjktLjQ0OTMuMDQ0Ny0uOTAxMS4wNDQ3LTEuMzU3MUEyMi41MjU5LDIyLjUyNTksMCwwLDAsMTAwLjY4OTMsMTYzLjMxNjdaIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIzNi40NzAyIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIxNTguMTIxNyIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTQ3LjgxMyIgeT0iMzYuNDcwMiIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTUwLjA2NDMiIHk9IjE1Ny41NTEzIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHBhdGggaWQ9Il9QYXRoXyIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtOCIgZD0iTTEwNy41MjU0LDEwMS4wMDI3YTExLjc3OTQsMTEuNzc5NCwwLDEsMC0xOS44Niw4LjU1NDhBNC4wNDE3LDQuMDQxNywwLDAsMSw4OC44NSwxMTMuNjJsLTIuMTA0LDcuMjY4MWEzLDMsMCwwLDAsMi44ODE3LDMuODM0MmgxMi4yMzcxYTMsMywwLDAsMCwyLjg4MTctMy44MzQybC0yLjA5NTktNy4yNGE0LjA3NDMsNC4wNzQzLDAsMCwxLDEuMTgwOC00LjA5NDVBMTEuNzE3MiwxMS43MTcyLDAsMCwwLDEwNy41MjU0LDEwMS4wMDI3WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTEwNC43NDYxLDEyMC44ODc3bC0yLjA5NTktNy4yNGE0LjA3NDQsNC4wNzQ0LDAsMCwxLDEuMTgwOC00LjA5NDUsMTEuNzYyOSwxMS43NjI5LDAsMCwwLTUuMDYtMTkuOTMxMywxMS45MSwxMS45MSwwLDAsMC04Ljc5OCwxMC45OTQ5LDExLjcxODUsMTEuNzE4NSwwLDAsMCwzLjY5MjksOC45NDFBNC4wNDE2LDQuMDQxNiwwLDAsMSw5NC44NSwxMTMuNjJsLTMuMjE0LDExLjEwMjNoMTAuMjI4OEEzLDMsMCwwLDAsMTA0Ljc0NjEsMTIwLjg4NzdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTgxLjc5NzUsMTAwLjMxYTMuOTQzOSwzLjk0MzksMCwwLDAtMy45NDQzLTMuOTQ0M0g0MS4wNDE3YTMuOTQ0MywzLjk0NDMsMCwwLDAsMCw3Ljg4ODdINzcuODUzMkEzLjk0MzksMy45NDM5LDAsMCwwLDgxLjc5NzUsMTAwLjMxWiIvPgogICAgICAgIDxwYXRoIGlkPSJfUGF0aF8yIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0xMSIgZD0iTTQxLjA0MTYsMTA0LjI1MzlIOTYuODUzMmEzLjk0NDMsMy45NDQzLDAsMCwwLDAtNy44ODg3SDQxLjA0MTZhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTEwIiBkPSJNODEuNzk3NSwxMDAuMzFhMy45NDM5LDMuOTQzOSwwLDAsMC0zLjk0NDMtMy45NDQzSDQxLjA0MTdhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N0g3Ny44NTMyQTMuOTQzOSwzLjk0MzksMCwwLDAsODEuNzk3NSwxMDAuMzFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo='", + "body": "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Oauth 2](#oauth-2)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Scopes](#scopes)\n* [Basic auth](#basic-auth)\n* [App passwords](#app-passwords)\n\n---\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\nvalid OAuth 2 clients. The only thing you need to do is edit your\nexisting consumer and configure a callback URL.\n\nOnce that is in place, you'll have the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer tokens, we support three of RFC-6749's grant\nflows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens.\nNote that Resource Owner Password Credentials Grant (4.3) is no longer supported.\n\n\n#### 1. Authorization Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\nThe callback includes the `?code={}` query parameter that you can swap\nfor an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=authorization_code -d code={code}\n\n\n#### 2. Implicit Grant (4.2)\n\nThis flow is useful for browser-based add-ons that operate without server-side backends.\n\nRequest the end user for authorization by directing the browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token\n\nThat will redirect to your preconfigured callback URL with a fragment\ncontaining the access token\n(`#access_token={token}&token_type=bearer`) where your page's js can\npull it out of the URL.\n\n\n#### 3. Client Credentials Grant (4.4)\n\nSomewhat like our existing \"2-LO\" flow for OAuth 1. Obtain an access\ntoken that represents not an end user, but the owner of the\nclient/consumer:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=client_credentials\n\n\n#### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting access token represents the\naccount for which the add-on is installed.\n\nMake sure you send the JWT token in the Authorization request header\nusing the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\nOnce you have an access token, as per RFC-6750, you can use it in a request in any of\nthe following ways (in decreasing order of desirability):\n\n1. Send it in a request header: `Authorization: Bearer {access_token}`\n2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`\n3. Put it in the query string of a non-POST: `?access_token={access_token}`\n\n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\ndifferent:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\nThe literal string `x-token-auth` as a substitute for username is\nrequired (note the difference with GitHub where the actual token is in\nthe username field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour. When this happens you'll get 401\nresponses.\n\nMost access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a\nrefresh token that can then be used to generate a new access token,\nwithout the need for end user participation:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token -d refresh_token={refresh_token}\n\n\n### Scopes\n\nBitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.\n\nScopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on\nto explicitly accept all scopes.\n\nOur best practice suggests you add the scopes your add-on needs, but no more than it needs.\n\nInvalid scope strings will cause the descriptor to be rejected and the installation to fail.\n\nFollowing is the set of all currently available scopes.\n\n#### repository\n\nGives the add-on read access to all the repositories the authorizing user has access to.\nNote that this scope does not give access to a repository's pull requests.\n\n* access to the repo's source code\n* clone over https\n* access the the file browsing API\n* download zip archives of the repo's contents\n* the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit pages)\n\n#### repository:write\n\nGives the add-on write (not admin) access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope implies `repository`, which does not need to be requested separately.\nThis scope alone does not give access to the pull requests API.\n\n* push access over https\n* fork repos\n\n#### repository:admin\n\nGives the add-on admin access to all the repositories the authorizing user has access to. No distinction is made between public or private repos. This scope does not imply `repository` or `repository:write`. It gives access to the admin features of a repo only, not direct access to its contents. Of course it can be (mis)used to grant read access to another user account who can then clone the repo, but repos that need to read of write source code would also request explicit read or write.\nThis scope comes with access to the following functionality:\n\n* view and manipulate committer mappings\n* list and edit deploy keys\n* ability to delete the repo\n* view and edit repo permissions\n* view and edit branch permissions\n* import and export the issue tracker\n* enable and disable the issue tracker\n* list and edit issue tracker version, milestones and components\n* enable and disable the wiki\n* list and edit default reviewers\n* list and edit repo links (Jira/Bamboo/Custom)\n* list and edit the repository web hooks\n* initiate a repo ownership transfer\n\n#### snippet\n\nGives the add-on read access to all the snippets the authorizing user has access to.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\n\n* view any snippet\n* create snippet comments\n\n#### snippet:write\n\nGives the add-on write access to all the snippets the authorizing user can edit.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis implies the Snippet Read scope which does not need to be requested separately.\n\n* edit snippets\n* delete snippets\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.\n\n* view, list and search issues\n* create new issues\n* comment on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis implies `issue`, but adds the ability to transition and delete issues.\nThis scope does not imply any other scopes and does not give implicit access to the repository the issue is attached to.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nGives access to wikis. No distinction is made between read and write as wikis are always editable by anyone.\nThis scope does not imply any other scopes and does not give implicit access to the repository the wiki is attached to.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### pullrequest\n\nGives the add-on read access to pull requests.\nThis scope implies `repository`, giving read access to the pull request's destination repository.\n\n* see and list pull requests\n* create and resolve tasks\n* comment on pull requests\n\n#### pullrequest:write\n\nImplies `pullrequest` but adds the ability to create, merge and decline pull requests.\nThis scope implies `repository:write`, giving write access to the pull request's destination repository. This is necessary to facilitate merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### project\n\nGives the app `repository` scope permissions for every repository under every project that the authorizing user has read access to.\n\n#### project:write\n\nThis scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).\n\n#### project:admin\n\nGives the app admin access to all the projects the authorizing user has access to. No distinction is made between public or private projects. This scope does not imply `project`, or `repository:write` on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n* ability to create the project\n* ability to update the project\n* ability to delete the project\n\n#### email\n\nAbility to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider to add-ons or external applications.\n\n#### account\n\nAbility to see all the user's account information. Note that this does not include any ability to mutate any of the data.\n\n* see all email addresses\n* language\n* location\n* website\n* full name\n* SSH keys\n* user groups\n\n#### account:write\n\nAbility to change properties on the user's account.\n\n* delete the authorizing user's account\n* manage the user's groups\n* manupilate a user's email addresses\n* change username, display name and avatar\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook\nrelated operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources you can access, without needing further scopes. This means that\na client can list all existing webhook subscriptions on repository\n`foo/bar` (assuming the principal user has access to this repo). The\nadditional `repository` scope is not required for this.\n\nLikewise, existing webhook subscriptions for a repo's issue tracker can be\nretrieved without holding the `issue` scope. All that is required is the\n`webhook` scope.\n\nHowever, to create a webhook for `issue:created`, the client will need to\nhave both the `webhook` as well as `issue` scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions\n\n#### pipeline\n\nGives read-only access to pipelines, steps, deployment environments and variables.\n\n#### pipeline:write\n\nGives write access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\nThis scope is not needed to trigger a build via a push. The act to doing push will trigger the build. The token doing the push only needs repository:write scope.\n\nThis does not give write access to create variables.\n\n#### pipeline:variable\n\nGives write access to create variables in pipelines at the various levels:\n* Workspace\n* Repository\n* Deployment\n\n#### runner\n\nGives read-only access to pipelines runners setup against a workspace or repository.\n\n#### runner:write\n\nGives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.\n\n### Basic auth\n\nBasic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.\n\n### App passwords\n\nApp passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree.\n\nSome important points about app passwords:\n\n* You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one.\n* You cannot use them to log into your Bitbucket account.\n* You cannot use app passwords to manage team actions.\n\n App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's.\n\n* You can use them for API call authentication, even if you don't have two-step verification enabled.\n* You can set permission scopes (specific access rights) for each app password.\n\n#### Create an app password\n\nTo create an app password:\n\n1. Select **Avatar > Bitbucket settings**.\n2. [Click **App passwords** in the Access management section.](https://bitbucket.org/account/settings/app-passwords/)\n3. Click **Create app password**.\n4. Give the app password a name related to the application that will use the password.\n5. Select the specific access and permissions you want this application password to have.\n6. Copy the generated password and either record or paste it into the application you want to give access. The password is only displayed this one time.\n\nThat's all there is to creating an app password. See your applications documentation for how to apply the app password for a specific application." }, { - "body": "\nYou can query the 2.0 API for specific objects using a simple language which resembles SQL.\n\nNote that filtering and querying by username has been deprecated, due to privacy changes. \nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-querying) \nfor details.\n\n---\n\n* [Supported endpoints](#supported-endpoints)\n* [Operators](#operators)\n* [Data types](#data-types)\n* [Querying](#querying)\n* [Sorting query results](#sorting-query-results)\n\n----\n\n### Supported endpoints\n\nMost 2.0 API resources that return paginated collections of objects support a single, shared, generic querying language that is used to filter down a result set.\n\nThis includes, but is in no way limited to:\n\n /2.0/repositories/{username}\n /2.0/repositories/{username}/{slug}/refs\n /2.0/repositories/{username}/{slug}/refs/branches\n /2.0/repositories/{username}/{slug}/refs/tags\n /2.0/repositories/{username}/{slug}/forks\n /2.0/repositories/{username}/{slug}/src\n /2.0/repositories/{username}/{slug}/issues\n /2.0/repositories/{username}/{slug}/pullrequests\n\nFiltering and sorting supports several distinct operators and data types as well as basic features, like logical operators (AND, OR).\nAs examples, the following queries could be used on the issue tracker endpoint (`/2.0/repositories/{workspace}/{slug}/issues/`):\n\n\t(state = \"open\" OR state = \"new\") AND assignee = null\n\treporter.nickname != \"evzijst\" AND priority >= \"major\"\n\t(title ~ \"unicode\" OR content.raw ~ \"unicode\") AND created_on > 2015-10-04T14:00:00-07:00\n\nFilter queries can be added to the URL using the q= query parameter. To sort the response, add sort=. Note that the entire query string is put in the q parameter and hence needs to be URL-encoded as shown in the following example:\n\n\t/2.0/repositories/foo/bar/issues?q=state=\"new\"&sort=-updated_on\n\n\n### Operators\n\nFiltering and sorting supports the following operators:\n\n| Operator | Definition | Example |\n|----------|--------------------------------|----------------------------|\n| \"=\" | test for equality | `nickname = \"evzijst\"` |\n| \"!=\" | not equal | `is_private != true` |\n| \"~\" | case-insensitive text contains | `description ~ \"beef\"` |\n| \"!~\" | case-insensitive not contains | `description !~ \"fubar\"` |\n| \">\" | greater than | `priority > \"major\"` |\n| \">=\" | greater than or equal | `priority <= \"trivial\"` |\n| \"<\" | less than | `id < 1234` |\n| \"<=\" | less than or equal | `updated_on <= 2015-03-04` |\n\n### Data types\n\nFiltering and sorting supports the following data types:\n\n| Type | Description | Example |\n|--------------|-----------------------------------------|---------------|\n| **String** | any text inside double quotes | `\"foo\"` |\n| **Number** | arbitrary precision integers and floats | `1, -10.302` |\n| **Null** | to test for the absence of a value | `null` |\n| **boolean** | the unquoted strings true or false | `true, false` |\n| **datetime** | an unquoted [ISO-8601][iso-8601] date time string with the timezone offset, milliseconds and entire time component being optional | `2015-03-04T14:08:59.123+02:00`, `2015-03-04T14:08:59` Date time strings are assumed to be in UTC, unless an explicit timezone offset is provided |\n\n[https://en.wikipedia.org/wiki/ISO_8601]: /iso-8601\n\n### Querying\n\nObjects can be filtered based on their properties. In principle, every element in an object's JSON document schema can be used as a filter criterion.\n\nNote that while the array of objects in a paginated response is wrapped in an\nenvelope with a `values` element, this prefix should not be included in the\nquery fields (so use `/2.0/repositories/foo/bar/issues?q=state=\"new\"`, not\n`/2.0/repositories/foo/bar/issues?q=values.state=\"new\"`).\n\n\n### Examples\n\nFields that contain embedded instances of other object types (e.g. owner is an embedded user object, while parent is an embedded repository) can be traversed recursively. For instance:\n\n\tparent.owner.nickname = \"bitbucket\"\n\nTo find pull requests which merge into master, come from a fork of the repo rather than a branch inside the repo, and on which I am a reviewer:\n\n```\nsource.repository.full_name != \"main/repo\" AND state = \"OPEN\" AND reviewers.nickname = \"evzijst\" AND destination.branch.name = \"master\"\n```\n```\n/2.0/repositories/main/repo/pullrequests?q=source.repository.full_name+%21%3D+%22main%2Frepo%22+AND+state+%3D+%22OPEN%22+AND+reviewers.nickname+%3D+%22evzijst%22+AND+destination.branch.name+%3D+%22master%22\n```\n\nTo find new or on-hold issues related to the UI, created or updated in the last day (SF local time), that have not yet been assigned to anyone:\n\n```\n(state = \"new\" OR state = \"on hold\") AND assignee = null AND component = \"UI\" and updated_on > 2015-11-11T00:00:00-07:00\n```\n```\n/2.0/repositories/main/repo/issues?q=%28state+%3D+%22new%22+OR+state+%3D+%22on+hold%22%29+AND+assignee+%3D+null+AND+component+%3D+%22UI%22+and+updated_on+%3E+2015-11-11T00%3A00%3A00-07%3A00\n```\n\nTo find all tags with the string \"2015\" in the name:\n\n```\nname ~ \"2015\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/tags?q=name+%7E+%222015%22\n```\nOr all my branches:\n\n```\nname ~ \"erik/\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/?q=name+%7E+%22erik%2F%22\n```\n### Sorting query results\n\nYou can sort result sets using the ?sort= query parameter, available on the same resources that support filtering:\n\n* In principle, every field that can be queried can also be used as a key for sorting.\n* By default the sort order is ascending. To reverse the order, prefix the field name with a hyphen (e.g. ?sort=-updated_on).\n* Only one field can be sorted on. Compound fields (e.g. sort on state first, followed by updated_on) are not supported.\n\n\n", - "title": "Filter and sort API objects", "anchor": "filtering", + "title": "Filter and sort API objects", "description": "Query the 2.0 API for specific objects", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTk0LjE5MTkgMTQ3LjYwOTIiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjY2ZkNGRiOwogICAgICB9CgogICAgICAuY2xzLTMsIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzg3NzdkOTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtNSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjY2NlMGZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iNDE2LjMwODIiIHkxPSI3NS4wNDc5IiB4Mj0iNTg0Ljg1NTYiIHkyPSI3NS4wNDc5IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC00NDMuOTQ2NyAxMjMuMDY4Nikgcm90YXRlKC0xMy43OTc2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIwLjY5MDgiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8dGl0bGU+TWFnbmlmeWluZyBHbGFzczwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtOS44ODc4LTUuOTg4OC04LjMyOTIsMTMuNzUxOSw5Ljg4NzgsNS45ODg4YTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0MmgwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0zIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtMy4wMTE4LTEuODI0MkE4LjAzODgsOC4wMzg4LDAsMCwwLDExNy4wNiw5NS44MTc4aDBhOC4wMzg4LDguMDM4OCwwLDAsMCwyLjcxMTMsMTEuMDQwNWwzLjAxMTgsMS44MjQyYTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0M2gwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMzkuMTQzNyw5Ny4xNzkyYTE1LjU5NzMsMTUuNTk3MywwLDAsMS04LjAzMTItMi4yNDg1bC0zLjAxMTgtMS44MjQyQTguMDM4OCw4LjAzODgsMCwwLDAsMTE3LjA2LDk1LjgxNzhoMGE4LjAzODgsOC4wMzg4LDAsMCwwLDIuNzExMywxMS4wNDA1bDMuMDExOCwxLjgyNDJhMTUuNTk3LDE1LjU5NywwLDAsMSw1LjcwNjksNi4wNjQ4LDY3Ljg0ODEsNjcuODQ4MSwwLDAsMCwxMC42NTM2LTE3LjU2ODFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNODMuMjUzNywxMzIuNTU2QTY3LjIzNDgsNjcuMjM0OCwwLDAsMSw5LjcxLDMyLjQyOTUsNjYuNzk3NCw2Ni43OTc0LDAsMCwxLDUxLjE4MzcsMS45NjY2bC4wMDA3LDBBNjYuNzk2Miw2Ni43OTYyLDAsMCwxLDEwMi4wNTEsOS43NTI1aDBBNjcuMjM0Niw2Ny4yMzQ2LDAsMCwxLDgzLjI1MzcsMTMyLjU1NloiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfMiIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtNiIgZD0iTTIzLjQzOSw0MC43NDgyQTUxLjE5MDgsNTEuMTkwOCwwLDAsMCwxMTEuMDEsOTMuNzg4OSw1MS4xOTA4LDUxLjE5MDgsMCwwLDAsMjMuNDM5LDQwLjc0ODJaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNNzkuNDMzLDExNi45ODJBNTEuMjE2Miw1MS4yMTYyLDAsMCwwLDExOC40MjQxLDY3LjAzN2E0OS4xMzkxLDQ5LjEzOTEsMCwwLDEtNS4wODY3LDIuMjc4OWMtMTUuNzAyOSw1Ljk2MDktMjkuNjg5NSwyLjExLTM2LjQ5ODcuMTMwOC0yMC40MzA3LTUuOTM5LTI0Ljc5LTE3LjM3ODUtMzkuMDQxNC0yNC41ODIzYTQ4LjMwOTIsNDguMzA5MiwwLDAsMC0xNC4wOTM5LTQuNTNjLS4wODYyLjEzOTUtLjE3OTMuMjczLS4yNjQ0LjQxMzVBNTEuMTkwNyw1MS4xOTA3LDAsMCwwLDc5LjQzMywxMTYuOTgyWiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTk0LjE5MTkgMTQ3LjYwOTIiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjY2ZkNGRiOwogICAgICB9CgogICAgICAuY2xzLTMsIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzg3NzdkOTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtNSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjY2NlMGZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iNDE2LjMwODIiIHkxPSI3NS4wNDc5IiB4Mj0iNTg0Ljg1NTYiIHkyPSI3NS4wNDc5IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC00NDMuOTQ2NyAxMjMuMDY4Nikgcm90YXRlKC0xMy43OTc2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIwLjY5MDgiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8dGl0bGU+TWFnbmlmeWluZyBHbGFzczwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtOS44ODc4LTUuOTg4OC04LjMyOTIsMTMuNzUxOSw5Ljg4NzgsNS45ODg4YTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0MmgwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0zIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtMy4wMTE4LTEuODI0MkE4LjAzODgsOC4wMzg4LDAsMCwwLDExNy4wNiw5NS44MTc4aDBhOC4wMzg4LDguMDM4OCwwLDAsMCwyLjcxMTMsMTEuMDQwNWwzLjAxMTgsMS44MjQyYTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0M2gwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMzkuMTQzNyw5Ny4xNzkyYTE1LjU5NzMsMTUuNTk3MywwLDAsMS04LjAzMTItMi4yNDg1bC0zLjAxMTgtMS44MjQyQTguMDM4OCw4LjAzODgsMCwwLDAsMTE3LjA2LDk1LjgxNzhoMGE4LjAzODgsOC4wMzg4LDAsMCwwLDIuNzExMywxMS4wNDA1bDMuMDExOCwxLjgyNDJhMTUuNTk3LDE1LjU5NywwLDAsMSw1LjcwNjksNi4wNjQ4LDY3Ljg0ODEsNjcuODQ4MSwwLDAsMCwxMC42NTM2LTE3LjU2ODFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNODMuMjUzNywxMzIuNTU2QTY3LjIzNDgsNjcuMjM0OCwwLDAsMSw5LjcxLDMyLjQyOTUsNjYuNzk3NCw2Ni43OTc0LDAsMCwxLDUxLjE4MzcsMS45NjY2bC4wMDA3LDBBNjYuNzk2Miw2Ni43OTYyLDAsMCwxLDEwMi4wNTEsOS43NTI1aDBBNjcuMjM0Niw2Ny4yMzQ2LDAsMCwxLDgzLjI1MzcsMTMyLjU1NloiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfMiIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtNiIgZD0iTTIzLjQzOSw0MC43NDgyQTUxLjE5MDgsNTEuMTkwOCwwLDAsMCwxMTEuMDEsOTMuNzg4OSw1MS4xOTA4LDUxLjE5MDgsMCwwLDAsMjMuNDM5LDQwLjc0ODJaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNNzkuNDMzLDExNi45ODJBNTEuMjE2Miw1MS4yMTYyLDAsMCwwLDExOC40MjQxLDY3LjAzN2E0OS4xMzkxLDQ5LjEzOTEsMCwwLDEtNS4wODY3LDIuMjc4OWMtMTUuNzAyOSw1Ljk2MDktMjkuNjg5NSwyLjExLTM2LjQ5ODcuMTMwOC0yMC40MzA3LTUuOTM5LTI0Ljc5LTE3LjM3ODUtMzkuMDQxNC0yNC41ODIzYTQ4LjMwOTIsNDguMzA5MiwwLDAsMC0xNC4wOTM5LTQuNTNjLS4wODYyLjEzOTUtLjE3OTMuMjczLS4yNjQ0LjQxMzVBNTEuMTkwNyw1MS4xOTA3LDAsMCwwLDc5LjQzMywxMTYuOTgyWiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\nYou can query the 2.0 API for specific objects using a simple language which resembles SQL.\n\nNote that filtering and querying by username has been deprecated, due to privacy changes. \nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-querying) \nfor details.\n\n---\n\n* [Supported endpoints](#supported-endpoints)\n* [Operators](#operators)\n* [Data types](#data-types)\n* [Querying](#querying)\n* [Sorting query results](#sorting-query-results)\n\n----\n\n### Supported endpoints\n\nMost 2.0 API resources that return paginated collections of objects support a single, shared, generic querying language that is used to filter down a result set.\n\nThis includes, but is in no way limited to:\n\n /2.0/repositories/{username}\n /2.0/repositories/{username}/{slug}/refs\n /2.0/repositories/{username}/{slug}/refs/branches\n /2.0/repositories/{username}/{slug}/refs/tags\n /2.0/repositories/{username}/{slug}/forks\n /2.0/repositories/{username}/{slug}/src\n /2.0/repositories/{username}/{slug}/issues\n /2.0/repositories/{username}/{slug}/pullrequests\n\nFiltering and sorting supports several distinct operators and data types as well as basic features, like logical operators (AND, OR).\nAs examples, the following queries could be used on the issue tracker endpoint (`/2.0/repositories/{workspace}/{slug}/issues/`):\n\n\t(state = \"open\" OR state = \"new\") AND assignee = null\n\treporter.nickname != \"evzijst\" AND priority >= \"major\"\n\t(title ~ \"unicode\" OR content.raw ~ \"unicode\") AND created_on > 2015-10-04T14:00:00-07:00\n\nFilter queries can be added to the URL using the q= query parameter. To sort the response, add sort=. Note that the entire query string is put in the q parameter and hence needs to be URL-encoded as shown in the following example:\n\n\t/2.0/repositories/foo/bar/issues?q=state=\"new\"&sort=-updated_on\n\n\n### Operators\n\nFiltering and sorting supports the following operators:\n\n| Operator | Definition | Example |\n|----------|--------------------------------|----------------------------|\n| \"=\" | test for equality | `nickname = \"evzijst\"` |\n| \"!=\" | not equal | `is_private != true` |\n| \"~\" | case-insensitive text contains | `description ~ \"beef\"` |\n| \"!~\" | case-insensitive not contains | `description !~ \"fubar\"` |\n| \">\" | greater than | `priority > \"major\"` |\n| \">=\" | greater than or equal | `priority <= \"trivial\"` |\n| \"<\" | less than | `id < 1234` |\n| \"<=\" | less than or equal | `updated_on <= 2015-03-04` |\n\n### Data types\n\nFiltering and sorting supports the following data types:\n\n| Type | Description | Example |\n|--------------|-----------------------------------------|---------------|\n| **String** | any text inside double quotes | `\"foo\"` |\n| **Number** | arbitrary precision integers and floats | `1, -10.302` |\n| **Null** | to test for the absence of a value | `null` |\n| **boolean** | the unquoted strings true or false | `true, false` |\n| **datetime** | an unquoted [ISO-8601][iso-8601] date time string with the timezone offset, milliseconds and entire time component being optional | `2015-03-04T14:08:59.123+02:00`, `2015-03-04T14:08:59` Date time strings are assumed to be in UTC, unless an explicit timezone offset is provided |\n\n[https://en.wikipedia.org/wiki/ISO_8601]: /iso-8601\n\n### Querying\n\nObjects can be filtered based on their properties. In principle, every element in an object's JSON document schema can be used as a filter criterion.\n\nNote that while the array of objects in a paginated response is wrapped in an\nenvelope with a `values` element, this prefix should not be included in the\nquery fields (so use `/2.0/repositories/foo/bar/issues?q=state=\"new\"`, not\n`/2.0/repositories/foo/bar/issues?q=values.state=\"new\"`).\n\n\n### Examples\n\nFields that contain embedded instances of other object types (e.g. owner is an embedded user object, while parent is an embedded repository) can be traversed recursively. For instance:\n\n\tparent.owner.nickname = \"bitbucket\"\n\nTo find pull requests which merge into master, come from a fork of the repo rather than a branch inside the repo, and on which I am a reviewer:\n\n```\nsource.repository.full_name != \"main/repo\" AND state = \"OPEN\" AND reviewers.nickname = \"evzijst\" AND destination.branch.name = \"master\"\n```\n```\n/2.0/repositories/main/repo/pullrequests?q=source.repository.full_name+%21%3D+%22main%2Frepo%22+AND+state+%3D+%22OPEN%22+AND+reviewers.nickname+%3D+%22evzijst%22+AND+destination.branch.name+%3D+%22master%22\n```\n\nTo find new or on-hold issues related to the UI, created or updated in the last day (SF local time), that have not yet been assigned to anyone:\n\n```\n(state = \"new\" OR state = \"on hold\") AND assignee = null AND component = \"UI\" and updated_on > 2015-11-11T00:00:00-07:00\n```\n```\n/2.0/repositories/main/repo/issues?q=%28state+%3D+%22new%22+OR+state+%3D+%22on+hold%22%29+AND+assignee+%3D+null+AND+component+%3D+%22UI%22+and+updated_on+%3E+2015-11-11T00%3A00%3A00-07%3A00\n```\n\nTo find all tags with the string \"2015\" in the name:\n\n```\nname ~ \"2015\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/tags?q=name+%7E+%222015%22\n```\nOr all my branches:\n\n```\nname ~ \"erik/\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/?q=name+%7E+%22erik%2F%22\n```\n### Sorting query results\n\nYou can sort result sets using the ?sort= query parameter, available on the same resources that support filtering:\n\n* In principle, every field that can be queried can also be used as a key for sorting.\n* By default the sort order is ascending. To reverse the order, prefix the field name with a hyphen (e.g. ?sort=-updated_on).\n* Only one field can be sorted on. Compound fields (e.g. sort on state first, followed by updated_on) are not supported.\n\n\n" }, { - "body": "\nEndpoints that return collections of objects should always apply pagination.\nPaginated collections are always wrapped in the following wrapper object:\n\n```json\n{\n \"size\": 5421,\n \"page\": 2,\n \"pagelen\": 10,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=3\",\n \"previous\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=1\",\n \"values\": [\n ...\n ]\n}\n```\n\nPagination is often page-bound, with a query parameter page indicating which\npage is to be returned.\n\nHowever, clients are not expected to construct URLs themselves by manipulating\nthe page number query parameter. Instead, the response contains a link to the\nnext page. This link should be treated as an opaque location that is not to be\nconstructed by clients or even assumed to be predictable. The only contract\naround the next link is that it will return the next chunk of results.\n\nLack of a next link in the response indicates the end of the collection.\n\nThe paginated response contains the following fields:\n\n| Field | Value |\n|------------|----------|\n| `size` | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. |\n| `page` | Page number of the current results. This is an optional element that is not provided in all responses. |\n| `pagelen` | Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. |\n| `next` | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `previous` | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `values` | The list of objects. This contains at most `pagelen` objects. |\n\nThe link to the next page is included such that you don't have to hardcode or construct any links. Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.\n\nIt is important to realize that Bitbucket support both list-based pagination and iterator-based pagination. List-based pagination assumes that the collection is a discrete, immutable, consistently ordered, finite array of objects with a fixed size. Clients navigate a list-based collection by requesting offset-based chunks. In Bitbucket Cloud, list-based responses include the optional size, page, and previous element. The the next and previous links typically resemble something like /foo/bar?page=4.\n\nHowever, not all result sets can be treated as immutable and finite – much like how programming languages tend to distinguish between lists and arrays on one hand and iterators or stream on the other. Where an list-based pagination offers random access into any point in a collection, iterator-based pagination can only navigate forward one element at a time. In Bitbucket such iterator-based pagination contains the next link and pagelen elements, but not necessarily anything else. In these cases, the next link's value often contains an unpredictable hash instead of an explicit page number. The commits resource uses iterator-based pagination.\n", - "title": "Pagination", "anchor": "pagination", + "title": "Pagination", "description": "Learn more about pagination", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM4LjgyIDE1MS42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2IyZDRmZjt9LmNscy0ye2ZpbGw6IzRjOWFmZjt9LmNscy0ze2ZpbGw6IzAwNTJjYzt9LmNscy00e29wYWNpdHk6MC42O30uY2xzLTV7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudCk7fS5jbHMtNntmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTd7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy04e2ZpbGw6dXJsKCNsaW5lYXItZ3JhZGllbnQtNCk7fS5jbHMtOXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTUpO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMntmaWxsOm5vbmU7fS5jbHMtMTB7c3Ryb2tlOiMzMzg0ZmY7fS5jbHMtMTAsLmNscy0xMSwuY2xzLTEyLC5jbHMtMTN7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjJweDt9LmNscy0xMXtzdHJva2U6I2ZmYWIwMDt9LmNscy0xMntzdHJva2U6I2ZhZmJmYzt9LmNscy0xM3tmaWxsOiNmZmFiMDA7c3Ryb2tlOiMyNjg0ZmY7fTwvc3R5bGU+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHkxPSI2NS4xNyIgeDI9Ijg2LjM4IiB5Mj0iNjUuMTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0YzlhZmYiLz48c3RvcCBvZmZzZXQ9IjAuMDgiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC45NCIvPjxzdG9wIG9mZnNldD0iMC4yNCIgc3RvcC1jb2xvcj0iIzRjOWFmZiIgc3RvcC1vcGFjaXR5PSIwLjc4Ii8+PHN0b3Agb2Zmc2V0PSIwLjQ1IiBzdG9wLWNvbG9yPSIjNGM5YWZmIiBzdG9wLW9wYWNpdHk9IjAuNTMiLz48c3RvcCBvZmZzZXQ9IjAuNTUiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC0yIiB4MT0iMTUyLjQ0IiB5MT0iNjUuMTciIHgyPSIyMzguODIiIHkyPSI2NS4xNyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudCIvPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTMiIHgxPSIxOC44NSIgeTE9IjExOC43OCIgeDI9IjEyNi4wOCIgeTI9IjExLjU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwLjA2IiBzdG9wLWNvbG9yPSIjMDA2NWZmIi8+PHN0b3Agb2Zmc2V0PSIwLjE5IiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuOTQiLz48c3RvcCBvZmZzZXQ9IjAuNDYiIHN0b3AtY29sb3I9IiMwMDY1ZmYiIHN0b3Atb3BhY2l0eT0iMC43OCIvPjxzdG9wIG9mZnNldD0iMC44MiIgc3RvcC1jb2xvcj0iIzAwNjVmZiIgc3RvcC1vcGFjaXR5PSIwLjUzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjExMi43NSIgeTE9IjExOC43OCIgeDI9IjIxOS45NyIgeTI9IjExLjU2IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTMiLz48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC01IiB4MT0iNTAuOTciIHkxPSIxMzMuNjEiIHgyPSIxODcuODYiIHkyPSItMy4yOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC42NiIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIvPjxzdG9wIG9mZnNldD0iMC44OCIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIgc3RvcC1vcGFjaXR5PSIwLjgzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjUzODU4IiBzdG9wLW9wYWNpdHk9IjAuNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjx0aXRsZT5WaWV3IFZlcnNpb25zPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU29mdHdhcmUiPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iOTQuNTMiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9IjEwNi45NCIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxjaXJjbGUgY2xhc3M9ImNscy0zIiBjeD0iMTE5LjM0IiBjeT0iMTQ3LjkzIiByPSIzLjY3Ii8+PGNpcmNsZSBjbGFzcz0iY2xzLTIiIGN4PSIxMzEuNzUiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE0NC4xNiIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxnIGNsYXNzPSJjbHMtNCI+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTUiIHk9IjI1LjkyIiB3aWR0aD0iODYuMzgiIGhlaWdodD0iNzguNDkiLz48L2c+PGcgY2xhc3M9ImNscy00Ij48cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjE1Mi40NCIgeT0iMjUuOTIiIHdpZHRoPSI4Ni4zOCIgaGVpZ2h0PSI3OC40OSIvPjwvZz48cmVjdCBpZD0iX1JlY3RhbmdsZV8zIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTciIHg9IjE2LjI4IiB5PSIxNC4xMiIgd2lkdGg9IjExMi4zNiIgaGVpZ2h0PSIxMDIuMDkiLz48cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTgiIHg9IjExMC4xOCIgeT0iMTQuMTIiIHdpZHRoPSIxMTIuMzYiIGhlaWdodD0iMTAyLjA5Ii8+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfNSIgZGF0YS1uYW1lPSImbHQ7UmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy05IiB4PSI0Ny42OSIgd2lkdGg9IjE0My40NSIgaGVpZ2h0PSIxMzAuMzQiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIxNi4xOCIgeDI9IjExNy4yNCIgeTI9IjE2LjE4Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMTYuMTgiIHgyPSI3Mi42IiB5Mj0iMTYuMTgiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iNzkuMTYiIHkxPSIyNi45NSIgeDI9IjExNy4yNCIgeTI9IjI2Ljk1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMjYuOTUiIHgyPSI3Mi42IiB5Mj0iMjYuOTUiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIzNy43MiIgeDI9IjE1MC43IiB5Mj0iMzcuNzIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIzNy43MiIgeDI9IjcyLjYiIHkyPSIzNy43MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSIxNTAuNyIgeTE9IjQ4LjQ5IiB4Mj0iMTc1LjU5IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTEwLjMyIiB5MT0iNDguNDkiIHgyPSIxNDMuMDUiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjQ4LjQ5IiB4Mj0iMTAxLjM3IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI0OC40OSIgeDI9IjcyLjYiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI3OS4xNiIgeTE9IjU5LjI2IiB4Mj0iMTUwLjciIHkyPSI1OS4yNiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjU5LjI2IiB4Mj0iNzIuNiIgeTI9IjU5LjI2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9Ijc5LjE2IiB5MT0iNzAuMDMiIHgyPSIxNzUuNTkiIHkyPSI3MC4wMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjcwLjAzIiB4Mj0iNzIuNiIgeTI9IjcwLjAzIi8+PGxpbmUgY2xhc3M9ImNscy0xMSIgeDE9Ijc5LjE2IiB5MT0iODAuNzkiIHgyPSIxMTcuMjQiIHkyPSI4MC43OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjgwLjc5IiB4Mj0iNzIuNiIgeTI9IjgwLjc5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9Ijc5LjE2IiB5MT0iOTEuNTYiIHgyPSIxNDkuMDYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjkxLjU2IiB4Mj0iNzIuNiIgeTI9IjkxLjU2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iODAuNzkiIHgyPSI3Mi42IiB5Mj0iODAuNzkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI5MS41NiIgeDI9IjcyLjYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjEwMi4zMyIgeDI9IjExNy4yNCIgeTI9IjEwMi4zMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjEwMi4zMyIgeDI9IjcyLjYiIHkyPSIxMDIuMzMiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMTI1Ljk4IiB5MT0iMTEzLjEiIHgyPSIxNDkuMDYiIHkyPSIxMTMuMSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSI3OS4xNiIgeTE9IjExMy4xIiB4Mj0iMTE3LjI0IiB5Mj0iMTEzLjEiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIxMTMuMSIgeDI9IjcyLjYiIHkyPSIxMTMuMSIvPjwvZz48L2c+PC9zdmc+" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM4LjgyIDE1MS42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2IyZDRmZjt9LmNscy0ye2ZpbGw6IzRjOWFmZjt9LmNscy0ze2ZpbGw6IzAwNTJjYzt9LmNscy00e29wYWNpdHk6MC42O30uY2xzLTV7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudCk7fS5jbHMtNntmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTd7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy04e2ZpbGw6dXJsKCNsaW5lYXItZ3JhZGllbnQtNCk7fS5jbHMtOXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTUpO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMntmaWxsOm5vbmU7fS5jbHMtMTB7c3Ryb2tlOiMzMzg0ZmY7fS5jbHMtMTAsLmNscy0xMSwuY2xzLTEyLC5jbHMtMTN7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjJweDt9LmNscy0xMXtzdHJva2U6I2ZmYWIwMDt9LmNscy0xMntzdHJva2U6I2ZhZmJmYzt9LmNscy0xM3tmaWxsOiNmZmFiMDA7c3Ryb2tlOiMyNjg0ZmY7fTwvc3R5bGU+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHkxPSI2NS4xNyIgeDI9Ijg2LjM4IiB5Mj0iNjUuMTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0YzlhZmYiLz48c3RvcCBvZmZzZXQ9IjAuMDgiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC45NCIvPjxzdG9wIG9mZnNldD0iMC4yNCIgc3RvcC1jb2xvcj0iIzRjOWFmZiIgc3RvcC1vcGFjaXR5PSIwLjc4Ii8+PHN0b3Agb2Zmc2V0PSIwLjQ1IiBzdG9wLWNvbG9yPSIjNGM5YWZmIiBzdG9wLW9wYWNpdHk9IjAuNTMiLz48c3RvcCBvZmZzZXQ9IjAuNTUiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC0yIiB4MT0iMTUyLjQ0IiB5MT0iNjUuMTciIHgyPSIyMzguODIiIHkyPSI2NS4xNyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudCIvPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTMiIHgxPSIxOC44NSIgeTE9IjExOC43OCIgeDI9IjEyNi4wOCIgeTI9IjExLjU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwLjA2IiBzdG9wLWNvbG9yPSIjMDA2NWZmIi8+PHN0b3Agb2Zmc2V0PSIwLjE5IiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuOTQiLz48c3RvcCBvZmZzZXQ9IjAuNDYiIHN0b3AtY29sb3I9IiMwMDY1ZmYiIHN0b3Atb3BhY2l0eT0iMC43OCIvPjxzdG9wIG9mZnNldD0iMC44MiIgc3RvcC1jb2xvcj0iIzAwNjVmZiIgc3RvcC1vcGFjaXR5PSIwLjUzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjExMi43NSIgeTE9IjExOC43OCIgeDI9IjIxOS45NyIgeTI9IjExLjU2IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTMiLz48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC01IiB4MT0iNTAuOTciIHkxPSIxMzMuNjEiIHgyPSIxODcuODYiIHkyPSItMy4yOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC42NiIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIvPjxzdG9wIG9mZnNldD0iMC44OCIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIgc3RvcC1vcGFjaXR5PSIwLjgzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjUzODU4IiBzdG9wLW9wYWNpdHk9IjAuNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjx0aXRsZT5WaWV3IFZlcnNpb25zPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU29mdHdhcmUiPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iOTQuNTMiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9IjEwNi45NCIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxjaXJjbGUgY2xhc3M9ImNscy0zIiBjeD0iMTE5LjM0IiBjeT0iMTQ3LjkzIiByPSIzLjY3Ii8+PGNpcmNsZSBjbGFzcz0iY2xzLTIiIGN4PSIxMzEuNzUiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE0NC4xNiIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxnIGNsYXNzPSJjbHMtNCI+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTUiIHk9IjI1LjkyIiB3aWR0aD0iODYuMzgiIGhlaWdodD0iNzguNDkiLz48L2c+PGcgY2xhc3M9ImNscy00Ij48cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjE1Mi40NCIgeT0iMjUuOTIiIHdpZHRoPSI4Ni4zOCIgaGVpZ2h0PSI3OC40OSIvPjwvZz48cmVjdCBpZD0iX1JlY3RhbmdsZV8zIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTciIHg9IjE2LjI4IiB5PSIxNC4xMiIgd2lkdGg9IjExMi4zNiIgaGVpZ2h0PSIxMDIuMDkiLz48cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTgiIHg9IjExMC4xOCIgeT0iMTQuMTIiIHdpZHRoPSIxMTIuMzYiIGhlaWdodD0iMTAyLjA5Ii8+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfNSIgZGF0YS1uYW1lPSImbHQ7UmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy05IiB4PSI0Ny42OSIgd2lkdGg9IjE0My40NSIgaGVpZ2h0PSIxMzAuMzQiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIxNi4xOCIgeDI9IjExNy4yNCIgeTI9IjE2LjE4Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMTYuMTgiIHgyPSI3Mi42IiB5Mj0iMTYuMTgiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iNzkuMTYiIHkxPSIyNi45NSIgeDI9IjExNy4yNCIgeTI9IjI2Ljk1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMjYuOTUiIHgyPSI3Mi42IiB5Mj0iMjYuOTUiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIzNy43MiIgeDI9IjE1MC43IiB5Mj0iMzcuNzIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIzNy43MiIgeDI9IjcyLjYiIHkyPSIzNy43MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSIxNTAuNyIgeTE9IjQ4LjQ5IiB4Mj0iMTc1LjU5IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTEwLjMyIiB5MT0iNDguNDkiIHgyPSIxNDMuMDUiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjQ4LjQ5IiB4Mj0iMTAxLjM3IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI0OC40OSIgeDI9IjcyLjYiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI3OS4xNiIgeTE9IjU5LjI2IiB4Mj0iMTUwLjciIHkyPSI1OS4yNiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjU5LjI2IiB4Mj0iNzIuNiIgeTI9IjU5LjI2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9Ijc5LjE2IiB5MT0iNzAuMDMiIHgyPSIxNzUuNTkiIHkyPSI3MC4wMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjcwLjAzIiB4Mj0iNzIuNiIgeTI9IjcwLjAzIi8+PGxpbmUgY2xhc3M9ImNscy0xMSIgeDE9Ijc5LjE2IiB5MT0iODAuNzkiIHgyPSIxMTcuMjQiIHkyPSI4MC43OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjgwLjc5IiB4Mj0iNzIuNiIgeTI9IjgwLjc5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9Ijc5LjE2IiB5MT0iOTEuNTYiIHgyPSIxNDkuMDYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjkxLjU2IiB4Mj0iNzIuNiIgeTI9IjkxLjU2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iODAuNzkiIHgyPSI3Mi42IiB5Mj0iODAuNzkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI5MS41NiIgeDI9IjcyLjYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjEwMi4zMyIgeDI9IjExNy4yNCIgeTI9IjEwMi4zMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjEwMi4zMyIgeDI9IjcyLjYiIHkyPSIxMDIuMzMiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMTI1Ljk4IiB5MT0iMTEzLjEiIHgyPSIxNDkuMDYiIHkyPSIxMTMuMSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSI3OS4xNiIgeTE9IjExMy4xIiB4Mj0iMTE3LjI0IiB5Mj0iMTEzLjEiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIxMTMuMSIgeDI9IjcyLjYiIHkyPSIxMTMuMSIvPjwvZz48L2c+PC9zdmc+'", + "body": "\nEndpoints that return collections of objects should always apply pagination.\nPaginated collections are always wrapped in the following wrapper object:\n\n```json\n{\n \"size\": 5421,\n \"page\": 2,\n \"pagelen\": 10,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=3\",\n \"previous\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=1\",\n \"values\": [\n ...\n ]\n}\n```\n\nPagination is often page-bound, with a query parameter page indicating which\npage is to be returned.\n\nHowever, clients are not expected to construct URLs themselves by manipulating\nthe page number query parameter. Instead, the response contains a link to the\nnext page. This link should be treated as an opaque location that is not to be\nconstructed by clients or even assumed to be predictable. The only contract\naround the next link is that it will return the next chunk of results.\n\nLack of a next link in the response indicates the end of the collection.\n\nThe paginated response contains the following fields:\n\n| Field | Value |\n|------------|----------|\n| `size` | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. |\n| `page` | Page number of the current results. This is an optional element that is not provided in all responses. |\n| `pagelen` | Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. |\n| `next` | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `previous` | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `values` | The list of objects. This contains at most `pagelen` objects. |\n\nThe link to the next page is included such that you don't have to hardcode or construct any links. Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.\n\nIt is important to realize that Bitbucket support both list-based pagination and iterator-based pagination. List-based pagination assumes that the collection is a discrete, immutable, consistently ordered, finite array of objects with a fixed size. Clients navigate a list-based collection by requesting offset-based chunks. In Bitbucket Cloud, list-based responses include the optional size, page, and previous element. The the next and previous links typically resemble something like /foo/bar?page=4.\n\nHowever, not all result sets can be treated as immutable and finite – much like how programming languages tend to distinguish between lists and arrays on one hand and iterators or stream on the other. Where an list-based pagination offers random access into any point in a collection, iterator-based pagination can only navigate forward one element at a time. In Bitbucket such iterator-based pagination contains the next link and pagelen elements, but not necessarily anything else. In these cases, the next link's value often contains an unpredictable hash instead of an explicit page number. The commits resource uses iterator-based pagination.\n" }, { - "body": "\nBy default, each endpoint returns the full representation of a resource and in\nsome cases that can be a lot of data. For example, retrieving a list of pull\nrequests can amount to quite a large document.\n\nFor better performance, you can ask the server to only return the fields you\nreally need and to omit unwanted data. To request a partial response and to\nadd or remove specific fields from a response, use the `fields` query\nparameter.\n\n\n### Example\n\nMost API resources embed a substantial list of links pointing to related\nresources. This saves the client from constructing its own URLs, but is\nsomewhat wasteful when the client doesn't need them.\n\nTo significantly reduce the size of the response, use `?fields=-links`:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\n### Fields parameter syntax\n\nThe `fields` parameter supports 3 modes of operation:\n\n1. Removal of select fields (e.g. `-links`)\n2. Pulling in additional fields not normally returned by an endpoint, while\n still getting all the default fields (e.g. `+reviewers`)\n3. Omitting all fields, except those specified (e.g. `owner.display_name`)\n\nThe fields parameter can contain a list of multiple comma-separated field names\n(e.g. `fields=owner.display_name,uuid,links.self.href`). The parameter itself is\nnot repeated.\n\nAs discussed at [Condensed Versus Full Objects](serialization#representations),\nmost objects that are embedded inside other objects (like how `owner` is an\nembedded `user` object in `repository`) appear in \"condensed\" form that omits\nmany fields. The `fields` parameter allows us to pull in additional fields in\nsuch cases.\n\nFor example, the embedded repository object in a pull request does not normally\ncontain its `owner`. To add that in we can use:\n`+values.destination.repository.owner`.\n\n\n### Wildcards\n\nThe asterisk can be used to match all fields on a particular level. For\nexample, removing all entries from the `links` element can be done like this:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links.*\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"links\": {},\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\nWildcards can be used in combination with exclusion and inclusion. For\ninstance, `-*,+foo,+bar` will remove all elements from the root level and then\nadd in `foo` and `bar`.\n\n\n### URL encoding\n\nBe aware that when using the `+foo.bar` syntax in the query string, that the\n\"+\" must be URL encoded as \"%2B\" and so the URL will be:\n\n```\nhttps://api.bitbucket.org/2.0/repositories/evzijst/interruptingcow?fields=%2Bowner.created_on\n```\n\nWithout URL escaping, \"+\" is interpreted as an encoded space which will not\nmatch any fields.\n\n\n### Field discovery\n\nWhile a resource's `self` URL, as well its \"collection\" URL typically return\nthe full object with all its fields, there are some exceptions for fields that\nare overly verbose or costly to generate.\n\nFor instance, a pull request contains the embedded lists of reviewers and\nparticipants. These fields are included from the `self` URL, but not from the\n`/pullrequests` collections resource, as it would impact performance too much.\n\nTo discover any additional fields that might not be included by default,\n`fields=*` can be used.\n\n\n### More examples\n\nIf we want to get a list of all reviewer nicknames on pull requests I created,\nwe could combine a [filter](filtering) with a partial response. This will omit\nall other data from the response:\n\n```\n/2.0/repositories/bitbucket/bitbucket/pullrequests?fields=values.id,values.reviewers.nickname,values.state&q=author.uuid%3D%22%7Bd301aafa-d676-4ee0-88be-962be7417567%7D%22\n{\n \"values\": [\n {\n \"reviewers\": [\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dtao\"\n },\n {\n \"nickname\": \"csomme\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11355\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dstevens\"\n }\n ],\n \"state\": \"MERGED\",\n \"id\": 11347\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"jmooring\"\n },\n {\n \"nickname\": \"zdavis\"\n },\n {\n \"nickname\": \"flexbox\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11344\n }\n ]\n}\n```\n", - "title": "Partial responses", "anchor": "partial-response", + "title": "Partial responses", "description": "Tweak which fields are returned", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYyLjQ0ODcgMjEwLjExMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTggewogICAgICAgIHN0cm9rZTogIzAwNjVmZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDJweDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBzdHJva2UtbGluZWpvaW46IHJvdW5kOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICNlN2U4ZWM7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogI2ZmZTM4MDsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmZmMGIyOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZTogI2ZmOTkxZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDEuODE1NnB4OwogICAgICB9CgogICAgICAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgICBmaWxsOiB1cmwoI2xpbmVhci1ncmFkaWVudCk7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogI2Y0ZjVmNzsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iMTEzLjM4MTgiIHkxPSI0OS40MyIgeDI9IjE1My43ODkzIiB5Mj0iOS4wMjI1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZhZmJmYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuMjc4NiIgc3RvcC1jb2xvcj0iI2VmZjFmMyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuNzY4OCIgc3RvcC1jb2xvcj0iI2QxZDZkZCIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgogIDx0aXRsZT5Eb2N1bWVudCBUYWJsZTwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMTcuNDcxIiB5MT0iMTcxLjc1NzMiIHgyPSI3OS4yOTgiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxwb2x5Z29uIGlkPSJfUGF0aF8iIGRhdGEtbmFtZT0iJmx0O1BhdGgmZ3Q7IiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTYyLjQ0NSAzOC43MTEgMTYyLjQ0NSAyMTAuMTExIDAgMjEwLjExMSAwIDAgMTIzLjcwNCAwIDE2Mi40MTUgMzguNzExIDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxOC45MTE3IiB5PSI3OC4xNTQyIiB3aWR0aD0iNDcuODQ4NSIgaGVpZ2h0PSI3OS42NTM3Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy01IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIyNi41NTEyIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy02IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIxMDYuMjA0OSIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjY2Ljc2MDEiIHkxPSI1MS42MDMiIHgyPSI2Ni43NjAxIiB5Mj0iMTU3LjgwNzkiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSI5MS4zMjg0IiB5MT0iNTEuNjAzIiB4Mj0iOTEuMzI4NCIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTE1Ljg5NjciIHkxPSI1MS42MDMiIHgyPSIxMTUuODk2NyIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9Ijc4LjE1NDIiIHgyPSIxNDIuMzY0NiIgeTI9Ijc4LjE1NDIiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSIxOC45MTE3IiB5MT0iMTA0LjcwNTUiIHgyPSIxNDIuMzY0NiIgeTI9IjEwNC43MDU1Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9IjEzMS4yNTY3IiB4Mj0iMTQyLjM2NDYiIHkyPSIxMzEuMjU2NyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNjIuNDQ1IDM4LjcxMSAxNjIuNDE1IDM4LjcxMSAxMjMuODcyIDAuMTY5IDEyMy44NzIgNTkuOTIxIDE2Mi40NDUgMzkuMTM3IDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy04IiB4MT0iMTguMzk3MyIgeTE9IjE4MS4zNDQiIHgyPSI3OS4xMTM1IiB5Mj0iMTgxLjM0NCIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxOTAuOTMwNiIgeDI9IjUxLjMwNDkiIHkyPSIxOTAuOTMwNiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxNzEuNzU3MyIgeDI9Ijc5LjExMzUiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIzNi4xNzA1IiB4Mj0iNzkuMTEzNSIgeTI9IjM2LjE3MDUiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTgiIHgxPSIxOC4zOTczIiB5MT0iMjYuNTgzOCIgeDI9Ijc5LjExMzUiIHkyPSIyNi41ODM4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Mi40NDkgMzguNzQyIDEyMy43MDcgMzguNzQyIDEyMy43MDcgMCAxNjIuNDQ5IDM4Ljc0MiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYyLjQ0ODcgMjEwLjExMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTggewogICAgICAgIHN0cm9rZTogIzAwNjVmZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDJweDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBzdHJva2UtbGluZWpvaW46IHJvdW5kOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICNlN2U4ZWM7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogI2ZmZTM4MDsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmZmMGIyOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZTogI2ZmOTkxZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDEuODE1NnB4OwogICAgICB9CgogICAgICAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgICBmaWxsOiB1cmwoI2xpbmVhci1ncmFkaWVudCk7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogI2Y0ZjVmNzsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iMTEzLjM4MTgiIHkxPSI0OS40MyIgeDI9IjE1My43ODkzIiB5Mj0iOS4wMjI1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZhZmJmYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuMjc4NiIgc3RvcC1jb2xvcj0iI2VmZjFmMyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuNzY4OCIgc3RvcC1jb2xvcj0iI2QxZDZkZCIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgogIDx0aXRsZT5Eb2N1bWVudCBUYWJsZTwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMTcuNDcxIiB5MT0iMTcxLjc1NzMiIHgyPSI3OS4yOTgiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxwb2x5Z29uIGlkPSJfUGF0aF8iIGRhdGEtbmFtZT0iJmx0O1BhdGgmZ3Q7IiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTYyLjQ0NSAzOC43MTEgMTYyLjQ0NSAyMTAuMTExIDAgMjEwLjExMSAwIDAgMTIzLjcwNCAwIDE2Mi40MTUgMzguNzExIDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxOC45MTE3IiB5PSI3OC4xNTQyIiB3aWR0aD0iNDcuODQ4NSIgaGVpZ2h0PSI3OS42NTM3Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy01IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIyNi41NTEyIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy02IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIxMDYuMjA0OSIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjY2Ljc2MDEiIHkxPSI1MS42MDMiIHgyPSI2Ni43NjAxIiB5Mj0iMTU3LjgwNzkiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSI5MS4zMjg0IiB5MT0iNTEuNjAzIiB4Mj0iOTEuMzI4NCIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTE1Ljg5NjciIHkxPSI1MS42MDMiIHgyPSIxMTUuODk2NyIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9Ijc4LjE1NDIiIHgyPSIxNDIuMzY0NiIgeTI9Ijc4LjE1NDIiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSIxOC45MTE3IiB5MT0iMTA0LjcwNTUiIHgyPSIxNDIuMzY0NiIgeTI9IjEwNC43MDU1Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9IjEzMS4yNTY3IiB4Mj0iMTQyLjM2NDYiIHkyPSIxMzEuMjU2NyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNjIuNDQ1IDM4LjcxMSAxNjIuNDE1IDM4LjcxMSAxMjMuODcyIDAuMTY5IDEyMy44NzIgNTkuOTIxIDE2Mi40NDUgMzkuMTM3IDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy04IiB4MT0iMTguMzk3MyIgeTE9IjE4MS4zNDQiIHgyPSI3OS4xMTM1IiB5Mj0iMTgxLjM0NCIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxOTAuOTMwNiIgeDI9IjUxLjMwNDkiIHkyPSIxOTAuOTMwNiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxNzEuNzU3MyIgeDI9Ijc5LjExMzUiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIzNi4xNzA1IiB4Mj0iNzkuMTEzNSIgeTI9IjM2LjE3MDUiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTgiIHgxPSIxOC4zOTczIiB5MT0iMjYuNTgzOCIgeDI9Ijc5LjExMzUiIHkyPSIyNi41ODM4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Mi40NDkgMzguNzQyIDEyMy43MDcgMzguNzQyIDEyMy43MDcgMCAxNjIuNDQ5IDM4Ljc0MiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\nBy default, each endpoint returns the full representation of a resource and in\nsome cases that can be a lot of data. For example, retrieving a list of pull\nrequests can amount to quite a large document.\n\nFor better performance, you can ask the server to only return the fields you\nreally need and to omit unwanted data. To request a partial response and to\nadd or remove specific fields from a response, use the `fields` query\nparameter.\n\n\n### Example\n\nMost API resources embed a substantial list of links pointing to related\nresources. This saves the client from constructing its own URLs, but is\nsomewhat wasteful when the client doesn't need them.\n\nTo significantly reduce the size of the response, use `?fields=-links`:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\n### Fields parameter syntax\n\nThe `fields` parameter supports 3 modes of operation:\n\n1. Removal of select fields (e.g. `-links`)\n2. Pulling in additional fields not normally returned by an endpoint, while\n still getting all the default fields (e.g. `+reviewers`)\n3. Omitting all fields, except those specified (e.g. `owner.display_name`)\n\nThe fields parameter can contain a list of multiple comma-separated field names\n(e.g. `fields=owner.display_name,uuid,links.self.href`). The parameter itself is\nnot repeated.\n\nAs discussed at [Condensed Versus Full Objects](serialization#representations),\nmost objects that are embedded inside other objects (like how `owner` is an\nembedded `user` object in `repository`) appear in \"condensed\" form that omits\nmany fields. The `fields` parameter allows us to pull in additional fields in\nsuch cases.\n\nFor example, the embedded repository object in a pull request does not normally\ncontain its `owner`. To add that in we can use:\n`+values.destination.repository.owner`.\n\n\n### Wildcards\n\nThe asterisk can be used to match all fields on a particular level. For\nexample, removing all entries from the `links` element can be done like this:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links.*\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"links\": {},\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\nWildcards can be used in combination with exclusion and inclusion. For\ninstance, `-*,+foo,+bar` will remove all elements from the root level and then\nadd in `foo` and `bar`.\n\n\n### URL encoding\n\nBe aware that when using the `+foo.bar` syntax in the query string, that the\n\"+\" must be URL encoded as \"%2B\" and so the URL will be:\n\n```\nhttps://api.bitbucket.org/2.0/repositories/evzijst/interruptingcow?fields=%2Bowner.created_on\n```\n\nWithout URL escaping, \"+\" is interpreted as an encoded space which will not\nmatch any fields.\n\n\n### Field discovery\n\nWhile a resource's `self` URL, as well its \"collection\" URL typically return\nthe full object with all its fields, there are some exceptions for fields that\nare overly verbose or costly to generate.\n\nFor instance, a pull request contains the embedded lists of reviewers and\nparticipants. These fields are included from the `self` URL, but not from the\n`/pullrequests` collections resource, as it would impact performance too much.\n\nTo discover any additional fields that might not be included by default,\n`fields=*` can be used.\n\n\n### More examples\n\nIf we want to get a list of all reviewer nicknames on pull requests I created,\nwe could combine a [filter](filtering) with a partial response. This will omit\nall other data from the response:\n\n```\n/2.0/repositories/bitbucket/bitbucket/pullrequests?fields=values.id,values.reviewers.nickname,values.state&q=author.uuid%3D%22%7Bd301aafa-d676-4ee0-88be-962be7417567%7D%22\n{\n \"values\": [\n {\n \"reviewers\": [\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dtao\"\n },\n {\n \"nickname\": \"csomme\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11355\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dstevens\"\n }\n ],\n \"state\": \"MERGED\",\n \"id\": 11347\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"jmooring\"\n },\n {\n \"nickname\": \"zdavis\"\n },\n {\n \"nickname\": \"flexbox\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11344\n }\n ]\n}\n```\n" }, { - "body": "\n----\n\n* [Open API Specification](#open-api-specification)\n* [JSON Schema](#json-schema)\n* [Condensed Versus Full Objects](#condensed-versus-full-objects)\n\n____\n\n\n### Open API Specification\n\nBitbucket uses the [Open API Specification](https://openapis.org) (OAI,\nformerly known as Swagger) to describe its APIs. Our OAI specification schema\nis hosted at [https://api.bitbucket.org/swagger.json](https://api.bitbucket.org/swagger.json)\nand serves as the canonical definition and comprehensive declaration of all\navailable endpoints.\n\nThe OAI specification makes writing client applications easier by:\nauto-generating boilerplate code (like data object classes) and dealing with\nauthentication and error handling.\n\nYou can find a comprehensive set of open tools for the OAI specification at:\n[https://github.com/swagger-api](https://github.com/swagger-api).\n\n\n### JSON Schema\n\nBitbucket uses JSON Schema to describe the layout of every type of object\nconsumed or produced by the API. These schemas are collected under the\n`#definitions` element of our swagger.json file.\n\nWhen an endpoint expects an object as part of a POST or PUT, it also expects\nthe object to validate against the JSON schemas. The same applies to objects\nreturned by an endpoint.\n\n\n### Condensed Versus Full Objects\n\nMost objects in Bitbucket come both in \"full\" and \"partial\" representation.\nThe full representation is when all elements are included. This is the layout\nreturned by a resource's `self` location (e.g. `/2.0/repositories/foo/bar`),\nas well as resource collection endpoints (e.g. `/2.0/repositories`).\n\nHowever, Bitbucket objects often embed other objects. For example, a `repository`\nobject embeds a `user` object for its owner. Likewise, a `pullrequest` object\nembeds its `repository` object.\n\nThese related objects are embedded, or inlined, to reduce the \"chatter\" when\nclients make frequent followup API calls to collect information on common,\nrelated information.\n\nEmbedded related objects are typically limited in their fields to avoid such\nobject graphs from becoming too deep and noisy. They often exclude their own\nnested objects in an attempt to strike a balance between performance and\nutility.\n\nAn object's embedded or condensed representation tends to be standardized,\nmeaning the fields included is the same set, regardless of where the object\nwas embedded.\n", - "title": "Schemas and Serialization", "anchor": "serialization", + "title": "Schemas and Serialization", "description": "Learn more about object representations", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjAuNzYyNCAyMDUuNTg2Ij4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBpc29sYXRpb246IGlzb2xhdGU7CiAgICAgIH0KCiAgICAgIC5jbHMtMiwgLmNscy02IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMsIC5jbHMtMywgLmNscy00LCAuY2xzLTYgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjYzFjN2QwOwogICAgICAgIHN0cm9rZS1saW5lY2FwOiByb3VuZDsKICAgICAgICBzdHJva2UtbWl0ZXJsaW1pdDogMTA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMy43ODE2IDUuMjk0MzsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuOTIxOSA1LjQ5MDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogIzAwNTJjYzsKICAgICAgfQoKICAgICAgLmNscy04IHsKICAgICAgICBmaWxsOiAjNGM5YWZmOwogICAgICB9CgogICAgICAuY2xzLTkgewogICAgICAgIGZpbGw6ICMwMDQ5YjA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTAgewogICAgICAgIGZpbGw6ICM1N2Q5YTM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTEgewogICAgICAgIGZpbGw6ICM3OWYyYzA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTIgewogICAgICAgIGZpbGw6ICMzNmIzN2U7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuODY4MSA1LjQxNTQ7CiAgICAgIH0KCiAgICAgIC5jbHMtMTQgewogICAgICAgIGZpbGw6ICM0MjUyNmU7CiAgICAgIH0KCiAgICAgIC5jbHMtMTUgewogICAgICAgIGZpbGw6ICMzNDQ1NjM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTYgewogICAgICAgIGZpbGw6ICM1MDVmNzk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDx0aXRsZT5JbnRlZ3JhdGlvbnM8L3RpdGxlPgogIDxnIGNsYXNzPSJjbHMtMSI+CiAgICA8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4KICAgICAgPGcgaWQ9Ik9iamVjdHMiPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iNzUuMjExNCIgeTE9IjE4Ny44NTczIiB4Mj0iNzcuMDI0OCIgeTI9IjE4Ny4xMTA5Ii8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNCIgeDE9IjgxLjkyMDUiIHkxPSIxODUuMDk1NiIgeDI9IjEzOC4yMjEyIiB5Mj0iMTYxLjkyMDMiLz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMTQwLjY2OSIgeTE9IjE2MC45MTI2IiB4Mj0iMTQyLjQ4MjQiIHkyPSIxNjAuMTY2MiIvPgogICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTUiIHBvaW50cz0iMTk0LjUyNiAyNi41NTIgMTc2LjkwMSAzOC4yNDEgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDE0Ljg3IDE5NC41MjYgMjYuNTUyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTgzLjcxMzUiIHkxPSI0My4yMTg4IiB4Mj0iMTgzLjcxMzUiIHkyPSI5Ny44ODMyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy03IiBwb2ludHM9IjE3Ni45MDEgMzguMjQxIDE3Ni45MDEgNTguMTY2IDE1OS4yNyA0Ni40NzcgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDM4LjI0MSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOCIgcG9pbnRzPSIxOTQuNTI2IDI2LjU1MiAxOTQuNTI2IDQ2LjQ3NyAxNzYuOTAxIDU4LjE2NiAxNzYuOTAxIDM4LjI0MSAxOTQuNTI2IDI2LjU1MiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjQ3Ljk0ODgiIHkxPSI0Mi4yMTg4IiB4Mj0iMTU5LjExNzIiIHkyPSI0Mi4yMTg4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjIyMC43NjIgOTkuNzUyIDE2Ny44MTcgMTM0Ljg2NCAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDY0LjY1NyAyMjAuNzYyIDk5Ljc1MiIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOSIgcG9pbnRzPSIxNjcuODE3IDEzNC44NjQgMTY3LjgxNyAxOTQuNzE4IDExNC44NTQgMTU5LjYwNiAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDEzNC44NjQiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMjIwLjc2MiA5OS43NTIgMjIwLjc2MiAxNTkuNjA2IDE2Ny44MTcgMTk0LjcxOCAxNjcuODE3IDEzNC44NjQgMjIwLjc2MiA5OS43NTIiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTEwIiBwb2ludHM9IjExMC41NDEgMjEuNjA0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCA3Ny45NDkgMCAxMTAuNTQxIDIxLjYwNCIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTEiIHBvaW50cz0iMTEwLjU0MSAyMS42MDQgMTEwLjU0MSA1OC40NDkgNzcuOTQ5IDgwLjA2NCA3Ny45NDkgNDMuMjE5IDExMC41NDEgMjEuNjA0Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjE0MS4xOSAxNDguMDczIDE2Ny44MTMgMTMwLjQxNyAxOTQuNDQ0IDE0OC4wNzMgMTY3LjgxMyAxNjUuNzE5IDE0MS4xOSAxNDguMDczIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Ny44MTMgMTMwLjQxNyAxNjcuODEzIDEwMC4zMjEgMTk0LjQ0NCAxMTcuOTc2IDE5NC40NDQgMTQ4LjA3MyAxNjcuODEzIDEzMC40MTciLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMTQxLjE5IDE0OC4wNzMgMTQxLjE5IDExNy45NzYgMTY3LjgxMyAxMDAuMzIxIDE2Ny44MTMgMTMwLjQxNyAxNDEuMTkgMTQ4LjA3MyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTIiIHBvaW50cz0iNDUuMzQ1IDIxLjYwNCA0NS4zNDUgNDQuOTg0IDU3LjIzMSA1Mi44NjQgNTcuMjMxIDY2LjI5NiA3Ny45NDkgODAuMDY0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCIvPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjQuNjQzOCIgeTE9Ijg2Ljk1NDQiIHgyPSIyNi4wMTU3IiB5Mj0iODUuNTUzMSIvPgogICAgICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTEzIiB4MT0iMjkuODA0IiB5MT0iODEuNjgzNCIgeDI9IjYwLjM4MTEiIHkyPSI1MC40NDkyIi8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjYyLjI3NTIiIHkxPSI0OC41MTQzIiB4Mj0iNjMuNjQ3IiB5Mj0iNDcuMTEzIi8+CiAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIzNS4yNTUgODkuNjQ1IDE3LjczNiAxMDEuNDkyIDAgODkuOTYyIDE3LjUyNSA3OC4xMjEgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNy43MzYgMTAxLjQ5MiAxNy45MTUgMTIxLjQxNiAwLjE3OSAxMDkuODg3IDAgODkuOTYyIDE3LjczNiAxMDEuNDkyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMjAuNTg0OSIgeTE9IjEwNS41MzA1IiB4Mj0iNjUuODc0OSIgeTI9IjE3MS4zNjgxIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjM1LjI1NSA4OS42NDUgMzUuNDM0IDEwOS41NjkgMTcuOTE1IDEyMS40MTYgMTcuNzM2IDEwMS40OTIgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTQiIHBvaW50cz0iOTIuMzk0IDE3My44MTUgNzQuODc1IDE4NS42NjIgNTcuMTM5IDE3NC4xMzIgNzQuNjY0IDE2Mi4yOTEgOTIuMzk0IDE3My44MTUiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTE1IiBwb2ludHM9Ijc0Ljg3NSAxODUuNjYyIDc1LjA1NCAyMDUuNTg2IDU3LjMxOSAxOTQuMDU3IDU3LjEzOSAxNzQuMTMyIDc0Ljg3NSAxODUuNjYyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy0xNiIgcG9pbnRzPSI5Mi4zOTQgMTczLjgxNSA5Mi41NzQgMTkzLjczOSA3NS4wNTQgMjA1LjU4NiA3NC44NzUgMTg1LjY2MiA5Mi4zOTQgMTczLjgxNSIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjAuNzYyNCAyMDUuNTg2Ij4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBpc29sYXRpb246IGlzb2xhdGU7CiAgICAgIH0KCiAgICAgIC5jbHMtMiwgLmNscy02IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMsIC5jbHMtMywgLmNscy00LCAuY2xzLTYgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjYzFjN2QwOwogICAgICAgIHN0cm9rZS1saW5lY2FwOiByb3VuZDsKICAgICAgICBzdHJva2UtbWl0ZXJsaW1pdDogMTA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMy43ODE2IDUuMjk0MzsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuOTIxOSA1LjQ5MDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogIzAwNTJjYzsKICAgICAgfQoKICAgICAgLmNscy04IHsKICAgICAgICBmaWxsOiAjNGM5YWZmOwogICAgICB9CgogICAgICAuY2xzLTkgewogICAgICAgIGZpbGw6ICMwMDQ5YjA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTAgewogICAgICAgIGZpbGw6ICM1N2Q5YTM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTEgewogICAgICAgIGZpbGw6ICM3OWYyYzA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTIgewogICAgICAgIGZpbGw6ICMzNmIzN2U7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuODY4MSA1LjQxNTQ7CiAgICAgIH0KCiAgICAgIC5jbHMtMTQgewogICAgICAgIGZpbGw6ICM0MjUyNmU7CiAgICAgIH0KCiAgICAgIC5jbHMtMTUgewogICAgICAgIGZpbGw6ICMzNDQ1NjM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTYgewogICAgICAgIGZpbGw6ICM1MDVmNzk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDx0aXRsZT5JbnRlZ3JhdGlvbnM8L3RpdGxlPgogIDxnIGNsYXNzPSJjbHMtMSI+CiAgICA8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4KICAgICAgPGcgaWQ9Ik9iamVjdHMiPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iNzUuMjExNCIgeTE9IjE4Ny44NTczIiB4Mj0iNzcuMDI0OCIgeTI9IjE4Ny4xMTA5Ii8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNCIgeDE9IjgxLjkyMDUiIHkxPSIxODUuMDk1NiIgeDI9IjEzOC4yMjEyIiB5Mj0iMTYxLjkyMDMiLz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMTQwLjY2OSIgeTE9IjE2MC45MTI2IiB4Mj0iMTQyLjQ4MjQiIHkyPSIxNjAuMTY2MiIvPgogICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTUiIHBvaW50cz0iMTk0LjUyNiAyNi41NTIgMTc2LjkwMSAzOC4yNDEgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDE0Ljg3IDE5NC41MjYgMjYuNTUyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTgzLjcxMzUiIHkxPSI0My4yMTg4IiB4Mj0iMTgzLjcxMzUiIHkyPSI5Ny44ODMyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy03IiBwb2ludHM9IjE3Ni45MDEgMzguMjQxIDE3Ni45MDEgNTguMTY2IDE1OS4yNyA0Ni40NzcgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDM4LjI0MSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOCIgcG9pbnRzPSIxOTQuNTI2IDI2LjU1MiAxOTQuNTI2IDQ2LjQ3NyAxNzYuOTAxIDU4LjE2NiAxNzYuOTAxIDM4LjI0MSAxOTQuNTI2IDI2LjU1MiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjQ3Ljk0ODgiIHkxPSI0Mi4yMTg4IiB4Mj0iMTU5LjExNzIiIHkyPSI0Mi4yMTg4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjIyMC43NjIgOTkuNzUyIDE2Ny44MTcgMTM0Ljg2NCAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDY0LjY1NyAyMjAuNzYyIDk5Ljc1MiIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOSIgcG9pbnRzPSIxNjcuODE3IDEzNC44NjQgMTY3LjgxNyAxOTQuNzE4IDExNC44NTQgMTU5LjYwNiAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDEzNC44NjQiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMjIwLjc2MiA5OS43NTIgMjIwLjc2MiAxNTkuNjA2IDE2Ny44MTcgMTk0LjcxOCAxNjcuODE3IDEzNC44NjQgMjIwLjc2MiA5OS43NTIiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTEwIiBwb2ludHM9IjExMC41NDEgMjEuNjA0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCA3Ny45NDkgMCAxMTAuNTQxIDIxLjYwNCIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTEiIHBvaW50cz0iMTEwLjU0MSAyMS42MDQgMTEwLjU0MSA1OC40NDkgNzcuOTQ5IDgwLjA2NCA3Ny45NDkgNDMuMjE5IDExMC41NDEgMjEuNjA0Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjE0MS4xOSAxNDguMDczIDE2Ny44MTMgMTMwLjQxNyAxOTQuNDQ0IDE0OC4wNzMgMTY3LjgxMyAxNjUuNzE5IDE0MS4xOSAxNDguMDczIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Ny44MTMgMTMwLjQxNyAxNjcuODEzIDEwMC4zMjEgMTk0LjQ0NCAxMTcuOTc2IDE5NC40NDQgMTQ4LjA3MyAxNjcuODEzIDEzMC40MTciLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMTQxLjE5IDE0OC4wNzMgMTQxLjE5IDExNy45NzYgMTY3LjgxMyAxMDAuMzIxIDE2Ny44MTMgMTMwLjQxNyAxNDEuMTkgMTQ4LjA3MyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTIiIHBvaW50cz0iNDUuMzQ1IDIxLjYwNCA0NS4zNDUgNDQuOTg0IDU3LjIzMSA1Mi44NjQgNTcuMjMxIDY2LjI5NiA3Ny45NDkgODAuMDY0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCIvPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjQuNjQzOCIgeTE9Ijg2Ljk1NDQiIHgyPSIyNi4wMTU3IiB5Mj0iODUuNTUzMSIvPgogICAgICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTEzIiB4MT0iMjkuODA0IiB5MT0iODEuNjgzNCIgeDI9IjYwLjM4MTEiIHkyPSI1MC40NDkyIi8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjYyLjI3NTIiIHkxPSI0OC41MTQzIiB4Mj0iNjMuNjQ3IiB5Mj0iNDcuMTEzIi8+CiAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIzNS4yNTUgODkuNjQ1IDE3LjczNiAxMDEuNDkyIDAgODkuOTYyIDE3LjUyNSA3OC4xMjEgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNy43MzYgMTAxLjQ5MiAxNy45MTUgMTIxLjQxNiAwLjE3OSAxMDkuODg3IDAgODkuOTYyIDE3LjczNiAxMDEuNDkyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMjAuNTg0OSIgeTE9IjEwNS41MzA1IiB4Mj0iNjUuODc0OSIgeTI9IjE3MS4zNjgxIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjM1LjI1NSA4OS42NDUgMzUuNDM0IDEwOS41NjkgMTcuOTE1IDEyMS40MTYgMTcuNzM2IDEwMS40OTIgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTQiIHBvaW50cz0iOTIuMzk0IDE3My44MTUgNzQuODc1IDE4NS42NjIgNTcuMTM5IDE3NC4xMzIgNzQuNjY0IDE2Mi4yOTEgOTIuMzk0IDE3My44MTUiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTE1IiBwb2ludHM9Ijc0Ljg3NSAxODUuNjYyIDc1LjA1NCAyMDUuNTg2IDU3LjMxOSAxOTQuMDU3IDU3LjEzOSAxNzQuMTMyIDc0Ljg3NSAxODUuNjYyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy0xNiIgcG9pbnRzPSI5Mi4zOTQgMTczLjgxNSA5Mi41NzQgMTkzLjczOSA3NS4wNTQgMjA1LjU4NiA3NC44NzUgMTg1LjY2MiA5Mi4zOTQgMTczLjgxNSIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\n----\n\n* [Open API Specification](#open-api-specification)\n* [JSON Schema](#json-schema)\n* [Condensed Versus Full Objects](#condensed-versus-full-objects)\n\n____\n\n\n### Open API Specification\n\nBitbucket uses the [Open API Specification](https://openapis.org) (OAI,\nformerly known as Swagger) to describe its APIs. Our OAI specification schema\nis hosted at [https://api.bitbucket.org/swagger.json](https://api.bitbucket.org/swagger.json)\nand serves as the canonical definition and comprehensive declaration of all\navailable endpoints.\n\nThe OAI specification makes writing client applications easier by:\nauto-generating boilerplate code (like data object classes) and dealing with\nauthentication and error handling.\n\nYou can find a comprehensive set of open tools for the OAI specification at:\n[https://github.com/swagger-api](https://github.com/swagger-api).\n\n\n### JSON Schema\n\nBitbucket uses JSON Schema to describe the layout of every type of object\nconsumed or produced by the API. These schemas are collected under the\n`#definitions` element of our swagger.json file.\n\nWhen an endpoint expects an object as part of a POST or PUT, it also expects\nthe object to validate against the JSON schemas. The same applies to objects\nreturned by an endpoint.\n\n\n### Condensed Versus Full Objects\n\nMost objects in Bitbucket come both in \"full\" and \"partial\" representation.\nThe full representation is when all elements are included. This is the layout\nreturned by a resource's `self` location (e.g. `/2.0/repositories/foo/bar`),\nas well as resource collection endpoints (e.g. `/2.0/repositories`).\n\nHowever, Bitbucket objects often embed other objects. For example, a `repository`\nobject embeds a `user` object for its owner. Likewise, a `pullrequest` object\nembeds its `repository` object.\n\nThese related objects are embedded, or inlined, to reduce the \"chatter\" when\nclients make frequent followup API calls to collect information on common,\nrelated information.\n\nEmbedded related objects are typically limited in their fields to avoid such\nobject graphs from becoming too deep and noisy. They often exclude their own\nnested objects in an attempt to strike a balance between performance and\nutility.\n\nAn object's embedded or condensed representation tends to be standardized,\nmeaning the fields included is the same set, regardless of where the object\nwas embedded.\n" }, { - "body": "\nYou should be familiar with REST architecture before writing an integration. Read this overview page to gain a good understanding of Bitbucket's REST implementation.\n\n----\n\n* [URI structure](#uri-structure)\n* [HTTP methods](#http-methods)\n* [UUID](#universally-unique-identifier)\n * [User object and UUID](#user-object-and-uuid)\n * [Repository object and UUID](#repository-object-and-uuid)\n * [Team object and UUID](#team-object-and-uuid)\n* [Standard error responses](#standardized-error-responses)\n* [Standard ISO-8601 timestamps](#standard-iso-8601-timestamps)\n\n----\n\n\n### URI structure\n\nAll Bitbucket Cloud requests start with the `https://api.bitbucket.org/2.0` prefix (for the 2.0 API) and `https://api.bitbucket.org/1.0` prefix (1.0 API).\n\nThe next segment of the URI path depends on the endpoint of the request. For example, using the curl command and the repositories endpoint you can list all the issues on Bitbucket's tutorial repository:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org\n```\nGiven a specific endpoint, you can then drill down to a particular aspect or resource of that endpoint. The issues resource on a repository is an example:\n\n```\ncurl https://api.bitbucket.org/1.0/repositories/tutorials/tutorials.bitbucket.org/issues\n```\n\n#### HTTP methods\n\nA given endpoint or resource has a series of actions (or methods) associated with it. The Bitbucket service supports these standard HTTP methods:\n\n| Call | Description |\n|------|-------------|\n| GET | Retrieves information. |\n| PUT | Updates existing information. |\n| POST | Creates new information. |\n| DELETE | Removes existing information. |\n\nFor example, you can call use the POST action on the issues resource and create an issue on the issue tracker.\n\n**Specifying content length**\n\nYou can get a `411 Length Required` response. If this happens, the API requires a Content-Length header but the client is not sending it. You should add the header yourself, for example using the curl client:\n\n```\ncurl -r PUT --header \"Content-Length: 0\" -u user:app_password https://api.bitbucket.org/1.0/emails/rap@atlassian.com\n```\n\n### Universally Unique Identifier\n\nUUID's provide a single point of recognition for users, teams, and repositories. The UUID is distinct from the username, team name, and repository name fields and remains the same even when those fields change. For example when a user changes their username or moves a repository you will need to modify calls which use those identifiers but not if you are pointing to the UUID.\n\n#### UUID examples and structure\n\nUUID's work with both the 1.0 and 2.0 APIs for the user, team, and repository objects. The following examples the following characters are replacements for curly brackets: `%7B` replaces `{` and `%7D` replaces `}`. You will see this structure in the following example sections.\n\n#### User object and UUID\n\nWhen you make a call using either the username or the UUID for that user the response is the same.\n\n**Call with username**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/tutorials\n```\n\n***Call with UUID for the user**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/%7Bc788b2da-b7a2-404c-9e26-d3f077557007%7D\n```\n\n**Response**\n```JSON\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\n\n#### Repository object and UUID\n\nOnce you have the UUID for a repository you no longer need a username or team name to make the API call so long as you use an empty field. This helps you resolve repositories no matter if the username or team name changes.\n\n**Call with team name (1team) and repository name (moxie)**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/moxie\n```\n**Call with UUID and empty field**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/%7B%7D/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Call with UUID and teamname**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Response**\n\n```JSON\n{\n \"created_on\": \"2013-11-08T01:11:03.222520+00:00\",\n \"description\": \"\",\n \"fork_policy\": \"allow_forks\",\n \"full_name\": \"1team/moxie\",\n \"has_issues\": false,\n \"has_wiki\": false,\n \"is_private\": false,\n \"language\": \"\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/1team/moxie/avatar/32/\"\n },\n \"branches\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/branches\"\n },\n \"clone\": [\n {\n \"href\": \"https://bitbucket.org/1team/moxie.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/1team/moxie.git\",\n \"name\": \"ssh\"\n }\n ],\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/commits\"\n },\n \"downloads\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/downloads\"\n },\n \"forks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/forks\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/moxie\"\n },\n \"pullrequests\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/pullrequests\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie\"\n },\n \"tags\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/tags\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/watchers\"\n }\n },\n \"name\": \"moxie\",\n \"owner\": {\n \"display_name\": \"the team\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/1team/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/teams/1team\"\n }\n },\n \"type\": \"team\",\n \"username\": \"1team\",\n \"uuid\": \"{aa559944-83c9-4963-a9a8-69ac8d9cf5d2}\"\n },\n \"project\": {\n \"key\": \"PROJ\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ/avatar/32\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ\"\n }\n },\n \"name\": \"Untitled project\",\n \"type\": \"project\",\n \"uuid\": \"{ab52aaeb-16ad-4fb0-bb1d-47e4f00367ff}\"\n },\n \"scm\": \"git\",\n \"size\": 33348,\n \"type\": \"repository\",\n \"updated_on\": \"2013-11-08T01:11:03.263237+00:00\",\n \"uuid\": \"{21fa9bf8-b5b2-4891-97ed-d590bad0f871}\",\n \"website\": \"\"\n}\n```\n\n#### Team object and UUID\n\nThis example shows a call for a list of team members using both the team name and with the UUID for the team object. As the call is unauthenticated in the following example the response object will only show members with public profiles. The response is the same in either case.\n\n**Call with teamname**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/1team/members\n```\n**Call with UUID for team object**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/%7Baa559944-83c9-4963-a9a8-69ac8d9cf5d2%7D/members\n```\n\n**Response**\n\n```JSON\n{\n \"page\": 1,\n \"pagelen\": 50,\n \"size\": 2,\n \"values\": [\n {\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"display_name\": \"tutorials account\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/tutorials/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/tutorials\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"website\": \"https://tutorials.bitbucket.org/\"\n },\n {\n \"created_on\": \"2013-12-10T14:44:13+00:00\",\n \"display_name\": \"Dan Stevens [Atlassian]\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/dans9190/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/dans9190/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/dans9190\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/dans9190\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"dans9190\",\n \"nickname\": \"dans9190\",\n \"account_status\": \"active\",\n \"uuid\": \"{1cd06601-cd0e-4fce-be03-e9ac226978b7}\",\n \"website\": \"\"\n }\n ]\n}\n```\n\n### Standardized error responses\n\nThe 2.0 API standardizes the error response layout. The 2.0 API serves a JSON\nobject along with the appropriate HTTP status code. The JSON object provides a\ndetailed problem description.\n\n```json\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"Bad request\",\n \"fields\": {\n \"src\": [\n \"This field is required.\"\n ]\n },\n \"detail\": \"You must specify a valid source branch when creating a pull request.\",\n \"id\": \"d23a1cc5178f7637f3d9bf2d13824258\",\n \"data\": {\n \"extra\": \"Optional, endpoint-specific data to further augment the error.\"\n }\n }\n}\n```\n\nThis object contains an error element which contains the following nested\nelements:\n\n| Element | Description |\n|---------|-------------|\n| message | A short description of the problem. This element is always present. Its value may be localized. |\n| fields | This optional element is used in response to POST or PUT operations in which clients have provided invalid input. It contains a list of one or more client-provided fields that failed validation. The values may be localized. |\n| detail | An optional detailed explanation of the failure. Its value may be localized.\n| id | An optional unique error identifier that identifies the error in Bitbucket's logging system. If you feel you hit a bug in an API and this field is provided, please mention it if you decide to contact support as it will greatly help us narrow down the problem. |\n\n### Standard ISO-8601 timestamps\n\nAll 2.0 APIs use standardized ISO-8601 timestamps. In most cases, our APIs return UTC timestamps and for these, the timezone offset part will be 00:00. In rare cases where the original localized timestamp has significance, the timezone offset may identify the event's original timezone.\n", - "title": "URI, UUID, and structures", "anchor": "uri-uuid", + "title": "URI, UUID, and structures", "description": "URL's, UUID's, errors, and timestamps", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTc5LjI2IDE3Ny42NSI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzA5MWU0Mjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMywuY2xzLTQsLmNscy05e2ZpbGw6bm9uZTt9LmNscy0ze3N0cm9rZTojOTljMWZmO30uY2xzLTMsLmNscy00e3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MDt9LmNscy0xMiwuY2xzLTQsLmNscy05e3N0cm9rZTojZTVlOGVjO30uY2xzLTV7ZmlsbDojMzQ0NTYzO30uY2xzLTZ7ZmlsbDojZmY4YjAwO30uY2xzLTd7ZmlsbDojZmZjNDAwO30uY2xzLTh7ZmlsbDojMDA2NWZmO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMiwuY2xzLTEzLC5jbHMtOXtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2Utd2lkdGg6MnB4O30uY2xzLTEwe3N0cm9rZTojZmZhYjAwO30uY2xzLTExLC5jbHMtMTN7c3Ryb2tlOiMwMDY1ZmY7fS5jbHMtMTJ7ZmlsbDojOTljMWZmO30uY2xzLTEze2ZpbGw6I2U1ZThlYzt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudCIgeDE9IjAuNCIgeTE9IjE3OC4wNSIgeDI9IjE3OC44NSIgeTI9Ii0wLjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMwOTFlNDIiLz48c3RvcCBvZmZzZXQ9IjAuMDciIHN0b3AtY29sb3I9IiMwZDIyNDUiLz48c3RvcCBvZmZzZXQ9IjAuNDkiIHN0b3AtY29sb3I9IiMxZjMyNTMiLz48c3RvcCBvZmZzZXQ9IjAuNzkiIHN0b3AtY29sb3I9IiMyNTM4NTgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48dGl0bGU+Q29kZTwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IlNvZnR3YXJlIj48cmVjdCBpZD0iX1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjE3OS4yNiIgaGVpZ2h0PSIxNzcuNjUiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzkuMjYsMjYuNjRIMFY3MS43NUExNjYuNDEsMTY2LjQxLDAsMCwwLDYzLjI0LDU5LjUxYTE4OC40MSwxODguNDEsMCwwLDAsMTcuMzktOC4zNmMxOC40NC05LjQzLDQ4LjM3LTE3LjksOTguNjItMTNabS0xNTkuNDQsMzRoMFptMC0xNC4wOGgwWiIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjE5LjgxIiB5MT0iNDYuNTgiIHgyPSIyNS4wNyIgeTI9IjQ2LjU4Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSI2MC42NiIgeDI9IjE5LjgxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iODguODIiIHgyPSIxOS44MSIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxMDIuODkiIHgyPSIxOS44MSIgeTI9IjEwMi44OSIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTE2Ljk3IiB4Mj0iMTkuODEiIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIyNS4wNyIgeTE9IjEzMS4wNSIgeDI9IjE5LjgxIiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxNDUuMTMiIHgyPSIxOS44MSIgeTI9IjE0NS4xMyIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTU5LjIxIiB4Mj0iMTkuODEiIHkyPSIxNTkuMjEiLz48bGluZSBjbGFzcz0iY2xzLTQiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy00IiB4MT0iNTUuODkiIHkxPSIxNDUuMTMiIHgyPSIxMzkuNjciIHkyPSIxNDUuMTMiLz48cmVjdCBjbGFzcz0iY2xzLTUiIHdpZHRoPSIxNzkuMjYiIGhlaWdodD0iMjYuNjQiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNiIgY3g9IjEzLjUiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy03IiBjeD0iMzAuMTgiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy04IiBjeD0iNDYuODYiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTc1LjQxLDg4LjgyIi8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksODguODIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMzIuODkiIHkxPSI3NC43NCIgeDI9Ijc1LjQxIiB5Mj0iNzQuNzQiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iMzIuODkiIHkxPSI2MC42NiIgeDI9Ijc1LjQxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTkiIHgxPSIzMi44OSIgeTE9IjQ2LjU4IiB4Mj0iNTUuODkiIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjQ2LjU4IiB4Mj0iMjUuMDciIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjYwLjY2IiB4Mj0iMjUuMDciIHkyPSI2MC42NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijg4LjgyIiB4Mj0iMjUuMDciIHkyPSI4OC44MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjEwMi44OSIgeDI9IjI1LjA3IiB5Mj0iMTAyLjg5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTE2Ljk3IiB4Mj0iMjUuMDciIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTkuODEiIHkxPSIxMzEuMDUiIHgyPSIyNS4wNyIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjE0NS4xMyIgeDI9IjI1LjA3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTU5LjIxIiB4Mj0iMjUuMDciIHkyPSIxNTkuMjEiLz48bGluZSBpZD0iX0xpbmVfIiBkYXRhLW5hbWU9IiZsdDtMaW5lJmd0OyIgY2xhc3M9ImNscy0xMCIgeDE9Ijg0LjI0IiB5MT0iMTE2Ljk3IiB4Mj0iMTU2LjY1IiB5Mj0iMTE2Ljk3Ii8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksMTE3aDBaIi8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjEwMiIgeTE9IjEzMS4wNSIgeDI9IjE2My42MiIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTMiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9IjU1Ljg5IiB5MT0iMTQ1LjEzIiB4Mj0iMTM5LjY3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNzguOSIgeTE9IjE1OS4yMSIgeDI9IjExMy41MSIgeTI9IjE1OS4yMSIvPjxsaW5lIGNsYXNzPSJjbHMtOSIgeDE9IjU5LjYxIiB5MT0iODguODIiIHgyPSI5OS4zMyIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNTkuNjEiIHkxPSIxMDIuODkiIHgyPSI5OS4zMyIgeTI9IjEwMi44OSIvPjxjaXJjbGUgY2xhc3M9ImNscy02IiBjeD0iMTMuNSIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTciIGN4PSIzMC4xOCIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTgiIGN4PSI0Ni44NiIgY3k9IjEyLjA4IiByPSI1LjExIi8+PC9nPjwvZz48L3N2Zz4=" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTc5LjI2IDE3Ny42NSI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzA5MWU0Mjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMywuY2xzLTQsLmNscy05e2ZpbGw6bm9uZTt9LmNscy0ze3N0cm9rZTojOTljMWZmO30uY2xzLTMsLmNscy00e3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MDt9LmNscy0xMiwuY2xzLTQsLmNscy05e3N0cm9rZTojZTVlOGVjO30uY2xzLTV7ZmlsbDojMzQ0NTYzO30uY2xzLTZ7ZmlsbDojZmY4YjAwO30uY2xzLTd7ZmlsbDojZmZjNDAwO30uY2xzLTh7ZmlsbDojMDA2NWZmO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMiwuY2xzLTEzLC5jbHMtOXtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2Utd2lkdGg6MnB4O30uY2xzLTEwe3N0cm9rZTojZmZhYjAwO30uY2xzLTExLC5jbHMtMTN7c3Ryb2tlOiMwMDY1ZmY7fS5jbHMtMTJ7ZmlsbDojOTljMWZmO30uY2xzLTEze2ZpbGw6I2U1ZThlYzt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudCIgeDE9IjAuNCIgeTE9IjE3OC4wNSIgeDI9IjE3OC44NSIgeTI9Ii0wLjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMwOTFlNDIiLz48c3RvcCBvZmZzZXQ9IjAuMDciIHN0b3AtY29sb3I9IiMwZDIyNDUiLz48c3RvcCBvZmZzZXQ9IjAuNDkiIHN0b3AtY29sb3I9IiMxZjMyNTMiLz48c3RvcCBvZmZzZXQ9IjAuNzkiIHN0b3AtY29sb3I9IiMyNTM4NTgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48dGl0bGU+Q29kZTwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IlNvZnR3YXJlIj48cmVjdCBpZD0iX1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjE3OS4yNiIgaGVpZ2h0PSIxNzcuNjUiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzkuMjYsMjYuNjRIMFY3MS43NUExNjYuNDEsMTY2LjQxLDAsMCwwLDYzLjI0LDU5LjUxYTE4OC40MSwxODguNDEsMCwwLDAsMTcuMzktOC4zNmMxOC40NC05LjQzLDQ4LjM3LTE3LjksOTguNjItMTNabS0xNTkuNDQsMzRoMFptMC0xNC4wOGgwWiIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjE5LjgxIiB5MT0iNDYuNTgiIHgyPSIyNS4wNyIgeTI9IjQ2LjU4Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSI2MC42NiIgeDI9IjE5LjgxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iODguODIiIHgyPSIxOS44MSIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxMDIuODkiIHgyPSIxOS44MSIgeTI9IjEwMi44OSIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTE2Ljk3IiB4Mj0iMTkuODEiIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIyNS4wNyIgeTE9IjEzMS4wNSIgeDI9IjE5LjgxIiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxNDUuMTMiIHgyPSIxOS44MSIgeTI9IjE0NS4xMyIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTU5LjIxIiB4Mj0iMTkuODEiIHkyPSIxNTkuMjEiLz48bGluZSBjbGFzcz0iY2xzLTQiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy00IiB4MT0iNTUuODkiIHkxPSIxNDUuMTMiIHgyPSIxMzkuNjciIHkyPSIxNDUuMTMiLz48cmVjdCBjbGFzcz0iY2xzLTUiIHdpZHRoPSIxNzkuMjYiIGhlaWdodD0iMjYuNjQiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNiIgY3g9IjEzLjUiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy03IiBjeD0iMzAuMTgiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy04IiBjeD0iNDYuODYiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTc1LjQxLDg4LjgyIi8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksODguODIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMzIuODkiIHkxPSI3NC43NCIgeDI9Ijc1LjQxIiB5Mj0iNzQuNzQiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iMzIuODkiIHkxPSI2MC42NiIgeDI9Ijc1LjQxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTkiIHgxPSIzMi44OSIgeTE9IjQ2LjU4IiB4Mj0iNTUuODkiIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjQ2LjU4IiB4Mj0iMjUuMDciIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjYwLjY2IiB4Mj0iMjUuMDciIHkyPSI2MC42NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijg4LjgyIiB4Mj0iMjUuMDciIHkyPSI4OC44MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjEwMi44OSIgeDI9IjI1LjA3IiB5Mj0iMTAyLjg5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTE2Ljk3IiB4Mj0iMjUuMDciIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTkuODEiIHkxPSIxMzEuMDUiIHgyPSIyNS4wNyIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjE0NS4xMyIgeDI9IjI1LjA3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTU5LjIxIiB4Mj0iMjUuMDciIHkyPSIxNTkuMjEiLz48bGluZSBpZD0iX0xpbmVfIiBkYXRhLW5hbWU9IiZsdDtMaW5lJmd0OyIgY2xhc3M9ImNscy0xMCIgeDE9Ijg0LjI0IiB5MT0iMTE2Ljk3IiB4Mj0iMTU2LjY1IiB5Mj0iMTE2Ljk3Ii8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksMTE3aDBaIi8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjEwMiIgeTE9IjEzMS4wNSIgeDI9IjE2My42MiIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTMiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9IjU1Ljg5IiB5MT0iMTQ1LjEzIiB4Mj0iMTM5LjY3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNzguOSIgeTE9IjE1OS4yMSIgeDI9IjExMy41MSIgeTI9IjE1OS4yMSIvPjxsaW5lIGNsYXNzPSJjbHMtOSIgeDE9IjU5LjYxIiB5MT0iODguODIiIHgyPSI5OS4zMyIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNTkuNjEiIHkxPSIxMDIuODkiIHgyPSI5OS4zMyIgeTI9IjEwMi44OSIvPjxjaXJjbGUgY2xhc3M9ImNscy02IiBjeD0iMTMuNSIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTciIGN4PSIzMC4xOCIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTgiIGN4PSI0Ni44NiIgY3k9IjEyLjA4IiByPSI1LjExIi8+PC9nPjwvZz48L3N2Zz4='", + "body": "\nYou should be familiar with REST architecture before writing an integration. Read this overview page to gain a good understanding of Bitbucket's REST implementation.\n\n----\n\n* [URI structure](#uri-structure)\n* [HTTP methods](#http-methods)\n* [UUID](#universally-unique-identifier)\n * [User object and UUID](#user-object-and-uuid)\n * [Repository object and UUID](#repository-object-and-uuid)\n * [Team object and UUID](#team-object-and-uuid)\n* [Standard error responses](#standardized-error-responses)\n* [Standard ISO-8601 timestamps](#standard-iso-8601-timestamps)\n\n----\n\n\n### URI structure\n\nAll Bitbucket Cloud requests start with the `https://api.bitbucket.org/2.0` prefix (for the 2.0 API) and `https://api.bitbucket.org/1.0` prefix (1.0 API).\n\nThe next segment of the URI path depends on the endpoint of the request. For example, using the curl command and the repositories endpoint you can list all the issues on Bitbucket's tutorial repository:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org\n```\nGiven a specific endpoint, you can then drill down to a particular aspect or resource of that endpoint. The issues resource on a repository is an example:\n\n```\ncurl https://api.bitbucket.org/1.0/repositories/tutorials/tutorials.bitbucket.org/issues\n```\n\n#### HTTP methods\n\nA given endpoint or resource has a series of actions (or methods) associated with it. The Bitbucket service supports these standard HTTP methods:\n\n| Call | Description |\n|------|-------------|\n| GET | Retrieves information. |\n| PUT | Updates existing information. |\n| POST | Creates new information. |\n| DELETE | Removes existing information. |\n\nFor example, you can call use the POST action on the issues resource and create an issue on the issue tracker.\n\n**Specifying content length**\n\nYou can get a `411 Length Required` response. If this happens, the API requires a Content-Length header but the client is not sending it. You should add the header yourself, for example using the curl client:\n\n```\ncurl -r PUT --header \"Content-Length: 0\" -u user:app_password https://api.bitbucket.org/1.0/emails/rap@atlassian.com\n```\n\n### Universally Unique Identifier\n\nUUID's provide a single point of recognition for users, teams, and repositories. The UUID is distinct from the username, team name, and repository name fields and remains the same even when those fields change. For example when a user changes their username or moves a repository you will need to modify calls which use those identifiers but not if you are pointing to the UUID.\n\n#### UUID examples and structure\n\nUUID's work with both the 1.0 and 2.0 APIs for the user, team, and repository objects. The following examples the following characters are replacements for curly brackets: `%7B` replaces `{` and `%7D` replaces `}`. You will see this structure in the following example sections.\n\n#### User object and UUID\n\nWhen you make a call using either the username or the UUID for that user the response is the same.\n\n**Call with username**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/tutorials\n```\n\n***Call with UUID for the user**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/%7Bc788b2da-b7a2-404c-9e26-d3f077557007%7D\n```\n\n**Response**\n```JSON\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\n\n#### Repository object and UUID\n\nOnce you have the UUID for a repository you no longer need a username or team name to make the API call so long as you use an empty field. This helps you resolve repositories no matter if the username or team name changes.\n\n**Call with team name (1team) and repository name (moxie)**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/moxie\n```\n**Call with UUID and empty field**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/%7B%7D/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Call with UUID and teamname**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Response**\n\n```JSON\n{\n \"created_on\": \"2013-11-08T01:11:03.222520+00:00\",\n \"description\": \"\",\n \"fork_policy\": \"allow_forks\",\n \"full_name\": \"1team/moxie\",\n \"has_issues\": false,\n \"has_wiki\": false,\n \"is_private\": false,\n \"language\": \"\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/1team/moxie/avatar/32/\"\n },\n \"branches\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/branches\"\n },\n \"clone\": [\n {\n \"href\": \"https://bitbucket.org/1team/moxie.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/1team/moxie.git\",\n \"name\": \"ssh\"\n }\n ],\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/commits\"\n },\n \"downloads\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/downloads\"\n },\n \"forks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/forks\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/moxie\"\n },\n \"pullrequests\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/pullrequests\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie\"\n },\n \"tags\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/tags\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/watchers\"\n }\n },\n \"name\": \"moxie\",\n \"owner\": {\n \"display_name\": \"the team\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/1team/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/teams/1team\"\n }\n },\n \"type\": \"team\",\n \"username\": \"1team\",\n \"uuid\": \"{aa559944-83c9-4963-a9a8-69ac8d9cf5d2}\"\n },\n \"project\": {\n \"key\": \"PROJ\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ/avatar/32\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ\"\n }\n },\n \"name\": \"Untitled project\",\n \"type\": \"project\",\n \"uuid\": \"{ab52aaeb-16ad-4fb0-bb1d-47e4f00367ff}\"\n },\n \"scm\": \"git\",\n \"size\": 33348,\n \"type\": \"repository\",\n \"updated_on\": \"2013-11-08T01:11:03.263237+00:00\",\n \"uuid\": \"{21fa9bf8-b5b2-4891-97ed-d590bad0f871}\",\n \"website\": \"\"\n}\n```\n\n#### Team object and UUID\n\nThis example shows a call for a list of team members using both the team name and with the UUID for the team object. As the call is unauthenticated in the following example the response object will only show members with public profiles. The response is the same in either case.\n\n**Call with teamname**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/1team/members\n```\n**Call with UUID for team object**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/%7Baa559944-83c9-4963-a9a8-69ac8d9cf5d2%7D/members\n```\n\n**Response**\n\n```JSON\n{\n \"page\": 1,\n \"pagelen\": 50,\n \"size\": 2,\n \"values\": [\n {\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"display_name\": \"tutorials account\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/tutorials/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/tutorials\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"website\": \"https://tutorials.bitbucket.org/\"\n },\n {\n \"created_on\": \"2013-12-10T14:44:13+00:00\",\n \"display_name\": \"Dan Stevens [Atlassian]\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/dans9190/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/dans9190/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/dans9190\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/dans9190\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"dans9190\",\n \"nickname\": \"dans9190\",\n \"account_status\": \"active\",\n \"uuid\": \"{1cd06601-cd0e-4fce-be03-e9ac226978b7}\",\n \"website\": \"\"\n }\n ]\n}\n```\n\n### Standardized error responses\n\nThe 2.0 API standardizes the error response layout. The 2.0 API serves a JSON\nobject along with the appropriate HTTP status code. The JSON object provides a\ndetailed problem description.\n\n```json\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"Bad request\",\n \"fields\": {\n \"src\": [\n \"This field is required.\"\n ]\n },\n \"detail\": \"You must specify a valid source branch when creating a pull request.\",\n \"id\": \"d23a1cc5178f7637f3d9bf2d13824258\",\n \"data\": {\n \"extra\": \"Optional, endpoint-specific data to further augment the error.\"\n }\n }\n}\n```\n\nThis object contains an error element which contains the following nested\nelements:\n\n| Element | Description |\n|---------|-------------|\n| message | A short description of the problem. This element is always present. Its value may be localized. |\n| fields | This optional element is used in response to POST or PUT operations in which clients have provided invalid input. It contains a list of one or more client-provided fields that failed validation. The values may be localized. |\n| detail | An optional detailed explanation of the failure. Its value may be localized.\n| id | An optional unique error identifier that identifies the error in Bitbucket's logging system. If you feel you hit a bug in an API and this field is provided, please mention it if you decide to contact support as it will greatly help us narrow down the problem. |\n\n### Standard ISO-8601 timestamps\n\nAll 2.0 APIs use standardized ISO-8601 timestamps. In most cases, our APIs return UTC timestamps and for these, the timezone offset part will be 00:00. In rare cases where the original localized timestamp has significance, the timezone offset may identify the event's original timezone.\n" }, { - "body": "\nThis section describes [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (CORS), what content types we support in requests and responses, and hyperlinking resources in each json responses.\n\n\n----\n\n* [CORS](#cors)\n* [Supported content types](#supported-content-types)\n* [Resource links](#resource-links)\n\n----\n\n### Cors\n\nThe Bitbucket API supports Cross-origin resource sharing to allow requests for restricted resources across domains. For more information you can refer to:\n\n* [Wikipedia article on CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n* [W3C CORS recommendation](https://www.w3.org/TR/cors/)\n\nSending a general request from the api to bitbucket.com:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\"`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 17:54:37 GMT\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-110\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00379920005798\n Connection: Keep-Alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 383\n X-Cache-Info: cached\n Content-Length: 0\n\nSending the same request with the CORS check -X OPTIONS in the call:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\" -X OPTIONS`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, Content-Type, ETag, Last-Modified\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 18:04:30 GMT\n Access-Control-Max-Age: 86400\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-111\n Access-Control-Allow-Origin: *\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00371098518372\n Connection: keep-alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 357\n Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS\n Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, Range, X-CsrftokenX-Requested-With\n X-Cache-Info: not cacheable; request wasn't a GET or HEAD\n Content-Length: 0\n\n\n\n### Supported content types\n\nThe default and primary content type for 2.0 APIs is JSON. This applies both to responses from the server and to the request bodies provided by the client.\n\nUnless documented otherwise, whenever creating a new (POST) or modifying an existing (PUT) object, your client must provide the object's normal representation. Not every object element can be mutated. For example, a repository's created_on date is an auto-generated, immutable field. Your client can omit immutable fields from a request body.\n\nIn some cases, a resource might also accept regular application/x-www-url-form-encoded POST and PUT bodies. Such bodies can be more convenient in scripts and command line usage. Requests bodies can contain contain nested elements or they can be flat (without nested elements). Clients can send flat request bodies as either as application/json or as application/x-www-url-form-encoded. Nested objects always require JSON.\n\n### Resource links\n\nEvery 2.0 object contains a links element that points to related resources or alternate representations. Use links to quickly discover and traverse to related objects. Links serve a \"self-documenting\" function for each endpoint. For example, the following request for a specific user:\n\n\n`$ curl https://api.bitbucket.org/2.0/users/tutorials`\n\n```json\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\nLinks can be actual REST API resources or they can be informational. In this example, informative resources include the user's avatar and the HTML URL for the user's Bitbucket account. Your client should avoid hardcoding an API's URL and instead use the URLs returned in API responses.\n\nA link's key is its `rel` (relationship) attribute and it contains a mandatory href element. For example, the following link:\n\n```json\n\"self\": {\n \"href\": \"https://api.bitbucket.org/api/2.0/users/tutorials\"\n}\n```\n\nThe rel for this link is self and the href is https://api.bitbucket.org/api/2.0/users/tutorials. A single rel key can contain an list (array) of href objects. Your client should anticipate that any rel key can contain one or more href objects.\n\nFinally, links can also contain optional elements. Two common optional elements are the name element and the title element. They are often used to disambiguate links that share the same rel key. In the example below, the repository object that contains a clone link with two href objects. Each object contains the optional name element to clarify its use.\n\n```json\n\"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/bitbucket\"\n },\n \"clone\": [\n {\n \"href\": \"https://api.bitbucket.org/evzijst/bitbucket.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/erik/bitbucket.git\",\n \"name\": \"ssh\"\n }\n ],\n ...\n}\n```\nLinks can support [URI Templates](https://tools.ietf.org/html/rfc6570); Those that do contain a `\"templated\": \"true\"` element.\n", - "title": "Cors and hypermedia", "anchor": "cors-hypermedia", + "title": "Cors and hypermedia", "description": "Learn about resources and linking", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM2LjYgMjE4LjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2lzb2xhdGlvbjppc29sYXRlO30uY2xzLTIsLmNscy0zLC5jbHMtNHtmaWxsOm5vbmU7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjExcHg7fS5jbHMtMntzdHJva2U6dXJsKCNsaW5lYXItZ3JhZGllbnQpO30uY2xzLTN7c3Ryb2tlOnVybCgjTmV3X0dyYWRpZW50X1N3YXRjaF8xNCk7fS5jbHMtNHtzdHJva2U6dXJsKCNOZXdfR3JhZGllbnRfU3dhdGNoXzEpO30uY2xzLTV7ZmlsbDojNDI1MjZlO30uY2xzLTZ7ZmlsbDojZmY1NjMwO30uY2xzLTEwLC5jbHMtNywuY2xzLTh7bWl4LWJsZW5kLW1vZGU6bXVsdGlwbHk7fS5jbHMtN3tmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTh7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy05e2ZpbGw6IzAwNjVmZjt9LmNscy0xMHtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTQpO308L3N0eWxlPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB5MT0iMTY3Ljg3IiB4Mj0iMTkxLjU2IiB5Mj0iMTY3Ljg3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNTA1Zjc5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMzQ0NTYzIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9Ik5ld19HcmFkaWVudF9Td2F0Y2hfMTQiIHgxPSIxMTIuODMiIHkxPSIxMzEuNzIiIHgyPSIyMzYuNiIgeTI9IjEzMS43MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzAwNTJjYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzI2ODRmZiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJOZXdfR3JhZGllbnRfU3dhdGNoXzEiIHgxPSI0NS4wNiIgeTE9Ijg2LjY5IiB4Mj0iMTY4Ljg4IiB5Mj0iODYuNjkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNkZTM1MGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjc0NTIiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTIiIHgxPSIzNDQ3LjkzIiB5MT0iLTkxOC43OSIgeDI9IjM0NTEuNCIgeTI9Ii0xMDMyLjc2IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC01NzIuMzggMzcwNC4yOSkgcm90YXRlKC02NC4zNCkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAuMzEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2MxYzdkMCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtMyIgeDE9IjM1MDYuNiIgeTE9Ii03OTYuNjYiIHgyPSIzNTEwLjA3IiB5Mj0iLTkxMC42MyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudC0yIi8+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjM1ODEuNjgiIHkxPSItOTA2LjgyIiB4Mj0iMzU4NS4xNiIgeTI9Ii0xMDIwLjc5IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTIiLz48L2RlZnM+PHRpdGxlPldlYmhvb2tzPC90aXRsZT48ZyBjbGFzcz0iY2xzLTEiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJTb2Z0d2FyZSI+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTg2LjA2LDE2Ny44N0gxMTcuNzJBMjcuNTgsMjcuNTgsMCwwLDAsOTIuMjQsMTg1YTQ1LjA2LDQ1LjA2LDAsMSwxLTQxLjY4LTYyLjE5Ii8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTE4LjMzLDUwLjUybDM0LjE1LDU5LjE4YTI3LjU5LDI3LjU5LDAsMCwwLDI3LjU4LDEzLjUxLDQ1LjA2LDQ1LjA2LDAsMSwxLTMzLDY3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNNTAuNTYsMTY3Ljg3bDM0LjE4LTU5LjE2YTI3LjU5LDI3LjU5LDAsMCwwLTIuMDktMzAuNjQsNDUuMDYsNDUuMDYsMCwxLDEsNzQuNy01Ii8+PHBhdGggY2xhc3M9ImNscy01IiBkPSJNMTg2LjA2LDE5OS42NmEzMS43OSwzMS43OSwwLDEsMSwzMS43OS0zMS43OUEzMS44MiwzMS44MiwwLDAsMSwxODYuMDYsMTk5LjY2WiIvPjxnIGlkPSJfR3JvdXBfIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTQ5LjU2LDE5OS42NGEzMS43OSwzMS43OSwwLDEsMSwzMi43Ny0zMC43N0EzMS44MiwzMS44MiwwLDAsMSw0OS41NiwxOTkuNjRaIi8+PC9nPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTU0LjEyLDE4MC4zNmE1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNhNDMuODksNDMuODksMCwwLDAtMTEuNzMtMTEuMTcsMzEuNzcsMzEuNzcsMCwwLDAsMjkuMjgsNTYuMTNDNTguMjksMTkyLjQ0LDU0LjY4LDE4Ni45LDU0LjEyLDE4MC4zNloiLz48cGF0aCBjbGFzcz0iY2xzLTgiIGQ9Ik0xODkuNjIsMTgwLjM2QTU4LjksNTguOSwwLDAsMCwxODgsMTY5LjA4cy0yLjM1LTkuNDQtNy4zMy0xNi44M0E0My44OSw0My44OSwwLDAsMCwxNjksMTQxLjA4YTMxLjc3LDMxLjc3LDAsMCwwLDI5LjI4LDU2LjEzQzE5My43OSwxOTIuNDQsMTkwLjE4LDE4Ni45LDE4OS42MiwxODAuMzZaIi8+PGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTg5LjksMzMuNzhhMzIuNDYsMzIuNDYsMCwxLDEsMTEuODgsNDQuMzRBMzIuNDksMzIuNDksMCwwLDEsODkuOSwzMy43OFoiLz48L2c+PHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTEyMi4yMyw2Ni4xM2E1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNjLTMuMzctNS05LjA2LTkuNzktMTUuNDMtMTMuNDhBMzIuNDQsMzIuNDQsMCwwLDAsMTI4Ljc3LDgwLjZDMTI1LjMxLDc2LjM5LDEyMi43LDcxLjYxLDEyMi4yMyw2Ni4xM1oiLz48L2c+PC9nPjwvZz48L3N2Zz4=" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM2LjYgMjE4LjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2lzb2xhdGlvbjppc29sYXRlO30uY2xzLTIsLmNscy0zLC5jbHMtNHtmaWxsOm5vbmU7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjExcHg7fS5jbHMtMntzdHJva2U6dXJsKCNsaW5lYXItZ3JhZGllbnQpO30uY2xzLTN7c3Ryb2tlOnVybCgjTmV3X0dyYWRpZW50X1N3YXRjaF8xNCk7fS5jbHMtNHtzdHJva2U6dXJsKCNOZXdfR3JhZGllbnRfU3dhdGNoXzEpO30uY2xzLTV7ZmlsbDojNDI1MjZlO30uY2xzLTZ7ZmlsbDojZmY1NjMwO30uY2xzLTEwLC5jbHMtNywuY2xzLTh7bWl4LWJsZW5kLW1vZGU6bXVsdGlwbHk7fS5jbHMtN3tmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTh7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy05e2ZpbGw6IzAwNjVmZjt9LmNscy0xMHtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTQpO308L3N0eWxlPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB5MT0iMTY3Ljg3IiB4Mj0iMTkxLjU2IiB5Mj0iMTY3Ljg3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNTA1Zjc5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMzQ0NTYzIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9Ik5ld19HcmFkaWVudF9Td2F0Y2hfMTQiIHgxPSIxMTIuODMiIHkxPSIxMzEuNzIiIHgyPSIyMzYuNiIgeTI9IjEzMS43MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzAwNTJjYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzI2ODRmZiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJOZXdfR3JhZGllbnRfU3dhdGNoXzEiIHgxPSI0NS4wNiIgeTE9Ijg2LjY5IiB4Mj0iMTY4Ljg4IiB5Mj0iODYuNjkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNkZTM1MGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjc0NTIiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTIiIHgxPSIzNDQ3LjkzIiB5MT0iLTkxOC43OSIgeDI9IjM0NTEuNCIgeTI9Ii0xMDMyLjc2IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC01NzIuMzggMzcwNC4yOSkgcm90YXRlKC02NC4zNCkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAuMzEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2MxYzdkMCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtMyIgeDE9IjM1MDYuNiIgeTE9Ii03OTYuNjYiIHgyPSIzNTEwLjA3IiB5Mj0iLTkxMC42MyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudC0yIi8+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjM1ODEuNjgiIHkxPSItOTA2LjgyIiB4Mj0iMzU4NS4xNiIgeTI9Ii0xMDIwLjc5IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTIiLz48L2RlZnM+PHRpdGxlPldlYmhvb2tzPC90aXRsZT48ZyBjbGFzcz0iY2xzLTEiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJTb2Z0d2FyZSI+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTg2LjA2LDE2Ny44N0gxMTcuNzJBMjcuNTgsMjcuNTgsMCwwLDAsOTIuMjQsMTg1YTQ1LjA2LDQ1LjA2LDAsMSwxLTQxLjY4LTYyLjE5Ii8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTE4LjMzLDUwLjUybDM0LjE1LDU5LjE4YTI3LjU5LDI3LjU5LDAsMCwwLDI3LjU4LDEzLjUxLDQ1LjA2LDQ1LjA2LDAsMSwxLTMzLDY3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNNTAuNTYsMTY3Ljg3bDM0LjE4LTU5LjE2YTI3LjU5LDI3LjU5LDAsMCwwLTIuMDktMzAuNjQsNDUuMDYsNDUuMDYsMCwxLDEsNzQuNy01Ii8+PHBhdGggY2xhc3M9ImNscy01IiBkPSJNMTg2LjA2LDE5OS42NmEzMS43OSwzMS43OSwwLDEsMSwzMS43OS0zMS43OUEzMS44MiwzMS44MiwwLDAsMSwxODYuMDYsMTk5LjY2WiIvPjxnIGlkPSJfR3JvdXBfIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTQ5LjU2LDE5OS42NGEzMS43OSwzMS43OSwwLDEsMSwzMi43Ny0zMC43N0EzMS44MiwzMS44MiwwLDAsMSw0OS41NiwxOTkuNjRaIi8+PC9nPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTU0LjEyLDE4MC4zNmE1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNhNDMuODksNDMuODksMCwwLDAtMTEuNzMtMTEuMTcsMzEuNzcsMzEuNzcsMCwwLDAsMjkuMjgsNTYuMTNDNTguMjksMTkyLjQ0LDU0LjY4LDE4Ni45LDU0LjEyLDE4MC4zNloiLz48cGF0aCBjbGFzcz0iY2xzLTgiIGQ9Ik0xODkuNjIsMTgwLjM2QTU4LjksNTguOSwwLDAsMCwxODgsMTY5LjA4cy0yLjM1LTkuNDQtNy4zMy0xNi44M0E0My44OSw0My44OSwwLDAsMCwxNjksMTQxLjA4YTMxLjc3LDMxLjc3LDAsMCwwLDI5LjI4LDU2LjEzQzE5My43OSwxOTIuNDQsMTkwLjE4LDE4Ni45LDE4OS42MiwxODAuMzZaIi8+PGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTg5LjksMzMuNzhhMzIuNDYsMzIuNDYsMCwxLDEsMTEuODgsNDQuMzRBMzIuNDksMzIuNDksMCwwLDEsODkuOSwzMy43OFoiLz48L2c+PHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTEyMi4yMyw2Ni4xM2E1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNjLTMuMzctNS05LjA2LTkuNzktMTUuNDMtMTMuNDhBMzIuNDQsMzIuNDQsMCwwLDAsMTI4Ljc3LDgwLjZDMTI1LjMxLDc2LjM5LDEyMi43LDcxLjYxLDEyMi4yMyw2Ni4xM1oiLz48L2c+PC9nPjwvZz48L3N2Zz4='", + "body": "\nThis section describes [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (CORS), what content types we support in requests and responses, and hyperlinking resources in each json responses.\n\n\n----\n\n* [CORS](#cors)\n* [Supported content types](#supported-content-types)\n* [Resource links](#resource-links)\n\n----\n\n### Cors\n\nThe Bitbucket API supports Cross-origin resource sharing to allow requests for restricted resources across domains. For more information you can refer to:\n\n* [Wikipedia article on CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n* [W3C CORS recommendation](https://www.w3.org/TR/cors/)\n\nSending a general request from the api to bitbucket.com:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\"`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 17:54:37 GMT\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-110\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00379920005798\n Connection: Keep-Alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 383\n X-Cache-Info: cached\n Content-Length: 0\n\nSending the same request with the CORS check -X OPTIONS in the call:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\" -X OPTIONS`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, Content-Type, ETag, Last-Modified\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 18:04:30 GMT\n Access-Control-Max-Age: 86400\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-111\n Access-Control-Allow-Origin: *\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00371098518372\n Connection: keep-alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 357\n Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS\n Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, Range, X-CsrftokenX-Requested-With\n X-Cache-Info: not cacheable; request wasn't a GET or HEAD\n Content-Length: 0\n\n\n\n### Supported content types\n\nThe default and primary content type for 2.0 APIs is JSON. This applies both to responses from the server and to the request bodies provided by the client.\n\nUnless documented otherwise, whenever creating a new (POST) or modifying an existing (PUT) object, your client must provide the object's normal representation. Not every object element can be mutated. For example, a repository's created_on date is an auto-generated, immutable field. Your client can omit immutable fields from a request body.\n\nIn some cases, a resource might also accept regular application/x-www-url-form-encoded POST and PUT bodies. Such bodies can be more convenient in scripts and command line usage. Requests bodies can contain contain nested elements or they can be flat (without nested elements). Clients can send flat request bodies as either as application/json or as application/x-www-url-form-encoded. Nested objects always require JSON.\n\n### Resource links\n\nEvery 2.0 object contains a links element that points to related resources or alternate representations. Use links to quickly discover and traverse to related objects. Links serve a \"self-documenting\" function for each endpoint. For example, the following request for a specific user:\n\n\n`$ curl https://api.bitbucket.org/2.0/users/tutorials`\n\n```json\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\nLinks can be actual REST API resources or they can be informational. In this example, informative resources include the user's avatar and the HTML URL for the user's Bitbucket account. Your client should avoid hardcoding an API's URL and instead use the URLs returned in API responses.\n\nA link's key is its `rel` (relationship) attribute and it contains a mandatory href element. For example, the following link:\n\n```json\n\"self\": {\n \"href\": \"https://api.bitbucket.org/api/2.0/users/tutorials\"\n}\n```\n\nThe rel for this link is self and the href is https://api.bitbucket.org/api/2.0/users/tutorials. A single rel key can contain an list (array) of href objects. Your client should anticipate that any rel key can contain one or more href objects.\n\nFinally, links can also contain optional elements. Two common optional elements are the name element and the title element. They are often used to disambiguate links that share the same rel key. In the example below, the repository object that contains a clone link with two href objects. Each object contains the optional name element to clarify its use.\n\n```json\n\"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/bitbucket\"\n },\n \"clone\": [\n {\n \"href\": \"https://api.bitbucket.org/evzijst/bitbucket.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/erik/bitbucket.git\",\n \"name\": \"ssh\"\n }\n ],\n ...\n}\n```\nLinks can support [URI Templates](https://tools.ietf.org/html/rfc6570); Those that do contain a `\"templated\": \"true\"` element.\n" }, { - "body": "\nYou can use the Atlassian Connect for Bitbucket Cloud to build add-ons which\ncan connect with the Bitbucket UI and your own application set. An add-on could\nbe an integration with another existing service, new features for the Atlassian\napplication, or even a new product that runs within the Atlassian application.\n\nFor complete information see:\n[Atlassian Connect for Bitbucket Cloud](https://developer.atlassian.com/bitbucket/index.html)\n", - "title": "Atlassian Connect", "anchor": "bb-connect", + "title": "Atlassian Connect", "description": "Build Bitbucket add-ons with Connect", - "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU3LjMxNjMgMTYyLjU5OTQiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMzQ0NTYzOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMxZGI5ZDQ7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzAwNTdkODsKICAgICAgfQoKICAgICAgLmNscy01LCAuY2xzLTcsIC5jbHMtOSB7CiAgICAgICAgbWl4LWJsZW5kLW1vZGU6IG11bHRpcGx5OwogICAgICB9CgogICAgICAuY2xzLTUgewogICAgICAgIGZpbGw6IHVybCgjTjc1KTsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjTjc1LTIpOwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQoKICAgICAgLmNscy05IHsKICAgICAgICBmaWxsOiB1cmwoI043NS0zKTsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogdXJsKCNUMjAwLVQ3NSk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9Ik43NSIgeDE9Ii0yMTg5LjU1NiIgeTE9IjI4MDguMjI4NCIgeDI9Ii0yMDkxLjE1NTEiIHkyPSIyODA4LjIyODQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC4xNjgxLCAwLjk4NTgsIDAuOTg1OCwgLTAuMTY4MSwgLTIzNzMuNzM2LCAyNzIyLjEyNzgpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2U1ZThlYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNlNWU4ZWMiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMiIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjE2OC41OTQ3IiB5MT0iMjkzNS4wNTU2IiB4Mj0iLTIwNzAuMTkzNyIgeTI9IjI5MzUuMDU1NiIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgxPSIxOTAuMzU0NyIgeTE9IjE1OS45NjciIHgyPSIyNTkuOTQ4NyIgeTI9IjkwLjM3MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMzNDQ1NjMiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNWU2Yzg0Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMyIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjI1Ny4zOTc3IiB5MT0iMjg4NC4yMjYzIiB4Mj0iLTIxNTguOTk2NyIgeTI9IjI4ODQuMjI2MyIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJUMjAwLVQ3NSIgeDE9IjEyNi4wMjU3IiB5MT0iODUuMTA4IiB4Mj0iMTk1LjYxOTciIHkyPSIxNS41MTQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjM2RjN2RjIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzljZTNlZSIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHRpdGxlPkFkZCBPbiBCbG9ja3MgMjwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTIiIHg9IjEyOC42NTgxIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTMiIHg9IjY0LjMyOTEiIHk9IjEyLjg4MTUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxyZWN0IGlkPSJfUmVjdGFuZ2xlXzMiIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtNCIgeT0iODcuNzQwNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNNjQuMzI5MSw4Ny43NEg1OC42NTIzYTYyLjc4NzcsNjIuNzg3NywwLDAsMC0yNC41Njg0LDIwLjc2MjFjLTguMjYwNywxMi4xOTYtNC4zNDM3LDE4LjI0MTUtMTEuNjYzNywzMS42Mzk1QzE2LjUxLDE1MC45Niw4LjA1MSwxNTcuODIsMCwxNjIuNTU2di4wNDM1aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjY0LjMyOTEiIHk9Ijg3Ljc0MDUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTE5Mi45ODcyLDg3Ljc0SDE4My4zNDNhNjIuNzg3Nyw2Mi43ODc3LDAsMCwwLTI0LjU2ODQsMjAuNzYyMWMtOC4yNjA3LDEyLjE5Ni00LjM0MzgsMTguMjQxNS0xMS42NjM3LDMxLjYzOTVhNTYuNzI0Niw1Ni43MjQ2LDAsMCwxLTE4LjQ1MjcsMTkuOTF2Mi41NDc0aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTgiIHg9IjE5Mi45ODcyIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTkiIGQ9Ik0xMjguNjU4MiwxMi44ODE1SDExNi41OUE2MS45NjQ2LDYxLjk2NDYsMCwwLDAsMTAxLjMyMzMsMjguMjE1QzkzLjA2MjUsNDAuNDEwOSw5Ni45Nzk0LDQ2LjQ1NjUsODkuNjYsNTkuODU0NCw4My4wMzE2LDcxLjk4NTcsNzMuMTk3LDc5LjE1MTQsNjQuMzI5MSw4My45MTA4djMuODNoNjQuMzI5MVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTEwIiB4PSIxMjguNjU4MSIgeT0iMTIuODgxNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxMC4xNjA1IiB5PSI3NC44NTkiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjUxLjk1MjMiIHk9Ijc0Ljg1OSIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iOTMuNzQ0MSIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxMzguODE4NiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxODAuNjEwNCIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIyMjIuNDAyMiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSI3NC40ODk1IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTYuMjgxNCIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTU4LjA3MzIiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==" + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU3LjMxNjMgMTYyLjU5OTQiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMzQ0NTYzOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMxZGI5ZDQ7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzAwNTdkODsKICAgICAgfQoKICAgICAgLmNscy01LCAuY2xzLTcsIC5jbHMtOSB7CiAgICAgICAgbWl4LWJsZW5kLW1vZGU6IG11bHRpcGx5OwogICAgICB9CgogICAgICAuY2xzLTUgewogICAgICAgIGZpbGw6IHVybCgjTjc1KTsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjTjc1LTIpOwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQoKICAgICAgLmNscy05IHsKICAgICAgICBmaWxsOiB1cmwoI043NS0zKTsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogdXJsKCNUMjAwLVQ3NSk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9Ik43NSIgeDE9Ii0yMTg5LjU1NiIgeTE9IjI4MDguMjI4NCIgeDI9Ii0yMDkxLjE1NTEiIHkyPSIyODA4LjIyODQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC4xNjgxLCAwLjk4NTgsIDAuOTg1OCwgLTAuMTY4MSwgLTIzNzMuNzM2LCAyNzIyLjEyNzgpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2U1ZThlYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNlNWU4ZWMiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMiIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjE2OC41OTQ3IiB5MT0iMjkzNS4wNTU2IiB4Mj0iLTIwNzAuMTkzNyIgeTI9IjI5MzUuMDU1NiIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgxPSIxOTAuMzU0NyIgeTE9IjE1OS45NjciIHgyPSIyNTkuOTQ4NyIgeTI9IjkwLjM3MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMzNDQ1NjMiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNWU2Yzg0Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMyIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjI1Ny4zOTc3IiB5MT0iMjg4NC4yMjYzIiB4Mj0iLTIxNTguOTk2NyIgeTI9IjI4ODQuMjI2MyIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJUMjAwLVQ3NSIgeDE9IjEyNi4wMjU3IiB5MT0iODUuMTA4IiB4Mj0iMTk1LjYxOTciIHkyPSIxNS41MTQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjM2RjN2RjIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzljZTNlZSIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHRpdGxlPkFkZCBPbiBCbG9ja3MgMjwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTIiIHg9IjEyOC42NTgxIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTMiIHg9IjY0LjMyOTEiIHk9IjEyLjg4MTUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxyZWN0IGlkPSJfUmVjdGFuZ2xlXzMiIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtNCIgeT0iODcuNzQwNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNNjQuMzI5MSw4Ny43NEg1OC42NTIzYTYyLjc4NzcsNjIuNzg3NywwLDAsMC0yNC41Njg0LDIwLjc2MjFjLTguMjYwNywxMi4xOTYtNC4zNDM3LDE4LjI0MTUtMTEuNjYzNywzMS42Mzk1QzE2LjUxLDE1MC45Niw4LjA1MSwxNTcuODIsMCwxNjIuNTU2di4wNDM1aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjY0LjMyOTEiIHk9Ijg3Ljc0MDUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTE5Mi45ODcyLDg3Ljc0SDE4My4zNDNhNjIuNzg3Nyw2Mi43ODc3LDAsMCwwLTI0LjU2ODQsMjAuNzYyMWMtOC4yNjA3LDEyLjE5Ni00LjM0MzgsMTguMjQxNS0xMS42NjM3LDMxLjYzOTVhNTYuNzI0Niw1Ni43MjQ2LDAsMCwxLTE4LjQ1MjcsMTkuOTF2Mi41NDc0aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTgiIHg9IjE5Mi45ODcyIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTkiIGQ9Ik0xMjguNjU4MiwxMi44ODE1SDExNi41OUE2MS45NjQ2LDYxLjk2NDYsMCwwLDAsMTAxLjMyMzMsMjguMjE1QzkzLjA2MjUsNDAuNDEwOSw5Ni45Nzk0LDQ2LjQ1NjUsODkuNjYsNTkuODU0NCw4My4wMzE2LDcxLjk4NTcsNzMuMTk3LDc5LjE1MTQsNjQuMzI5MSw4My45MTA4djMuODNoNjQuMzI5MVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTEwIiB4PSIxMjguNjU4MSIgeT0iMTIuODgxNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxMC4xNjA1IiB5PSI3NC44NTkiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjUxLjk1MjMiIHk9Ijc0Ljg1OSIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iOTMuNzQ0MSIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxMzguODE4NiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxODAuNjEwNCIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIyMjIuNDAyMiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSI3NC40ODk1IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTYuMjgxNCIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTU4LjA3MzIiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg=='", + "body": "\nYou can use the Atlassian Connect for Bitbucket Cloud to build add-ons which\ncan connect with the Bitbucket UI and your own application set. An add-on could\nbe an integration with another existing service, new features for the Atlassian\napplication, or even a new product that runs within the Atlassian application.\n\nFor complete information see:\n[Atlassian Connect for Bitbucket Cloud](https://developer.atlassian.com/bitbucket/index.html)\n" } ] }, @@ -19044,17 +18995,6 @@ "description": "The new snippet object.", "required": true }, - "issue_comment": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/issue_comment" - } - } - }, - "description": "The updated comment.", - "required": true - }, "pipeline_variable2": { "content": { "application/json": { @@ -19082,47 +19022,47 @@ "description": "Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and app password as credentials.", "scheme": "basic" }, - "api_key": { - "description": "API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.", - "type": "apiKey", - "name": "Authorization", - "in": "header" - }, "oauth2": { - "description": "OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).", "type": "oauth2", + "description": "OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).", "flows": { "authorizationCode": { "authorizationUrl": "https://bitbucket.org/site/oauth2/authorize", "tokenUrl": "https://bitbucket.org/site/oauth2/access_token", "scopes": { - "wiki": "Read and modify your repositories' wikis", - "pullrequest:write": "Read and modify your repositories and their pull requests", - "runner": "Access your workspaces/repositories' runners", - "runner:write": "Access and edit your workspaces/repositories' runners", - "pipeline:variable": "Access your repositories' build pipelines and configure their variables", - "project:write": "Read and modify your workspace's project settings, and read and transfer repositories within your workspace's projects", - "pipeline:write": "Access and rerun your repositories' build pipelines", - "snippet": "Read your snippets", - "repository:delete": "Delete your repositories", - "repository:write": "Read and modify your repositories", - "issue": "Read your repositories' issues", "email": "Read your account's primary email address", - "repository": "Read your repositories", - "issue:write": "Read and modify your repositories' issues", - "webhook": "Read and modify your repositories' webhooks", - "pipeline": "Access your repositories' build pipelines", - "snippet:write": "Read and modify your snippets", "account": "Read your account information", - "repository:admin": "Administer your repositories", - "pullrequest": "Read your repositories and their pull requests", - "project": "Read your workspace's project settings and read repositories contained within your workspace's projects", + "account:write": "Read and modify your account information", "team": "Read your team membership information", "team:write": "Read and modify your team membership information", - "account:write": "Read and modify your account information" + "repository": "Read your repositories", + "repository:write": "Read and modify your repositories", + "repository:admin": "Administer your repositories", + "repository:delete": "Delete your repositories", + "project": "Read your workspace's project settings and read repositories contained within your workspace's projects", + "project:admin": "Read and modify settings for projects in your workspace", + "pipeline": "Access your repositories' build pipelines", + "pipeline:write": "Access and rerun your repositories' build pipelines", + "pipeline:variable": "Access your repositories' build pipelines and configure their variables", + "runner": "Access your workspaces/repositories' runners", + "runner:write": "Access and edit your workspaces/repositories' runners", + "issue": "Read your repositories' issues", + "issue:write": "Read and modify your repositories' issues", + "pullrequest": "Read your repositories and their pull requests", + "pullrequest:write": "Read and modify your repositories and their pull requests", + "snippet": "Read your snippets", + "snippet:write": "Read and modify your snippets", + "webhook": "Read and modify your repositories' webhooks", + "wiki": "Read and modify your repositories' wikis" } } } + }, + "api_key": { + "name": "Authorization", + "type": "apiKey", + "description": "API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.", + "in": "header" } }, "schemas": { @@ -19134,10 +19074,6 @@ { "type": "object", "properties": { - "account_status": { - "type": "string", - "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future." - }, "created_on": { "type": "string", "format": "date-time" @@ -19145,108 +19081,8 @@ "display_name": { "type": "string" }, - "has_2fa_enabled": { - "type": "boolean" - }, "links": { - "type": "object", - "properties": { - "avatar": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "followers": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "following": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "html": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "repositories": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - }, - "self": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "nickname": { - "type": "string", - "description": "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique." + "$ref": "#/components/schemas/account_links" }, "username": { "type": "string", @@ -19254,9 +19090,6 @@ }, "uuid": { "type": "string" - }, - "website": { - "type": "string" } }, "additionalProperties": true @@ -19265,6 +19098,44 @@ "title": "Account", "description": "An account object." }, + "account_links": { + "type": "object", + "title": "Account Links", + "description": "Links related to an Account.", + "properties": { + "avatar": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true + }, + "app_user": { + "allOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "type": "object", + "properties": { + "account_id": { + "type": "string", + "description": "The user's Atlassian account ID." + }, + "account_status": { + "type": "string", + "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future." + }, + "kind": { + "type": "string", + "description": "The kind of App User." + } + }, + "additionalProperties": true + } + ], + "title": "App User", + "description": "An app user object." + }, "application_property": { "additionalProperties": true, "type": "object", @@ -19421,10 +19292,6 @@ "branch": { "$ref": "#/components/schemas/branch" }, - "branch_does_not_exist": { - "type": "boolean", - "description": "Indicates if the indicated branch exists on the repository (`false`)or not (`true`). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model." - }, "name": { "type": "string", "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." @@ -19443,10 +19310,6 @@ "branch": { "$ref": "#/components/schemas/branch" }, - "branch_does_not_exist": { - "type": "boolean", - "description": "Indicates if the indicated branch exists on the repository (`false`)or not (`true`). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model." - }, "name": { "type": "string", "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." @@ -19503,10 +19366,6 @@ "development": { "type": "object", "properties": { - "branch_does_not_exist": { - "type": "boolean", - "description": "Optional and only returned for a repository's branching model. Indicates ifthe indicated branch exists on the repository (`false`)or not (`true`). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model." - }, "is_valid": { "type": "boolean", "description": "Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings." @@ -19546,10 +19405,6 @@ "production": { "type": "object", "properties": { - "branch_does_not_exist": { - "type": "boolean", - "description": "Optional and only returned for a repository's branching model. Indicates ifthe indicated branch exists on the repository (`false`)or not (`true`). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model." - }, "enabled": { "type": "boolean", "description": "Indicates if branch is enabled or not." @@ -19584,23 +19439,6 @@ { "type": "object", "properties": { - "branch_match_kind": { - "type": "string", - "description": "Indicates how the restriction is matched against a branch. The default is `glob`.", - "enum": ["branching_model", "glob"] - }, - "branch_type": { - "type": "string", - "description": "Apply the restriction to branches of this type. Active when `branch_match_kind` is `branching_model`. The branch type will be calculated using the branching model configured for the repository.", - "enum": [ - "feature", - "bugfix", - "release", - "hotfix", - "development", - "production" - ] - }, "groups": { "type": "array", "items": { @@ -19608,69 +19446,14 @@ }, "minItems": 0 }, - "id": { - "type": "integer", - "description": "The branch restriction status' id." - }, - "kind": { - "type": "string", - "description": "The type of restriction that is being applied.", - "enum": [ - "require_tasks_to_be_completed", - "allow_auto_merge_when_builds_pass", - "require_passing_builds_to_merge", - "force", - "require_all_dependencies_merged", - "require_commits_behind", - "restrict_merges", - "enforce_merge_checks", - "reset_pullrequest_changes_requested_on_change", - "require_no_changes_requested", - "smart_reset_pullrequest_approvals", - "push", - "require_approvals_to_merge", - "require_default_reviewer_approvals_to_merge", - "reset_pullrequest_approvals_on_change", - "delete" - ] - }, - "links": { - "type": "object", - "properties": { - "self": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "pattern": { - "type": "string", - "description": "Apply the restriction to branches that match this pattern. Active when `branch_match_kind` is `glob`. Will be empty when `branch_match_kind` is `branching_model`." - }, "users": { "type": "array", "items": { "$ref": "#/components/schemas/account" }, "minItems": 0 - }, - "value": { - "type": "integer" } }, - "required": ["kind", "branch_match_kind", "pattern"], "additionalProperties": true } ], @@ -19794,7 +19577,7 @@ "format": "date-time" }, "user": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" } }, "additionalProperties": true @@ -19940,7 +19723,7 @@ "state": { "type": "string", "description": "Provides some indication of the status of this commit", - "enum": ["SUCCESSFUL", "FAILED", "INPROGRESS", "STOPPED"] + "enum": ["FAILED", "SUCCESSFUL", "INPROGRESS", "STOPPED"] }, "updated_on": { "type": "string", @@ -20017,6 +19800,24 @@ "x-bb-default-fields": ["uuid", "commitHash"], "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" }, + "default_reviewer_and_type": { + "type": "object", + "title": "Default Reviewer and Type", + "description": "Object containing a user that is a default reviewer and the type of reviewer", + "properties": { + "reviewer_type": { + "type": "string" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/user" + } + }, + "required": ["type"], + "additionalProperties": true + }, "deploy_key": { "allOf": [ { @@ -20574,6 +20375,80 @@ "required": ["type"], "additionalProperties": true }, + "effective_repo_branching_model": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "properties": { + "branch_types": { + "type": "array", + "description": "The active branch types.", + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of branch.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`." + } + }, + "required": ["kind", "prefix"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + } + }, + "additionalProperties": true + } + ], + "title": "Effective Repository Branching Model", + "description": "A repository's effective branching model" + }, "error": { "type": "object", "title": "Error", @@ -20714,31 +20589,31 @@ "type": "string", "description": "The event identifier.", "enum": [ - "pullrequest:unapproved", + "pullrequest:updated", "issue:comment_created", - "repo:imported", - "repo:created", - "repo:commit_comment_created", - "pullrequest:approved", - "pullrequest:comment_updated", "issue:updated", - "project:updated", - "repo:deleted", + "repo:fork", "pullrequest:changes_request_created", "pullrequest:comment_created", - "repo:commit_status_updated", - "pullrequest:updated", - "issue:created", - "repo:fork", - "pullrequest:comment_deleted", - "repo:commit_status_created", + "repo:created", "repo:updated", + "pullrequest:comment_deleted", "pullrequest:rejected", - "pullrequest:fulfilled", + "issue:created", + "repo:imported", + "pullrequest:unapproved", + "pullrequest:approved", + "pullrequest:comment_updated", + "project:updated", "pullrequest:created", + "pullrequest:fulfilled", + "repo:commit_status_created", "pullrequest:changes_request_removed", - "repo:transfer", - "repo:push" + "repo:push", + "repo:commit_comment_created", + "repo:commit_status_updated", + "repo:deleted", + "repo:transfer" ] }, "label": { @@ -20757,7 +20632,7 @@ "type": "object", "properties": { "assignee": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" }, "component": { "$ref": "#/components/schemas/component" @@ -20900,7 +20775,7 @@ "enum": ["trivial", "minor", "major", "critical", "blocker"] }, "reporter": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" }, "repository": { "$ref": "#/components/schemas/repository" @@ -21165,7 +21040,7 @@ "type": "string" }, "user": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" } }, "required": ["type"], @@ -21253,6 +21128,21 @@ "x-bb-detail-fields": ["connected"], "x-bb-url": "/api/{target_user.uuid}/jira/sites/{cloudId}?atlassian_account_id={user.account_id}" }, + "link": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, "milestone": { "allOf": [ { @@ -21358,6 +21248,29 @@ } } }, + "paginated_accounts": { + "title": "Paginated Accounts", + "description": "A paginated list of accounts.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/account" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_annotations": { "title": "Paginated Annotations", "description": "A paginated list of annotations.", @@ -21518,6 +21431,29 @@ } ] }, + "paginated_default_reviewer_and_type": { + "title": "Paginated Default Reviewer and Type", + "description": "A paginated list of default reviewers with reviewer type.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/default_reviewer_and_type" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_deploy_keys": { "title": "Paginated Deploy Keys", "description": "A paginated list of deploy keys.", @@ -21943,6 +21879,29 @@ } ] }, + "paginated_project_deploy_keys": { + "title": "Paginated Project Deploy Keys", + "description": "A paginated list of project deploy keys.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_deploy_key" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_projects": { "title": "Paginated Projects", "description": "A paginated list of projects", @@ -22263,52 +22222,6 @@ } ] }, - "paginated_team_permissions": { - "title": "Paginated Team Permissions", - "description": "A paginated list of team permissions.", - "allOf": [ - { - "$ref": "#/components/schemas/paginated" - }, - { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/team_permission" - }, - "minItems": 0, - "uniqueItems": true, - "description": "The values of the current page." - } - } - } - ] - }, - "paginated_teams": { - "title": "Paginated Teams", - "description": "A paginated list of teams.", - "allOf": [ - { - "$ref": "#/components/schemas/paginated" - }, - { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/team" - }, - "minItems": 0, - "uniqueItems": true, - "description": "The values of the current page." - } - } - } - ] - }, "paginated_treeentries": { "title": "Paginated Tree Entry", "description": "A paginated list of commit_file and/or commit_directory objects.", @@ -22332,29 +22245,6 @@ } ] }, - "paginated_users": { - "title": "Paginated Users", - "description": "A paginated list of users.", - "allOf": [ - { - "$ref": "#/components/schemas/paginated" - }, - { - "type": "object", - "properties": { - "values": { - "type": "array", - "items": { - "$ref": "#/components/schemas/user" - }, - "minItems": 0, - "uniqueItems": true, - "description": "The values of the current page." - } - } - } - ] - }, "paginated_versions": { "title": "Paginated Versions", "description": "A paginated list of issue tracker versions.", @@ -22472,7 +22362,7 @@ "enum": ["approved", "changes_requested", null] }, "user": { - "$ref": "#/components/schemas/user" + "$ref": "#/components/schemas/account" } }, "additionalProperties": true @@ -23679,6 +23569,136 @@ "title": "Project", "description": "A Bitbucket project.\n Projects are used by teams to organize repositories." }, + "project_branching_model": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "properties": { + "branch_types": { + "type": "array", + "description": "The active branch types.", + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of branch.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`." + } + }, + "required": ["kind", "prefix"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + } + }, + "additionalProperties": true + } + ], + "title": "Project Branching Model", + "description": "A project's branching model" + }, + "project_deploy_key": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "properties": { + "added_on": { + "type": "string", + "format": "date-time" + }, + "comment": { + "type": "string", + "description": "The comment parsed from the deploy key (if present)" + }, + "created_by": { + "$ref": "#/components/schemas/account" + }, + "key": { + "type": "string", + "description": "The deploy key value." + }, + "label": { + "type": "string", + "description": "The user-defined label for the deploy key" + }, + "last_used": { + "type": "string", + "format": "date-time" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "project": { + "$ref": "#/components/schemas/project" + } + }, + "additionalProperties": true + } + ], + "title": "Project Deploy Key", + "description": "Represents deploy key for a project." + }, "pullrequest": { "allOf": [ { @@ -23970,7 +23990,7 @@ "state": { "type": "string", "description": "The pull request's current status.", - "enum": ["MERGED", "SUPERSEDED", "OPEN", "DECLINED"] + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] }, "summary": { "type": "object", @@ -24614,7 +24634,7 @@ }, "permission": { "type": "string", - "enum": ["admin", "write", "read", "none"] + "enum": ["read", "write", "admin", "none"] }, "repository": { "$ref": "#/components/schemas/repository" @@ -24626,6 +24646,21 @@ "required": ["type"], "additionalProperties": true }, + "repository_inheritance_state": { + "type": "object", + "title": "Repository Inheritance State", + "description": "A json object representing the repository's inheritance state values", + "properties": { + "override_settings": { + "type": "object" + }, + "type": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": true + }, "repository_permission": { "type": "object", "title": "Repository Permission", @@ -24633,7 +24668,7 @@ "properties": { "permission": { "type": "string", - "enum": ["admin", "write", "read", "none"] + "enum": ["read", "write", "admin", "none"] }, "repository": { "$ref": "#/components/schemas/repository" @@ -24676,7 +24711,7 @@ }, "permission": { "type": "string", - "enum": ["admin", "write", "read", "none"] + "enum": ["read", "write", "admin", "none"] }, "repository": { "$ref": "#/components/schemas/repository" @@ -25073,28 +25108,7 @@ }, "additionalProperties": false }, - "team": { - "type": "object", - "properties": { - "events": { - "type": "object", - "title": "Link", - "description": "A link to a resource related to this object.", - "properties": { - "href": { - "type": "string", - "format": "uri" - }, - "name": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "user": { + "workspace": { "type": "object", "properties": { "events": { @@ -25152,34 +25166,46 @@ }, { "type": "object", - "properties": {}, + "properties": { + "links": { + "$ref": "#/components/schemas/team_links" + } + }, "additionalProperties": true } ], "title": "Team", "description": "A team object." }, - "team_permission": { - "type": "object", - "title": "Team Permission", - "description": "A user's permission for a given team.", - "properties": { - "permission": { - "type": "string", - "enum": ["admin", "collaborator", "member"] + "team_links": { + "allOf": [ + { + "$ref": "#/components/schemas/account_links" }, - "team": { - "$ref": "#/components/schemas/team" - }, - "type": { - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/user" + { + "type": "object", + "properties": { + "html": { + "$ref": "#/components/schemas/link" + }, + "members": { + "$ref": "#/components/schemas/link" + }, + "projects": { + "$ref": "#/components/schemas/link" + }, + "repositories": { + "$ref": "#/components/schemas/link" + }, + "self": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true } - }, - "required": ["type"], - "additionalProperties": true + ], + "title": "Team Links", + "description": "Links related to a Team." }, "treeentry": { "type": "object", @@ -25212,8 +25238,25 @@ "type": "string", "description": "The user's Atlassian account ID." }, + "account_status": { + "type": "string", + "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future." + }, + "has_2fa_enabled": { + "type": "boolean" + }, "is_staff": { "type": "boolean" + }, + "links": { + "$ref": "#/components/schemas/user_links" + }, + "nickname": { + "type": "string", + "description": "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique." + }, + "website": { + "type": "string" } }, "additionalProperties": true @@ -25222,6 +25265,30 @@ "title": "User", "description": "A user object." }, + "user_links": { + "allOf": [ + { + "$ref": "#/components/schemas/account_links" + }, + { + "type": "object", + "properties": { + "html": { + "$ref": "#/components/schemas/link" + }, + "repositories": { + "$ref": "#/components/schemas/link" + }, + "self": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true + } + ], + "title": "User Links", + "description": "Links related to a User." + }, "version": { "allOf": [ { @@ -25289,31 +25356,31 @@ "items": { "type": "string", "enum": [ - "pullrequest:unapproved", + "pullrequest:updated", "issue:comment_created", - "repo:imported", - "repo:created", - "repo:commit_comment_created", - "pullrequest:approved", - "pullrequest:comment_updated", "issue:updated", - "project:updated", - "repo:deleted", + "repo:fork", "pullrequest:changes_request_created", "pullrequest:comment_created", - "repo:commit_status_updated", - "pullrequest:updated", - "issue:created", - "repo:fork", - "pullrequest:comment_deleted", - "repo:commit_status_created", + "repo:created", "repo:updated", + "pullrequest:comment_deleted", "pullrequest:rejected", - "pullrequest:fulfilled", + "issue:created", + "repo:imported", + "pullrequest:unapproved", + "pullrequest:approved", + "pullrequest:comment_updated", + "project:updated", "pullrequest:created", + "pullrequest:fulfilled", + "repo:commit_status_created", "pullrequest:changes_request_removed", - "repo:transfer", - "repo:push" + "repo:push", + "repo:commit_comment_created", + "repo:commit_status_updated", + "repo:deleted", + "repo:transfer" ] }, "minItems": 1, @@ -25325,7 +25392,7 @@ "subject_type": { "type": "string", "description": "The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined.", - "enum": ["workspace", "user", "repository", "team"] + "enum": ["repository", "workspace"] }, "url": { "type": "string", diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index 1e8db8185f..d61d353b34 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -21,7 +21,7 @@ "clean": "backstage-cli package clean", "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack", - "refresh-schema": "scripts/prepare-schema.js && prettier --check bitbucket-cloud.oas.json -w", + "refresh-schema": "scripts/prepare-schema.js && yarn run -T prettier --check bitbucket-cloud.oas.json -w", "generate-models": "scripts/generate-models.sh", "reduce-models": "scripts/reduce-models.js", "update-models": "yarn refresh-schema && yarn generate-models && yarn reduce-models" diff --git a/plugins/bitbucket-cloud-common/scripts/adjust-models.js b/plugins/bitbucket-cloud-common/scripts/adjust-models.js index 5d6eea845b..80b8f88903 100755 --- a/plugins/bitbucket-cloud-common/scripts/adjust-models.js +++ b/plugins/bitbucket-cloud-common/scripts/adjust-models.js @@ -99,6 +99,18 @@ function setPaginatedResultItemType(modelsModule) { }); } +function fixTeamLinksExtension(modelsModule) { + const accountLinks = modelsModule.getInterfaceOrThrow('AccountLinks'); + const teamLinks = modelsModule.getInterfaceOrThrow('TeamLinks'); + teamLinks.addExtends(accountLinks.getName()); + accountLinks.getProperties().forEach(prop => { + const other = teamLinks.getProperty(prop.getName()); + if (other && other.getText() === prop.getText()) { + other.remove(); + } + }); +} + const project = new tsMorph.Project({ tsConfigFilePath: '../../tsconfig.json', skipAddingFilesFromTsConfig: true, @@ -111,5 +123,6 @@ const modelsModule = modelsFile.getModuleOrThrow('Models'); cleanupWrongAllOfModels(modelsModule); makePaginatedGeneric(modelsModule); setPaginatedResultItemType(modelsModule); +fixTeamLinksExtension(modelsModule); project.saveSync(); diff --git a/plugins/bitbucket-cloud-common/scripts/generate-models.sh b/plugins/bitbucket-cloud-common/scripts/generate-models.sh index 7dd3170fd2..29256cc935 100755 --- a/plugins/bitbucket-cloud-common/scripts/generate-models.sh +++ b/plugins/bitbucket-cloud-common/scripts/generate-models.sh @@ -22,4 +22,4 @@ PLUGIN_DIR="${SCRIPT_DIR}/.." yarn --cwd "${PLUGIN_DIR}" openapi-generator-cli generate --generator-key backstage rm -d "${PLUGIN_DIR}/src/apis" # empty dir or fails "${SCRIPT_DIR}"/adjust-models.js -yarn --cwd "${PLUGIN_DIR}" prettier --check . -w +yarn run -T prettier --check . -w diff --git a/plugins/bitbucket-cloud-common/scripts/prepare-schema.js b/plugins/bitbucket-cloud-common/scripts/prepare-schema.js index 7454aecb40..aa32295cfc 100755 --- a/plugins/bitbucket-cloud-common/scripts/prepare-schema.js +++ b/plugins/bitbucket-cloud-common/scripts/prepare-schema.js @@ -214,19 +214,6 @@ const preventHardToDetectDuplicateInterfacesDueToAllOf = json => { return json; }; -const removeBuggyDescription = json => { - const valueProp = - json.components.schemas.branchrestriction.allOf[1].properties.value; - if (!valueProp.description.startsWith(' { const schema = json.components.schemas.pipeline_selector; const extension = schema.allOf[1]; @@ -269,7 +256,6 @@ fetch(SCHEMA_SOURCE) .then(addPaginatedDefinition) .then(paginatedDefinitionsExtendPaginated) .then(preventHardToDetectDuplicateInterfacesDueToAllOf) - .then(removeBuggyDescription) .then(resolveConflictingInheritance) .then(escapeTsdocInDescription) .then(relativeToAbsoluteUrls) diff --git a/plugins/bitbucket-cloud-common/src/models/index.ts b/plugins/bitbucket-cloud-common/src/models/index.ts index 14cb8865b8..580f23a13f 100644 --- a/plugins/bitbucket-cloud-common/src/models/index.ts +++ b/plugins/bitbucket-cloud-common/src/models/index.ts @@ -33,33 +33,20 @@ export namespace Models { * @public */ export interface Account extends ModelObject { - /** - * The status of the account. Currently the only possible value is "active", but more values may be added in the future. - */ - account_status?: string; created_on?: string; display_name?: string; - has_2fa_enabled?: boolean; links?: AccountLinks; - /** - * Account name defined by the owner. Should be used instead of the "username" field. Note that "nickname" cannot be used in place of "username" in URLs and queries, as "nickname" is not guaranteed to be unique. - */ - nickname?: string; username?: string; uuid?: string; - website?: string; } /** + * Links related to an Account. * @public */ export interface AccountLinks { + [key: string]: unknown; avatar?: Link; - followers?: Link; - following?: Link; - html?: Link; - repositories?: Link; - self?: Link; } /** @@ -278,7 +265,7 @@ export namespace Models { participated_on?: string; role?: ParticipantRoleEnum; state?: ParticipantStateEnum; - user?: User; + user?: Account; } /** @@ -516,17 +503,19 @@ export namespace Models { * A team object. * @public */ - export interface Team extends Account {} + export interface Team extends Account { + links?: TeamLinks; + } /** - * A user object. + * Links related to a Team. * @public */ - export interface User extends Account { - /** - * The user's Atlassian account ID. - */ - account_id?: string; - is_staff?: boolean; + export interface TeamLinks extends AccountLinks { + html?: Link; + members?: Link; + projects?: Link; + repositories?: Link; + self?: Link; } } From 45857bffae0f6c504a0b9b0519ae9b15616b985c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:17:27 +0200 Subject: [PATCH 119/279] backend-app-api: export rootLoggerFactory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .changeset/yellow-lemons-march.md | 5 +++++ packages/backend-app-api/api-report.md | 3 +++ .../backend-app-api/src/services/implementations/index.ts | 1 + .../src/services/implementations/rootLoggerService.ts | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/yellow-lemons-march.md diff --git a/.changeset/yellow-lemons-march.md b/.changeset/yellow-lemons-march.md new file mode 100644 index 0000000000..24d9e760ad --- /dev/null +++ b/.changeset/yellow-lemons-march.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Properly export `rootLoggerFactory`. diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index ea149a44f2..e5d7f9dedd 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -69,6 +69,9 @@ export const permissionsFactory: ( options?: undefined, ) => ServiceFactory; +// @public (undocumented) +export const rootLoggerFactory: (options?: undefined) => ServiceFactory; + // @public (undocumented) export const schedulerFactory: ( options?: undefined, diff --git a/packages/backend-app-api/src/services/implementations/index.ts b/packages/backend-app-api/src/services/implementations/index.ts index 048c952b4e..714122ca11 100644 --- a/packages/backend-app-api/src/services/implementations/index.ts +++ b/packages/backend-app-api/src/services/implementations/index.ts @@ -19,6 +19,7 @@ export { configFactory } from './configService'; export { databaseFactory } from './databaseService'; export { discoveryFactory } from './discoveryService'; export { loggerFactory } from './loggerService'; +export { rootLoggerFactory } from './rootLoggerService'; export { permissionsFactory } from './permissionsService'; export { schedulerFactory } from './schedulerService'; export { tokenManagerFactory } from './tokenManagerService'; diff --git a/packages/backend-app-api/src/services/implementations/rootLoggerService.ts b/packages/backend-app-api/src/services/implementations/rootLoggerService.ts index d7da11723e..a65a8d9126 100644 --- a/packages/backend-app-api/src/services/implementations/rootLoggerService.ts +++ b/packages/backend-app-api/src/services/implementations/rootLoggerService.ts @@ -39,7 +39,7 @@ class BackstageLogger implements Logger { } /** @public */ -export const loggerFactory = createServiceFactory({ +export const rootLoggerFactory = createServiceFactory({ service: rootLoggerServiceRef, deps: {}, async factory() { From 72549952d1ee43344a9da44b9be94050cebc3037 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:18:05 +0200 Subject: [PATCH 120/279] backend-test-utils: fix handling of root scoped services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .changeset/curvy-lemons-change.md | 5 +++++ .../src/next/wiring/TestBackend.ts | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/curvy-lemons-change.md diff --git a/.changeset/curvy-lemons-change.md b/.changeset/curvy-lemons-change.md new file mode 100644 index 0000000000..29e31a7b60 --- /dev/null +++ b/.changeset/curvy-lemons-change.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-test-utils': patch +--- + +Fixed handling of root scoped services in `startTestBackend`. diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.ts index f93b34cdd8..677ba930cc 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.ts @@ -63,10 +63,18 @@ export async function startTestBackend< if (Array.isArray(serviceDef)) { // if type is ExtensionPoint? // do something differently? + const [ref, impl] = serviceDef; + if (ref.scope === 'plugin') { + return createServiceFactory({ + service: ref, + deps: {}, + factory: async () => async () => impl, + }); + } return createServiceFactory({ - service: serviceDef[0], + service: ref, deps: {}, - factory: async () => async () => serviceDef[1], + factory: async () => impl, }); } return serviceDef as ServiceFactory; From 8336d42b404bab1753cc88d813ac9125540a2220 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:18:39 +0200 Subject: [PATCH 121/279] backend-plugin-api: fix spelling mistakes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- packages/backend-plugin-api/src/wiring/factories.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend-plugin-api/src/wiring/factories.test.ts b/packages/backend-plugin-api/src/wiring/factories.test.ts index 110d7b4f3f..6a1e7d33bc 100644 --- a/packages/backend-plugin-api/src/wiring/factories.test.ts +++ b/packages/backend-plugin-api/src/wiring/factories.test.ts @@ -31,7 +31,7 @@ describe('createExtensionPoint', () => { }); describe('createBackendPlugin', () => { - it('should create an BackendPlugin', () => { + it('should create a BackendPlugin', () => { const plugin = createBackendPlugin({ id: 'x', register(_reg, _options: { a: string }) {}, @@ -71,7 +71,7 @@ describe('createBackendPlugin', () => { }); describe('createBackendModule', () => { - it('should create an BackendModule', () => { + it('should create a BackendModule', () => { const mod = createBackendModule({ pluginId: 'x', moduleId: 'y', From 571ff04b0cacb74bb8da9402b327793266567e67 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:22:38 +0200 Subject: [PATCH 122/279] app-backend: initial port to new backend system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- plugins/app-backend/api-report.md | 12 ++ plugins/app-backend/package.json | 10 +- plugins/app-backend/src/index.ts | 2 + .../app-backend/src/service/appPlugin.test.ts | 81 +++++++++++++ plugins/app-backend/src/service/appPlugin.ts | 107 ++++++++++++++++++ yarn.lock | 11 ++ 6 files changed, 221 insertions(+), 2 deletions(-) create mode 100644 plugins/app-backend/src/service/appPlugin.test.ts create mode 100644 plugins/app-backend/src/service/appPlugin.ts diff --git a/plugins/app-backend/api-report.md b/plugins/app-backend/api-report.md index 0383129823..cfeebc6cd9 100644 --- a/plugins/app-backend/api-report.md +++ b/plugins/app-backend/api-report.md @@ -3,11 +3,23 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { BackendFeature } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; import { PluginDatabaseManager } from '@backstage/backend-common'; +// @alpha +export const appPlugin: (options: AppPluginOptions) => BackendFeature; + +// @alpha (undocumented) +export type AppPluginOptions = { + appPackageName: string; + staticFallbackHandler?: express.Handler; + disableConfigInjection?: boolean; + disableStaticFallbackCache?: boolean; +}; + // @public (undocumented) export function createRouter(options: RouterOptions): Promise; diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index ffd40b89c0..d79ab46b12 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -8,7 +8,8 @@ "publishConfig": { "access": "public", "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "alphaTypes": "dist/index.alpha.d.ts" }, "backstage": { "role": "backend-plugin" @@ -24,7 +25,7 @@ ], "scripts": { "start": "backstage-cli package start", - "build": "backstage-cli package build", + "build": "backstage-cli package build --experimental-type-build", "lint": "backstage-cli package lint", "test": "backstage-cli package test", "prepack": "backstage-cli package prepack", @@ -33,6 +34,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/config-loader": "workspace:^", "@backstage/types": "workspace:^", @@ -49,16 +51,20 @@ "yn": "^4.0.0" }, "devDependencies": { + "@backstage/backend-app-api": "workspace:^", "@backstage/backend-test-utils": "workspace:^", "@backstage/cli": "workspace:^", "@backstage/types": "workspace:^", "@types/supertest": "^2.0.8", + "get-port": "^6.1.2", "mock-fs": "^5.1.0", "msw": "^0.47.0", + "node-fetch": "^2.6.7", "supertest": "^6.1.3" }, "files": [ "dist", + "alpha", "migrations/**/*.{js,d.ts}", "static" ] diff --git a/plugins/app-backend/src/index.ts b/plugins/app-backend/src/index.ts index c91416eac1..167dc041fc 100644 --- a/plugins/app-backend/src/index.ts +++ b/plugins/app-backend/src/index.ts @@ -21,3 +21,5 @@ */ export * from './service/router'; +export { appPlugin } from './service/appPlugin'; +export type { AppPluginOptions } from './service/appPlugin'; diff --git a/plugins/app-backend/src/service/appPlugin.test.ts b/plugins/app-backend/src/service/appPlugin.test.ts new file mode 100644 index 0000000000..03ed4e8845 --- /dev/null +++ b/plugins/app-backend/src/service/appPlugin.test.ts @@ -0,0 +1,81 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import mockFs from 'mock-fs'; +import { resolve as resolvePath } from 'path'; +import fetch from 'node-fetch'; +import { configServiceRef } from '@backstage/backend-plugin-api'; +import { startTestBackend } from '@backstage/backend-test-utils'; +import { appPlugin } from './appPlugin'; +import { + databaseFactory, + httpRouterFactory, + loggerFactory, + rootLoggerFactory, +} from '@backstage/backend-app-api'; +import { ConfigReader } from '@backstage/config'; +import getPort from 'get-port'; + +describe('appPlugin', () => { + beforeAll(() => { + mockFs({ + [resolvePath(process.cwd(), 'node_modules/app')]: { + 'package.json': '{}', + dist: { + static: {}, + 'index.html': 'winning', + }, + }, + }); + }); + + afterAll(() => { + mockFs.restore(); + }); + + it('boots', async () => { + const port = await getPort(); + await startTestBackend({ + services: [ + [ + configServiceRef, + new ConfigReader({ + backend: { + listen: { port }, + database: { client: 'better-sqlite3', connection: ':memory:' }, + }, + }), + ], + loggerFactory(), + rootLoggerFactory(), + databaseFactory(), + httpRouterFactory(), + ], + features: [ + appPlugin({ + appPackageName: 'app', + disableStaticFallbackCache: true, + }), + ], + }); + + await expect( + fetch(`http://localhost:${port}/api/app/derp.html`).then(res => + res.text(), + ), + ).resolves.toBe('winning'); + }); +}); diff --git a/plugins/app-backend/src/service/appPlugin.ts b/plugins/app-backend/src/service/appPlugin.ts new file mode 100644 index 0000000000..185279f0f0 --- /dev/null +++ b/plugins/app-backend/src/service/appPlugin.ts @@ -0,0 +1,107 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import express from 'express'; +import { + configServiceRef, + createBackendPlugin, + databaseServiceRef, + loggerServiceRef, + loggerToWinstonLogger, + httpRouterServiceRef, +} from '@backstage/backend-plugin-api'; +import { createRouter } from './router'; + +/** @alpha */ +export type AppPluginOptions = { + /** + * The name of the app package (in most Backstage repositories, this is the + * "name" field in `packages/app/package.json`) that content should be served + * from. The same app package should be added as a dependency to the backend + * package in order for it to be accessible at runtime. + * + * In a typical setup with a single app package, this would be set to 'app'. + */ + appPackageName: string; + + /** + * A request handler to handle requests for static content that are not present in the app bundle. + * + * This can be used to avoid issues with clients on older deployment versions trying to access lazy + * loaded content that is no longer present. Typically the requests would fall back to a long-term + * object store where all recently deployed versions of the app are present. + * + * Another option is to provide a `database` that will take care of storing the static assets instead. + * + * If both `database` and `staticFallbackHandler` are provided, the `database` will attempt to serve + * static assets first, and if they are not found, the `staticFallbackHandler` will be called. + */ + staticFallbackHandler?: express.Handler; + + /** + * Disables the configuration injection. This can be useful if you're running in an environment + * with a read-only filesystem, or for some other reason don't want configuration to be injected. + * + * Note that this will cause the configuration used when building the app bundle to be used, unless + * a separate configuration loading strategy is set up. + * + * This also disables configuration injection though `APP_CONFIG_` environment variables. + */ + disableConfigInjection?: boolean; + + /** + * By default the app backend plugin will cache previously deployed static assets in the database. + * If you disable this, it is recommended to set a `staticFallbackHandler` instead. + */ + disableStaticFallbackCache?: boolean; +}; + +/** + * The App plugin is responsible for serving the frontend app bundle and static assets. + * @alpha + */ +export const appPlugin = createBackendPlugin({ + id: 'app', + register(env, options: AppPluginOptions) { + env.registerInit({ + deps: { + logger: loggerServiceRef, + config: configServiceRef, + database: databaseServiceRef, + httpRouter: httpRouterServiceRef, + }, + async init({ logger, config, database, httpRouter }) { + const { + appPackageName, + staticFallbackHandler, + disableConfigInjection, + disableStaticFallbackCache, + } = options; + const winstonLogger = loggerToWinstonLogger(logger); + + const router = await createRouter({ + logger: winstonLogger, + config, + database: disableStaticFallbackCache ? undefined : database, + appPackageName, + staticFallbackHandler, + disableConfigInjection, + }); + httpRouter.use(router); + }, + }); + }, +}); diff --git a/yarn.lock b/yarn.lock index 0b643f5711..6ef0daf878 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3932,7 +3932,9 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-app-backend@workspace:plugins/app-backend" dependencies: + "@backstage/backend-app-api": "workspace:^" "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -3943,6 +3945,7 @@ __metadata: express: ^4.17.1 express-promise-router: ^4.1.0 fs-extra: 10.1.0 + get-port: ^6.1.2 globby: ^11.0.0 helmet: ^6.0.0 knex: ^2.0.0 @@ -3950,6 +3953,7 @@ __metadata: luxon: ^3.0.0 mock-fs: ^5.1.0 msw: ^0.47.0 + node-fetch: ^2.6.7 supertest: ^6.1.3 winston: ^3.2.1 yn: ^4.0.0 @@ -23132,6 +23136,13 @@ __metadata: languageName: node linkType: hard +"get-port@npm:^6.1.2": + version: 6.1.2 + resolution: "get-port@npm:6.1.2" + checksum: e3c3d591492a11393455ef220f24c812a28f7da56ec3e4a2512d931a1f196d42850b50ac6138349a44622eda6dc3c0ccd8495cd91376d968e2d9e6f6f849e0a9 + languageName: node + linkType: hard + "get-stdin@npm:^8.0.0": version: 8.0.0 resolution: "get-stdin@npm:8.0.0" From 0027a749cdefd1379470da1799e033827b2b33ca Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:40:11 +0200 Subject: [PATCH 123/279] backend-app-api: added index plugin option for http router service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .changeset/fair-tools-melt.md | 5 +++++ packages/backend-app-api/api-report.md | 7 ++++++- .../services/implementations/httpRouterService.ts | 15 +++++++++++++-- .../src/services/implementations/index.ts | 1 + 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .changeset/fair-tools-melt.md diff --git a/.changeset/fair-tools-melt.md b/.changeset/fair-tools-melt.md new file mode 100644 index 0000000000..e63e4d5181 --- /dev/null +++ b/.changeset/fair-tools-melt.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-app-api': patch +--- + +Added possibility to configure index plugin of the HTTP router service. diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index e5d7f9dedd..4d9fbea4a5 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -58,9 +58,14 @@ export const discoveryFactory: ( // @public (undocumented) export const httpRouterFactory: ( - options?: undefined, + options?: HttpRouterFactoryOptions | undefined, ) => ServiceFactory; +// @public (undocumented) +export type HttpRouterFactoryOptions = { + indexPlugin?: string; +}; + // @public (undocumented) export const loggerFactory: (options?: undefined) => ServiceFactory; diff --git a/packages/backend-app-api/src/services/implementations/httpRouterService.ts b/packages/backend-app-api/src/services/implementations/httpRouterService.ts index be4af664c4..c470443edc 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouterService.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouterService.ts @@ -24,6 +24,16 @@ import Router from 'express-promise-router'; import { Handler } from 'express'; import { createServiceBuilder } from '@backstage/backend-common'; +/** + * @public + */ +export type HttpRouterFactoryOptions = { + /** + * The plugin ID used for the index route. Defaults to 'app' + */ + indexPlugin?: string; +}; + /** @public */ export const httpRouterFactory = createServiceFactory({ service: httpRouterServiceRef, @@ -31,8 +41,9 @@ export const httpRouterFactory = createServiceFactory({ config: configServiceRef, plugin: pluginMetadataServiceRef, }, - async factory({ config }) { + async factory({ config }, options?: HttpRouterFactoryOptions) { const rootRouter = Router(); + const defaultPluginId = options?.indexPlugin ?? 'app'; const service = createServiceBuilder(module) .loadConfig(config) @@ -42,7 +53,7 @@ export const httpRouterFactory = createServiceFactory({ return async ({ plugin }) => { const pluginId = plugin.getId(); - const path = pluginId ? `/api/${pluginId}` : ''; + const path = pluginId === defaultPluginId ? '' : `/api/${pluginId}`; return { use(handler: Handler) { rootRouter.use(path, handler); diff --git a/packages/backend-app-api/src/services/implementations/index.ts b/packages/backend-app-api/src/services/implementations/index.ts index 714122ca11..608399bad9 100644 --- a/packages/backend-app-api/src/services/implementations/index.ts +++ b/packages/backend-app-api/src/services/implementations/index.ts @@ -25,3 +25,4 @@ export { schedulerFactory } from './schedulerService'; export { tokenManagerFactory } from './tokenManagerService'; export { urlReaderFactory } from './urlReaderService'; export { httpRouterFactory } from './httpRouterService'; +export type { HttpRouterFactoryOptions } from './httpRouterService'; From 96d288a02d798fed102a0e6d801f8b7a37921bda Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:40:58 +0200 Subject: [PATCH 124/279] backend-defaults: added root logger service to default services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .changeset/large-dingos-juggle.md | 5 +++++ packages/backend-defaults/src/CreateBackend.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/large-dingos-juggle.md diff --git a/.changeset/large-dingos-juggle.md b/.changeset/large-dingos-juggle.md new file mode 100644 index 0000000000..8566a0f305 --- /dev/null +++ b/.changeset/large-dingos-juggle.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-defaults': patch +--- + +Added root logger service to the set of default services. diff --git a/packages/backend-defaults/src/CreateBackend.ts b/packages/backend-defaults/src/CreateBackend.ts index 5130d6733b..b95bd6f35b 100644 --- a/packages/backend-defaults/src/CreateBackend.ts +++ b/packages/backend-defaults/src/CreateBackend.ts @@ -24,6 +24,7 @@ import { httpRouterFactory, loggerFactory, permissionsFactory, + rootLoggerFactory, schedulerFactory, tokenManagerFactory, urlReaderFactory, @@ -36,6 +37,7 @@ export const defaultServiceFactories = [ databaseFactory, discoveryFactory, loggerFactory, + rootLoggerFactory, permissionsFactory, schedulerFactory, tokenManagerFactory, From fff524b44db978d7f4a3c304331b3cdf8184e70e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:49:55 +0200 Subject: [PATCH 125/279] app-backend: make "app" the default app package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- plugins/app-backend/api-report.md | 2 +- plugins/app-backend/src/service/appPlugin.test.ts | 3 +++ plugins/app-backend/src/service/appPlugin.ts | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/app-backend/api-report.md b/plugins/app-backend/api-report.md index cfeebc6cd9..b52132ef51 100644 --- a/plugins/app-backend/api-report.md +++ b/plugins/app-backend/api-report.md @@ -14,7 +14,7 @@ export const appPlugin: (options: AppPluginOptions) => BackendFeature; // @alpha (undocumented) export type AppPluginOptions = { - appPackageName: string; + appPackageName?: string; staticFallbackHandler?: express.Handler; disableConfigInjection?: boolean; disableStaticFallbackCache?: boolean; diff --git a/plugins/app-backend/src/service/appPlugin.test.ts b/plugins/app-backend/src/service/appPlugin.test.ts index 03ed4e8845..f4a2b142e8 100644 --- a/plugins/app-backend/src/service/appPlugin.test.ts +++ b/plugins/app-backend/src/service/appPlugin.test.ts @@ -77,5 +77,8 @@ describe('appPlugin', () => { res.text(), ), ).resolves.toBe('winning'); + await expect( + fetch(`http://localhost:${port}`).then(res => res.text()), + ).resolves.toBe('winning'); }); }); diff --git a/plugins/app-backend/src/service/appPlugin.ts b/plugins/app-backend/src/service/appPlugin.ts index 185279f0f0..f88bcb14f1 100644 --- a/plugins/app-backend/src/service/appPlugin.ts +++ b/plugins/app-backend/src/service/appPlugin.ts @@ -33,9 +33,9 @@ export type AppPluginOptions = { * from. The same app package should be added as a dependency to the backend * package in order for it to be accessible at runtime. * - * In a typical setup with a single app package, this would be set to 'app'. + * In a typical setup with a single app package, this will default to 'app'. */ - appPackageName: string; + appPackageName?: string; /** * A request handler to handle requests for static content that are not present in the app bundle. @@ -96,7 +96,7 @@ export const appPlugin = createBackendPlugin({ logger: winstonLogger, config, database: disableStaticFallbackCache ? undefined : database, - appPackageName, + appPackageName: appPackageName ?? 'app', staticFallbackHandler, disableConfigInjection, }); From 11c9e0ad333b79d738163799c889a6bc45da842b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:53:58 +0200 Subject: [PATCH 126/279] changesets: add changeset for app-backend alpha plugin export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .changeset/quiet-ligers-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/quiet-ligers-draw.md diff --git a/.changeset/quiet-ligers-draw.md b/.changeset/quiet-ligers-draw.md new file mode 100644 index 0000000000..30f5845a54 --- /dev/null +++ b/.changeset/quiet-ligers-draw.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-app-backend': patch +--- + +Added alpha plugin implementation for the new backend system. Available at `@backstage/plugin-app-backend/alpha`. From de7587254f4b658c803dc4f22569622c2c40afc4 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:55:59 +0200 Subject: [PATCH 127/279] backend-app-api: fix for root router overriding api routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- .../services/implementations/httpRouterService.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/backend-app-api/src/services/implementations/httpRouterService.ts b/packages/backend-app-api/src/services/implementations/httpRouterService.ts index c470443edc..d9fc807b1a 100644 --- a/packages/backend-app-api/src/services/implementations/httpRouterService.ts +++ b/packages/backend-app-api/src/services/implementations/httpRouterService.ts @@ -42,21 +42,27 @@ export const httpRouterFactory = createServiceFactory({ plugin: pluginMetadataServiceRef, }, async factory({ config }, options?: HttpRouterFactoryOptions) { - const rootRouter = Router(); const defaultPluginId = options?.indexPlugin ?? 'app'; + const apiRouter = Router(); + const rootRouter = Router(); + const service = createServiceBuilder(module) .loadConfig(config) + .addRouter('/api', apiRouter) .addRouter('', rootRouter); await service.start(); return async ({ plugin }) => { const pluginId = plugin.getId(); - const path = pluginId === defaultPluginId ? '' : `/api/${pluginId}`; return { use(handler: Handler) { - rootRouter.use(path, handler); + if (pluginId === defaultPluginId) { + rootRouter.use(handler); + } else { + apiRouter.use(`/${pluginId}`, handler); + } }, }; }; From e19bcd165361260ebd716a55afdaf813613dcce3 Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Mon, 26 Sep 2022 17:19:29 +0200 Subject: [PATCH 128/279] Incorporated the feedback Signed-off-by: bnechyporenko --- .../EntityRefLink/EntityRefLinks.tsx | 51 +++++--- .../EntityRefLink/FetchedEntityRefLinks.tsx | 115 ++++++++++++++++++ 2 files changed, 149 insertions(+), 17 deletions(-) create mode 100644 plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx index cf18a2d643..9f66fffd7a 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx @@ -17,43 +17,60 @@ import { Entity, CompoundEntityRef } from '@backstage/catalog-model'; import React from 'react'; import { EntityRefLink } from './EntityRefLink'; import { LinkProps } from '@backstage/core-components'; +import { FetchedEntityRefLinks } from './FetchedEntityRefLinks'; /** * Props for {@link EntityRefLink}. * * @public */ -export type EntityRefLinksProps = { - entityRefs: (string | Entity | CompoundEntityRef)[]; - defaultKind?: string; - getTitle?: (cer: CompoundEntityRef) => string | undefined; -} & Omit; +export type EntityRefLinksProps< + TRef extends string | CompoundEntityRef | Entity, +> = + | { + defaultKind?: string; + entityRefs: TRef[]; + fetchEntities?: false; + getTitle?(entity: TRef): string | undefined; + } + | ({ + defaultKind?: string; + entityRefs: TRef[]; + fetchEntities: true; + getTitle?(entity: Entity): string | undefined; + } & Omit); /** * Shows a list of clickable links to entities. * * @public */ -export function EntityRefLinks(props: EntityRefLinksProps) { - const { entityRefs, defaultKind, getTitle, ...linkProps } = props; +export function EntityRefLinks< + TRef extends string | CompoundEntityRef | Entity, +>(props: EntityRefLinksProps) { + const { entityRefs, defaultKind, fetchEntities, getTitle, ...linkProps } = + props; + + if (fetchEntities) { + return ( + + ); + } + return ( <> - {entityRefs.map((r, i) => { - const isCompoundEntityRef = - getTitle && typeof r !== 'string' && !('metadata' in r); - - const title = isCompoundEntityRef - ? getTitle(r as CompoundEntityRef) - : undefined; - + {entityRefs.map((r: TRef, i: number) => { return ( {i > 0 && ', '} ); diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx new file mode 100644 index 0000000000..5dbe429496 --- /dev/null +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx @@ -0,0 +1,115 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Entity, CompoundEntityRef } from '@backstage/catalog-model'; +import React from 'react'; +import { EntityRefLink } from './EntityRefLink'; +import { ErrorPanel, LinkProps, Progress } from '@backstage/core-components'; +import useAsync from 'react-use/lib/useAsync'; +import { catalogApiRef } from '../../api'; +import { useApi } from '@backstage/core-plugin-api'; + +/** + * Props for {@link EntityRefLink}. + * + * @public + */ +export type FetchedEntityRefLinksProps< + TRef extends string | CompoundEntityRef | Entity, +> = { + defaultKind?: string; + entityRefs: TRef[]; + fetchEntities: true; + getTitle?(entity: Entity): string | undefined; +} & Omit; + +/** + * Shows a list of clickable links to entities with auto-fetching of entities + * for customising a displayed text via title attribute. + * + * @public + */ +export function FetchedEntityRefLinks< + TRef extends string | CompoundEntityRef | Entity, +>(props: FetchedEntityRefLinksProps) { + const { entityRefs, defaultKind, fetchEntities, getTitle, ...linkProps } = + props; + + const catalogApi = useApi(catalogApiRef); + + const { + value: refToEntity = new Map(), + loading, + error, + } = useAsync( + () => + entityRefs.reduce( + async (promisedAcc: Promise>, entityRef: TRef) => { + const acc = await promisedAcc; + const entity: Entity | undefined = + 'metadata' in entityRef + ? (entityRef as Entity) + : await catalogApi.getEntityByRef( + entityRef as string | CompoundEntityRef, + ); + if (entity) { + acc.set(entityRef, entity); + } + return acc; + }, + Promise.resolve(new Map()), + ), + [catalogApi, entityRefs], + ); + + if (loading) { + return ; + } + + if (error) { + return ( + <> + + + ); + } + + return ( + <> + {entityRefs.map((r: TRef, i) => { + let title: string | undefined; + + if (typeof r === 'string' || !('metadata' in r)) { + const entity = refToEntity.get(r); + title = getTitle && entity ? getTitle(entity) : undefined; + } else { + title = getTitle ? getTitle(r as Entity) : undefined; + } + + return ( + + {i > 0 && ', '} + + + ); + })} + + ); +} From 21ceffe99d37a61fe3c0d73d5f25b15fd61dd6d6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 16:56:18 +0200 Subject: [PATCH 129/279] backend-next: add app-backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Johan Haals Signed-off-by: Patrik Oldsberg --- packages/backend-next/package.json | 1 + packages/backend-next/src/index.ts | 2 ++ yarn.lock | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index 4e989c81cf..7e83203cea 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -26,6 +26,7 @@ }, "dependencies": { "@backstage/backend-defaults": "workspace:^", + "@backstage/plugin-app-backend": "workspace:^", "@backstage/plugin-catalog-backend": "workspace:^", "@backstage/plugin-scaffolder-backend": "workspace:^" }, diff --git a/packages/backend-next/src/index.ts b/packages/backend-next/src/index.ts index c6b7da8fa7..8196b28452 100644 --- a/packages/backend-next/src/index.ts +++ b/packages/backend-next/src/index.ts @@ -17,9 +17,11 @@ import { catalogPlugin } from '@backstage/plugin-catalog-backend'; import { scaffolderCatalogModule } from '@backstage/plugin-scaffolder-backend'; import { createBackend } from '@backstage/backend-defaults'; +import { appPlugin } from '@backstage/plugin-app-backend'; const backend = createBackend(); backend.add(catalogPlugin()); backend.add(scaffolderCatalogModule()); +backend.add(appPlugin({ appPackageName: 'example-app' })); backend.start(); diff --git a/yarn.lock b/yarn.lock index 6ef0daf878..a1d37af851 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21756,6 +21756,7 @@ __metadata: dependencies: "@backstage/backend-defaults": "workspace:^" "@backstage/cli": "workspace:^" + "@backstage/plugin-app-backend": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/plugin-scaffolder-backend": "workspace:^" languageName: unknown From 4acad115c1644ae0169a129c4d2fe1e763fe83cd Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 19:33:43 +0200 Subject: [PATCH 130/279] Update plugins/scaffolder-backend/src/service/router.ts Signed-off-by: Patrik Oldsberg --- plugins/scaffolder-backend/src/service/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 46fdcbe806..2e4549c8f1 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -148,7 +148,7 @@ export async function createRouter( options: RouterOptions, ): Promise { const router = Router(); - // Be generous in upload size to support a wide rande of templates in dry-run mode. + // Be generous in upload size to support a wide range of templates in dry-run mode. router.use(express.json({ limit: '10MB' })); const { From a541a3a78a3a86be7151ec4f48c448dd72cd5694 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 20:37:24 +0200 Subject: [PATCH 131/279] cli: upfront resolution of swc-loader Signed-off-by: Patrik Oldsberg --- .changeset/smooth-tables-pull.md | 5 +++++ packages/cli/src/lib/bundler/transforms.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/smooth-tables-pull.md diff --git a/.changeset/smooth-tables-pull.md b/.changeset/smooth-tables-pull.md new file mode 100644 index 0000000000..2833ff5da7 --- /dev/null +++ b/.changeset/smooth-tables-pull.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Switch to upfront resolution of `swc-loader` in Webpack config. diff --git a/packages/cli/src/lib/bundler/transforms.ts b/packages/cli/src/lib/bundler/transforms.ts index ba8da5bad8..0a4dddcaf5 100644 --- a/packages/cli/src/lib/bundler/transforms.ts +++ b/packages/cli/src/lib/bundler/transforms.ts @@ -55,7 +55,7 @@ export const transforms = (options: TransformOptions): Transforms => { exclude: /node_modules/, use: [ { - loader: 'swc-loader', + loader: require.resolve('swc-loader'), options: { jsc: { target: 'es2019', @@ -81,7 +81,7 @@ export const transforms = (options: TransformOptions): Transforms => { exclude: /node_modules/, use: [ { - loader: 'swc-loader', + loader: require.resolve('swc-loader'), options: { jsc: { target: 'es2019', @@ -112,7 +112,7 @@ export const transforms = (options: TransformOptions): Transforms => { test: [/\.icon\.svg$/], use: [ { - loader: 'swc-loader', + loader: require.resolve('swc-loader'), options: { jsc: { target: 'es2019', From 3e0f0c02850b3f1e75400644252cc9d5edaf33a7 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:02:22 +0200 Subject: [PATCH 132/279] oauth: consider hosted gitlab with relative path Signed-off-by: ahmed --- plugins/auth-backend/src/providers/gitlab/provider.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index 7f5489d391..31efafa4ee 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -91,6 +91,9 @@ export class GitlabAuthProvider implements OAuthHandlers { clientSecret: options.clientSecret, callbackURL: options.callbackUrl, baseURL: options.baseUrl, + authorizationURL: `${options.baseUrl}/oauth/authorize`, + tokenURL: `${options.baseUrl}/oauth/token`, + profileURL: `${options.baseUrl}/api/v4/user`, }, ( accessToken: any, From 8c6ec175bf814faea25ce7113643cadd6bd9ceea Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:09:38 +0200 Subject: [PATCH 133/279] changeset Signed-off-by: ahmed --- .changeset/slow-mirrors-eat.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slow-mirrors-eat.md diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md new file mode 100644 index 0000000000..59e0c38484 --- /dev/null +++ b/.changeset/slow-mirrors-eat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +oauth callbacks to consider installations with relative_url From 35bac0dbf1113c37da9404fc7ce54303f6c0bcd8 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 26 Sep 2022 22:12:56 +0200 Subject: [PATCH 134/279] make docs happy Signed-off-by: ahmed --- .changeset/slow-mirrors-eat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md index 59e0c38484..5a71095820 100644 --- a/.changeset/slow-mirrors-eat.md +++ b/.changeset/slow-mirrors-eat.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -oauth callbacks to consider installations with relative_url +oauth callbacks to consider installations with relative URL. From 4132eacfe390af86bf72d3b159dee405c9cf9fa5 Mon Sep 17 00:00:00 2001 From: "Clemens S. Heithecker" Date: Mon, 26 Sep 2022 22:40:24 +0200 Subject: [PATCH 135/279] Update helper text for project selection Signed-off-by: Clemens S. Heithecker --- .../src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx index cd2882ac24..335c285faf 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx @@ -106,7 +106,7 @@ export const AzureRepoPicker = (props: { )} - The project that this repo will belong to + The Project that this repo will belong to From 01d3242b47c57efe5fc62b9d1c539a32a8957eff Mon Sep 17 00:00:00 2001 From: "Clemens S. Heithecker" Date: Mon, 26 Sep 2022 22:47:12 +0200 Subject: [PATCH 136/279] Update helper text for organization selection Signed-off-by: Clemens S. Heithecker --- .../src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx index 335c285faf..83f013c8b4 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/AzureRepoPicker.tsx @@ -76,7 +76,7 @@ export const AzureRepoPicker = (props: { )} - The organization that this repo will belong to + The Organization that this repo will belong to Date: Mon, 26 Sep 2022 17:22:34 -0400 Subject: [PATCH 137/279] fix: useCustomResource hook infinite call (#13835) * fix: useCustomResource hook infinite call Signed-off-by: Matthew Clarke * prettier Signed-off-by: Matthew Clarke Signed-off-by: Matthew Clarke --- .changeset/sixty-items-nail.md | 5 ++++ .../src/hooks/useCustomResources.ts | 16 +++++------ .../src/hooks/useKubernetesObjects.ts | 27 +++++++++---------- 3 files changed, 25 insertions(+), 23 deletions(-) create mode 100644 .changeset/sixty-items-nail.md diff --git a/.changeset/sixty-items-nail.md b/.changeset/sixty-items-nail.md new file mode 100644 index 0000000000..bf8f9b8161 --- /dev/null +++ b/.changeset/sixty-items-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-kubernetes': patch +--- + +Fix infinite call bug in `useCustomResources` hook diff --git a/plugins/kubernetes/src/hooks/useCustomResources.ts b/plugins/kubernetes/src/hooks/useCustomResources.ts index c0ec7d91ea..c53e00d81c 100644 --- a/plugins/kubernetes/src/hooks/useCustomResources.ts +++ b/plugins/kubernetes/src/hooks/useCustomResources.ts @@ -40,9 +40,9 @@ export const useCustomResources = ( ): KubernetesObjects => { const kubernetesApi = useApi(kubernetesApiRef); const kubernetesAuthProvidersApi = useApi(kubernetesAuthProvidersApiRef); - - const getCustomObjects = - useCallback(async (): Promise => { + const matchersString = JSON.stringify(customResourceMatchers); + const getCustomObjects = useCallback( + async (): Promise => { const auth = await generateAuth( entity, kubernetesApi, @@ -53,12 +53,10 @@ export const useCustomResources = ( customResources: customResourceMatchers, entity, }); - }, [ - kubernetesApi, - entity, - kubernetesAuthProvidersApi, - customResourceMatchers, - ]); + }, + // eslint-disable-next-line react-hooks/exhaustive-deps + [kubernetesApi, entity, kubernetesAuthProvidersApi, matchersString], + ); const { value, loading, error, retry } = useAsyncRetry( () => getCustomObjects(), diff --git a/plugins/kubernetes/src/hooks/useKubernetesObjects.ts b/plugins/kubernetes/src/hooks/useKubernetesObjects.ts index 87d6a0fe8b..aad2f48fd3 100644 --- a/plugins/kubernetes/src/hooks/useKubernetesObjects.ts +++ b/plugins/kubernetes/src/hooks/useKubernetesObjects.ts @@ -36,22 +36,21 @@ export const useKubernetesObjects = ( ): KubernetesObjects => { const kubernetesApi = useApi(kubernetesApiRef); const kubernetesAuthProvidersApi = useApi(kubernetesAuthProvidersApiRef); - const getCustomObjects = - useCallback(async (): Promise => { - const auth = await generateAuth( - entity, - kubernetesApi, - kubernetesAuthProvidersApi, - ); - return await kubernetesApi.getObjectsByEntity({ - auth, - entity, - }); - }, [kubernetesApi, entity, kubernetesAuthProvidersApi]); + const getObjects = useCallback(async (): Promise => { + const auth = await generateAuth( + entity, + kubernetesApi, + kubernetesAuthProvidersApi, + ); + return await kubernetesApi.getObjectsByEntity({ + auth, + entity, + }); + }, [kubernetesApi, entity, kubernetesAuthProvidersApi]); const { value, loading, error, retry } = useAsyncRetry( - () => getCustomObjects(), - [getCustomObjects], + () => getObjects(), + [getObjects], ); useInterval(() => retry(), intervalMs); From dadeeb8a888df7d9d77e92067f6e1b41bdb8a28c Mon Sep 17 00:00:00 2001 From: "Clemens S. Heithecker" Date: Mon, 26 Sep 2022 23:43:25 +0200 Subject: [PATCH 138/279] Update api-report.md Signed-off-by: Clemens S. Heithecker --- plugins/scaffolder/api-report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index e88d2861a7..cfa34c4d40 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -225,6 +225,8 @@ export interface RepoUrlPickerUiOptions { // (undocumented) allowedHosts?: string[]; // (undocumented) + allowedOrganizations?: string[]; + // (undocumented) allowedOwners?: string[]; // (undocumented) allowedRepos?: string[]; From 840b39292de9e1dc9983676cebbac02b114a806d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 09:11:34 +0000 Subject: [PATCH 139/279] fix(deps): update dependency aws-sdk to v2.1220.0 Signed-off-by: Renovate Bot --- yarn.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0b643f5711..0746f24c43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3035,7 +3035,7 @@ __metadata: "@types/webpack-env": ^1.15.2 "@types/yauzl": ^2.10.0 archiver: ^5.0.2 - aws-sdk: ^2.840.0 + aws-sdk: ^2.948.0 aws-sdk-mock: ^5.2.1 base64-stream: ^1.0.0 better-sqlite3: ^7.5.0 @@ -4260,7 +4260,7 @@ __metadata: "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" "@types/lodash": ^4.14.151 - aws-sdk: ^2.840.0 + aws-sdk: ^2.948.0 aws-sdk-mock: ^5.2.1 lodash: ^4.17.21 p-limit: ^3.0.2 @@ -5767,7 +5767,7 @@ __metadata: "@types/aws4": ^1.5.1 "@types/express": ^4.17.6 "@types/luxon": ^3.0.0 - aws-sdk: ^2.840.0 + aws-sdk: ^2.948.0 aws-sdk-mock: ^5.2.1 aws4: ^1.11.0 compression: ^1.7.4 @@ -7104,7 +7104,7 @@ __metadata: "@types/mock-fs": ^4.13.0 "@types/recursive-readdir": ^2.2.0 "@types/supertest": ^2.0.8 - aws-sdk: ^2.840.0 + aws-sdk: ^2.948.0 express: ^4.17.1 fs-extra: 10.1.0 git-url-parse: ^13.0.0 @@ -16059,7 +16059,7 @@ __metadata: languageName: node linkType: hard -"aws-sdk@npm:^2.1122.0, aws-sdk@npm:^2.814.0, aws-sdk@npm:^2.840.0, aws-sdk@npm:^2.948.0": +"aws-sdk@npm:^2.1122.0, aws-sdk@npm:^2.814.0, aws-sdk@npm:^2.948.0": version: 2.1209.0 resolution: "aws-sdk@npm:2.1209.0" dependencies: From 92170763861dae9c248770a141d27a9ff5055778 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 27 Sep 2022 00:01:50 +0200 Subject: [PATCH 140/279] yarn.lock: update for aws-sdk bump Signed-off-by: Patrik Oldsberg --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0746f24c43..76ff108bd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3035,7 +3035,7 @@ __metadata: "@types/webpack-env": ^1.15.2 "@types/yauzl": ^2.10.0 archiver: ^5.0.2 - aws-sdk: ^2.948.0 + aws-sdk: ^2.840.0 aws-sdk-mock: ^5.2.1 base64-stream: ^1.0.0 better-sqlite3: ^7.5.0 @@ -4260,7 +4260,7 @@ __metadata: "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" "@types/lodash": ^4.14.151 - aws-sdk: ^2.948.0 + aws-sdk: ^2.840.0 aws-sdk-mock: ^5.2.1 lodash: ^4.17.21 p-limit: ^3.0.2 @@ -5767,7 +5767,7 @@ __metadata: "@types/aws4": ^1.5.1 "@types/express": ^4.17.6 "@types/luxon": ^3.0.0 - aws-sdk: ^2.948.0 + aws-sdk: ^2.840.0 aws-sdk-mock: ^5.2.1 aws4: ^1.11.0 compression: ^1.7.4 @@ -7104,7 +7104,7 @@ __metadata: "@types/mock-fs": ^4.13.0 "@types/recursive-readdir": ^2.2.0 "@types/supertest": ^2.0.8 - aws-sdk: ^2.948.0 + aws-sdk: ^2.840.0 express: ^4.17.1 fs-extra: 10.1.0 git-url-parse: ^13.0.0 @@ -16059,9 +16059,9 @@ __metadata: languageName: node linkType: hard -"aws-sdk@npm:^2.1122.0, aws-sdk@npm:^2.814.0, aws-sdk@npm:^2.948.0": - version: 2.1209.0 - resolution: "aws-sdk@npm:2.1209.0" +"aws-sdk@npm:^2.1122.0, aws-sdk@npm:^2.814.0, aws-sdk@npm:^2.840.0, aws-sdk@npm:^2.948.0": + version: 2.1224.0 + resolution: "aws-sdk@npm:2.1224.0" dependencies: buffer: 4.9.2 events: 1.1.1 @@ -16073,7 +16073,7 @@ __metadata: util: ^0.12.4 uuid: 8.0.0 xml2js: 0.4.19 - checksum: da4cae7da28b218dfa67398e5a63acb894b1636337e2842f6e0800bad6eb5fc692d0b703dc84f67fdc9f1d59ee9f82f4ccc9d71fe8fb6a49a8292697ab77b92c + checksum: 990b4db8b72462432cfd75b4fe2c71ff8b24abed2b0d6b6441d51211167afd00b002ff91d7c3ff02379b34f6e5dcae72bdf9e31f55a9c105f50ad96cfc8f08da languageName: node linkType: hard From bc10f02f6f746275f2f5d9365f190796238dac05 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 09:01:29 +0000 Subject: [PATCH 141/279] fix(deps): update dependency @uiw/react-codemirror to v4.12.3 Signed-off-by: Renovate Bot --- yarn.lock | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0b643f5711..fcbbfcab22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7751,6 +7751,18 @@ __metadata: languageName: node linkType: hard +"@codemirror/commands@npm:^6.1.0": + version: 6.1.0 + resolution: "@codemirror/commands@npm:6.1.0" + dependencies: + "@codemirror/language": ^6.0.0 + "@codemirror/state": ^6.0.0 + "@codemirror/view": ^6.0.0 + "@lezer/common": ^1.0.0 + checksum: 0b95ed5b657590adda3171ef8cb1b662078ed1c02109b414bbd71503ae8cac3d5d56a56a159020178a4e8f1e7168bd3c5f5782eb2d90a6e25f067fc8c39dbc87 + languageName: node + linkType: hard + "@codemirror/language@npm:^6.0.0": version: 6.2.1 resolution: "@codemirror/language@npm:6.2.1" @@ -7803,6 +7815,13 @@ __metadata: languageName: node linkType: hard +"@codemirror/state@npm:^6.1.1": + version: 6.1.1 + resolution: "@codemirror/state@npm:6.1.1" + checksum: 26b767af3a3385479d9bb6a31b5d4fb7d2485d4f502c3056aa3117c12ba0b4e80bbbf358d81e81a03d147e404b7ef65cc1449058b2f869f698882d1969b74996 + languageName: node + linkType: hard + "@codemirror/theme-one-dark@npm:^6.0.0": version: 6.0.0 resolution: "@codemirror/theme-one-dark@npm:6.0.0" @@ -14765,9 +14784,9 @@ __metadata: languageName: node linkType: hard -"@uiw/codemirror-extensions-basic-setup@npm:4.11.6": - version: 4.11.6 - resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.11.6" +"@uiw/codemirror-extensions-basic-setup@npm:4.12.3": + version: 4.12.3 + resolution: "@uiw/codemirror-extensions-basic-setup@npm:4.12.3" dependencies: "@codemirror/autocomplete": ^6.0.0 "@codemirror/commands": ^6.0.0 @@ -14784,26 +14803,29 @@ __metadata: "@codemirror/search": ">=6.0.0" "@codemirror/state": ">=6.0.0" "@codemirror/view": ">=6.0.0" - checksum: 706a64a098380c404499a228ba3e28f472d39b20088ed794c586005d227340e77c5320a09b9574e8ec51f7d13ca1b98816606de0e7f3c9407761493c41c9801f + checksum: 14c5c6694b2f5ce34bba2ed3fa7017a268c36f3ba234711580d31243603a14adc2b31ebec7d665cd6687917a8ac617d6ac453861d32bf277f43b65946ac1c656 languageName: node linkType: hard "@uiw/react-codemirror@npm:^4.9.3": - version: 4.11.6 - resolution: "@uiw/react-codemirror@npm:4.11.6" + version: 4.12.3 + resolution: "@uiw/react-codemirror@npm:4.12.3" dependencies: "@babel/runtime": ^7.18.6 + "@codemirror/commands": ^6.1.0 + "@codemirror/state": ^6.1.1 "@codemirror/theme-one-dark": ^6.0.0 - "@uiw/codemirror-extensions-basic-setup": 4.11.6 + "@uiw/codemirror-extensions-basic-setup": 4.12.3 codemirror: ^6.0.0 peerDependencies: "@babel/runtime": ">=7.11.0" + "@codemirror/state": ">=6.0.0" "@codemirror/theme-one-dark": ">=6.0.0" "@codemirror/view": ">=6.0.0" codemirror: ">=6.0.0" react: ">=16.8.0" react-dom: ">=16.8.0" - checksum: f630400ef57ff1928962244854805acb37f259606bc21967861c9ffaf80168d7c6c5052058299e96f7694635e218c6497ef4c5f3086109b35669b7cf5e2ee297 + checksum: 504003e6162dbe672072ace980117d1eeb9264282d6ad314de0398e0d29925133bc8d8c484c3aadb91b6ebedb8ebb259307b838cc31d39ab4792af5ab061949c languageName: node linkType: hard From a4deaf198fa4a6c09a9c11f853a3e0b95599bdd4 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 27 Sep 2022 00:29:05 +0200 Subject: [PATCH 142/279] yarn.lock: sync codemirror versions Signed-off-by: Patrik Oldsberg --- yarn.lock | 53 +++++++++++++++++------------------------------------ 1 file changed, 17 insertions(+), 36 deletions(-) diff --git a/yarn.lock b/yarn.lock index fcbbfcab22..6111355cec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7723,8 +7723,8 @@ __metadata: linkType: hard "@codemirror/autocomplete@npm:^6.0.0": - version: 6.0.2 - resolution: "@codemirror/autocomplete@npm:6.0.2" + version: 6.3.0 + resolution: "@codemirror/autocomplete@npm:6.3.0" dependencies: "@codemirror/language": ^6.0.0 "@codemirror/state": ^6.0.0 @@ -7735,23 +7735,11 @@ __metadata: "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 "@lezer/common": ^1.0.0 - checksum: f843572333ae8d0ac772952d3f261e53ebed16a4914ec7089d0de5496089daa24f45c3c4609e1817328a081447bbe0bc40aa82d8c42f29071ad6179020a59dac + checksum: 903b24732230ce3713e5be2bea615ef11f42b6253859274b37206a7158b8f7aed1700c9013d9330665c16d6f9576fd71efb686b4def4434e29b5c1e4e15520dc languageName: node linkType: hard -"@codemirror/commands@npm:^6.0.0": - version: 6.0.0 - resolution: "@codemirror/commands@npm:6.0.0" - dependencies: - "@codemirror/language": ^6.0.0 - "@codemirror/state": ^6.0.0 - "@codemirror/view": ^6.0.0 - "@lezer/common": ^1.0.0 - checksum: 5b3bac420635316f9fb324e38b76a281a4d1425f80e6a5e66a34cf1508414e5d182f494e3c30936b27f86aa67403c1af4137bca5df0f0e53b2a4baa49a25caf2 - languageName: node - linkType: hard - -"@codemirror/commands@npm:^6.1.0": +"@codemirror/commands@npm:^6.0.0, @codemirror/commands@npm:^6.1.0": version: 6.1.0 resolution: "@codemirror/commands@npm:6.1.0" dependencies: @@ -7798,50 +7786,43 @@ __metadata: linkType: hard "@codemirror/search@npm:^6.0.0": - version: 6.0.0 - resolution: "@codemirror/search@npm:6.0.0" + version: 6.2.1 + resolution: "@codemirror/search@npm:6.2.1" dependencies: "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 crelt: ^1.0.5 - checksum: e40b55f1ff1287a8b5b321f633bff638c9d4a411ada524b36b275344a13f9f4a66b7c5176d8a142a6a7761d1591d18dc535c88897f30b9885508a2890162fc72 + checksum: fdd352c6df6972863ea7e07a0dbad8872d4bd7e3ada01417d562a2cde4cf2b4fdfde47ed801c66e18342bb695c00b1cecd9918bd2e1dab74eaedab7b2dde5feb languageName: node linkType: hard -"@codemirror/state@npm:^6.0.0": - version: 6.0.1 - resolution: "@codemirror/state@npm:6.0.1" - checksum: fcb5aa5e1ce455ed1261616beb6cdb9e855f9cf11618a1ef7f61142622a0aba4551605356d381d2fa96f021f932b71323808369bf8edadfa69d745252b7e6ccd - languageName: node - linkType: hard - -"@codemirror/state@npm:^6.1.1": - version: 6.1.1 - resolution: "@codemirror/state@npm:6.1.1" - checksum: 26b767af3a3385479d9bb6a31b5d4fb7d2485d4f502c3056aa3117c12ba0b4e80bbbf358d81e81a03d147e404b7ef65cc1449058b2f869f698882d1969b74996 +"@codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.1": + version: 6.1.2 + resolution: "@codemirror/state@npm:6.1.2" + checksum: 7eda4b3eb6a777fecaa5a62e95a162aa163ccff01913d21a88d1157247390d9b57e6bcf54738be0b98aff8ba3a6ec3cb7aeb3b9714b019cb6c05242da9d9fdfe languageName: node linkType: hard "@codemirror/theme-one-dark@npm:^6.0.0": - version: 6.0.0 - resolution: "@codemirror/theme-one-dark@npm:6.0.0" + version: 6.1.0 + resolution: "@codemirror/theme-one-dark@npm:6.1.0" dependencies: "@codemirror/language": ^6.0.0 "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 "@lezer/highlight": ^1.0.0 - checksum: 916f23e3ce0e003224e4bcee209ebcae57eb620c942adb180d7e0a1a0f2091bb042723d07cbd855c7016cb86fae66aa374de115001dcbe3d033f86c1624c3f9b + checksum: 7454742006f0ea23ed36b1c8e232d55bd1cdf6cd3c9b5ad7f7212a4b5fe7907eecaeb1d908fed2022c2ca5d667176c93e9f071c939d54449cfe740dc028a16d8 languageName: node linkType: hard "@codemirror/view@npm:^6.0.0": - version: 6.2.3 - resolution: "@codemirror/view@npm:6.2.3" + version: 6.2.5 + resolution: "@codemirror/view@npm:6.2.5" dependencies: "@codemirror/state": ^6.0.0 style-mod: ^4.0.0 w3c-keyname: ^2.2.4 - checksum: 93d6f159c49ffd9276e9b6ba28cef2c41934be7eb68aa49acf1971dede97ee2684bde6daeb7494da8e15f2ef937933c3fa076253127b230c6996db0fe7a79ef2 + checksum: 0db9c3475790531912a86d5bb60f895ea11d19786a4c877703a602c840d45c2fd92ad6aea6b8648c7dccf88b7250ee1cbc5ca1c1797e5410440e7eb17a970a62 languageName: node linkType: hard From 72e91020da2cf14317c64a8ebc7eb18cc1c5ebd5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 23:49:02 +0000 Subject: [PATCH 143/279] chore(deps): update dependency @graphql-codegen/cli to v2.12.2 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6111355cec..11a99257fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8215,8 +8215,8 @@ __metadata: linkType: hard "@graphql-codegen/cli@npm:^2.3.1": - version: 2.12.1 - resolution: "@graphql-codegen/cli@npm:2.12.1" + version: 2.12.2 + resolution: "@graphql-codegen/cli@npm:2.12.2" dependencies: "@graphql-codegen/core": 2.6.2 "@graphql-codegen/plugin-helpers": ^2.7.1 @@ -8257,7 +8257,7 @@ __metadata: graphql-code-generator: cjs/bin.js graphql-codegen: cjs/bin.js graphql-codegen-esm: esm/bin.js - checksum: c3e3772f1bd7d6a35ecc42a0fcb96d7e417e184170254ef89286f029a31eba688465179d572897f52197199757edf16e5a7442e4e7fb2612cd79530ea33572a3 + checksum: 38262533b4bfcdacab25a3ce874082895ca3da164313466c531ac012d868f748c2f764f50dd4e98f03d3d5a5253c397488dde7c164b59677659eb8838459e518 languageName: node linkType: hard From bc3f2c1f20fdbaf7ce3fbdbcf21f4a02db181c2e Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 09:11:30 +0200 Subject: [PATCH 144/279] Incorporated partially the feedback Signed-off-by: bnechyporenko --- .../EntityRefLink/EntityRefLinks.tsx | 4 +- .../EntityRefLink/FetchedEntityRefLinks.tsx | 60 ++++++------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx index 9f66fffd7a..bb8950041a 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx @@ -54,8 +54,10 @@ export function EntityRefLinks< if (fetchEntities) { return ( ); } diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx index 5dbe429496..6b6ead7872 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx @@ -13,7 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Entity, CompoundEntityRef } from '@backstage/catalog-model'; +import { + Entity, + CompoundEntityRef, + parseEntityRef, +} from '@backstage/catalog-model'; import React from 'react'; import { EntityRefLink } from './EntityRefLink'; import { ErrorPanel, LinkProps, Progress } from '@backstage/core-components'; @@ -31,7 +35,6 @@ export type FetchedEntityRefLinksProps< > = { defaultKind?: string; entityRefs: TRef[]; - fetchEntities: true; getTitle?(entity: Entity): string | undefined; } & Omit; @@ -44,60 +47,35 @@ export type FetchedEntityRefLinksProps< export function FetchedEntityRefLinks< TRef extends string | CompoundEntityRef | Entity, >(props: FetchedEntityRefLinksProps) { - const { entityRefs, defaultKind, fetchEntities, getTitle, ...linkProps } = - props; + const { entityRefs, defaultKind, getTitle, ...linkProps } = props; const catalogApi = useApi(catalogApiRef); const { - value: refToEntity = new Map(), + value: entities = new Array(), loading, error, - } = useAsync( - () => - entityRefs.reduce( - async (promisedAcc: Promise>, entityRef: TRef) => { - const acc = await promisedAcc; - const entity: Entity | undefined = - 'metadata' in entityRef - ? (entityRef as Entity) - : await catalogApi.getEntityByRef( - entityRef as string | CompoundEntityRef, - ); - if (entity) { - acc.set(entityRef, entity); - } - return acc; - }, - Promise.resolve(new Map()), - ), - [catalogApi, entityRefs], - ); + } = useAsync(async () => { + const refs = entityRefs.reduce((acc, current) => { + return 'metadata' in current ? acc : [...acc, parseEntityRef(current)]; + }, new Array()); + + return refs + ? (await catalogApi.getEntities({ filter: refs })).items + : (entityRefs as Array); + }, [entityRefs]); if (loading) { return ; } if (error) { - return ( - <> - - - ); + return ; } return ( <> - {entityRefs.map((r: TRef, i) => { - let title: string | undefined; - - if (typeof r === 'string' || !('metadata' in r)) { - const entity = refToEntity.get(r); - title = getTitle && entity ? getTitle(entity) : undefined; - } else { - title = getTitle ? getTitle(r as Entity) : undefined; - } - + {entities.map((r: Entity, i) => { return ( {i > 0 && ', '} @@ -105,7 +83,7 @@ export function FetchedEntityRefLinks< {...linkProps} defaultKind={defaultKind} entityRef={r} - title={title} + title={getTitle ? getTitle(r as Entity) : undefined} /> ); From 1d4a2588739cc038e4063e9a53da360123be9f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 09:37:36 +0200 Subject: [PATCH 145/279] just another gitignore entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 256cef00c2..b7bfe7a84d 100644 --- a/.gitignore +++ b/.gitignore @@ -149,3 +149,6 @@ cypress/cypress/* # Possible leftover from build:api-reports tsconfig.tmp.json + +# vscode database functionality support files +*.session.sql From 28377dc89f1f33baf8051d0fdd7b0091e0ac97da Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 26 Sep 2022 18:49:05 +0200 Subject: [PATCH 146/279] backend-plugin-api: fix type inference of interface options Signed-off-by: Patrik Oldsberg --- .changeset/itchy-schools-run.md | 5 + packages/backend-plugin-api/api-report.md | 25 +--- .../src/services/system/types.test.ts | 137 ++++++++++++++++++ .../src/services/system/types.ts | 2 +- .../src/wiring/factories.test.ts | 66 +++++++++ .../src/wiring/factories.ts | 11 +- 6 files changed, 222 insertions(+), 24 deletions(-) create mode 100644 .changeset/itchy-schools-run.md diff --git a/.changeset/itchy-schools-run.md b/.changeset/itchy-schools-run.md new file mode 100644 index 0000000000..6e46cabb15 --- /dev/null +++ b/.changeset/itchy-schools-run.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-plugin-api': patch +--- + +Allow interfaces to be used for inferred option types. diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 3344576db8..2d4e431502 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -73,11 +73,7 @@ export const configServiceRef: ServiceRef; // @public (undocumented) export function createBackendModule< - TOptions extends - | { - [name: string]: unknown; - } - | undefined = undefined, + TOptions extends object | undefined = undefined, >( config: BackendModuleConfig, ): undefined extends TOptions @@ -86,14 +82,11 @@ export function createBackendModule< // @public (undocumented) export function createBackendPlugin< - TOptions extends - | { - [name: string]: unknown; - } - | undefined = undefined, ->( - config: BackendPluginConfig, -): undefined extends TOptions + TOptions extends object | undefined = undefined, +>(config: { + id: string; + register(reg: BackendRegistrationPoints, options: TOptions): void; +}): undefined extends TOptions ? (options?: TOptions) => BackendFeature : (options: TOptions) => BackendFeature; @@ -110,11 +103,7 @@ export function createServiceFactory< TDeps extends { [name in string]: ServiceRef; }, - TOpts extends - | { - [name in string]: unknown; - } - | undefined = undefined, + TOpts extends object | undefined = undefined, >(config: { service: ServiceRef; deps: TDeps; diff --git a/packages/backend-plugin-api/src/services/system/types.test.ts b/packages/backend-plugin-api/src/services/system/types.test.ts index 29512d3a58..0e02f38d3f 100644 --- a/packages/backend-plugin-api/src/services/system/types.test.ts +++ b/packages/backend-plugin-api/src/services/system/types.test.ts @@ -58,6 +58,8 @@ describe('createServiceFactory', () => { metaFactory({}); metaFactory({ x: 1 }); // @ts-expect-error + metaFactory({ x: 1, y: 2 }); + // @ts-expect-error metaFactory(null); metaFactory(undefined); metaFactory(); @@ -80,10 +82,145 @@ describe('createServiceFactory', () => { metaFactory({}); metaFactory({ x: 1 }); // @ts-expect-error + metaFactory({ x: 1, y: 2 }); + // @ts-expect-error metaFactory(null); // @ts-expect-error metaFactory(undefined); // @ts-expect-error metaFactory(); }); + + it('should create a meta factory with optional options as interface', () => { + interface TestOptions { + x: number; + } + const ref = createServiceRef({ id: 'x' }); + const metaFactory = createServiceFactory({ + service: ref, + deps: {}, + async factory(_deps, _opts?: TestOptions) { + return async () => 'x'; + }, + }); + expect(metaFactory).toEqual(expect.any(Function)); + + // @ts-expect-error + metaFactory('string'); + // @ts-expect-error + metaFactory({}); + metaFactory({ x: 1 }); + // @ts-expect-error + metaFactory({ x: 1, y: 2 }); + // @ts-expect-error + metaFactory(null); + metaFactory(undefined); + metaFactory(); + }); + + it('should create a meta factory with required options as interface', () => { + interface TestOptions { + x: number; + } + const ref = createServiceRef({ id: 'x' }); + const metaFactory = createServiceFactory({ + service: ref, + deps: {}, + async factory(_deps, _opts: TestOptions) { + return async () => 'x'; + }, + }); + expect(metaFactory).toEqual(expect.any(Function)); + + // @ts-expect-error + metaFactory('string'); + // @ts-expect-error + metaFactory({}); + metaFactory({ x: 1 }); + // @ts-expect-error + metaFactory({ x: 1, y: 2 }); + // @ts-expect-error + metaFactory(null); + // @ts-expect-error + metaFactory(undefined); + // @ts-expect-error + metaFactory(); + }); + + it('should only allow objects as options', () => { + const ref = createServiceRef({ id: 'x' }); + const metaFactory = createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: string) { + return async () => 'x'; + }, + }); + expect(metaFactory).toEqual(expect.any(Function)); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: number) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: symbol) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: bigint) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: 'string') { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: Array) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: Map) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: Set) { + return async () => 'x'; + }, + }); + createServiceFactory({ + service: ref, + deps: {}, + // @ts-expect-error + async factory(_deps, _opts: null) { + return async () => 'x'; + }, + }); + }); }); diff --git a/packages/backend-plugin-api/src/services/system/types.ts b/packages/backend-plugin-api/src/services/system/types.ts index d20fd6fd8f..2459dea918 100644 --- a/packages/backend-plugin-api/src/services/system/types.ts +++ b/packages/backend-plugin-api/src/services/system/types.ts @@ -133,7 +133,7 @@ export function createServiceFactory< TScope extends 'root' | 'plugin', TImpl extends TService, TDeps extends { [name in string]: ServiceRef }, - TOpts extends { [name in string]: unknown } | undefined = undefined, + TOpts extends object | undefined = undefined, >(config: { service: ServiceRef; deps: TDeps; diff --git a/packages/backend-plugin-api/src/wiring/factories.test.ts b/packages/backend-plugin-api/src/wiring/factories.test.ts index 110d7b4f3f..8dbd5c5479 100644 --- a/packages/backend-plugin-api/src/wiring/factories.test.ts +++ b/packages/backend-plugin-api/src/wiring/factories.test.ts @@ -68,6 +68,38 @@ describe('createBackendPlugin', () => { // @ts-expect-error expect(plugin({})).toBeDefined(); }); + + it('should create a BackendPlugin with options as interface', () => { + interface TestOptions { + a: string; + } + const plugin = createBackendPlugin({ + id: 'x', + register(_reg, _options: TestOptions) {}, + }); + expect(plugin).toBeDefined(); + expect(plugin({ a: 'a' })).toBeDefined(); + expect(plugin({ a: 'a' }).id).toBe('x'); + // @ts-expect-error + expect(plugin()).toBeDefined(); + // @ts-expect-error + expect(plugin({ b: 'b' })).toBeDefined(); + }); + + it('should create plugins with optional options as interface', () => { + interface TestOptions { + a: string; + } + const plugin = createBackendPlugin({ + id: 'x', + register(_reg, _options?: TestOptions) {}, + }); + expect(plugin).toBeDefined(); + expect(plugin({ a: 'a' })).toBeDefined(); + expect(plugin()).toBeDefined(); + // @ts-expect-error + expect(plugin({ b: 'b' })).toBeDefined(); + }); }); describe('createBackendModule', () => { @@ -111,4 +143,38 @@ describe('createBackendModule', () => { // @ts-expect-error expect(mod({})).toBeDefined(); }); + + it('should create a BackendModule as interface', () => { + interface TestOptions { + a: string; + } + const mod = createBackendModule({ + pluginId: 'x', + moduleId: 'y', + register(_reg, _options: TestOptions) {}, + }); + expect(mod).toBeDefined(); + expect(mod({ a: 'a' })).toBeDefined(); + expect(mod({ a: 'a' }).id).toBe('x.y'); + // @ts-expect-error + expect(mod()).toBeDefined(); + // @ts-expect-error + expect(mod({ b: 'b' })).toBeDefined(); + }); + + it('should create modules with optional options as interface', () => { + interface TestOptions { + a: string; + } + const mod = createBackendModule({ + pluginId: 'x', + moduleId: 'y', + register(_reg, _options?: TestOptions) {}, + }); + expect(mod).toBeDefined(); + expect(mod({ a: 'a' })).toBeDefined(); + expect(mod()).toBeDefined(); + // @ts-expect-error + expect(mod({ b: 'b' })).toBeDefined(); + }); }); diff --git a/packages/backend-plugin-api/src/wiring/factories.ts b/packages/backend-plugin-api/src/wiring/factories.ts index 491a18c9db..35f1ad1b7c 100644 --- a/packages/backend-plugin-api/src/wiring/factories.ts +++ b/packages/backend-plugin-api/src/wiring/factories.ts @@ -44,10 +44,11 @@ export interface BackendPluginConfig { /** @public */ export function createBackendPlugin< - TOptions extends { [name: string]: unknown } | undefined = undefined, ->( - config: BackendPluginConfig, -): undefined extends TOptions + TOptions extends object | undefined = undefined, +>(config: { + id: string; + register(reg: BackendRegistrationPoints, options: TOptions): void; +}): undefined extends TOptions ? (options?: TOptions) => BackendFeature : (options: TOptions) => BackendFeature { return (options?: TOptions) => ({ @@ -70,7 +71,7 @@ export interface BackendModuleConfig { /** @public */ export function createBackendModule< - TOptions extends { [name: string]: unknown } | undefined = undefined, + TOptions extends object | undefined = undefined, >( config: BackendModuleConfig, ): undefined extends TOptions From be617b42a44edc99a5e8cbd5179d6d26a8272206 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 27 Sep 2022 10:03:46 +0200 Subject: [PATCH 147/279] catalog-backend: integration test review fixes Signed-off-by: Patrik Oldsberg --- plugins/catalog-backend/src/integration.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend/src/integration.test.ts b/plugins/catalog-backend/src/integration.test.ts index e61a7d7038..67b63428db 100644 --- a/plugins/catalog-backend/src/integration.test.ts +++ b/plugins/catalog-backend/src/integration.test.ts @@ -207,7 +207,7 @@ class TestHarness { ); const logger = options?.logger ?? getVoidLogger(); const db = - options?.db /* (await TestDatabases.create().init('SQLITE_3')); */ ?? + options?.db ?? (await DatabaseManager.fromConfig(config, { logger }) .forPlugin('catalog') .getClient()); @@ -245,7 +245,6 @@ class TestHarness { rulesEnforcer, logger, parser: defaultEntityDataParser, - // policy: new SchemaValidEntityPolicy(), policy: EntityPolicies.allOf([]), }); const stitcher = new Stitcher(db, logger); @@ -303,10 +302,11 @@ class TestHarness { } async process(entityRefs?: Set) { - this.#engine.start(); - const tracker = new WaitingProgressTracker(entityRefs); this.#proxyProgressTracker.setTracker(tracker); + + this.#engine.start(); + const errors = await tracker.wait(); this.#engine.stop(); From f0f34a493cf0fb051cd5ee37d9d5e64e01f96a9c Mon Sep 17 00:00:00 2001 From: Ahmed Date: Tue, 27 Sep 2022 10:12:43 +0200 Subject: [PATCH 148/279] Update .changeset/slow-mirrors-eat.md Co-authored-by: Patrik Oldsberg Signed-off-by: Ahmed --- .changeset/slow-mirrors-eat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/slow-mirrors-eat.md b/.changeset/slow-mirrors-eat.md index 5a71095820..6996a977d0 100644 --- a/.changeset/slow-mirrors-eat.md +++ b/.changeset/slow-mirrors-eat.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -oauth callbacks to consider installations with relative URL. +Fix GitLab provider setup so that it supports GitLab installations with a path in the URL. From c008f74f8ffff7f898fead101b7d24cf70414b8a Mon Sep 17 00:00:00 2001 From: Crevil Date: Thu, 4 Aug 2022 17:32:41 +0200 Subject: [PATCH 149/279] Implement EntityKindPicker This change implements the EntityKindPicker allowing for selecting multiple kinds. Signed-off-by: Crevil --- .../EntityKindPicker/EntityKindPicker.tsx | 122 ++++++++++++++---- plugins/catalog-react/src/filters.ts | 15 ++- .../CatalogPage/DefaultCatalogPage.tsx | 2 + .../components/CatalogTable/CatalogTable.tsx | 9 +- 4 files changed, 117 insertions(+), 31 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx index 4cfd141509..774d07c544 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx +++ b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx @@ -14,41 +14,115 @@ * limitations under the License. */ -import React, { useEffect, useState } from 'react'; -import { Alert } from '@material-ui/lab'; -import { useEntityList } from '../../hooks'; +import { useApi } from '@backstage/core-plugin-api'; +import { + Box, + Checkbox, + FormControlLabel, + makeStyles, + TextField, + Typography, +} from '@material-ui/core'; +import CheckBoxIcon from '@material-ui/icons/CheckBox'; +import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; +import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; +import { Autocomplete } from '@material-ui/lab'; +import React, { useEffect, useMemo, useState } from 'react'; +import useAsync from 'react-use/lib/useAsync'; +import { catalogApiRef } from '../../api'; import { EntityKindFilter } from '../../filters'; +import { useEntityList } from '../../hooks'; -/** - * Props for {@link EntityKindPicker}. - * - * @public - */ -export interface EntityKindPickerProps { - initialFilter?: string; - hidden: boolean; -} +const useStyles = makeStyles( + { + input: {}, + }, + { + name: 'CatalogReactEntityKindPicker', + }, +); + +const icon = ; +const checkedIcon = ; /** @public */ -export const EntityKindPicker = (props: EntityKindPickerProps) => { - const { initialFilter, hidden } = props; - +export const EntityKindPicker = () => { + const classes = useStyles(); const { updateFilters, - queryParameters: { kind: kindParameter }, + filters, + queryParameters: { kind: kindsParameter }, } = useEntityList(); - const [selectedKind] = useState([kindParameter].flat()[0] ?? initialFilter); + + const catalogApi = useApi(catalogApiRef); + const { value: availableKinds } = useAsync(async () => { + const facet = 'kind'; + const { facets } = await catalogApi.getEntityFacets({ + facets: [facet], + }); + + return facets[facet].map(({ value }) => value); + }, [filters.kind]); + + const queryParamKinds = useMemo( + () => [kindsParameter].flat().filter(Boolean) as string[], + [kindsParameter], + ); + + const [selectedKinds, setSelectedKinds] = useState( + queryParamKinds.length ? queryParamKinds : filters.kind?.getKinds() ?? [], + ); + + // Set selected kinds on query parameter updates; this happens at initial page load and from + // external updates to the page location. + useEffect(() => { + if (queryParamKinds.length) { + setSelectedKinds(queryParamKinds); + } + }, [queryParamKinds]); useEffect(() => { updateFilters({ - kind: selectedKind ? new EntityKindFilter(selectedKind) : undefined, + kind: selectedKinds.length + ? new EntityKindFilter(selectedKinds) + : undefined, }); - }, [selectedKind, updateFilters]); + }, [selectedKinds, updateFilters]); - if (hidden) return null; + if (!availableKinds?.length) return null; - // TODO(timbonicus): This should load available kinds from the catalog-backend, similar to - // EntityTypePicker. - - return Kind filter not yet available; + return ( + + + Kinds + setSelectedKinds(value)} + renderOption={(option, { selected }) => ( + + } + label={option} + /> + )} + size="small" + popupIcon={} + renderInput={params => ( + + )} + /> + + + ); }; diff --git a/plugins/catalog-react/src/filters.ts b/plugins/catalog-react/src/filters.ts index 056b3b92c1..efa10a8e19 100644 --- a/plugins/catalog-react/src/filters.ts +++ b/plugins/catalog-react/src/filters.ts @@ -28,14 +28,19 @@ import { getEntityRelations } from './utils'; * @public */ export class EntityKindFilter implements EntityFilter { - constructor(readonly value: string) {} + constructor(readonly value: string | string[]) {} - getCatalogFilters(): Record { - return { kind: this.value }; + // Simplify `string | string[]` for consumers, always returns an array + getKinds(): string[] { + return Array.isArray(this.value) ? this.value : [this.value]; } - toQueryValue(): string { - return this.value; + getCatalogFilters(): Record { + return { kind: this.getKinds() }; + } + + toQueryValue(): string[] { + return this.getKinds(); } } diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index 39c19d717a..3f34a950be 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -34,6 +34,7 @@ import { EntityTypePicker, UserListFilterKind, UserListPicker, + EntityKindPicker, } from '@backstage/plugin-catalog-react'; import React from 'react'; import { createComponentRouteRef } from '../../routes'; @@ -83,6 +84,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) { + diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 6bc18d7a90..5a7f8aabbb 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -70,7 +70,12 @@ export const CatalogTable = (props: CatalogTableProps) => { const defaultColumns: TableColumn[] = useMemo(() => { return [ columnFactories.createTitleColumn({ hidden: true }), - columnFactories.createNameColumn({ defaultKind: filters.kind?.value }), + columnFactories.createNameColumn({ + defaultKind: + filters.kind?.getKinds()?.length === 1 + ? filters.kind?.getKinds()[0] + : undefined, + }), ...createEntitySpecificColumns(), columnFactories.createMetadataDescriptionColumn(), columnFactories.createTagsColumn(), @@ -100,7 +105,7 @@ export const CatalogTable = (props: CatalogTableProps) => { ]; } } - }, [filters.kind?.value]); + }, [filters.kind]); const showTypeColumn = filters.type === undefined; // TODO(timbonicus): remove the title from the CatalogTable once using EntitySearchBar From 52f25858a813abaf23cb374347e8aa5d6e29abd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 11:14:27 +0200 Subject: [PATCH 150/279] create-app too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/tender-parrots-peel.md | 5 +++++ packages/create-app/templates/default-app/.gitignore.hbs | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/tender-parrots-peel.md diff --git a/.changeset/tender-parrots-peel.md b/.changeset/tender-parrots-peel.md new file mode 100644 index 0000000000..566467e143 --- /dev/null +++ b/.changeset/tender-parrots-peel.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Added `*.session.sql` Visual Studio Code database functionality files to `.gitignore` in the default template. This is optional but potentially helpful if your developers use Visual Studio Code; you can add a line with that exact value to your own root `.gitignore` if you want the same. diff --git a/packages/create-app/templates/default-app/.gitignore.hbs b/packages/create-app/templates/default-app/.gitignore.hbs index fdc2a5dfb2..d452ac2932 100644 --- a/packages/create-app/templates/default-app/.gitignore.hbs +++ b/packages/create-app/templates/default-app/.gitignore.hbs @@ -46,3 +46,6 @@ site # Sensitive credentials *-credentials.yaml + +# vscode database functionality support files +*.session.sql From b5a63ea00b1c9ee7095f4bdb5adc6d0ff19893e5 Mon Sep 17 00:00:00 2001 From: Clemens Stefan Heithecker <48448358+clemensheithecker@users.noreply.github.com> Date: Tue, 27 Sep 2022 10:50:10 +0200 Subject: [PATCH 151/279] Fix wrong import in README.md Replace `identityApi` with `identityApiRef` when importing from @backstage/core-plugin-api. Signed-off-by: Clemens Stefan Heithecker <48448358+clemensheithecker@users.noreply.github.com> Signed-off-by: Clemens Stefan Heithecker --- plugins/user-settings-backend/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user-settings-backend/README.md b/plugins/user-settings-backend/README.md index d12ee0aa89..bbd69cb18e 100644 --- a/plugins/user-settings-backend/README.md +++ b/plugins/user-settings-backend/README.md @@ -54,7 +54,7 @@ To make use of the user settings backend, replace the `WebStorage` with the + discoveryApiRef, + fetchApiRef, errorApiRef, -+ identityApi, ++ identityApiRef, + storageApiRef, } from '@backstage/core-plugin-api'; +import { UserSettingsStorage } from '@backstage/plugin-user-settings'; From 82ac9bcfe585d9414bad6f2ee4921f747b25dbe2 Mon Sep 17 00:00:00 2001 From: Clemens Stefan Heithecker Date: Tue, 27 Sep 2022 11:37:10 +0200 Subject: [PATCH 152/279] Add changeset Signed-off-by: Clemens Stefan Heithecker --- .changeset/tall-baboons-deliver.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tall-baboons-deliver.md diff --git a/.changeset/tall-baboons-deliver.md b/.changeset/tall-baboons-deliver.md new file mode 100644 index 0000000000..a69e52e31a --- /dev/null +++ b/.changeset/tall-baboons-deliver.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-user-settings-backend': patch +--- + +Fix wrong import statement in `README.md`. From 074def89aa5bf38c8881fd6fbd809c86b641114a Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Tue, 27 Sep 2022 12:03:07 +0200 Subject: [PATCH 153/279] stringify globals Signed-off-by: Kiss Miklos --- .../scaffolder-backend/src/lib/templating/SecureTemplater.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts index 2a16ff96c1..7dc42658be 100644 --- a/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts +++ b/plugins/scaffolder-backend/src/lib/templating/SecureTemplater.ts @@ -69,7 +69,7 @@ const { render, renderCompat } = (() => { if (typeof global === 'function') { env.addGlobal(globalName, (...args) => JSON.parse(global(...args))); } else { - env.addGlobal(globalName, global); + env.addGlobal(globalName, JSON.parse(global)); } } } @@ -166,7 +166,7 @@ export class SecureTemplater { (...args: JsonValue[]) => JSON.stringify(global(...args)), ]; } - return [globalName, global]; + return [globalName, JSON.stringify(global)]; }), ); } From 719ccbb963f437020350f72a4e835b5aadec9724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 12:06:24 +0200 Subject: [PATCH 154/279] filter ownership by references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/old-needles-brake.md | 6 ++++++ .../src/hooks/useEntityGitHubRepositories.ts | 11 ++++------- .../src/hooks/useUserRepositories.tsx | 12 ++++-------- 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 .changeset/old-needles-brake.md diff --git a/.changeset/old-needles-brake.md b/.changeset/old-needles-brake.md new file mode 100644 index 0000000000..eea2bf6539 --- /dev/null +++ b/.changeset/old-needles-brake.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-github-issues': patch +'@backstage/plugin-github-pull-requests-board': patch +--- + +Properly filter on relations instead of the spec, when finding by owner diff --git a/plugins/github-issues/src/hooks/useEntityGitHubRepositories.ts b/plugins/github-issues/src/hooks/useEntityGitHubRepositories.ts index 242de514ca..d7b60575ad 100644 --- a/plugins/github-issues/src/hooks/useEntityGitHubRepositories.ts +++ b/plugins/github-issues/src/hooks/useEntityGitHubRepositories.ts @@ -13,13 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Entity } from '@backstage/catalog-model'; + +import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; -import { - catalogApiRef, - humanizeEntityRef, - useEntity, -} from '@backstage/plugin-catalog-react'; +import { catalogApiRef, useEntity } from '@backstage/plugin-catalog-react'; import { useCallback, useEffect, useState } from 'react'; const GITHUB_PROJECT_SLUG_ANNOTATION = 'github.com/project-slug'; @@ -48,7 +45,7 @@ export function useEntityGitHubRepositories() { const entitiesList = await catalogApi.getEntities({ filter: { kind: ['Component', 'API'], - 'spec.owner': humanizeEntityRef(entity, { defaultKind: 'group' }), + 'relations.ownedBy': stringifyEntityRef(entity), }, }); diff --git a/plugins/github-pull-requests-board/src/hooks/useUserRepositories.tsx b/plugins/github-pull-requests-board/src/hooks/useUserRepositories.tsx index b905811aea..ed0d3580f0 100644 --- a/plugins/github-pull-requests-board/src/hooks/useUserRepositories.tsx +++ b/plugins/github-pull-requests-board/src/hooks/useUserRepositories.tsx @@ -13,12 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import { stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; -import { - catalogApiRef, - humanizeEntityRef, - useEntity, -} from '@backstage/plugin-catalog-react'; +import { catalogApiRef, useEntity } from '@backstage/plugin-catalog-react'; import { useCallback, useEffect, useState } from 'react'; import { getProjectNameFromEntity } from '../utils/functions'; @@ -29,9 +27,7 @@ export function useUserRepositories() { const getRepositoriesNames = useCallback(async () => { const entitiesList = await catalogApi.getEntities({ - filter: { - 'spec.owner': humanizeEntityRef(teamEntity, { defaultKind: 'group' }), - }, + filter: { 'relations.ownedBy': stringifyEntityRef(teamEntity) }, }); const entitiesNames: string[] = entitiesList.items.map(componentEntity => From 4e94720142b0f76047af3897e7dfab1a8c3a7fdf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 27 Sep 2022 10:57:53 +0000 Subject: [PATCH 155/279] Version Packages (next) --- .changeset/pre.json | 47 +- docs/releases/v1.7.0-next.0-changelog.md | 2064 +++++++++++++++++ package.json | 2 +- packages/app-defaults/CHANGELOG.md | 11 + packages/app-defaults/package.json | 2 +- packages/app/CHANGELOG.md | 62 + packages/app/package.json | 2 +- packages/backend-app-api/CHANGELOG.md | 13 + packages/backend-app-api/package.json | 2 +- packages/backend-common/CHANGELOG.md | 12 + packages/backend-common/package.json | 2 +- packages/backend-defaults/CHANGELOG.md | 9 + packages/backend-defaults/package.json | 2 +- packages/backend-next/CHANGELOG.md | 10 + packages/backend-next/package.json | 2 +- packages/backend-plugin-api/CHANGELOG.md | 11 + packages/backend-plugin-api/package.json | 2 +- packages/backend-tasks/CHANGELOG.md | 10 + packages/backend-tasks/package.json | 2 +- packages/backend-test-utils/CHANGELOG.md | 13 + packages/backend-test-utils/package.json | 2 +- packages/backend/CHANGELOG.md | 42 + packages/backend/package.json | 2 +- packages/catalog-client/CHANGELOG.md | 8 + packages/catalog-client/package.json | 2 +- packages/catalog-model/CHANGELOG.md | 10 + packages/catalog-model/package.json | 2 +- packages/cli/CHANGELOG.md | 36 + packages/cli/package.json | 2 +- packages/codemods/CHANGELOG.md | 7 + packages/codemods/package.json | 2 +- packages/config-loader/CHANGELOG.md | 10 + packages/config-loader/package.json | 2 +- packages/config/CHANGELOG.md | 7 + packages/config/package.json | 2 +- packages/core-app-api/CHANGELOG.md | 10 + packages/core-app-api/package.json | 2 +- packages/core-components/CHANGELOG.md | 12 + packages/core-components/package.json | 2 +- packages/core-plugin-api/CHANGELOG.md | 9 + packages/core-plugin-api/package.json | 2 +- packages/create-app/CHANGELOG.md | 29 + packages/create-app/package.json | 2 +- packages/dev-utils/CHANGELOG.md | 15 + packages/dev-utils/package.json | 2 +- packages/errors/CHANGELOG.md | 7 + packages/errors/package.json | 2 +- packages/integration-react/CHANGELOG.md | 11 + packages/integration-react/package.json | 2 +- packages/integration/CHANGELOG.md | 8 + packages/integration/package.json | 2 +- .../techdocs-cli-embedded-app/CHANGELOG.md | 19 + .../techdocs-cli-embedded-app/package.json | 2 +- packages/techdocs-cli/CHANGELOG.md | 21 + packages/techdocs-cli/package.json | 2 +- packages/test-utils/CHANGELOG.md | 14 + packages/test-utils/package.json | 2 +- plugins/adr-backend/CHANGELOG.md | 14 + plugins/adr-backend/package.json | 2 +- plugins/adr-common/CHANGELOG.md | 9 + plugins/adr-common/package.json | 2 +- plugins/adr/CHANGELOG.md | 15 + plugins/adr/package.json | 2 +- plugins/airbrake-backend/CHANGELOG.md | 8 + plugins/airbrake-backend/package.json | 2 +- plugins/airbrake/CHANGELOG.md | 13 + plugins/airbrake/package.json | 2 +- plugins/allure/CHANGELOG.md | 11 + plugins/allure/package.json | 2 +- plugins/analytics-module-ga/CHANGELOG.md | 10 + plugins/analytics-module-ga/package.json | 2 +- plugins/apache-airflow/CHANGELOG.md | 8 + plugins/apache-airflow/package.json | 2 +- plugins/api-docs/CHANGELOG.md | 13 + plugins/api-docs/package.json | 2 +- plugins/apollo-explorer/CHANGELOG.md | 9 + plugins/apollo-explorer/package.json | 2 +- plugins/app-backend/CHANGELOG.md | 12 + plugins/app-backend/package.json | 2 +- plugins/auth-backend/CHANGELOG.md | 23 + plugins/auth-backend/package.json | 2 +- plugins/auth-node/CHANGELOG.md | 9 + plugins/auth-node/package.json | 2 +- plugins/azure-devops-backend/CHANGELOG.md | 9 + plugins/azure-devops-backend/package.json | 2 +- plugins/azure-devops/CHANGELOG.md | 13 + plugins/azure-devops/package.json | 2 +- plugins/badges-backend/CHANGELOG.md | 11 + plugins/badges-backend/package.json | 2 +- plugins/badges/CHANGELOG.md | 12 + plugins/badges/package.json | 2 +- plugins/bazaar-backend/CHANGELOG.md | 9 + plugins/bazaar-backend/package.json | 2 +- plugins/bazaar/CHANGELOG.md | 13 + plugins/bazaar/package.json | 2 +- plugins/bitbucket-cloud-common/CHANGELOG.md | 17 + plugins/bitbucket-cloud-common/package.json | 2 +- plugins/bitrise/CHANGELOG.md | 11 + plugins/bitrise/package.json | 2 +- .../catalog-backend-module-aws/CHANGELOG.md | 14 + .../catalog-backend-module-aws/package.json | 2 +- .../catalog-backend-module-azure/CHANGELOG.md | 14 + .../catalog-backend-module-azure/package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- .../CHANGELOG.md | 16 + .../package.json | 2 +- .../CHANGELOG.md | 14 + .../package.json | 2 +- .../catalog-backend-module-ldap/CHANGELOG.md | 12 + .../catalog-backend-module-ldap/package.json | 2 +- .../CHANGELOG.md | 10 + .../package.json | 2 +- .../CHANGELOG.md | 13 + .../package.json | 2 +- plugins/catalog-backend/CHANGELOG.md | 23 + plugins/catalog-backend/package.json | 2 +- plugins/catalog-common/CHANGELOG.md | 8 + plugins/catalog-common/package.json | 2 +- plugins/catalog-customized/CHANGELOG.md | 8 + plugins/catalog-customized/package.json | 2 +- plugins/catalog-graph/CHANGELOG.md | 12 + plugins/catalog-graph/package.json | 2 +- plugins/catalog-graphql/CHANGELOG.md | 9 + plugins/catalog-graphql/package.json | 2 +- plugins/catalog-import/CHANGELOG.md | 15 + plugins/catalog-import/package.json | 2 +- plugins/catalog-node/CHANGELOG.md | 11 + plugins/catalog-node/package.json | 2 +- plugins/catalog-react/CHANGELOG.md | 18 + plugins/catalog-react/package.json | 2 +- plugins/catalog/CHANGELOG.md | 18 + plugins/catalog/package.json | 2 +- .../CHANGELOG.md | 9 + .../package.json | 2 +- plugins/cicd-statistics/CHANGELOG.md | 10 + plugins/cicd-statistics/package.json | 2 +- plugins/circleci/CHANGELOG.md | 11 + plugins/circleci/package.json | 2 +- plugins/cloudbuild/CHANGELOG.md | 11 + plugins/cloudbuild/package.json | 2 +- plugins/code-climate/CHANGELOG.md | 11 + plugins/code-climate/package.json | 2 +- plugins/code-coverage-backend/CHANGELOG.md | 12 + plugins/code-coverage-backend/package.json | 2 +- plugins/code-coverage/CHANGELOG.md | 13 + plugins/code-coverage/package.json | 2 +- plugins/codescene/CHANGELOG.md | 11 + plugins/codescene/package.json | 2 +- plugins/config-schema/CHANGELOG.md | 12 + plugins/config-schema/package.json | 2 +- plugins/cost-insights/CHANGELOG.md | 13 + plugins/cost-insights/package.json | 2 +- plugins/dynatrace/CHANGELOG.md | 11 + plugins/dynatrace/package.json | 2 +- .../example-todo-list-backend/CHANGELOG.md | 10 + .../example-todo-list-backend/package.json | 2 +- plugins/example-todo-list-common/CHANGELOG.md | 7 + plugins/example-todo-list-common/package.json | 2 +- plugins/example-todo-list/CHANGELOG.md | 9 + plugins/example-todo-list/package.json | 2 +- plugins/explore-react/CHANGELOG.md | 7 + plugins/explore-react/package.json | 2 +- plugins/explore/CHANGELOG.md | 12 + plugins/explore/package.json | 2 +- plugins/firehydrant/CHANGELOG.md | 10 + plugins/firehydrant/package.json | 2 +- plugins/fossa/CHANGELOG.md | 12 + plugins/fossa/package.json | 2 +- plugins/gcalendar/CHANGELOG.md | 10 + plugins/gcalendar/package.json | 2 +- plugins/gcp-projects/CHANGELOG.md | 9 + plugins/gcp-projects/package.json | 2 +- plugins/git-release-manager/CHANGELOG.md | 10 + plugins/git-release-manager/package.json | 2 +- plugins/github-actions/CHANGELOG.md | 12 + plugins/github-actions/package.json | 2 +- plugins/github-deployments/CHANGELOG.md | 14 + plugins/github-deployments/package.json | 2 +- plugins/github-issues/CHANGELOG.md | 13 + plugins/github-issues/package.json | 2 +- .../github-pull-requests-board/CHANGELOG.md | 12 + .../github-pull-requests-board/package.json | 2 +- plugins/gitops-profiles/CHANGELOG.md | 9 + plugins/gitops-profiles/package.json | 2 +- plugins/gocd/CHANGELOG.md | 12 + plugins/gocd/package.json | 2 +- plugins/graphiql/CHANGELOG.md | 9 + plugins/graphiql/package.json | 2 +- plugins/graphql-backend/CHANGELOG.md | 9 + plugins/graphql-backend/package.json | 2 +- plugins/home/CHANGELOG.md | 13 + plugins/home/package.json | 2 +- plugins/ilert/CHANGELOG.md | 12 + plugins/ilert/package.json | 2 +- plugins/jenkins-backend/CHANGELOG.md | 15 + plugins/jenkins-backend/package.json | 2 +- plugins/jenkins-common/CHANGELOG.md | 8 + plugins/jenkins-common/package.json | 2 +- plugins/jenkins/CHANGELOG.md | 13 + plugins/jenkins/package.json | 2 +- plugins/kafka-backend/CHANGELOG.md | 10 + plugins/kafka-backend/package.json | 2 +- plugins/kafka/CHANGELOG.md | 12 + plugins/kafka/package.json | 2 +- plugins/kubernetes-backend/CHANGELOG.md | 13 + plugins/kubernetes-backend/package.json | 2 +- plugins/kubernetes-common/CHANGELOG.md | 7 + plugins/kubernetes-common/package.json | 2 +- plugins/kubernetes/CHANGELOG.md | 15 + plugins/kubernetes/package.json | 2 +- plugins/lighthouse/CHANGELOG.md | 12 + plugins/lighthouse/package.json | 2 +- plugins/newrelic-dashboard/CHANGELOG.md | 11 + plugins/newrelic-dashboard/package.json | 2 +- plugins/newrelic/CHANGELOG.md | 9 + plugins/newrelic/package.json | 2 +- plugins/org/CHANGELOG.md | 12 + plugins/org/package.json | 2 +- plugins/pagerduty/CHANGELOG.md | 12 + plugins/pagerduty/package.json | 2 +- plugins/periskop-backend/CHANGELOG.md | 8 + plugins/periskop-backend/package.json | 2 +- plugins/periskop/CHANGELOG.md | 12 + plugins/periskop/package.json | 2 +- plugins/permission-backend/CHANGELOG.md | 12 + plugins/permission-backend/package.json | 2 +- plugins/permission-common/CHANGELOG.md | 8 + plugins/permission-common/package.json | 2 +- plugins/permission-node/CHANGELOG.md | 11 + plugins/permission-node/package.json | 2 +- plugins/permission-react/CHANGELOG.md | 9 + plugins/permission-react/package.json | 2 +- plugins/playlist-backend/CHANGELOG.md | 16 + plugins/playlist-backend/package.json | 2 +- plugins/playlist-common/CHANGELOG.md | 7 + plugins/playlist-common/package.json | 2 +- plugins/playlist/CHANGELOG.md | 17 + plugins/playlist/package.json | 2 +- plugins/proxy-backend/CHANGELOG.md | 8 + plugins/proxy-backend/package.json | 2 +- plugins/rollbar-backend/CHANGELOG.md | 8 + plugins/rollbar-backend/package.json | 2 +- plugins/rollbar/CHANGELOG.md | 11 + plugins/rollbar/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- .../CHANGELOG.md | 9 + .../package.json | 2 +- plugins/scaffolder-backend/CHANGELOG.md | 26 + plugins/scaffolder-backend/package.json | 2 +- plugins/scaffolder-common/CHANGELOG.md | 8 + plugins/scaffolder-common/package.json | 2 +- plugins/scaffolder/CHANGELOG.md | 28 + plugins/scaffolder/package.json | 2 +- .../CHANGELOG.md | 9 + .../package.json | 2 +- plugins/search-backend-module-pg/CHANGELOG.md | 10 + plugins/search-backend-module-pg/package.json | 2 +- plugins/search-backend-node/CHANGELOG.md | 12 + plugins/search-backend-node/package.json | 2 +- plugins/search-backend/CHANGELOG.md | 15 + plugins/search-backend/package.json | 2 +- plugins/search-common/CHANGELOG.md | 8 + plugins/search-common/package.json | 2 +- plugins/search-react/CHANGELOG.md | 12 + plugins/search-react/package.json | 2 +- plugins/search/CHANGELOG.md | 17 + plugins/search/package.json | 2 +- plugins/sentry/CHANGELOG.md | 11 + plugins/sentry/package.json | 2 +- plugins/shortcuts/CHANGELOG.md | 10 + plugins/shortcuts/package.json | 2 +- plugins/sonarqube-backend/CHANGELOG.md | 9 + plugins/sonarqube-backend/package.json | 2 +- plugins/sonarqube/CHANGELOG.md | 11 + plugins/sonarqube/package.json | 2 +- plugins/splunk-on-call/CHANGELOG.md | 11 + plugins/splunk-on-call/package.json | 2 +- plugins/stack-overflow-backend/CHANGELOG.md | 9 + plugins/stack-overflow-backend/package.json | 2 +- plugins/stack-overflow/CHANGELOG.md | 12 + plugins/stack-overflow/package.json | 2 +- .../CHANGELOG.md | 11 + .../package.json | 2 +- plugins/tech-insights-backend/CHANGELOG.md | 14 + plugins/tech-insights-backend/package.json | 2 +- plugins/tech-insights-common/CHANGELOG.md | 7 + plugins/tech-insights-common/package.json | 2 +- plugins/tech-insights-node/CHANGELOG.md | 12 + plugins/tech-insights-node/package.json | 2 +- plugins/tech-insights/CHANGELOG.md | 14 + plugins/tech-insights/package.json | 2 +- plugins/tech-radar/CHANGELOG.md | 9 + plugins/tech-radar/package.json | 2 +- .../techdocs-addons-test-utils/CHANGELOG.md | 16 + .../techdocs-addons-test-utils/package.json | 2 +- plugins/techdocs-backend/CHANGELOG.md | 16 + plugins/techdocs-backend/package.json | 2 +- .../CHANGELOG.md | 12 + .../package.json | 2 +- plugins/techdocs-node/CHANGELOG.md | 22 + plugins/techdocs-node/package.json | 2 +- plugins/techdocs-react/CHANGELOG.md | 11 + plugins/techdocs-react/package.json | 2 +- plugins/techdocs/CHANGELOG.md | 18 + plugins/techdocs/package.json | 2 +- plugins/todo-backend/CHANGELOG.md | 12 + plugins/todo-backend/package.json | 2 +- plugins/todo/CHANGELOG.md | 12 + plugins/todo/package.json | 2 +- plugins/user-settings-backend/CHANGELOG.md | 12 + plugins/user-settings-backend/package.json | 2 +- plugins/user-settings/CHANGELOG.md | 22 + plugins/user-settings/package.json | 2 +- plugins/vault-backend/CHANGELOG.md | 11 + plugins/vault-backend/package.json | 2 +- plugins/vault/CHANGELOG.md | 12 + plugins/vault/package.json | 2 +- plugins/xcmetrics/CHANGELOG.md | 10 + plugins/xcmetrics/package.json | 2 +- yarn.lock | 302 ++- 330 files changed, 4623 insertions(+), 174 deletions(-) create mode 100644 docs/releases/v1.7.0-next.0-changelog.md diff --git a/.changeset/pre.json b/.changeset/pre.json index 46123733ca..faed720d63 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -175,5 +175,50 @@ "@backstage/plugin-vault-backend": "0.2.2", "@backstage/plugin-xcmetrics": "0.2.29" }, - "changesets": [] + "changesets": [ + "breezy-pots-worry", + "bright-rules-shout", + "clean-camels-sneeze", + "curvy-kiwis-fold", + "curvy-lemons-change", + "dull-rocks-warn", + "eleven-apples-accept", + "fair-tools-melt", + "grumpy-pans-knock", + "itchy-schools-run", + "kind-penguins-report", + "large-dingos-juggle", + "lazy-beds-pull", + "lazy-fireants-check", + "little-roses-rule", + "lucky-cows-boil", + "odd-singers-taste", + "old-cobras-suffer", + "perfect-moose-drum", + "poor-clouds-ring", + "quiet-hats-kick", + "quiet-ligers-draw", + "red-pants-rush", + "renovate-a02d90b", + "rich-carrots-reflect", + "rude-bulldogs-sleep", + "selfish-turkeys-exist", + "shaggy-books-smell", + "sixty-items-nail", + "slow-mirrors-eat", + "smooth-tables-pull", + "soft-falcons-love", + "stupid-dragons-complain", + "sweet-insects-camp", + "swift-phones-cheat", + "tall-baboons-deliver", + "tender-drinks-drive", + "tender-parrots-peel", + "thick-kings-destroy", + "tiny-mails-bathe", + "tough-hairs-sparkle", + "wild-weeks-live", + "wise-ligers-scream", + "yellow-lemons-march" + ] } diff --git a/docs/releases/v1.7.0-next.0-changelog.md b/docs/releases/v1.7.0-next.0-changelog.md new file mode 100644 index 0000000000..57b3c64f6f --- /dev/null +++ b/docs/releases/v1.7.0-next.0-changelog.md @@ -0,0 +1,2064 @@ +# Release v1.7.0-next.0 + +## @backstage/cli@0.20.0-next.0 + +### Minor Changes + +- f368ad7279: **BREAKING**: Bumped `jest`, `jest-runtime`, and `jest-environment-jsdom` to v29. This is up from v27, so check out both the [v28](https://jestjs.io/docs/28.x/upgrading-to-jest28) and [v29](https://jestjs.io/docs/upgrading-to-jest29) (later [here](https://jestjs.io/docs/29.x/upgrading-to-jest29)) migration guides. + + Particular changes that where encountered in the main Backstage repo are: + + - The updated snapshot format. + - `jest.useFakeTimers('legacy')` is now `jest.useFakeTimers({ legacyFakeTimers: true })`. + - Error objects collected by `withLogCollector` from `@backstage/test-utils` are now objects with a `detail` property rather than a string. + +### Patch Changes + +- 3e309107ca: Updated fallback versions of dependencies in all templates. + +- 292a088807: Added a new `repo test` command. + +- ba63cae41c: Updated lockfile parsing to have better support for Yarn 3. + +- 2dddb32fea: Switched the Jest transform for YAML files to use a custom one available at `@backstage/cli/config/jestYamlTransform.js`. + +- a541a3a78a: Switch to upfront resolution of `swc-loader` in Webpack config. + +- cfb3598410: Removed `tsx` and `jsx` as supported extensions in backend packages. For most + repos, this will not have any effect. But if you inadvertently had added some + `tsx`/`jsx` files to your backend package, you may now start to see `code: 'MODULE_NOT_FOUND'` errors when launching the backend locally. The reason for + this is that the offending files get ignored during transpilation. Hence, the + importing file can no longer find anything to import. + + The fix is to rename any `.tsx` files in your backend packages to `.ts` instead, + or `.jsx` to `.js`. + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/release-manifests@0.0.6 + - @backstage/types@1.0.0 + +## @backstage/plugin-auth-backend@0.17.0-next.0 + +### Minor Changes + +- 5fa831ce55: CookieConfigurer can optionally return the `SameSite` cookie attribute. + CookieConfigurer now requires an additional argument `appOrigin` - the origin URL of the app - which is used to calculate the `SameSite` attribute. + defaultCookieConfigurer returns the `SameSite` attribute which defaults to `Lax`. In cases where an auth-backend is running on a different domain than the App, `SameSite=None` is used - but only for secure contexts. This is so that cookies can be included in third-party requests. + + OAuthAdapterOptions has been modified to require additional arguments, `baseUrl`, and `cookieConfigurer`. + OAuthAdapter now resolves cookie configuration using its supplied CookieConfigurer for each request to make sure that the proper attributes always are set. + +### Patch Changes + +- 8c6ec175bf: Fix GitLab provider setup so that it supports GitLab installations with a path in the URL. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 + +### Minor Changes + +- ad74723fbf: Update Bitbucket Cloud models to latest OAS version. + + The latest specification contained some BREAKING CHANGES + due to removed fields. + + All of these fields are not used at other plugins, though. + Therefore, this change has no impact on other modules here. + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-scaffolder@1.7.0-next.0 + +### Minor Changes + +- f13d5f3f06: Add support for link to TechDocs and other links defined in template entity specification metadata on TemplateCard +- 05f22193c5: EntityPickers now support flags to control when to include default namespace + in result + +### Patch Changes + +- 8960d83013: Add support for `allowedOrganizations` and `allowedOwners` to the `AzureRepoPicker`. +- b681275e69: Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + +## @backstage/plugin-scaffolder-backend@1.7.0-next.0 + +### Minor Changes + +- 253453fa14: Added a new property called `additionalTemplateGlobals` which allows you to add global functions to the scaffolder nunjucks templates. +- 304305dd20: Add `allowAutoMerge` option for `publish:github` action +- 694bfe2d61: Add functionality to shutdown scaffolder tasks if they are stale + +### Patch Changes + +- b681275e69: Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-user-settings@0.5.0-next.0 + +### Minor Changes + +- 5543e86660: **BREAKING**: The `apiRef` passed to `ProviderSettingsItem` now needs to + implement `ProfileInfoApi & SessionApi`, rather than just the latter. This is + unlikely to have an effect on most users though, since the builtin auth + providers generally implement both. + + Fixed settings page showing providers as logged out when the user is using more + than one provider, and displayed some additional login information. + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + +## @backstage/app-defaults@1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-permission-react@0.4.6-next.0 + +## @backstage/backend-app-api@0.2.2-next.0 + +### Patch Changes + +- 0027a749cd: Added possibility to configure index plugin of the HTTP router service. +- 45857bffae: Properly export `rootLoggerFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/backend-common@0.15.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/backend-defaults@0.1.2-next.0 + +### Patch Changes + +- 96d288a02d: Added root logger service to the set of default services. +- Updated dependencies + - @backstage/backend-app-api@0.2.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + +## @backstage/backend-plugin-api@0.1.3-next.0 + +### Patch Changes + +- 28377dc89f: Allow interfaces to be used for inferred option types. +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/backend-tasks@0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/backend-test-utils@0.1.29-next.0 + +### Patch Changes + +- 72549952d1: Fixed handling of root scoped services in `startTestBackend`. +- e91e8e9c55: Increased test database max connection pool size to reduce the risk of resource exhaustion. +- Updated dependencies + - @backstage/backend-app-api@0.2.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/catalog-client@1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/catalog-model@1.1.2-next.0 + +### Patch Changes + +- 6f3b8d0962: Defer `ajv` compilation of schema validators to improve module-import performance +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/codemods@0.1.40-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + +## @backstage/config@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + +## @backstage/config-loader@1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/core-app-api@1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + +## @backstage/core-components@0.11.2-next.0 + +### Patch Changes + +- 882101cd9b: Deep-import LightAsync component to improve module-import speed +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/version-bridge@1.0.1 + +## @backstage/core-plugin-api@1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + +## @backstage/create-app@0.4.32-next.0 + +### Patch Changes + +- 58c2264325: Newly created Backstage repositories now use the stable version 6 of + `react-router`, just like the main repo does. Please let us know if you find any + issues with this. + + Migrating to the stable version of `react-router` is optional for the time + being. But if you want to do the same for your existing repository, please + follow [this + guide](https://backstage.io/docs/tutorials/react-router-stable-migration). + +- e05e0f021b: Update versions of packages used in the create-app template, to match those in the main repo + +- 52f25858a8: Added `*.session.sql` Visual Studio Code database functionality files to `.gitignore` in the default template. This is optional but potentially helpful if your developers use Visual Studio Code; you can add a line with that exact value to your own root `.gitignore` if you want the same. + +- 6d00e80146: Updated the root `test` scripts to use `backstage-cli repo test`. + + To apply this change to an existing app, make the following change to the root `package.json`: + + ```diff + - "test": "backstage-cli test", + - "test:all": "lerna run test -- --coverage", + + "test": "backstage-cli repo test", + + "test:all": "backstage-cli repo test --coverage", + ``` + +- Updated dependencies + - @backstage/cli-common@0.1.10 + +## @backstage/dev-utils@1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/errors@1.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + +## @backstage/integration@1.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/integration-react@1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @techdocs/cli@1.2.2-next.0 + +### Patch Changes + +- 0b2a30dead: fixing techdocs-cli Docker client creation + + Docker client does not need to be created when --no-docker + option is provided. + + If you had DOCKER_CERT_PATH environment variable defined + the Docker client was looking for certificates + and breaking techdocs-cli generate command even with --no-docker + option. + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-techdocs-node@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + +## @backstage/test-utils@1.2.1-next.0 + +### Patch Changes + +- e05e0f021b: Align on the version of `@material-ui/icons` used, to `^4.9.1` like other packages in the main repo +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + +## @backstage/plugin-adr@0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-adr-common@0.2.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-adr-backend@0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-adr-common@0.2.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-adr-common@0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-airbrake@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/dev-utils@1.0.7-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-airbrake-backend@0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-allure@0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-analytics-module-ga@0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-apache-airflow@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + +## @backstage/plugin-api-docs@0.8.10-next.0 + +### Patch Changes + +- 3d5bb521ee: Updated dependency `@asyncapi/react-component` to `1.0.0-next.42`. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-apollo-explorer@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-app-backend@0.3.37-next.0 + +### Patch Changes + +- 11c9e0ad33: Added alpha plugin implementation for the new backend system. Available at `@backstage/plugin-app-backend/alpha`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-auth-node@0.2.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-azure-devops@0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + +## @backstage/plugin-azure-devops-backend@0.3.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-azure-devops-common@0.3.0 + +## @backstage/plugin-badges@0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-badges-backend@0.1.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-bazaar@0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + +## @backstage/plugin-bazaar-backend@0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-bitrise@0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog@1.5.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-catalog-backend@1.4.1-next.0 + +### Patch Changes + +- 8cb6e10105: Fixed a bug where entities provided without a location key would always replace existing entities, rather than updating them. +- 63296ebcd4: Allow Placeholder value to be any value, not only string. +- 74022e0163: Make sure to stitch entities correctly after deletion, to ensure that their relations are updated. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-catalog-backend-module-aws@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-azure@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-catalog-backend-module-github@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-gitlab@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-backend-module-msgraph@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-common@1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-catalog-graph@0.2.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-catalog-graphql@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-import@0.8.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-catalog-node@1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-catalog-react@1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + +## @backstage/plugin-cicd-statistics@0.1.12-next.0 + +### Patch Changes + +- e05e0f021b: Align on the version of `@material-ui/icons` used, to `^4.9.1` like other packages in the main repo +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-cicd-statistics@0.1.12-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + +## @backstage/plugin-circleci@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-cloudbuild@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-climate@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-code-coverage-backend@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-codescene@0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-config-schema@0.1.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + +## @backstage/plugin-cost-insights@0.11.32-next.0 + +### Patch Changes + +- a94c2ed1b7: Fixed bug in `CostOverviewBreakdownChart` component where some datasets caused the cost overview breakdown chart to tear. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + +## @backstage/plugin-dynatrace@0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-explore@0.3.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-explore-react@0.0.22-next.0 + +## @backstage/plugin-explore-react@0.0.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.7-next.0 + +## @backstage/plugin-firehydrant@0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-fossa@0.2.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcalendar@0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gcp-projects@0.3.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-git-release-manager@0.3.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-actions@0.5.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-deployments@0.1.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-issues@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-github-pull-requests-board@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gitops-profiles@0.3.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-gocd@0.1.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphiql@0.2.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-graphql-backend@0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-graphql@0.3.14-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-home@0.4.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-stack-overflow@0.1.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-ilert@0.1.36-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-jenkins@0.7.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.9-next.0 + +## @backstage/plugin-jenkins-backend@0.1.27-next.0 + +### Patch Changes + +- b19ea927af: Fixed a bug where `extraRequestHeaders` configuration was ignored. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-jenkins-common@0.1.9-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-jenkins-common@0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-kafka@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-kafka-backend@0.2.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-kubernetes@0.7.3-next.0 + +### Patch Changes + +- 51af8361de: Add useCustomResources react hook for fetching Kubernetes Custom Resources +- 35a6cfe257: Fix infinite call bug in `useCustomResources` hook +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-kubernetes-common@0.4.3-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-kubernetes-backend@0.7.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-kubernetes-common@0.4.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-kubernetes-common@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + +## @backstage/plugin-lighthouse@0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic@0.3.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-newrelic-dashboard@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-org@0.5.10-next.0 + +### Patch Changes + +- f2b4b55636: consistently show parent and child relations in group profile card +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-pagerduty@0.5.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-periskop@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-periskop-backend@0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-permission-backend@0.5.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-permission-common@0.6.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-permission-node@0.6.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-permission-react@0.4.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-playlist@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + - @backstage/plugin-playlist-common@0.1.1-next.0 + +## @backstage/plugin-playlist-backend@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-playlist-common@0.1.1-next.0 + +## @backstage/plugin-playlist-common@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-proxy-backend@0.2.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-rollbar@0.4.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-rollbar-backend@0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-scaffolder-common@1.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-search@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-search-backend@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-search-backend-module-elasticsearch@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-search-backend-module-pg@0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-search-backend-node@1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-search-common@1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + +## @backstage/plugin-search-react@1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-sentry@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-shortcuts@0.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + +## @backstage/plugin-sonarqube@0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-sonarqube-backend@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-splunk-on-call@0.3.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-stack-overflow@0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-home@0.4.26-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-stack-overflow-backend@0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.20.0-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-tech-insights@0.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + +## @backstage/plugin-tech-insights-backend@0.5.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + +## @backstage/plugin-tech-insights-common@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + +## @backstage/plugin-tech-insights-node@0.3.5-next.0 + +### Patch Changes + +- 0963b4d5fb: Updated package role to be `node-library`. +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + +## @backstage/plugin-tech-radar@0.5.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs@1.3.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-backend@1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-techdocs-node@1.4.1-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-techdocs-module-addons-contrib@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-techdocs-node@1.4.1-next.0 + +### Patch Changes + +- 0b2a30dead: fixing techdocs-cli Docker client creation + + Docker client does not need to be created when --no-docker + option is provided. + + If you had DOCKER_CERT_PATH environment variable defined + the Docker client was looking for certificates + and breaking techdocs-cli generate command even with --no-docker + option. + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + +## @backstage/plugin-techdocs-react@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/version-bridge@1.0.1 + +## @backstage/plugin-todo@0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-todo-backend@0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + +## @backstage/plugin-user-settings-backend@0.1.1-next.0 + +### Patch Changes + +- 82ac9bcfe5: Fix wrong import statement in `README.md`. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + +## @backstage/plugin-vault@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## @backstage/plugin-vault-backend@0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @backstage/plugin-xcmetrics@0.2.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + +## example-app@0.2.76-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-org@0.5.10-next.0 + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/plugin-kubernetes@0.7.3-next.0 + - @backstage/plugin-scaffolder@1.7.0-next.0 + - @backstage/plugin-api-docs@0.8.10-next.0 + - @backstage/plugin-user-settings@0.5.0-next.0 + - @backstage/plugin-cost-insights@0.11.32-next.0 + - @backstage/plugin-airbrake@0.3.10-next.0 + - @backstage/plugin-azure-devops@0.2.1-next.0 + - @backstage/plugin-badges@0.2.34-next.0 + - @backstage/plugin-catalog-graph@0.2.22-next.0 + - @backstage/plugin-catalog-import@0.8.13-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-circleci@0.3.10-next.0 + - @backstage/plugin-cloudbuild@0.3.10-next.0 + - @backstage/plugin-code-coverage@0.2.3-next.0 + - @backstage/plugin-dynatrace@0.2.1-next.0 + - @backstage/plugin-explore@0.3.41-next.0 + - @backstage/plugin-github-actions@0.5.10-next.0 + - @backstage/plugin-gocd@0.1.16-next.0 + - @backstage/plugin-home@0.4.26-next.0 + - @backstage/plugin-jenkins@0.7.9-next.0 + - @backstage/plugin-kafka@0.3.10-next.0 + - @backstage/plugin-lighthouse@0.3.10-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.3-next.0 + - @backstage/plugin-pagerduty@0.5.3-next.0 + - @backstage/plugin-playlist@0.1.1-next.0 + - @backstage/plugin-rollbar@0.4.10-next.0 + - @backstage/plugin-search@1.0.3-next.0 + - @backstage/plugin-sentry@0.4.3-next.0 + - @backstage/plugin-tech-insights@0.3.1-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/plugin-todo@0.2.12-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-apache-airflow@0.2.3-next.0 + - @backstage/plugin-gcalendar@0.3.6-next.0 + - @backstage/plugin-gcp-projects@0.3.29-next.0 + - @backstage/plugin-graphiql@0.2.42-next.0 + - @backstage/plugin-newrelic@0.3.28-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/plugin-shortcuts@0.3.2-next.0 + - @backstage/plugin-stack-overflow@0.1.6-next.0 + - @backstage/plugin-tech-radar@0.5.17-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + - @internal/plugin-catalog-customized@0.0.3-next.0 + +## example-backend@0.2.76-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/plugin-auth-backend@0.17.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-jenkins-backend@0.1.27-next.0 + - @backstage/plugin-app-backend@0.3.37-next.0 + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - example-app@0.2.76-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-badges-backend@0.1.31-next.0 + - @backstage/plugin-code-coverage-backend@0.2.3-next.0 + - @backstage/plugin-kafka-backend@0.2.30-next.0 + - @backstage/plugin-kubernetes-backend@0.7.3-next.0 + - @backstage/plugin-playlist-backend@0.1.1-next.0 + - @backstage/plugin-tech-insights-backend@0.5.3-next.0 + - @backstage/plugin-techdocs-backend@1.3.1-next.0 + - @backstage/plugin-todo-backend@0.1.34-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/plugin-rollbar-backend@0.1.34-next.0 + - @backstage/plugin-search-backend-module-pg@0.4.1-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-azure-devops-backend@0.3.16-next.0 + - @backstage/plugin-graphql-backend@0.1.27-next.0 + - @backstage/plugin-permission-backend@0.5.12-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-proxy-backend@0.2.31-next.0 + - @backstage/plugin-search-backend@1.0.3-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.21-next.0 + +## example-backend-next@0.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-defaults@0.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-app-backend@0.3.37-next.0 + +## techdocs-cli-embedded-app@0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @internal/plugin-catalog-customized@0.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + +## @internal/plugin-todo-list@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + +## @internal/plugin-todo-list-backend@1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + +## @internal/plugin-todo-list-common@1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 diff --git a/package.json b/package.json index 31b0c194d2..394a6eca29 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/react": "^17", "@types/react-dom": "^17" }, - "version": "1.6.0", + "version": "1.7.0-next.0", "dependencies": { "@manypkg/get-packages": "^1.1.3", "@microsoft/api-documenter": "^7.17.11", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 6d9d3fc029..b4b1d861ac 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/app-defaults +## 1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-permission-react@0.4.6-next.0 + ## 1.0.6 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index 0742d2cb13..c1cb3ba39c 100644 --- a/packages/app-defaults/package.json +++ b/packages/app-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/app-defaults", "description": "Provides the default wiring of a Backstage App", - "version": "1.0.6", + "version": "1.0.7-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index e5c37fb1d9..47ee55e1af 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,67 @@ # example-app +## 0.2.76-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-org@0.5.10-next.0 + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/plugin-kubernetes@0.7.3-next.0 + - @backstage/plugin-scaffolder@1.7.0-next.0 + - @backstage/plugin-api-docs@0.8.10-next.0 + - @backstage/plugin-user-settings@0.5.0-next.0 + - @backstage/plugin-cost-insights@0.11.32-next.0 + - @backstage/plugin-airbrake@0.3.10-next.0 + - @backstage/plugin-azure-devops@0.2.1-next.0 + - @backstage/plugin-badges@0.2.34-next.0 + - @backstage/plugin-catalog-graph@0.2.22-next.0 + - @backstage/plugin-catalog-import@0.8.13-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-circleci@0.3.10-next.0 + - @backstage/plugin-cloudbuild@0.3.10-next.0 + - @backstage/plugin-code-coverage@0.2.3-next.0 + - @backstage/plugin-dynatrace@0.2.1-next.0 + - @backstage/plugin-explore@0.3.41-next.0 + - @backstage/plugin-github-actions@0.5.10-next.0 + - @backstage/plugin-gocd@0.1.16-next.0 + - @backstage/plugin-home@0.4.26-next.0 + - @backstage/plugin-jenkins@0.7.9-next.0 + - @backstage/plugin-kafka@0.3.10-next.0 + - @backstage/plugin-lighthouse@0.3.10-next.0 + - @backstage/plugin-newrelic-dashboard@0.2.3-next.0 + - @backstage/plugin-pagerduty@0.5.3-next.0 + - @backstage/plugin-playlist@0.1.1-next.0 + - @backstage/plugin-rollbar@0.4.10-next.0 + - @backstage/plugin-search@1.0.3-next.0 + - @backstage/plugin-sentry@0.4.3-next.0 + - @backstage/plugin-tech-insights@0.3.1-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/plugin-todo@0.2.12-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-apache-airflow@0.2.3-next.0 + - @backstage/plugin-gcalendar@0.3.6-next.0 + - @backstage/plugin-gcp-projects@0.3.29-next.0 + - @backstage/plugin-graphiql@0.2.42-next.0 + - @backstage/plugin-newrelic@0.3.28-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/plugin-shortcuts@0.3.2-next.0 + - @backstage/plugin-stack-overflow@0.1.6-next.0 + - @backstage/plugin-tech-radar@0.5.17-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.0.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + - @internal/plugin-catalog-customized@0.0.3-next.0 + ## 0.2.75 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index ad24f23c45..4181b036e9 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.75", + "version": "0.2.76-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 801ec9aba6..b947c4d6ff 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/backend-app-api +## 0.2.2-next.0 + +### Patch Changes + +- 0027a749cd: Added possibility to configure index plugin of the HTTP router service. +- 45857bffae: Properly export `rootLoggerFactory`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.2.1 ### Patch Changes diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 2878de5aa3..e8a470acc8 100644 --- a/packages/backend-app-api/package.json +++ b/packages/backend-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-app-api", "description": "Core API used by Backstage backend apps", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md index 4e51ad3b8f..9ab2e9d9a3 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/backend-common +## 0.15.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.15.1 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 35e1ccdf10..2008c75ad8 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.15.1", + "version": "0.15.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-defaults/CHANGELOG.md b/packages/backend-defaults/CHANGELOG.md index 2e8ef65792..4f56cd17f7 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-defaults +## 0.1.2-next.0 + +### Patch Changes + +- 96d288a02d: Added root logger service to the set of default services. +- Updated dependencies + - @backstage/backend-app-api@0.2.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + ## 0.1.1 ### Patch Changes diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 23652120e2..e518c0737a 100644 --- a/packages/backend-defaults/package.json +++ b/packages/backend-defaults/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-defaults", "description": "Backend defaults used by Backstage backend apps", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-next/CHANGELOG.md b/packages/backend-next/CHANGELOG.md index a37fc48dac..2247f7b7a5 100644 --- a/packages/backend-next/CHANGELOG.md +++ b/packages/backend-next/CHANGELOG.md @@ -1,5 +1,15 @@ # example-backend-next +## 0.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-defaults@0.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-app-backend@0.3.37-next.0 + ## 0.0.3 ### Patch Changes diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index 7e83203cea..1c3de17651 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-next", - "version": "0.0.3", + "version": "0.0.4-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index 33e3b36268..3ee241792a 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/backend-plugin-api +## 0.1.3-next.0 + +### Patch Changes + +- 28377dc89f: Allow interfaces to be used for inferred option types. +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.1.2 ### Patch Changes diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index 18c6c842fc..72ac712f29 100644 --- a/packages/backend-plugin-api/package.json +++ b/packages/backend-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-plugin-api", "description": "Core API used by Backstage backend plugins", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-tasks/CHANGELOG.md b/packages/backend-tasks/CHANGELOG.md index 0510a54825..10d7d74bb1 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/backend-tasks +## 0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 0.3.5 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index 88b8cf0345..5f62b9f2f0 100644 --- a/packages/backend-tasks/package.json +++ b/packages/backend-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-tasks", "description": "Common distributed task management library for Backstage backends", - "version": "0.3.5", + "version": "0.3.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-test-utils/CHANGELOG.md b/packages/backend-test-utils/CHANGELOG.md index 27e41be568..4595ae773c 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/backend-test-utils +## 0.1.29-next.0 + +### Patch Changes + +- 72549952d1: Fixed handling of root scoped services in `startTestBackend`. +- e91e8e9c55: Increased test database max connection pool size to reduce the risk of resource exhaustion. +- Updated dependencies + - @backstage/backend-app-api@0.2.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.1.28 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index b1006b8464..03f04c4cad 100644 --- a/packages/backend-test-utils/package.json +++ b/packages/backend-test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-test-utils", "description": "Test helpers library for Backstage backends", - "version": "0.1.28", + "version": "0.1.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index b196b1df9e..b9ce0dfcc2 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,47 @@ # example-backend +## 0.2.76-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/plugin-auth-backend@0.17.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-jenkins-backend@0.1.27-next.0 + - @backstage/plugin-app-backend@0.3.37-next.0 + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - example-app@0.2.76-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-badges-backend@0.1.31-next.0 + - @backstage/plugin-code-coverage-backend@0.2.3-next.0 + - @backstage/plugin-kafka-backend@0.2.30-next.0 + - @backstage/plugin-kubernetes-backend@0.7.3-next.0 + - @backstage/plugin-playlist-backend@0.1.1-next.0 + - @backstage/plugin-tech-insights-backend@0.5.3-next.0 + - @backstage/plugin-techdocs-backend@1.3.1-next.0 + - @backstage/plugin-todo-backend@0.1.34-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/plugin-rollbar-backend@0.1.34-next.0 + - @backstage/plugin-search-backend-module-pg@0.4.1-next.0 + - @backstage/plugin-scaffolder-backend-module-rails@0.4.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-azure-devops-backend@0.3.16-next.0 + - @backstage/plugin-graphql-backend@0.1.27-next.0 + - @backstage/plugin-permission-backend@0.5.12-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-proxy-backend@0.2.31-next.0 + - @backstage/plugin-search-backend@1.0.3-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.21-next.0 + ## 0.2.75 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 54bf8c586e..a3ccbf0cc2 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.75", + "version": "0.2.76-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 774325ff44..878fb489c6 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/catalog-client +## 1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/errors@1.1.2-next.0 + ## 1.1.0 ### Minor Changes diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index fb1de71062..52e763d55b 100644 --- a/packages/catalog-client/package.json +++ b/packages/catalog-client/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-client", "description": "An isomorphic client for the catalog backend", - "version": "1.1.0", + "version": "1.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md index d3f9fe4af8..21da581831 100644 --- a/packages/catalog-model/CHANGELOG.md +++ b/packages/catalog-model/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/catalog-model +## 1.1.2-next.0 + +### Patch Changes + +- 6f3b8d0962: Defer `ajv` compilation of schema validators to improve module-import performance +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 1.1.1 ### Patch Changes diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index ce2abee20a..f11dbe67c1 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/catalog-model", "description": "Types and validators that help describe the model of a Backstage Catalog", - "version": "1.1.1", + "version": "1.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 0f36ba5e56..79ace4911a 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,41 @@ # @backstage/cli +## 0.20.0-next.0 + +### Minor Changes + +- f368ad7279: **BREAKING**: Bumped `jest`, `jest-runtime`, and `jest-environment-jsdom` to v29. This is up from v27, so check out both the [v28](https://jestjs.io/docs/28.x/upgrading-to-jest28) and [v29](https://jestjs.io/docs/upgrading-to-jest29) (later [here](https://jestjs.io/docs/29.x/upgrading-to-jest29)) migration guides. + + Particular changes that where encountered in the main Backstage repo are: + + - The updated snapshot format. + - `jest.useFakeTimers('legacy')` is now `jest.useFakeTimers({ legacyFakeTimers: true })`. + - Error objects collected by `withLogCollector` from `@backstage/test-utils` are now objects with a `detail` property rather than a string. + +### Patch Changes + +- 3e309107ca: Updated fallback versions of dependencies in all templates. +- 292a088807: Added a new `repo test` command. +- ba63cae41c: Updated lockfile parsing to have better support for Yarn 3. +- 2dddb32fea: Switched the Jest transform for YAML files to use a custom one available at `@backstage/cli/config/jestYamlTransform.js`. +- a541a3a78a: Switch to upfront resolution of `swc-loader` in Webpack config. +- cfb3598410: Removed `tsx` and `jsx` as supported extensions in backend packages. For most + repos, this will not have any effect. But if you inadvertently had added some + `tsx`/`jsx` files to your backend package, you may now start to see `code: 'MODULE_NOT_FOUND'` errors when launching the backend locally. The reason for + this is that the offending files get ignored during transpilation. Hence, the + importing file can no longer find anything to import. + + The fix is to rename any `.tsx` files in your backend packages to `.ts` instead, + or `.jsx` to `.js`. + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/release-manifests@0.0.6 + - @backstage/types@1.0.0 + ## 0.19.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index b07f2a0263..9e54e01966 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.19.0", + "version": "0.20.0-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/codemods/CHANGELOG.md b/packages/codemods/CHANGELOG.md index 957910660a..233d550f88 100644 --- a/packages/codemods/CHANGELOG.md +++ b/packages/codemods/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/codemods +## 0.1.40-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + ## 0.1.39 ### Patch Changes diff --git a/packages/codemods/package.json b/packages/codemods/package.json index 4be7e5a31c..d25c933514 100644 --- a/packages/codemods/package.json +++ b/packages/codemods/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/codemods", "description": "A collection of codemods for Backstage projects", - "version": "0.1.39", + "version": "0.1.40-next.0", "publishConfig": { "access": "public", "main": "dist/index.cjs.js" diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md index f3cc482178..34d0c3bd50 100644 --- a/packages/config-loader/CHANGELOG.md +++ b/packages/config-loader/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/config-loader +## 1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 1.1.4 ### Patch Changes diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 15d622cf5d..ef899dd332 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "1.1.4", + "version": "1.1.5-next.0", "publishConfig": { "access": "public", "main": "dist/index.cjs.js", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index 7774d1aa5c..9993c4654f 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/config +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + ## 1.0.2 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index fec1fa88ad..14ae285fdf 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config", "description": "Config API used by Backstage core, backend, and CLI", - "version": "1.0.2", + "version": "1.0.3-next.0", "publishConfig": { "access": "public", "main": "dist/index.cjs.js", diff --git a/packages/core-app-api/CHANGELOG.md b/packages/core-app-api/CHANGELOG.md index 5ec66460c6..8c29b473c4 100644 --- a/packages/core-app-api/CHANGELOG.md +++ b/packages/core-app-api/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/core-app-api +## 1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + ## 1.1.0 ### Minor Changes diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index d3f8f04fc2..f2cc7037f6 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-app-api", "description": "Core app API used by Backstage apps", - "version": "1.1.0", + "version": "1.1.1-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/core-components/CHANGELOG.md b/packages/core-components/CHANGELOG.md index 66284b6bc6..05e1ddc6cb 100644 --- a/packages/core-components/CHANGELOG.md +++ b/packages/core-components/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/core-components +## 0.11.2-next.0 + +### Patch Changes + +- 882101cd9b: Deep-import LightAsync component to improve module-import speed +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/version-bridge@1.0.1 + ## 0.11.1 ### Patch Changes diff --git a/packages/core-components/package.json b/packages/core-components/package.json index 2c861c145a..a59c9f9de2 100644 --- a/packages/core-components/package.json +++ b/packages/core-components/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-components", "description": "Core components used by Backstage plugins and apps", - "version": "0.11.1", + "version": "0.11.2-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/core-plugin-api/CHANGELOG.md b/packages/core-plugin-api/CHANGELOG.md index 9671062a50..c7d13de30e 100644 --- a/packages/core-plugin-api/CHANGELOG.md +++ b/packages/core-plugin-api/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/core-plugin-api +## 1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + ## 1.0.6 ### Patch Changes diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index 71372e26f1..46e655c654 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-plugin-api", "description": "Core API used by Backstage plugins", - "version": "1.0.6", + "version": "1.0.7-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index c3b9164858..5d11588079 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/create-app +## 0.4.32-next.0 + +### Patch Changes + +- 58c2264325: Newly created Backstage repositories now use the stable version 6 of + `react-router`, just like the main repo does. Please let us know if you find any + issues with this. + + Migrating to the stable version of `react-router` is optional for the time + being. But if you want to do the same for your existing repository, please + follow [this + guide](https://backstage.io/docs/tutorials/react-router-stable-migration). + +- e05e0f021b: Update versions of packages used in the create-app template, to match those in the main repo +- 52f25858a8: Added `*.session.sql` Visual Studio Code database functionality files to `.gitignore` in the default template. This is optional but potentially helpful if your developers use Visual Studio Code; you can add a line with that exact value to your own root `.gitignore` if you want the same. +- 6d00e80146: Updated the root `test` scripts to use `backstage-cli repo test`. + + To apply this change to an existing app, make the following change to the root `package.json`: + + ```diff + - "test": "backstage-cli test", + - "test:all": "lerna run test -- --coverage", + + "test": "backstage-cli repo test", + + "test:all": "backstage-cli repo test --coverage", + ``` + +- Updated dependencies + - @backstage/cli-common@0.1.10 + ## 0.4.31 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index bb65d3b4ca..0af58bc911 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "A CLI that helps you create your own Backstage app", - "version": "0.4.31", + "version": "0.4.32-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 0f56fbb388..27ee9913f3 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/dev-utils +## 1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 1.0.6 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 4a43a0b8b3..9420fa01db 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "1.0.6", + "version": "1.0.7-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/errors/CHANGELOG.md b/packages/errors/CHANGELOG.md index aad6d660c3..d1ea777ad2 100644 --- a/packages/errors/CHANGELOG.md +++ b/packages/errors/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/errors +## 1.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + ## 1.1.1 ### Patch Changes diff --git a/packages/errors/package.json b/packages/errors/package.json index eb3627f1ba..d337704fbd 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/errors", "description": "Common utilities for error handling within Backstage", - "version": "1.1.1", + "version": "1.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/integration-react/CHANGELOG.md b/packages/integration-react/CHANGELOG.md index 29376adbab..d5dddcf7de 100644 --- a/packages/integration-react/CHANGELOG.md +++ b/packages/integration-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/integration-react +## 1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 1.1.4 ### Patch Changes diff --git a/packages/integration-react/package.json b/packages/integration-react/package.json index 3f23625aac..48a8498595 100644 --- a/packages/integration-react/package.json +++ b/packages/integration-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration-react", "description": "Frontend package for managing integrations towards external systems", - "version": "1.1.4", + "version": "1.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/integration/CHANGELOG.md b/packages/integration/CHANGELOG.md index 3aaeeb4d48..8152527cfd 100644 --- a/packages/integration/CHANGELOG.md +++ b/packages/integration/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/integration +## 1.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 1.3.1 ### Patch Changes diff --git a/packages/integration/package.json b/packages/integration/package.json index 6c2e070467..73f30509cc 100644 --- a/packages/integration/package.json +++ b/packages/integration/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/integration", "description": "Helpers for managing integrations towards external systems", - "version": "1.3.1", + "version": "1.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 982eb6c0de..099cc0a57b 100644 --- a/packages/techdocs-cli-embedded-app/CHANGELOG.md +++ b/packages/techdocs-cli-embedded-app/CHANGELOG.md @@ -1,5 +1,24 @@ # techdocs-cli-embedded-app +## 0.2.75-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/app-defaults@1.0.7-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.2.74 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 060735636b..3e75b535f2 100644 --- a/packages/techdocs-cli-embedded-app/package.json +++ b/packages/techdocs-cli-embedded-app/package.json @@ -1,6 +1,6 @@ { "name": "techdocs-cli-embedded-app", - "version": "0.2.74", + "version": "0.2.75-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index 377e44625b..e6f8519a97 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,26 @@ # @techdocs/cli +## 1.2.2-next.0 + +### Patch Changes + +- 0b2a30dead: fixing techdocs-cli Docker client creation + + Docker client does not need to be created when --no-docker + option is provided. + + If you had DOCKER_CERT_PATH environment variable defined + the Docker client was looking for certificates + and breaking techdocs-cli generate command even with --no-docker + option. + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-techdocs-node@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/cli-common@0.1.10 + - @backstage/config@1.0.3-next.0 + ## 1.2.1 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 2e74c28c62..77e37765b2 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "Utility CLI for managing TechDocs sites in Backstage.", - "version": "1.2.1", + "version": "1.2.2-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index 6258adff78..4778423725 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/test-utils +## 1.2.1-next.0 + +### Patch Changes + +- e05e0f021b: Align on the version of `@material-ui/icons` used, to `^4.9.1` like other packages in the main repo +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + ## 1.2.0 ### Minor Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 90f966ad97..8021137fb4 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "1.2.0", + "version": "1.2.1-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index f32be42f18..66c7e6a9ab 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-adr-backend +## 0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-adr-common@0.2.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index d8295c0e46..833bd057db 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/adr-common/CHANGELOG.md b/plugins/adr-common/CHANGELOG.md index 9a68db3d74..7f9e88e4e6 100644 --- a/plugins/adr-common/CHANGELOG.md +++ b/plugins/adr-common/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-adr-common +## 0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/adr-common/package.json b/plugins/adr-common/package.json index 02ae1d642d..ecf901869f 100644 --- a/plugins/adr-common/package.json +++ b/plugins/adr-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-adr-common", "description": "Common functionalities for the adr plugin", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/adr/CHANGELOG.md b/plugins/adr/CHANGELOG.md index 2fe9aacb31..e3be268d9d 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-adr +## 0.2.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-adr-common@0.2.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.2.1 ### Patch Changes diff --git a/plugins/adr/package.json b/plugins/adr/package.json index f64d901820..fa7543f803 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr", - "version": "0.2.1", + "version": "0.2.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/airbrake-backend/CHANGELOG.md b/plugins/airbrake-backend/CHANGELOG.md index 2e249ba14a..dde95dfb46 100644 --- a/plugins/airbrake-backend/CHANGELOG.md +++ b/plugins/airbrake-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-airbrake-backend +## 0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.2.9 ### Patch Changes diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index b79cdd80b1..2237277f40 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake-backend", - "version": "0.2.9", + "version": "0.2.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/airbrake/CHANGELOG.md b/plugins/airbrake/CHANGELOG.md index 2d03fb6ef2..94adddd369 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-airbrake +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/dev-utils@1.0.7-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.9 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 5dc54ea863..0c2d903c48 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/allure/CHANGELOG.md b/plugins/allure/CHANGELOG.md index 60dcd97b14..c9a0064652 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-allure +## 0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.25 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 3bfe92c6ee..9cd6980a86 100644 --- a/plugins/allure/package.json +++ b/plugins/allure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-allure", "description": "A Backstage plugin that integrates with Allure", - "version": "0.1.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/analytics-module-ga/CHANGELOG.md b/plugins/analytics-module-ga/CHANGELOG.md index 622257c75a..53112fc359 100644 --- a/plugins/analytics-module-ga/CHANGELOG.md +++ b/plugins/analytics-module-ga/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-analytics-module-ga +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.20 ### Patch Changes diff --git a/plugins/analytics-module-ga/package.json b/plugins/analytics-module-ga/package.json index 7e4ce38c20..e0759a1838 100644 --- a/plugins/analytics-module-ga/package.json +++ b/plugins/analytics-module-ga/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-analytics-module-ga", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/apache-airflow/CHANGELOG.md b/plugins/apache-airflow/CHANGELOG.md index 66b3d3120b..6971c8865b 100644 --- a/plugins/apache-airflow/CHANGELOG.md +++ b/plugins/apache-airflow/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-apache-airflow +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/apache-airflow/package.json b/plugins/apache-airflow/package.json index 5555fd35fc..3393caabc3 100644 --- a/plugins/apache-airflow/package.json +++ b/plugins/apache-airflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apache-airflow", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md index 339ad58f59..b6109ff8ad 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-api-docs +## 0.8.10-next.0 + +### Patch Changes + +- 3d5bb521ee: Updated dependency `@asyncapi/react-component` to `1.0.0-next.42`. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.8.9 ### Patch Changes diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 42cd8d5d74..c41a69c2d7 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-api-docs", "description": "A Backstage plugin that helps represent API entities in the frontend", - "version": "0.8.9", + "version": "0.8.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/apollo-explorer/CHANGELOG.md b/plugins/apollo-explorer/CHANGELOG.md index f4dfdc2d35..a2b184b1e3 100644 --- a/plugins/apollo-explorer/CHANGELOG.md +++ b/plugins/apollo-explorer/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-apollo-explorer +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.2 ### Patch Changes diff --git a/plugins/apollo-explorer/package.json b/plugins/apollo-explorer/package.json index 770af99853..70639fb3ab 100644 --- a/plugins/apollo-explorer/package.json +++ b/plugins/apollo-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-apollo-explorer", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index a6cf9ef532..5a78c4e920 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-app-backend +## 0.3.37-next.0 + +### Patch Changes + +- 11c9e0ad33: Added alpha plugin implementation for the new backend system. Available at `@backstage/plugin-app-backend/alpha`. +- Updated dependencies + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/config-loader@1.1.5-next.0 + - @backstage/types@1.0.0 + ## 0.3.36 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index d79ab46b12..74d8443452 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-backend", "description": "A Backstage backend plugin that serves the Backstage frontend app", - "version": "0.3.36", + "version": "0.3.37-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index 189a4a235f..bdb0a481b7 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/plugin-auth-backend +## 0.17.0-next.0 + +### Minor Changes + +- 5fa831ce55: CookieConfigurer can optionally return the `SameSite` cookie attribute. + CookieConfigurer now requires an additional argument `appOrigin` - the origin URL of the app - which is used to calculate the `SameSite` attribute. + defaultCookieConfigurer returns the `SameSite` attribute which defaults to `Lax`. In cases where an auth-backend is running on a different domain than the App, `SameSite=None` is used - but only for secure contexts. This is so that cookies can be included in third-party requests. + + OAuthAdapterOptions has been modified to require additional arguments, `baseUrl`, and `cookieConfigurer`. + OAuthAdapter now resolves cookie configuration using its supplied CookieConfigurer for each request to make sure that the proper attributes always are set. + +### Patch Changes + +- 8c6ec175bf: Fix GitLab provider setup so that it supports GitLab installations with a path in the URL. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 0.16.0 ### Minor Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index d3c4fc2724..3601907054 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend", "description": "A Backstage backend plugin that handles authentication", - "version": "0.16.0", + "version": "0.17.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-node/CHANGELOG.md b/plugins/auth-node/CHANGELOG.md index 24ce679c1e..e6c3171649 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-node +## 0.2.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.2.5 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index eac9d4e4d1..b42ebcb9cd 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.2.5", + "version": "0.2.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-devops-backend/CHANGELOG.md b/plugins/azure-devops-backend/CHANGELOG.md index 4f40ad3c6e..fb55855019 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-azure-devops-backend +## 0.3.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-azure-devops-common@0.3.0 + ## 0.3.15 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index c77860abe5..c5173bd79a 100644 --- a/plugins/azure-devops-backend/package.json +++ b/plugins/azure-devops-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops-backend", - "version": "0.3.15", + "version": "0.3.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 6ca86dfefa..66ab55c4e6 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-azure-devops +## 0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-azure-devops-common@0.3.0 + ## 0.2.0 ### Minor Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index 9785fdf2b3..a4917190dd 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index 8b842ca26a..d590c516df 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges-backend +## 0.1.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.1.30 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 0eaf8a9d0a..ad71549841 100644 --- a/plugins/badges-backend/package.json +++ b/plugins/badges-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges-backend", "description": "A Backstage backend plugin that generates README badges for your entities", - "version": "0.1.30", + "version": "0.1.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/badges/CHANGELOG.md b/plugins/badges/CHANGELOG.md index fff53440bc..d5d68973f6 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-badges +## 0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.2.33 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 2e8081f3f6..7eade1381d 100644 --- a/plugins/badges/package.json +++ b/plugins/badges/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-badges", "description": "A Backstage plugin that generates README badges for your entities", - "version": "0.2.33", + "version": "0.2.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bazaar-backend/CHANGELOG.md b/plugins/bazaar-backend/CHANGELOG.md index 805b1d2068..6a9d48270c 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-bazaar-backend +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.1.20 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 5f11c694f8..4aaaa73a2b 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bazaar/CHANGELOG.md b/plugins/bazaar/CHANGELOG.md index f936900cd8..72f92b559c 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-bazaar +## 0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/cli@0.20.0-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + ## 0.1.24 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 919f8a7df7..2a5c8ef28a 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "version": "0.1.24", + "version": "0.1.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index 0990b34b42..709ae51914 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.2.0-next.0 + +### Minor Changes + +- ad74723fbf: Update Bitbucket Cloud models to latest OAS version. + + The latest specification contained some BREAKING CHANGES + due to removed fields. + + All of these fields are not used at other plugins, though. + Therefore, this change has no impact on other modules here. + +### Patch Changes + +- Updated dependencies + - @backstage/integration@1.3.2-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index d61d353b34..b8faf79057 100644 --- a/plugins/bitbucket-cloud-common/package.json +++ b/plugins/bitbucket-cloud-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitbucket-cloud-common", "description": "Common functionalities for bitbucket-cloud plugins", - "version": "0.1.3", + "version": "0.2.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index 55eb78d63e..41ca3fbb8e 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-bitrise +## 0.1.37-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.36 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 1a7e586e5c..93b8bb0cff 100644 --- a/plugins/bitrise/package.json +++ b/plugins/bitrise/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-bitrise", "description": "A Backstage plugin that integrates towards Bitrise", - "version": "0.1.36", + "version": "0.1.37-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-aws/CHANGELOG.md b/plugins/catalog-backend-module-aws/CHANGELOG.md index ea6f2810e7..3ae4083b36 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.9 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index c921aad767..3033033091 100644 --- a/plugins/catalog-backend-module-aws/package.json +++ b/plugins/catalog-backend-module-aws/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-aws", "description": "A Backstage catalog backend module that helps integrate towards AWS", - "version": "0.1.9", + "version": "0.1.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-azure/CHANGELOG.md b/plugins/catalog-backend-module-azure/CHANGELOG.md index 51d9752af9..ba1ef35e98 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index afcfdf9f0f..977f31bd83 100644 --- a/plugins/catalog-backend-module-azure/package.json +++ b/plugins/catalog-backend-module-azure/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-azure", "description": "A Backstage catalog backend module that helps integrate towards Azure", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 453f6124ba..02ba2c3c40 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.1.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index 4fdebd65bd..d36d7c653e 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/package.json +++ b/plugins/catalog-backend-module-bitbucket-cloud/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-cloud", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket Cloud", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md index 5ec5a515bb..fd10f33ad2 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index d4e27a8ec6..a59d911797 100644 --- a/plugins/catalog-backend-module-bitbucket-server/package.json +++ b/plugins/catalog-backend-module-bitbucket-server/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket-server", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md index 9af08254eb..d7ca8562d9 100644 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-bitbucket +## 0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.0-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.2.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index 171493dfc2..2fb11897f4 100644 --- a/plugins/catalog-backend-module-bitbucket/package.json +++ b/plugins/catalog-backend-module-bitbucket/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-bitbucket", "description": "A Backstage catalog backend module that helps integrate towards Bitbucket", - "version": "0.2.3", + "version": "0.2.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index 2dc4229172..e26273fb8e 100644 --- a/plugins/catalog-backend-module-gerrit/CHANGELOG.md +++ b/plugins/catalog-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-gerrit +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 6a115ea481..0d26fd86b5 100644 --- a/plugins/catalog-backend-module-gerrit/package.json +++ b/plugins/catalog-backend-module-gerrit/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-gerrit", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index fa49109016..76b4808846 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-github +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 278f108a7b..23d9cbecfc 100644 --- a/plugins/catalog-backend-module-github/package.json +++ b/plugins/catalog-backend-module-github/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-github", "description": "A Backstage catalog backend module that helps integrate towards GitHub", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-gitlab/CHANGELOG.md b/plugins/catalog-backend-module-gitlab/CHANGELOG.md index d6b3cfb3d7..e5a9216b23 100644 --- a/plugins/catalog-backend-module-gitlab/CHANGELOG.md +++ b/plugins/catalog-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-gitlab +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index 457be11480..0c25a084f4 100644 --- a/plugins/catalog-backend-module-gitlab/package.json +++ b/plugins/catalog-backend-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-gitlab", "description": "A Backstage catalog backend module that helps integrate towards GitLab", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-ldap/CHANGELOG.md b/plugins/catalog-backend-module-ldap/CHANGELOG.md index 7e21490644..c0e3d69da2 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 0.5.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index ea00832f98..cf35fe6069 100644 --- a/plugins/catalog-backend-module-ldap/package.json +++ b/plugins/catalog-backend-module-ldap/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-ldap", "description": "A Backstage catalog backend module that helps integrate towards LDAP", - "version": "0.5.3", + "version": "0.5.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-msgraph/CHANGELOG.md b/plugins/catalog-backend-module-msgraph/CHANGELOG.md index aa601f1c3f..2102d5c84c 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.4.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 5a5b90832e..4e524f80c2 100644 --- a/plugins/catalog-backend-module-msgraph/package.json +++ b/plugins/catalog-backend-module-msgraph/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-msgraph", "description": "A Backstage catalog backend module that helps integrate towards Microsoft Graph", - "version": "0.4.2", + "version": "0.4.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-openapi/CHANGELOG.md b/plugins/catalog-backend-module-openapi/CHANGELOG.md index 81f356168e..5dba58c901 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index f3081f575b..f0b7767502 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-openapi", "description": "A Backstage catalog backend module that helps with OpenAPI specifications", - "version": "0.1.2", + "version": "0.1.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md index d702df4af0..7c866ba96a 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/plugin-catalog-backend +## 1.4.1-next.0 + +### Patch Changes + +- 8cb6e10105: Fixed a bug where entities provided without a location key would always replace existing entities, rather than updating them. +- 63296ebcd4: Allow Placeholder value to be any value, not only string. +- 74022e0163: Make sure to stitch entities correctly after deletion, to ensure that their relations are updated. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.4.0 ### Minor Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index f834b0e2e8..f5ab216a7f 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend", "description": "The Backstage backend plugin that provides the Backstage catalog", - "version": "1.4.0", + "version": "1.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-common/CHANGELOG.md b/plugins/catalog-common/CHANGELOG.md index 57600eb6a5..7ffbfcffdd 100644 --- a/plugins/catalog-common/CHANGELOG.md +++ b/plugins/catalog-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-catalog-common +## 1.0.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.0.6 ### Patch Changes diff --git a/plugins/catalog-common/package.json b/plugins/catalog-common/package.json index 357636341a..ecb53d35de 100644 --- a/plugins/catalog-common/package.json +++ b/plugins/catalog-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-common", "description": "Common functionalities for the catalog plugin", - "version": "1.0.6", + "version": "1.0.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-customized/CHANGELOG.md b/plugins/catalog-customized/CHANGELOG.md index 409c007eea..c4cd9671bc 100644 --- a/plugins/catalog-customized/CHANGELOG.md +++ b/plugins/catalog-customized/CHANGELOG.md @@ -1,5 +1,13 @@ # @internal/plugin-catalog-customized +## 0.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + ## 0.0.2 ### Patch Changes diff --git a/plugins/catalog-customized/package.json b/plugins/catalog-customized/package.json index a8ffbd7494..7a2cc4943a 100644 --- a/plugins/catalog-customized/package.json +++ b/plugins/catalog-customized/package.json @@ -1,7 +1,7 @@ { "name": "@internal/plugin-catalog-customized", "description": "The internal Backstage Customizable plugin for browsing the Backstage catalog", - "version": "0.0.2", + "version": "0.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-graph/CHANGELOG.md b/plugins/catalog-graph/CHANGELOG.md index 09a41b65c5..69a51713c4 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-graph +## 0.2.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.2.21 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index 88a45c4bde..ba1aa00023 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.2.21", + "version": "0.2.22-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md index f2280d2f0a..76f67b2327 100644 --- a/plugins/catalog-graphql/CHANGELOG.md +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-graphql +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + ## 0.3.13 ### Patch Changes diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index 7ad5fb68be..8d165e582b 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-graphql", "description": "An experimental Backstage catalog GraphQL module", - "version": "0.3.13", + "version": "0.3.14-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index a1c4d9145f..af9ebd0436 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-import +## 0.8.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.8.12 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 7ec45fc6ed..2a4ea4642c 100644 --- a/plugins/catalog-import/package.json +++ b/plugins/catalog-import/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-import", "description": "A Backstage plugin the helps you import entities into your catalog", - "version": "0.8.12", + "version": "0.8.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index f4c1782da2..77f7ae8360 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-node +## 1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 1.1.0 ### Minor Changes diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index 4bd1f5259b..0a7e687bb7 100644 --- a/plugins/catalog-node/package.json +++ b/plugins/catalog-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-node", "description": "The plugin-catalog-node module for @backstage/plugin-catalog-backend", - "version": "1.1.0", + "version": "1.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-react/CHANGELOG.md b/plugins/catalog-react/CHANGELOG.md index 00710c2f45..8ba602415b 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog-react +## 1.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + ## 1.1.4 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 759aa6e4a9..a04566c6da 100644 --- a/plugins/catalog-react/package.json +++ b/plugins/catalog-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-react", "description": "A frontend library that helps other Backstage plugins interact with the catalog", - "version": "1.1.4", + "version": "1.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index 57a1c60174..19fb7dfb65 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-catalog +## 1.5.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.5.1 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 99361b6a3d..c33ecd7af5 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog", "description": "The Backstage plugin for browsing the Backstage catalog", - "version": "1.5.1", + "version": "1.5.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index 01dd968ad6..3e71f4e6e7 100644 --- a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md +++ b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-cicd-statistics-module-gitlab +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-cicd-statistics@0.1.12-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index a8c4ef7dec..60c5f686e7 100644 --- a/plugins/cicd-statistics-module-gitlab/package.json +++ b/plugins/cicd-statistics-module-gitlab/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics-module-gitlab", "description": "CI/CD Statistics plugin module; Gitlab CICD", - "version": "0.1.5", + "version": "0.1.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cicd-statistics/CHANGELOG.md b/plugins/cicd-statistics/CHANGELOG.md index 6bda1cf68d..d72669ed40 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-cicd-statistics +## 0.1.12-next.0 + +### Patch Changes + +- e05e0f021b: Align on the version of `@material-ui/icons` used, to `^4.9.1` like other packages in the main repo +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + ## 0.1.11 ### Patch Changes diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index 1e1a7f95ad..5b6c9aa1e7 100644 --- a/plugins/cicd-statistics/package.json +++ b/plugins/cicd-statistics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cicd-statistics", "description": "A frontend plugin visualizing CI/CD pipeline statistics (build time)", - "version": "0.1.11", + "version": "0.1.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md index f020e67b0f..9533804049 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-circleci +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.9 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 7363bd98f0..cd587c4cc3 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-circleci", "description": "A Backstage plugin that integrates towards Circle CI", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md index 5c01b5be4b..6cc82d9d53 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-cloudbuild +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.9 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 3b20b28c3d..3fb2f18aff 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cloudbuild", "description": "A Backstage plugin that integrates towards Google Cloud Build", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-climate/CHANGELOG.md b/plugins/code-climate/CHANGELOG.md index 418421aafe..26b7d2b9f9 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-climate +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.9 ### Patch Changes diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 1863e3e080..449d9b7ffc 100644 --- a/plugins/code-climate/package.json +++ b/plugins/code-climate/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-code-climate", - "version": "0.1.9", + "version": "0.1.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-coverage-backend/CHANGELOG.md b/plugins/code-coverage-backend/CHANGELOG.md index 9001fbeab0..799565794d 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-code-coverage-backend +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 3cf9b2f087..96cdf80f71 100644 --- a/plugins/code-coverage-backend/package.json +++ b/plugins/code-coverage-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage-backend", "description": "A Backstage backend plugin that helps you keep track of your code coverage", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/code-coverage/CHANGELOG.md b/plugins/code-coverage/CHANGELOG.md index b8e384fbd7..4aec1be0ec 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-code-coverage +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.2.2 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index ab4e071ccc..0385818eec 100644 --- a/plugins/code-coverage/package.json +++ b/plugins/code-coverage/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-code-coverage", "description": "A Backstage plugin that helps you keep track of your code coverage", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/codescene/CHANGELOG.md b/plugins/codescene/CHANGELOG.md index b5d70d9d17..4a0362dd2a 100644 --- a/plugins/codescene/CHANGELOG.md +++ b/plugins/codescene/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-codescene +## 0.1.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.4 ### Patch Changes diff --git a/plugins/codescene/package.json b/plugins/codescene/package.json index 884b751347..7241a0ec50 100644 --- a/plugins/codescene/package.json +++ b/plugins/codescene/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-codescene", - "version": "0.1.4", + "version": "0.1.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/config-schema/CHANGELOG.md b/plugins/config-schema/CHANGELOG.md index 88d12a9da1..29ad9ec9a9 100644 --- a/plugins/config-schema/CHANGELOG.md +++ b/plugins/config-schema/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-config-schema +## 0.1.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + ## 0.1.32 ### Patch Changes diff --git a/plugins/config-schema/package.json b/plugins/config-schema/package.json index cf2cb6cf90..0043ad5e4e 100644 --- a/plugins/config-schema/package.json +++ b/plugins/config-schema/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-config-schema", "description": "A Backstage plugin that lets you browse the configuration schema of your app", - "version": "0.1.32", + "version": "0.1.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md index 1bb7d5aa75..ec52e4bb32 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-cost-insights +## 0.11.32-next.0 + +### Patch Changes + +- a94c2ed1b7: Fixed bug in `CostOverviewBreakdownChart` component where some datasets caused the cost overview breakdown chart to tear. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-cost-insights-common@0.1.1 + ## 0.11.31 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index fc128f405f..42f3dad27d 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-cost-insights", "description": "A Backstage plugin that helps you keep track of your cloud spend", - "version": "0.11.31", + "version": "0.11.32-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index ae367016e3..c0fb7e0eec 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-dynatrace +## 0.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.2.0 ### Minor Changes diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index d8b3cb06a8..fa7cf7d6a8 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "0.2.0", + "version": "0.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list-backend/CHANGELOG.md b/plugins/example-todo-list-backend/CHANGELOG.md index 5bc46323d8..8bccbf814a 100644 --- a/plugins/example-todo-list-backend/CHANGELOG.md +++ b/plugins/example-todo-list-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @internal/plugin-todo-list-backend +## 1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 1.0.5 ### Patch Changes diff --git a/plugins/example-todo-list-backend/package.json b/plugins/example-todo-list-backend/package.json index 295aad4021..3b7c6e1249 100644 --- a/plugins/example-todo-list-backend/package.json +++ b/plugins/example-todo-list-backend/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-backend", - "version": "1.0.5", + "version": "1.0.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list-common/CHANGELOG.md b/plugins/example-todo-list-common/CHANGELOG.md index 3754f768ab..a92fef02e4 100644 --- a/plugins/example-todo-list-common/CHANGELOG.md +++ b/plugins/example-todo-list-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @internal/plugin-todo-list-common +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 1.0.4 ### Patch Changes diff --git a/plugins/example-todo-list-common/package.json b/plugins/example-todo-list-common/package.json index 32dfe96ef4..bebd595acb 100644 --- a/plugins/example-todo-list-common/package.json +++ b/plugins/example-todo-list-common/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list-common", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/example-todo-list/CHANGELOG.md b/plugins/example-todo-list/CHANGELOG.md index be969303aa..661cd7e12c 100644 --- a/plugins/example-todo-list/CHANGELOG.md +++ b/plugins/example-todo-list/CHANGELOG.md @@ -1,5 +1,14 @@ # @internal/plugin-todo-list +## 1.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 1.0.5 ### Patch Changes diff --git a/plugins/example-todo-list/package.json b/plugins/example-todo-list/package.json index 9b66c0c0a9..2bf669e26e 100644 --- a/plugins/example-todo-list/package.json +++ b/plugins/example-todo-list/package.json @@ -1,6 +1,6 @@ { "name": "@internal/plugin-todo-list", - "version": "1.0.5", + "version": "1.0.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore-react/CHANGELOG.md b/plugins/explore-react/CHANGELOG.md index e35dae9e32..56d159ac05 100644 --- a/plugins/explore-react/CHANGELOG.md +++ b/plugins/explore-react/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-explore-react +## 0.0.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-plugin-api@1.0.7-next.0 + ## 0.0.21 ### Patch Changes diff --git a/plugins/explore-react/package.json b/plugins/explore-react/package.json index 66ac17f785..fcd2a1efb7 100644 --- a/plugins/explore-react/package.json +++ b/plugins/explore-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore-react", "description": "A frontend library for Backstage plugins that want to interact with the explore plugin", - "version": "0.0.21", + "version": "0.0.22-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md index 3e803d2d6b..7abc27a32c 100644 --- a/plugins/explore/CHANGELOG.md +++ b/plugins/explore/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-explore +## 0.3.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-explore-react@0.0.22-next.0 + ## 0.3.40 ### Patch Changes diff --git a/plugins/explore/package.json b/plugins/explore/package.json index b9b9257a3a..4a384477ef 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-explore", "description": "A Backstage plugin for building an exploration page of your software ecosystem", - "version": "0.3.40", + "version": "0.3.41-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/firehydrant/CHANGELOG.md b/plugins/firehydrant/CHANGELOG.md index eae65d3c36..d96cce5cbc 100644 --- a/plugins/firehydrant/CHANGELOG.md +++ b/plugins/firehydrant/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-firehydrant +## 0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.1.26 ### Patch Changes diff --git a/plugins/firehydrant/package.json b/plugins/firehydrant/package.json index 37aa7b259b..06327ff88f 100644 --- a/plugins/firehydrant/package.json +++ b/plugins/firehydrant/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-firehydrant", "description": "A Backstage plugin that integrates towards FireHydrant", - "version": "0.1.26", + "version": "0.1.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/fossa/CHANGELOG.md b/plugins/fossa/CHANGELOG.md index 3126dbc0e1..86f8e91105 100644 --- a/plugins/fossa/CHANGELOG.md +++ b/plugins/fossa/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-fossa +## 0.2.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.2.41 ### Patch Changes diff --git a/plugins/fossa/package.json b/plugins/fossa/package.json index bf249c1b9d..433a0cc650 100644 --- a/plugins/fossa/package.json +++ b/plugins/fossa/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-fossa", "description": "A Backstage plugin that integrates towards FOSSA", - "version": "0.2.41", + "version": "0.2.42-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gcalendar/CHANGELOG.md b/plugins/gcalendar/CHANGELOG.md index 2be25841e7..b6ee05094f 100644 --- a/plugins/gcalendar/CHANGELOG.md +++ b/plugins/gcalendar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-gcalendar +## 0.3.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.3.5 ### Patch Changes diff --git a/plugins/gcalendar/package.json b/plugins/gcalendar/package.json index 9ef566e95c..0aba7bfdd7 100644 --- a/plugins/gcalendar/package.json +++ b/plugins/gcalendar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcalendar", - "version": "0.3.5", + "version": "0.3.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md index d4e54838c4..a562180d9a 100644 --- a/plugins/gcp-projects/CHANGELOG.md +++ b/plugins/gcp-projects/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gcp-projects +## 0.3.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.28 ### Patch Changes diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index d2926de41b..49142c1caa 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gcp-projects", "description": "A Backstage plugin that helps you manage projects in GCP", - "version": "0.3.28", + "version": "0.3.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/git-release-manager/CHANGELOG.md b/plugins/git-release-manager/CHANGELOG.md index 0c7f930e60..a534e2bd7e 100644 --- a/plugins/git-release-manager/CHANGELOG.md +++ b/plugins/git-release-manager/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-git-release-manager +## 0.3.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 0.3.22 ### Patch Changes diff --git a/plugins/git-release-manager/package.json b/plugins/git-release-manager/package.json index 89061cc510..392c826587 100644 --- a/plugins/git-release-manager/package.json +++ b/plugins/git-release-manager/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-git-release-manager", "description": "A Backstage plugin that helps you manage releases in git", - "version": "0.3.22", + "version": "0.3.23-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md index 4a0ca4dce0..287c22f7e2 100644 --- a/plugins/github-actions/CHANGELOG.md +++ b/plugins/github-actions/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-github-actions +## 0.5.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 0.5.9 ### Patch Changes diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 596e844c11..fd7bfbc241 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-actions", "description": "A Backstage plugin that integrates towards GitHub Actions", - "version": "0.5.9", + "version": "0.5.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-deployments/CHANGELOG.md b/plugins/github-deployments/CHANGELOG.md index 244a610d0c..e47456ea5c 100644 --- a/plugins/github-deployments/CHANGELOG.md +++ b/plugins/github-deployments/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-github-deployments +## 0.1.41-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.40 ### Patch Changes diff --git a/plugins/github-deployments/package.json b/plugins/github-deployments/package.json index a0f94015dd..c44482bce7 100644 --- a/plugins/github-deployments/package.json +++ b/plugins/github-deployments/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-deployments", "description": "A Backstage plugin that integrates towards GitHub Deployments", - "version": "0.1.40", + "version": "0.1.41-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-issues/CHANGELOG.md b/plugins/github-issues/CHANGELOG.md index 8519b5cc08..37c52b7476 100644 --- a/plugins/github-issues/CHANGELOG.md +++ b/plugins/github-issues/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-github-issues +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.1 ### Patch Changes diff --git a/plugins/github-issues/package.json b/plugins/github-issues/package.json index c393e4db8a..52e4672380 100644 --- a/plugins/github-issues/package.json +++ b/plugins/github-issues/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-issues", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/github-pull-requests-board/CHANGELOG.md b/plugins/github-pull-requests-board/CHANGELOG.md index 061fca1187..0358aa4e10 100644 --- a/plugins/github-pull-requests-board/CHANGELOG.md +++ b/plugins/github-pull-requests-board/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-github-pull-requests-board +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.3 ### Patch Changes diff --git a/plugins/github-pull-requests-board/package.json b/plugins/github-pull-requests-board/package.json index 62826918a9..ae573fc8a1 100644 --- a/plugins/github-pull-requests-board/package.json +++ b/plugins/github-pull-requests-board/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-github-pull-requests-board", "description": "A Backstage plugin that allows you to see all open Pull Requests for all the repositories owned by your team", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md index 0845dcf919..dc680ff1fd 100644 --- a/plugins/gitops-profiles/CHANGELOG.md +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-gitops-profiles +## 0.3.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.27 ### Patch Changes diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 9c2114a91f..6f745ed8c5 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gitops-profiles", "description": "A Backstage plugin that helps you manage GitOps profiles", - "version": "0.3.27", + "version": "0.3.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/gocd/CHANGELOG.md b/plugins/gocd/CHANGELOG.md index aa676a8c77..f6664edaf5 100644 --- a/plugins/gocd/CHANGELOG.md +++ b/plugins/gocd/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-gocd +## 0.1.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.15 ### Patch Changes diff --git a/plugins/gocd/package.json b/plugins/gocd/package.json index 6ed5489b61..ade65eb063 100644 --- a/plugins/gocd/package.json +++ b/plugins/gocd/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-gocd", "description": "A Backstage plugin that integrates towards GoCD", - "version": "0.1.15", + "version": "0.1.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md index fbd18a82db..1e43bc3737 100644 --- a/plugins/graphiql/CHANGELOG.md +++ b/plugins/graphiql/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-graphiql +## 0.2.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.2.41 ### Patch Changes diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 2ad33b0f9a..698293d0b9 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.2.41", + "version": "0.2.42-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/plugins/graphql-backend/CHANGELOG.md b/plugins/graphql-backend/CHANGELOG.md index d25668d794..2527142b05 100644 --- a/plugins/graphql-backend/CHANGELOG.md +++ b/plugins/graphql-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-graphql-backend +## 0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-graphql@0.3.14-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.1.26 ### Patch Changes diff --git a/plugins/graphql-backend/package.json b/plugins/graphql-backend/package.json index 8575323fe6..53138c05c2 100644 --- a/plugins/graphql-backend/package.json +++ b/plugins/graphql-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphql-backend", "description": "An experimental Backstage backend plugin for GraphQL", - "version": "0.1.26", + "version": "0.1.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/home/CHANGELOG.md b/plugins/home/CHANGELOG.md index bbeec680e2..71ca1fdd22 100644 --- a/plugins/home/CHANGELOG.md +++ b/plugins/home/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-home +## 0.4.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-stack-overflow@0.1.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.4.25 ### Patch Changes diff --git a/plugins/home/package.json b/plugins/home/package.json index bfa3d388c3..069c66d216 100644 --- a/plugins/home/package.json +++ b/plugins/home/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-home", "description": "A Backstage plugin that helps you build a home page", - "version": "0.4.25", + "version": "0.4.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/ilert/CHANGELOG.md b/plugins/ilert/CHANGELOG.md index 9c228fdf99..bb3c172397 100644 --- a/plugins/ilert/CHANGELOG.md +++ b/plugins/ilert/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-ilert +## 0.1.36-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.35 ### Patch Changes diff --git a/plugins/ilert/package.json b/plugins/ilert/package.json index 391a9e495d..550cc7b556 100644 --- a/plugins/ilert/package.json +++ b/plugins/ilert/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-ilert", "description": "A Backstage plugin that integrates towards iLert", - "version": "0.1.35", + "version": "0.1.36-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/jenkins-backend/CHANGELOG.md b/plugins/jenkins-backend/CHANGELOG.md index 693c0d2988..66b0c6c4c0 100644 --- a/plugins/jenkins-backend/CHANGELOG.md +++ b/plugins/jenkins-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-jenkins-backend +## 0.1.27-next.0 + +### Patch Changes + +- b19ea927af: Fixed a bug where `extraRequestHeaders` configuration was ignored. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-jenkins-common@0.1.9-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.1.26 ### Patch Changes diff --git a/plugins/jenkins-backend/package.json b/plugins/jenkins-backend/package.json index 7c2203a866..9eb11fba49 100644 --- a/plugins/jenkins-backend/package.json +++ b/plugins/jenkins-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins-backend", "description": "A Backstage backend plugin that integrates towards Jenkins", - "version": "0.1.26", + "version": "0.1.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/jenkins-common/CHANGELOG.md b/plugins/jenkins-common/CHANGELOG.md index a1d29726fd..8e9941a981 100644 --- a/plugins/jenkins-common/CHANGELOG.md +++ b/plugins/jenkins-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-jenkins-common +## 0.1.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.1.8 ### Patch Changes diff --git a/plugins/jenkins-common/package.json b/plugins/jenkins-common/package.json index fd752b9d84..fb6d5eb667 100644 --- a/plugins/jenkins-common/package.json +++ b/plugins/jenkins-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins-common", - "version": "0.1.8", + "version": "0.1.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md index ff4612ba8f..a906a9a103 100644 --- a/plugins/jenkins/CHANGELOG.md +++ b/plugins/jenkins/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-jenkins +## 0.7.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-jenkins-common@0.1.9-next.0 + ## 0.7.8 ### Patch Changes diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 18b4507b48..64e019abc5 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-jenkins", "description": "A Backstage plugin that integrates towards Jenkins", - "version": "0.7.8", + "version": "0.7.9-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kafka-backend/CHANGELOG.md b/plugins/kafka-backend/CHANGELOG.md index 8294bcd1aa..f3f523d678 100644 --- a/plugins/kafka-backend/CHANGELOG.md +++ b/plugins/kafka-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-kafka-backend +## 0.2.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.2.29 ### Patch Changes diff --git a/plugins/kafka-backend/package.json b/plugins/kafka-backend/package.json index 5c56582454..0c9a69e718 100644 --- a/plugins/kafka-backend/package.json +++ b/plugins/kafka-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka-backend", "description": "A Backstage backend plugin that integrates towards Kafka", - "version": "0.2.29", + "version": "0.2.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kafka/CHANGELOG.md b/plugins/kafka/CHANGELOG.md index ca3383b39e..fcebee37c1 100644 --- a/plugins/kafka/CHANGELOG.md +++ b/plugins/kafka/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-kafka +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.9 ### Patch Changes diff --git a/plugins/kafka/package.json b/plugins/kafka/package.json index 228b2d6bc9..95e181f83e 100644 --- a/plugins/kafka/package.json +++ b/plugins/kafka/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kafka", "description": "A Backstage plugin that integrates towards Kafka", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md index 135bb3cd6e..a05cc878d0 100644 --- a/plugins/kubernetes-backend/CHANGELOG.md +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-kubernetes-backend +## 0.7.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-kubernetes-common@0.4.3-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.7.2 ### Patch Changes diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 9adb3d4c22..22d787ca9f 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-backend", "description": "A Backstage backend plugin that integrates towards Kubernetes", - "version": "0.7.2", + "version": "0.7.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes-common/CHANGELOG.md b/plugins/kubernetes-common/CHANGELOG.md index dd5e74b384..422affb318 100644 --- a/plugins/kubernetes-common/CHANGELOG.md +++ b/plugins/kubernetes-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-kubernetes-common +## 0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + ## 0.4.2 ### Patch Changes diff --git a/plugins/kubernetes-common/package.json b/plugins/kubernetes-common/package.json index 5baa12800d..421e8f3cbf 100644 --- a/plugins/kubernetes-common/package.json +++ b/plugins/kubernetes-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-common", "description": "Common functionalities for kubernetes, to be shared between kubernetes and kubernetes-backend plugin", - "version": "0.4.2", + "version": "0.4.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md index b5909b8c01..b7feeafcc1 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-kubernetes +## 0.7.3-next.0 + +### Patch Changes + +- 51af8361de: Add useCustomResources react hook for fetching Kubernetes Custom Resources +- 35a6cfe257: Fix infinite call bug in `useCustomResources` hook +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-kubernetes-common@0.4.3-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.7.2 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index a6c3171529..cdfad6fbbb 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes", "description": "A Backstage plugin that integrates towards Kubernetes", - "version": "0.7.2", + "version": "0.7.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 7980f276d6..3914ae516e 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-lighthouse +## 0.3.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.9 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 78ae3237cb..dde57d77e6 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse", "description": "A Backstage plugin that integrates towards Lighthouse", - "version": "0.3.9", + "version": "0.3.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/newrelic-dashboard/CHANGELOG.md b/plugins/newrelic-dashboard/CHANGELOG.md index bd9d5cd4ca..7c4f6f5e27 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-newrelic-dashboard +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 986ebd44ab..0d81bc3f66 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md index 66adaffc65..c0b4f96b8d 100644 --- a/plugins/newrelic/CHANGELOG.md +++ b/plugins/newrelic/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-newrelic +## 0.3.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.27 ### Patch Changes diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index c76f73c41a..c7ec8f46a0 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-newrelic", "description": "A Backstage plugin that integrates towards New Relic", - "version": "0.3.27", + "version": "0.3.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/org/CHANGELOG.md b/plugins/org/CHANGELOG.md index 7e535db9e5..5357d2ff65 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-org +## 0.5.10-next.0 + +### Patch Changes + +- f2b4b55636: consistently show parent and child relations in group profile card +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.5.9 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index 9fb4b45a32..8a483bf339 100644 --- a/plugins/org/package.json +++ b/plugins/org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-org", "description": "A Backstage plugin that helps you create entity pages for your organization", - "version": "0.5.9", + "version": "0.5.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/pagerduty/CHANGELOG.md b/plugins/pagerduty/CHANGELOG.md index b4fdd60fae..2eb8eddf82 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-pagerduty +## 0.5.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.5.2 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 4909465deb..a847aebc58 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "A Backstage plugin that integrates towards PagerDuty", - "version": "0.5.2", + "version": "0.5.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/periskop-backend/CHANGELOG.md b/plugins/periskop-backend/CHANGELOG.md index d23f635d8d..04ee622c30 100644 --- a/plugins/periskop-backend/CHANGELOG.md +++ b/plugins/periskop-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-periskop-backend +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.1.7 ### Patch Changes diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index 4704370394..10f179f04e 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop-backend", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/periskop/CHANGELOG.md b/plugins/periskop/CHANGELOG.md index b4258a2d73..38213b4b25 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-periskop +## 0.1.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.7 ### Patch Changes diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index 94ec1fdc21..449a9f99c1 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.7", + "version": "0.1.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-backend/CHANGELOG.md b/plugins/permission-backend/CHANGELOG.md index 9dad2e00fb..d2979ee5dd 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-permission-backend +## 0.5.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.5.11 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index 234e633482..fcb478873f 100644 --- a/plugins/permission-backend/package.json +++ b/plugins/permission-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-backend", - "version": "0.5.11", + "version": "0.5.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-common/CHANGELOG.md b/plugins/permission-common/CHANGELOG.md index b906ac0038..9342d9b7ca 100644 --- a/plugins/permission-common/CHANGELOG.md +++ b/plugins/permission-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-permission-common +## 0.6.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.6.4 ### Patch Changes diff --git a/plugins/permission-common/package.json b/plugins/permission-common/package.json index e83131387a..fcf1c47ea6 100644 --- a/plugins/permission-common/package.json +++ b/plugins/permission-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-common", "description": "Isomorphic types and client for Backstage permissions and authorization", - "version": "0.6.4", + "version": "0.6.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 0543ac4e43..62c8aaf739 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-permission-node +## 0.6.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.6.5 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 354aced054..5461c2132e 100644 --- a/plugins/permission-node/package.json +++ b/plugins/permission-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-node", "description": "Common permission and authorization utilities for backend plugins", - "version": "0.6.5", + "version": "0.6.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-react/CHANGELOG.md b/plugins/permission-react/CHANGELOG.md index c69fe65e0a..28cea96b81 100644 --- a/plugins/permission-react/CHANGELOG.md +++ b/plugins/permission-react/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-permission-react +## 0.4.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.4.5 ### Patch Changes diff --git a/plugins/permission-react/package.json b/plugins/permission-react/package.json index faaca8829f..131c3dc846 100644 --- a/plugins/permission-react/package.json +++ b/plugins/permission-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-permission-react", - "version": "0.4.5", + "version": "0.4.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist-backend/CHANGELOG.md b/plugins/playlist-backend/CHANGELOG.md index ca4ab28ba7..e9a4eb2ec8 100644 --- a/plugins/playlist-backend/CHANGELOG.md +++ b/plugins/playlist-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-playlist-backend +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-playlist-common@0.1.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/playlist-backend/package.json b/plugins/playlist-backend/package.json index ae472da767..9e4ab86020 100644 --- a/plugins/playlist-backend/package.json +++ b/plugins/playlist-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist-backend", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist-common/CHANGELOG.md b/plugins/playlist-common/CHANGELOG.md index 1c7ae8af12..c6764ea083 100644 --- a/plugins/playlist-common/CHANGELOG.md +++ b/plugins/playlist-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-playlist-common +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/playlist-common/package.json b/plugins/playlist-common/package.json index 87dbc7d9f5..a2f230f58e 100644 --- a/plugins/playlist-common/package.json +++ b/plugins/playlist-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-playlist-common", "description": "Common functionalities for the playlist plugin", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/playlist/CHANGELOG.md b/plugins/playlist/CHANGELOG.md index f4be6fc149..41751a7358 100644 --- a/plugins/playlist/CHANGELOG.md +++ b/plugins/playlist/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-playlist +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + - @backstage/plugin-playlist-common@0.1.1-next.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/playlist/package.json b/plugins/playlist/package.json index 7da8d4ba08..0fa58bb47b 100644 --- a/plugins/playlist/package.json +++ b/plugins/playlist/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index 329827d9de..4020656c4d 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-proxy-backend +## 0.2.31-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.2.30 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 553c43051d..c715fdb825 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-proxy-backend", "description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend", - "version": "0.2.30", + "version": "0.2.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md index 6700252ae2..ae59a12779 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar-backend +## 0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + ## 0.1.33 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index aca54df1b2..ca6cc724cf 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar-backend", "description": "A Backstage backend plugin that integrates towards Rollbar", - "version": "0.1.33", + "version": "0.1.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md index c6c7e427ed..a58d313a93 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-rollbar +## 0.4.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.4.9 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 6c31befc6b..2235ed58c2 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-rollbar", "description": "A Backstage plugin that integrates towards Rollbar", - "version": "0.4.9", + "version": "0.4.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index e8f57c5426..d539849c1b 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.2.11 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 200b7bffa0..af3825353a 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.2.11", + "version": "0.2.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index 649d08dca0..1afd281015 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 0.4.4 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 9418190ece..2ed8f584e5 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.4.4", + "version": "0.4.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index 6a0ddacab6..8c67a21ccc 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend@1.7.0-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + ## 0.2.9 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index a7fa872f6d..ade31cec48 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.2.9", + "version": "0.2.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 3c7624553c..65c7ede856 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-scaffolder-backend +## 1.7.0-next.0 + +### Minor Changes + +- 253453fa14: Added a new property called `additionalTemplateGlobals` which allows you to add global functions to the scaffolder nunjucks templates. +- 304305dd20: Add `allowAutoMerge` option for `publish:github` action +- 694bfe2d61: Add functionality to shutdown scaffolder tasks if they are stale + +### Patch Changes + +- b681275e69: Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-plugin-api@0.1.3-next.0 + - @backstage/plugin-catalog-backend@1.4.1-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-node@1.1.1-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/types@1.0.0 + ## 1.6.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 35f7fe01e2..acb397db17 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-backend", "description": "The Backstage backend plugin that helps you create new things", - "version": "1.6.0", + "version": "1.7.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index 4d05c26cee..e04a0a760d 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-scaffolder-common +## 1.2.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 1.2.0 ### Minor Changes diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index ab7508d215..a302844e33 100644 --- a/plugins/scaffolder-common/package.json +++ b/plugins/scaffolder-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-common", "description": "Common functionalities for the scaffolder, to be shared between scaffolder and scaffolder-backend plugin", - "version": "1.2.0", + "version": "1.2.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 2c1640c5e8..97ad56bfed 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-scaffolder +## 1.7.0-next.0 + +### Minor Changes + +- f13d5f3f06: Add support for link to TechDocs and other links defined in template entity specification metadata on TemplateCard +- 05f22193c5: EntityPickers now support flags to control when to include default namespace + in result + +### Patch Changes + +- 8960d83013: Add support for `allowedOrganizations` and `allowedOwners` to the `AzureRepoPicker`. +- b681275e69: Ignore .git directories in Template Editor, increase upload limit for dry-runs to 10MB. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-scaffolder-common@1.2.1-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-react@0.4.6-next.0 + ## 1.6.0 ### Minor Changes diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 0debc7dd23..f4fef354da 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder", "description": "The Backstage plugin that helps you create new things", - "version": "1.6.0", + "version": "1.7.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend-module-elasticsearch/CHANGELOG.md b/plugins/search-backend-module-elasticsearch/CHANGELOG.md index 0ee3827314..19d50ab86c 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.0.2 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index b161905d75..3eda1c2169 100644 --- a/plugins/search-backend-module-elasticsearch/package.json +++ b/plugins/search-backend-module-elasticsearch/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-elasticsearch", "description": "A module for the search backend that implements search using ElasticSearch", - "version": "1.0.2", + "version": "1.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend-module-pg/CHANGELOG.md b/plugins/search-backend-module-pg/CHANGELOG.md index 59b0989c58..a206f62ac1 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-search-backend-module-pg +## 0.4.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.4.0 ### Minor Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 8af9d8a4c8..dea998bbef 100644 --- a/plugins/search-backend-module-pg/package.json +++ b/plugins/search-backend-module-pg/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-pg", "description": "A module for the search backend that implements search using PostgreSQL", - "version": "0.4.0", + "version": "0.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend-node/CHANGELOG.md b/plugins/search-backend-node/CHANGELOG.md index d35568c247..8846a909b8 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend-node +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.0.2 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index 43f8597fd5..25e4533568 100644 --- a/plugins/search-backend-node/package.json +++ b/plugins/search-backend-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-node", "description": "A library for Backstage backend plugins that want to interact with the search backend plugin", - "version": "1.0.2", + "version": "1.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend/CHANGELOG.md b/plugins/search-backend/CHANGELOG.md index f29b600616..252d035949 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-search-backend +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/plugin-permission-node@0.6.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-backend-node@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.0.2 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index d01a8b2ff0..ddfca888a2 100644 --- a/plugins/search-backend/package.json +++ b/plugins/search-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend", "description": "The Backstage backend plugin that provides your backstage app with search", - "version": "1.0.2", + "version": "1.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-common/CHANGELOG.md b/plugins/search-common/CHANGELOG.md index b17e92a074..694fb15e32 100644 --- a/plugins/search-common/CHANGELOG.md +++ b/plugins/search-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-search-common +## 1.0.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + ## 1.0.1 ### Patch Changes diff --git a/plugins/search-common/package.json b/plugins/search-common/package.json index 0907468fdd..7ab8033565 100644 --- a/plugins/search-common/package.json +++ b/plugins/search-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-common", "description": "Common functionalities for Search, to be shared between various search-enabled plugins", - "version": "1.0.1", + "version": "1.0.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/plugins/search-react/CHANGELOG.md b/plugins/search-react/CHANGELOG.md index d3ad8d6067..c218062d18 100644 --- a/plugins/search-react/CHANGELOG.md +++ b/plugins/search-react/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-react +## 1.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.1.0 ### Minor Changes diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index d3b8105076..7b33d87438 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-react", - "version": "1.1.0", + "version": "1.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search/CHANGELOG.md b/plugins/search/CHANGELOG.md index 0d353dff58..8080517944 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-search +## 1.0.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/version-bridge@1.0.1 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.0.2 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index f25c8a11f1..ad867f5a8b 100644 --- a/plugins/search/package.json +++ b/plugins/search/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search", "description": "The Backstage plugin that provides your backstage app with search", - "version": "1.0.2", + "version": "1.0.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md index e9e11ab5eb..003faea8a6 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sentry +## 0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.4.2 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 65cac51b8f..4386a7a17f 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sentry", "description": "A Backstage plugin that integrates towards Sentry", - "version": "0.4.2", + "version": "0.4.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/shortcuts/CHANGELOG.md b/plugins/shortcuts/CHANGELOG.md index 3664d5713b..1dcafa9ec0 100644 --- a/plugins/shortcuts/CHANGELOG.md +++ b/plugins/shortcuts/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-shortcuts +## 0.3.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + ## 0.3.1 ### Patch Changes diff --git a/plugins/shortcuts/package.json b/plugins/shortcuts/package.json index e0eda5cd4c..67302d2d5d 100644 --- a/plugins/shortcuts/package.json +++ b/plugins/shortcuts/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-shortcuts", "description": "A Backstage plugin that provides a shortcuts feature to the sidebar", - "version": "0.3.1", + "version": "0.3.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/sonarqube-backend/CHANGELOG.md b/plugins/sonarqube-backend/CHANGELOG.md index 485559c8b1..51d48eb26f 100644 --- a/plugins/sonarqube-backend/CHANGELOG.md +++ b/plugins/sonarqube-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-sonarqube-backend +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/sonarqube-backend/package.json b/plugins/sonarqube-backend/package.json index 2552407db8..db68be22af 100644 --- a/plugins/sonarqube-backend/package.json +++ b/plugins/sonarqube-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube-backend", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index af84e29a46..fab80c5cbe 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sonarqube +## 0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.4.1 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index a06019e867..ce1740ec33 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.4.1", + "version": "0.4.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/splunk-on-call/CHANGELOG.md b/plugins/splunk-on-call/CHANGELOG.md index 7c85846970..0c1359bd3c 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-splunk-on-call +## 0.3.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.3.33 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index f52594b8dd..cbdf12e838 100644 --- a/plugins/splunk-on-call/package.json +++ b/plugins/splunk-on-call/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-splunk-on-call", "description": "A Backstage plugin that integrates towards Splunk On-Call", - "version": "0.3.33", + "version": "0.3.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/stack-overflow-backend/CHANGELOG.md b/plugins/stack-overflow-backend/CHANGELOG.md index a12465231d..5e5766f204 100644 --- a/plugins/stack-overflow-backend/CHANGELOG.md +++ b/plugins/stack-overflow-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-stack-overflow-backend +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/cli@0.20.0-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index 4407219bf2..e7e124c9e8 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow-backend", - "version": "0.1.5", + "version": "0.1.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/stack-overflow/CHANGELOG.md b/plugins/stack-overflow/CHANGELOG.md index 0d1fa8a8ec..7aa46f99e9 100644 --- a/plugins/stack-overflow/CHANGELOG.md +++ b/plugins/stack-overflow/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-stack-overflow +## 0.1.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-home@0.4.26-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 0.1.5 ### Patch Changes diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index 2a1884280d..4cc2065090 100644 --- a/plugins/stack-overflow/package.json +++ b/plugins/stack-overflow/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-stack-overflow", - "version": "0.1.5", + "version": "0.1.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md index 1a07c089ab..b1ae5c7f18 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + ## 0.1.20 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 8109697054..a93867856b 100644 --- a/plugins/tech-insights-backend-module-jsonfc/package.json +++ b/plugins/tech-insights-backend-module-jsonfc/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend-module-jsonfc", - "version": "0.1.20", + "version": "0.1.21-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-insights-backend/CHANGELOG.md b/plugins/tech-insights-backend/CHANGELOG.md index 846dad6e33..6fc14dbb97 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-tech-insights-backend +## 0.5.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-tech-insights-node@0.3.5-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + ## 0.5.2 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index d2d1838bc1..b28d40915d 100644 --- a/plugins/tech-insights-backend/package.json +++ b/plugins/tech-insights-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-backend", - "version": "0.5.2", + "version": "0.5.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-insights-common/CHANGELOG.md b/plugins/tech-insights-common/CHANGELOG.md index 0482f80fb0..0658d2a187 100644 --- a/plugins/tech-insights-common/CHANGELOG.md +++ b/plugins/tech-insights-common/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-tech-insights-common +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/types@1.0.0 + ## 0.2.6 ### Patch Changes diff --git a/plugins/tech-insights-common/package.json b/plugins/tech-insights-common/package.json index fda306c580..24180c436a 100644 --- a/plugins/tech-insights-common/package.json +++ b/plugins/tech-insights-common/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-common", - "version": "0.2.6", + "version": "0.2.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-insights-node/CHANGELOG.md b/plugins/tech-insights-node/CHANGELOG.md index fc2bc73476..dea7a9435b 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-tech-insights-node +## 0.3.5-next.0 + +### Patch Changes + +- 0963b4d5fb: Updated package role to be `node-library`. +- Updated dependencies + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/types@1.0.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + ## 0.3.4 ### Patch Changes diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 81554199a9..50503686cc 100644 --- a/plugins/tech-insights-node/package.json +++ b/plugins/tech-insights-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights-node", - "version": "0.3.4", + "version": "0.3.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-insights/CHANGELOG.md b/plugins/tech-insights/CHANGELOG.md index 3418b08943..c0cd9a7900 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-tech-insights +## 0.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + - @backstage/plugin-tech-insights-common@0.2.7-next.0 + ## 0.3.0 ### Minor Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 8a839daaf3..f308017fa0 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-insights", - "version": "0.3.0", + "version": "0.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md index c445592f15..52884953e4 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-tech-radar +## 0.5.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 0.5.16 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index 19bd64d67c..841056b0ad 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-tech-radar", "description": "A Backstage plugin that lets you display a Tech Radar for your organization", - "version": "0.5.16", + "version": "0.5.17-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/techdocs-addons-test-utils/CHANGELOG.md b/plugins/techdocs-addons-test-utils/CHANGELOG.md index 3af34f56d8..ce5385598f 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/test-utils@1.2.1-next.0 + - @backstage/plugin-catalog@1.5.2-next.0 + - @backstage/plugin-techdocs@1.3.3-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/theme@0.2.16 + ## 1.0.4 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index b891a28679..fe1d245af0 100644 --- a/plugins/techdocs-addons-test-utils/package.json +++ b/plugins/techdocs-addons-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-addons-test-utils", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md index 0d41beac1b..b5fd861fcb 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-techdocs-backend +## 1.3.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/plugin-techdocs-node@1.4.1-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-catalog-common@1.0.7-next.0 + - @backstage/plugin-permission-common@0.6.5-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.3.0 ### Minor Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index d31bc9fe84..659306195e 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-backend", "description": "The Backstage backend plugin that renders technical documentation for your components", - "version": "1.3.0", + "version": "1.3.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/techdocs-module-addons-contrib/CHANGELOG.md b/plugins/techdocs-module-addons-contrib/CHANGELOG.md index e735bb0e04..5043b43762 100644 --- a/plugins/techdocs-module-addons-contrib/CHANGELOG.md +++ b/plugins/techdocs-module-addons-contrib/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-techdocs-module-addons-contrib +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + ## 1.0.4 ### Patch Changes diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index a5a054dd9f..56a65537be 100644 --- a/plugins/techdocs-module-addons-contrib/package.json +++ b/plugins/techdocs-module-addons-contrib/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-module-addons-contrib", "description": "Plugin module for contributed TechDocs Addons", - "version": "1.0.4", + "version": "1.0.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/techdocs-node/CHANGELOG.md b/plugins/techdocs-node/CHANGELOG.md index b14edde938..a0c61ccf9c 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-techdocs-node +## 1.4.1-next.0 + +### Patch Changes + +- 0b2a30dead: fixing techdocs-cli Docker client creation + + Docker client does not need to be created when --no-docker + option is provided. + + If you had DOCKER_CERT_PATH environment variable defined + the Docker client was looking for certificates + and breaking techdocs-cli generate command even with --no-docker + option. + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.4.0 ### Minor Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index c096f5199c..c11fdddd6a 100644 --- a/plugins/techdocs-node/package.json +++ b/plugins/techdocs-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-node", "description": "Common node.js functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli", - "version": "1.4.0", + "version": "1.4.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/plugins/techdocs-react/CHANGELOG.md b/plugins/techdocs-react/CHANGELOG.md index 869f63f4de..6b5ce64c77 100644 --- a/plugins/techdocs-react/CHANGELOG.md +++ b/plugins/techdocs-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-techdocs-react +## 1.0.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/version-bridge@1.0.1 + ## 1.0.4 ### Patch Changes diff --git a/plugins/techdocs-react/package.json b/plugins/techdocs-react/package.json index a7f469a4a9..31807d45bc 100644 --- a/plugins/techdocs-react/package.json +++ b/plugins/techdocs-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs-react", "description": "Shared frontend utilities for TechDocs and Addons", - "version": "1.0.4", + "version": "1.0.5-next.0", "publishConfig": { "access": "public", "alphaTypes": "dist/index.alpha.d.ts", diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index ba3a0e0e8a..1198aaedd3 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-techdocs +## 1.3.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/plugin-techdocs-react@1.0.5-next.0 + - @backstage/integration-react@1.1.5-next.0 + - @backstage/plugin-search-react@1.1.1-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/plugin-search-common@1.0.2-next.0 + ## 1.3.2 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index ec8c1bf515..b3a3be05d2 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-techdocs", "description": "The Backstage plugin that renders technical documentation for your components", - "version": "1.3.2", + "version": "1.3.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/todo-backend/CHANGELOG.md b/plugins/todo-backend/CHANGELOG.md index 72e176f85a..4ed6287b14 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-todo-backend +## 0.1.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/catalog-client@1.1.1-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/integration@1.3.2-next.0 + ## 0.1.33 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index 5ac93bc1bd..d4ee6bfa5f 100644 --- a/plugins/todo-backend/package.json +++ b/plugins/todo-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo-backend", "description": "A Backstage backend plugin that lets you browse TODO comments in your source code", - "version": "0.1.33", + "version": "0.1.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/todo/CHANGELOG.md b/plugins/todo/CHANGELOG.md index f4cd9f07ca..aea5c84b1c 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-todo +## 0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.2.11 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index 9c9956a1ef..ece247b42e 100644 --- a/plugins/todo/package.json +++ b/plugins/todo/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-todo", "description": "A Backstage plugin that lets you browse TODO comments in your source code", - "version": "0.2.11", + "version": "0.2.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/user-settings-backend/CHANGELOG.md b/plugins/user-settings-backend/CHANGELOG.md index 10c62e7b09..6d8dc95983 100644 --- a/plugins/user-settings-backend/CHANGELOG.md +++ b/plugins/user-settings-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-user-settings-backend +## 0.1.1-next.0 + +### Patch Changes + +- 82ac9bcfe5: Fix wrong import statement in `README.md`. +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/plugin-auth-node@0.2.6-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/types@1.0.0 + ## 0.1.0 ### Minor Changes diff --git a/plugins/user-settings-backend/package.json b/plugins/user-settings-backend/package.json index 429d12d3d3..68cc1f86f9 100644 --- a/plugins/user-settings-backend/package.json +++ b/plugins/user-settings-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings-backend", "description": "The Backstage backend plugin to manage user settings", - "version": "0.1.0", + "version": "0.1.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md index 42d11f365a..d5f74aaa22 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-user-settings +## 0.5.0-next.0 + +### Minor Changes + +- 5543e86660: **BREAKING**: The `apiRef` passed to `ProviderSettingsItem` now needs to + implement `ProfileInfoApi & SessionApi`, rather than just the latter. This is + unlikely to have an effect on most users though, since the builtin auth + providers generally implement both. + + Fixed settings page showing providers as logged out when the user is using more + than one provider, and displayed some additional login information. + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-app-api@1.1.1-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + - @backstage/types@1.0.0 + ## 0.4.8 ### Patch Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index e00cf09bb8..0c4daaeef0 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-user-settings", "description": "A Backstage plugin that provides a settings page", - "version": "0.4.8", + "version": "0.5.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/vault-backend/CHANGELOG.md b/plugins/vault-backend/CHANGELOG.md index fbdf60722d..5d5e1d2247 100644 --- a/plugins/vault-backend/CHANGELOG.md +++ b/plugins/vault-backend/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-vault-backend +## 0.2.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-test-utils@0.1.29-next.0 + - @backstage/backend-common@0.15.2-next.0 + - @backstage/backend-tasks@0.3.6-next.0 + - @backstage/config@1.0.3-next.0 + - @backstage/errors@1.1.2-next.0 + ## 0.2.2 ### Patch Changes diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index e4f0774b45..e594eaf3a3 100644 --- a/plugins/vault-backend/package.json +++ b/plugins/vault-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault-backend", "description": "A Backstage backend plugin that integrates towards Vault", - "version": "0.2.2", + "version": "0.2.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md index 5f646bd441..635eecaacb 100644 --- a/plugins/vault/CHANGELOG.md +++ b/plugins/vault/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-vault +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.1.2-next.0 + - @backstage/core-components@0.11.2-next.0 + - @backstage/plugin-catalog-react@1.1.5-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.1.3 ### Patch Changes diff --git a/plugins/vault/package.json b/plugins/vault/package.json index 843434be41..94f099a73f 100644 --- a/plugins/vault/package.json +++ b/plugins/vault/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault", "description": "A Backstage plugin that integrates towards Vault", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/xcmetrics/CHANGELOG.md b/plugins/xcmetrics/CHANGELOG.md index 62726efa29..8536effe4f 100644 --- a/plugins/xcmetrics/CHANGELOG.md +++ b/plugins/xcmetrics/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-xcmetrics +## 0.2.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-components@0.11.2-next.0 + - @backstage/core-plugin-api@1.0.7-next.0 + - @backstage/errors@1.1.2-next.0 + - @backstage/theme@0.2.16 + ## 0.2.29 ### Patch Changes diff --git a/plugins/xcmetrics/package.json b/plugins/xcmetrics/package.json index afed40f10d..ab6712b611 100644 --- a/plugins/xcmetrics/package.json +++ b/plugins/xcmetrics/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-xcmetrics", "description": "A Backstage plugin that shows XCode build metrics for your components", - "version": "0.2.29", + "version": "0.2.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/yarn.lock b/yarn.lock index ab32864850..df1404ad33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3153,6 +3153,17 @@ __metadata: languageName: unknown linkType: soft +"@backstage/catalog-client@npm:^1.1.0": + version: 1.1.0 + resolution: "@backstage/catalog-client@npm:1.1.0" + dependencies: + "@backstage/catalog-model": ^1.1.1 + "@backstage/errors": ^1.1.1 + cross-fetch: ^3.1.5 + checksum: 54ee5c193bbebd46d71dbfc259e2ba6958d1f492e1b5f31a9ca17add95b7daaaa0a6f51b03a2a1bb7207c9e5f36a16cc40bd2f3cce7381e577f61249625c5b20 + languageName: node + linkType: hard + "@backstage/catalog-client@workspace:^, @backstage/catalog-client@workspace:packages/catalog-client": version: 0.0.0-use.local resolution: "@backstage/catalog-client@workspace:packages/catalog-client" @@ -3165,7 +3176,22 @@ __metadata: languageName: unknown linkType: soft -"@backstage/catalog-model@^1.0.0, @backstage/catalog-model@workspace:^, @backstage/catalog-model@workspace:packages/catalog-model": +"@backstage/catalog-model@npm:^1.0.0, @backstage/catalog-model@npm:^1.1.1": + version: 1.1.1 + resolution: "@backstage/catalog-model@npm:1.1.1" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/errors": ^1.1.1 + "@backstage/types": ^1.0.0 + ajv: ^8.10.0 + json-schema: ^0.4.0 + lodash: ^4.17.21 + uuid: ^8.0.0 + checksum: 32b38c59b40b8ebbabbced27fe996305ba739015eb20fad20c6e106d9058a81f05fee4878fac801e074a8f316702fd2c5c16af35c4b827defe83400320070658 + languageName: node + linkType: hard + +"@backstage/catalog-model@workspace:^, @backstage/catalog-model@workspace:packages/catalog-model": version: 0.0.0-use.local resolution: "@backstage/catalog-model@workspace:packages/catalog-model" dependencies: @@ -3379,6 +3405,16 @@ __metadata: languageName: unknown linkType: soft +"@backstage/config@npm:^1.0.2": + version: 1.0.2 + resolution: "@backstage/config@npm:1.0.2" + dependencies: + "@backstage/types": ^1.0.0 + lodash: ^4.17.21 + checksum: 452c9fd47247974552bb8d53cfebcab120d37f60a209da74ec06b1408b1ae6464c8f61404d0d071eb7b70ece0aaa5462d02e9cc5713a21744795a8b9db3f80ce + languageName: node + linkType: hard + "@backstage/config@workspace:^, @backstage/config@workspace:packages/config": version: 0.0.0-use.local resolution: "@backstage/config@workspace:packages/config" @@ -3425,7 +3461,58 @@ __metadata: languageName: unknown linkType: soft -"@backstage/core-components@^0.11.0, @backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": +"@backstage/core-components@npm:^0.11.0, @backstage/core-components@npm:^0.11.1": + version: 0.11.1 + resolution: "@backstage/core-components@npm:0.11.1" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/errors": ^1.1.1 + "@backstage/theme": ^0.2.16 + "@backstage/version-bridge": ^1.0.1 + "@material-table/core": ^3.1.0 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.57 + "@react-hookz/web": ^15.0.0 + "@types/react-sparklines": ^1.7.0 + "@types/react-text-truncate": ^0.14.0 + ansi-regex: ^6.0.1 + classnames: ^2.2.6 + d3-selection: ^3.0.0 + d3-shape: ^3.0.0 + d3-zoom: ^3.0.0 + dagre: ^0.8.5 + history: ^5.0.0 + immer: ^9.0.1 + lodash: ^4.17.21 + pluralize: ^8.0.0 + prop-types: ^15.7.2 + qs: ^6.9.4 + rc-progress: 3.4.0 + react-helmet: 6.1.0 + react-hook-form: ^7.12.2 + react-markdown: ^8.0.0 + react-sparklines: ^1.7.0 + react-syntax-highlighter: ^15.4.5 + react-text-truncate: ^0.19.0 + react-use: ^17.3.2 + react-virtualized-auto-sizer: ^1.0.6 + react-window: ^1.8.6 + remark-gfm: ^3.0.1 + zen-observable: ^0.8.15 + zod: ^3.11.6 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + react-dom: ^16.13.1 || ^17.0.0 + react-router: 6.0.0-beta.0 || ^6.3.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: 91f185253d6fba47d3c7c93f37cc318f2b59f790efc518c1f207c976b0bc3153993d87365802e97ba66fb12f373fd2fa61eb99f2390a133a6e1ae69396cad346 + languageName: node + linkType: hard + +"@backstage/core-components@workspace:^, @backstage/core-components@workspace:packages/core-components": version: 0.0.0-use.local resolution: "@backstage/core-components@workspace:packages/core-components" dependencies: @@ -3497,7 +3584,25 @@ __metadata: languageName: unknown linkType: soft -"@backstage/core-plugin-api@^1.0.0, @backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": +"@backstage/core-plugin-api@npm:^1.0.0, @backstage/core-plugin-api@npm:^1.0.6": + version: 1.0.6 + resolution: "@backstage/core-plugin-api@npm:1.0.6" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/types": ^1.0.0 + "@backstage/version-bridge": ^1.0.1 + history: ^5.0.0 + prop-types: ^15.7.2 + zen-observable: ^0.8.15 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: ee44e5b1c6fe59f67ca55f7d0777873937a9c2ec6d33c6bf9c30f7d3063f3366b8680578854f5abdecee4aa1f71d1844c82100c87abd20b637ea385c8dd89618 + languageName: node + linkType: hard + +"@backstage/core-plugin-api@workspace:^, @backstage/core-plugin-api@workspace:packages/core-plugin-api": version: 0.0.0-use.local resolution: "@backstage/core-plugin-api@workspace:packages/core-plugin-api" dependencies: @@ -3582,6 +3687,17 @@ __metadata: languageName: unknown linkType: soft +"@backstage/errors@npm:^1.1.1": + version: 1.1.1 + resolution: "@backstage/errors@npm:1.1.1" + dependencies: + "@backstage/types": ^1.0.0 + cross-fetch: ^3.1.5 + serialize-error: ^8.0.1 + checksum: 8983eba72212a545bd3543d71f796b9836aacecfd85d6ac67a5a37da4af5566b8267533547ffc9caa01969c6c08a2197569626206aa84cb18fbfe4bf03ca8328 + languageName: node + linkType: hard + "@backstage/errors@workspace:^, @backstage/errors@workspace:packages/errors": version: 0.0.0-use.local resolution: "@backstage/errors@workspace:packages/errors" @@ -3593,7 +3709,26 @@ __metadata: languageName: unknown linkType: soft -"@backstage/integration-react@^1.0.0, @backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": +"@backstage/integration-react@npm:^1.0.0": + version: 1.1.4 + resolution: "@backstage/integration-react@npm:1.1.4" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/core-components": ^0.11.1 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/integration": ^1.3.1 + "@backstage/theme": ^0.2.16 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.57 + react-use: ^17.2.4 + peerDependencies: + react: ^16.13.1 || ^17.0.0 + checksum: c17e7e8a545e551fb246a6e879c37975a8dc3bdfe0db04998cbb940bea5ece7df328353f8193764ce68e9f0df14af8cb1a6549bfe8f15a2160312b7339040be6 + languageName: node + linkType: hard + +"@backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": version: 0.0.0-use.local resolution: "@backstage/integration-react@workspace:packages/integration-react" dependencies: @@ -3620,6 +3755,22 @@ __metadata: languageName: unknown linkType: soft +"@backstage/integration@npm:^1.3.1": + version: 1.3.1 + resolution: "@backstage/integration@npm:1.3.1" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/errors": ^1.1.1 + "@octokit/auth-app": ^4.0.0 + "@octokit/rest": ^19.0.3 + cross-fetch: ^3.1.5 + git-url-parse: ^13.0.0 + lodash: ^4.17.21 + luxon: ^3.0.0 + checksum: e684f6ab52e8ef25db49f8fda38407a6d3153a30d1fbea7615a39af9cdfa8ba064a0b13a09658a28edc3364202bd673d8ceee34f7ec46567a302cfbed3ea945b + languageName: node + linkType: hard + "@backstage/integration@workspace:^, @backstage/integration@workspace:packages/integration": version: 0.0.0-use.local resolution: "@backstage/integration@workspace:packages/integration" @@ -4548,6 +4699,16 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-catalog-common@npm:^1.0.6": + version: 1.0.6 + resolution: "@backstage/plugin-catalog-common@npm:1.0.6" + dependencies: + "@backstage/plugin-permission-common": ^0.6.4 + "@backstage/plugin-search-common": ^1.0.1 + checksum: a4f227cc0339ce41a954f024f62752fdda148331ca94dc6d5e90186e67b66e3dd2182467709478309d9eb3031309549afd179742ce182a6dd16f9cbd58550e5c + languageName: node + linkType: hard + "@backstage/plugin-catalog-common@workspace:^, @backstage/plugin-catalog-common@workspace:plugins/catalog-common": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-common@workspace:plugins/catalog-common" @@ -4673,7 +4834,41 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-react@^1.0.0, @backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": +"@backstage/plugin-catalog-react@npm:^1.0.0, @backstage/plugin-catalog-react@npm:^1.1.4": + version: 1.1.4 + resolution: "@backstage/plugin-catalog-react@npm:1.1.4" + dependencies: + "@backstage/catalog-client": ^1.1.0 + "@backstage/catalog-model": ^1.1.1 + "@backstage/core-components": ^0.11.1 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/errors": ^1.1.1 + "@backstage/integration": ^1.3.1 + "@backstage/plugin-catalog-common": ^1.0.6 + "@backstage/plugin-permission-common": ^0.6.4 + "@backstage/plugin-permission-react": ^0.4.5 + "@backstage/theme": ^0.2.16 + "@backstage/types": ^1.0.0 + "@backstage/version-bridge": ^1.0.1 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.57 + classnames: ^2.2.6 + jwt-decode: ^3.1.0 + lodash: ^4.17.21 + qs: ^6.9.4 + react-use: ^17.2.4 + yaml: ^2.0.0 + zen-observable: ^0.8.15 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + react-router: 6.0.0-beta.0 || ^6.3.0 + checksum: 6e0f0405d734a5d8316b490ceee761aadac5cf8e037f4532339b736ddfc61b434ed3b761ed6027c52e492d4592fbbbd0ad0fee260d3e9f6bcd756cedb43cc930 + languageName: node + linkType: hard + +"@backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-react@workspace:plugins/catalog-react" dependencies: @@ -5562,7 +5757,31 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-home@^0.4.19, @backstage/plugin-home@workspace:^, @backstage/plugin-home@workspace:plugins/home": +"@backstage/plugin-home@npm:^0.4.19, @backstage/plugin-home@npm:^0.4.25": + version: 0.4.25 + resolution: "@backstage/plugin-home@npm:0.4.25" + dependencies: + "@backstage/catalog-model": ^1.1.1 + "@backstage/config": ^1.0.2 + "@backstage/core-components": ^0.11.1 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/plugin-catalog-react": ^1.1.4 + "@backstage/plugin-stack-overflow": ^0.1.5 + "@backstage/theme": ^0.2.16 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.57 + lodash: ^4.17.21 + react-use: ^17.2.4 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + react-router: 6.0.0-beta.0 || ^6.3.0 + checksum: 76610e6caa8db980c37aa01bb39e6bdb6254a7c765155de2195b377a0d2b45aa3fbaa197c7429405f4fa67c617b3ba10353d0bcd1b820744024462feed206ec4 + languageName: node + linkType: hard + +"@backstage/plugin-home@workspace:^, @backstage/plugin-home@workspace:plugins/home": version: 0.0.0-use.local resolution: "@backstage/plugin-home@workspace:plugins/home" dependencies: @@ -6064,6 +6283,19 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-permission-common@npm:^0.6.4": + version: 0.6.4 + resolution: "@backstage/plugin-permission-common@npm:0.6.4" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/errors": ^1.1.1 + cross-fetch: ^3.1.5 + uuid: ^8.0.0 + zod: ^3.11.6 + checksum: 35e2b43e822a08c5e51cbfef1d797b1e8795bf252e65bab9fb2683d90778edc68586223fc1b714229743943732db4a9abbe9a44d8b3dba383e01ee9075efbc90 + languageName: node + linkType: hard + "@backstage/plugin-permission-common@workspace:^, @backstage/plugin-permission-common@workspace:plugins/permission-common": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-common@workspace:plugins/permission-common" @@ -6099,6 +6331,24 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-permission-react@npm:^0.4.5": + version: 0.4.5 + resolution: "@backstage/plugin-permission-react@npm:0.4.5" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/plugin-permission-common": ^0.6.4 + cross-fetch: ^3.1.5 + react-use: ^17.2.4 + swr: ^1.1.2 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + react-router: 6.0.0-beta.0 || ^6.3.0 + checksum: bfe7827a7e0a4cc91884ff4943bc0810f9fe3bc992f9cb5784687523df5a0ff68c6e2e68db4b6cc2e3bbbd3bc72db5126688c8b9f63d9a3ae402d7353f363456 + languageName: node + linkType: hard + "@backstage/plugin-permission-react@workspace:^, @backstage/plugin-permission-react@workspace:plugins/permission-react": version: 0.0.0-use.local resolution: "@backstage/plugin-permission-react@workspace:plugins/permission-react" @@ -6571,6 +6821,16 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-search-common@npm:^1.0.1": + version: 1.0.1 + resolution: "@backstage/plugin-search-common@npm:1.0.1" + dependencies: + "@backstage/plugin-permission-common": ^0.6.4 + "@backstage/types": ^1.0.0 + checksum: 62f9d2d3175f9433f0c4f6cf29a5c3462af91ab95bf01bb6450604993ed2704a6ea1db91e114b601e450f1dddcdd44601cefdd6be1dfdb9d4863a16a23cbba1b + languageName: node + linkType: hard + "@backstage/plugin-search-common@workspace:^, @backstage/plugin-search-common@workspace:plugins/search-common": version: 0.0.0-use.local resolution: "@backstage/plugin-search-common@workspace:plugins/search-common" @@ -6812,6 +7072,30 @@ __metadata: languageName: unknown linkType: soft +"@backstage/plugin-stack-overflow@npm:^0.1.5": + version: 0.1.5 + resolution: "@backstage/plugin-stack-overflow@npm:0.1.5" + dependencies: + "@backstage/config": ^1.0.2 + "@backstage/core-components": ^0.11.1 + "@backstage/core-plugin-api": ^1.0.6 + "@backstage/plugin-home": ^0.4.25 + "@backstage/plugin-search-common": ^1.0.1 + "@backstage/theme": ^0.2.16 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@testing-library/jest-dom": ^5.10.1 + cross-fetch: ^3.1.5 + lodash: ^4.17.21 + qs: ^6.9.4 + react-use: ^17.2.4 + peerDependencies: + "@types/react": ^16.13.1 || ^17.0.0 + react: ^16.13.1 || ^17.0.0 + checksum: 0f005664f5c7f75a67c6aece733ec47ca8d256859a9502659ae97a4d4cb57b3feeae1d18a4b8ef04340fe49d4915a2b8d84f9119f923cb6d908a1d275a384a89 + languageName: node + linkType: hard + "@backstage/plugin-stack-overflow@workspace:^, @backstage/plugin-stack-overflow@workspace:plugins/stack-overflow": version: 0.0.0-use.local resolution: "@backstage/plugin-stack-overflow@workspace:plugins/stack-overflow" @@ -7437,7 +7721,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/theme@^0.2.6, @backstage/theme@^0.2.7, @backstage/theme@^0.2.9, @backstage/theme@workspace:^, @backstage/theme@workspace:packages/theme": +"@backstage/theme@^0.2.16, @backstage/theme@^0.2.6, @backstage/theme@^0.2.7, @backstage/theme@^0.2.9, @backstage/theme@workspace:^, @backstage/theme@workspace:packages/theme": version: 0.0.0-use.local resolution: "@backstage/theme@workspace:packages/theme" dependencies: @@ -7446,7 +7730,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/types@workspace:^, @backstage/types@workspace:packages/types": +"@backstage/types@^1.0.0, @backstage/types@workspace:^, @backstage/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@backstage/types@workspace:packages/types" dependencies: @@ -7456,7 +7740,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": +"@backstage/version-bridge@^1.0.1, @backstage/version-bridge@workspace:^, @backstage/version-bridge@workspace:packages/version-bridge": version: 0.0.0-use.local resolution: "@backstage/version-bridge@workspace:packages/version-bridge" dependencies: From deb286a78f1e603356c18e8bf9d55d5575cb1d6a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 00:01:26 +0000 Subject: [PATCH 156/279] chore(deps): update dependency @types/lodash to v4.14.185 Signed-off-by: Renovate Bot --- yarn.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index ab32864850..b672fe3e0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3174,7 +3174,7 @@ __metadata: "@backstage/errors": "workspace:^" "@backstage/types": "workspace:^" "@types/json-schema": ^7.0.5 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 ajv: ^8.10.0 json-schema: ^0.4.0 lodash: ^4.17.21 @@ -4263,7 +4263,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 aws-sdk: ^2.840.0 aws-sdk-mock: ^5.2.1 lodash: ^4.17.21 @@ -4288,7 +4288,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4350,7 +4350,7 @@ __metadata: "@backstage/plugin-bitbucket-cloud-common": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4397,7 +4397,7 @@ __metadata: "@backstage/plugin-catalog-node": "workspace:^" "@backstage/types": "workspace:^" "@octokit/graphql": ^5.0.0 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4420,7 +4420,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 "@types/uuid": ^8.0.0 lodash: ^4.17.21 msw: ^0.47.0 @@ -4442,7 +4442,7 @@ __metadata: "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" "@types/ldapjs": ^2.2.0 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 ldapjs: ^2.2.0 lodash: ^4.17.21 uuid: ^8.0.0 @@ -4463,7 +4463,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@microsoft/microsoft-graph-types": ^2.6.0 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 "@types/node-fetch": ^2.5.12 lodash: ^4.17.21 msw: ^0.47.0 @@ -4519,7 +4519,7 @@ __metadata: "@types/core-js": ^2.5.4 "@types/express": ^4.17.6 "@types/git-url-parse": ^9.0.0 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 "@types/supertest": ^2.0.8 "@types/uuid": ^8.0.0 better-sqlite3: ^7.5.0 @@ -5710,7 +5710,7 @@ __metadata: "@backstage/errors": "workspace:^" "@types/express": ^4.17.6 "@types/jest-when": ^3.5.0 - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 express: ^4.17.1 express-promise-router: ^4.1.0 jest-when: ^3.1.0 @@ -6049,7 +6049,7 @@ __metadata: "@backstage/plugin-permission-common": "workspace:^" "@backstage/plugin-permission-node": "workspace:^" "@types/express": "*" - "@types/lodash": ^4.14.151 + "@types/lodash": ^4.14.173 "@types/supertest": ^2.0.8 dataloader: ^2.0.0 express: ^4.17.1 @@ -13527,7 +13527,7 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.14.151, @types/lodash@npm:^4.14.173, @types/lodash@npm:^4.14.175": +"@types/lodash@npm:^4.14.173, @types/lodash@npm:^4.14.175": version: 4.14.184 resolution: "@types/lodash@npm:4.14.184" checksum: 6d9a4d67f7f9d0ec3fd21174f3dd3d00629dc1227eb469450eace53adbc1f7e2330699c28d0fe093e5f0fef0f0e763098be1f779268857213224af082b62be21 From 6118ad8f69f14b9122a8296984786bbd8580b141 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 27 Sep 2022 13:03:32 +0200 Subject: [PATCH 157/279] yarn.lock: fix lodash bump Signed-off-by: Patrik Oldsberg --- yarn.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/yarn.lock b/yarn.lock index b672fe3e0a..5c5e5d902e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3174,7 +3174,7 @@ __metadata: "@backstage/errors": "workspace:^" "@backstage/types": "workspace:^" "@types/json-schema": ^7.0.5 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 ajv: ^8.10.0 json-schema: ^0.4.0 lodash: ^4.17.21 @@ -4263,7 +4263,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 aws-sdk: ^2.840.0 aws-sdk-mock: ^5.2.1 lodash: ^4.17.21 @@ -4288,7 +4288,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4350,7 +4350,7 @@ __metadata: "@backstage/plugin-bitbucket-cloud-common": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4397,7 +4397,7 @@ __metadata: "@backstage/plugin-catalog-node": "workspace:^" "@backstage/types": "workspace:^" "@octokit/graphql": ^5.0.0 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 lodash: ^4.17.21 msw: ^0.47.0 node-fetch: ^2.6.7 @@ -4420,7 +4420,7 @@ __metadata: "@backstage/integration": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 "@types/uuid": ^8.0.0 lodash: ^4.17.21 msw: ^0.47.0 @@ -4442,7 +4442,7 @@ __metadata: "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/types": "workspace:^" "@types/ldapjs": ^2.2.0 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 ldapjs: ^2.2.0 lodash: ^4.17.21 uuid: ^8.0.0 @@ -4463,7 +4463,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@microsoft/microsoft-graph-types": ^2.6.0 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 "@types/node-fetch": ^2.5.12 lodash: ^4.17.21 msw: ^0.47.0 @@ -4519,7 +4519,7 @@ __metadata: "@types/core-js": ^2.5.4 "@types/express": ^4.17.6 "@types/git-url-parse": ^9.0.0 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 "@types/supertest": ^2.0.8 "@types/uuid": ^8.0.0 better-sqlite3: ^7.5.0 @@ -5710,7 +5710,7 @@ __metadata: "@backstage/errors": "workspace:^" "@types/express": ^4.17.6 "@types/jest-when": ^3.5.0 - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 express: ^4.17.1 express-promise-router: ^4.1.0 jest-when: ^3.1.0 @@ -6049,7 +6049,7 @@ __metadata: "@backstage/plugin-permission-common": "workspace:^" "@backstage/plugin-permission-node": "workspace:^" "@types/express": "*" - "@types/lodash": ^4.14.173 + "@types/lodash": ^4.14.151 "@types/supertest": ^2.0.8 dataloader: ^2.0.0 express: ^4.17.1 @@ -13527,10 +13527,10 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.14.173, @types/lodash@npm:^4.14.175": - version: 4.14.184 - resolution: "@types/lodash@npm:4.14.184" - checksum: 6d9a4d67f7f9d0ec3fd21174f3dd3d00629dc1227eb469450eace53adbc1f7e2330699c28d0fe093e5f0fef0f0e763098be1f779268857213224af082b62be21 +"@types/lodash@npm:^4.14.151, @types/lodash@npm:^4.14.173, @types/lodash@npm:^4.14.175": + version: 4.14.185 + resolution: "@types/lodash@npm:4.14.185" + checksum: f81d13da5ecab110ca9c5c7cc2bedc3c9802a6acf668576aecd1b8f4b134ed81d06c15f1e600fb08f05975098280a0d97d30cddfc2cb39ec1c6b56e971ca53b3 languageName: node linkType: hard From 7289b5ec4eaf8d6e01fd45ad61649762d114fb9e Mon Sep 17 00:00:00 2001 From: Alessandro Dalfovo Date: Tue, 13 Sep 2022 16:27:30 +0200 Subject: [PATCH 158/279] Call logout OAuth handler in OAuthAdapter Signed-off-by: Alessandro Dalfovo --- .../src/lib/oauth/OAuthAdapter.test.ts | 10 ++++++++-- .../auth-backend/src/lib/oauth/OAuthAdapter.ts | 16 ++++++++++++++-- plugins/auth-backend/src/lib/oauth/index.ts | 1 + plugins/auth-backend/src/lib/oauth/types.ts | 7 ++++++- .../src/providers/google/provider.ts | 7 +++++++ 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts index 526b05d0ab..e0d4f0e051 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.test.ts @@ -17,7 +17,7 @@ import express from 'express'; import { THOUSAND_DAYS_MS, TEN_MINUTES_MS, OAuthAdapter } from './OAuthAdapter'; import { encodeState } from './helpers'; -import { OAuthHandlers, OAuthState } from './types'; +import { OAuthHandlers, OAuthLogoutRequest, OAuthState } from './types'; import { CookieConfigurer } from '../../providers/types'; const mockResponseData = { @@ -60,6 +60,7 @@ describe('OAuthAdapter', () => { refreshToken: 'token', }; } + async logout(_: OAuthLogoutRequest) {} } const providerInstance = new MyAuthProvider(); const mockCookieConfig: ReturnType = { @@ -262,13 +263,17 @@ describe('OAuthAdapter', () => { ); }); - it('removes refresh cookie when logging out', async () => { + it('removes refresh cookie and calls logout handler when logging out', async () => { + const logoutSpy = jest.spyOn(providerInstance, 'logout'); const oauthProvider = new OAuthAdapter(providerInstance, { ...oAuthProviderOptions, isOriginAllowed: () => false, }); const mockRequest = { + cookies: { + 'test-provider-refresh-token': 'token', + }, header: () => 'XMLHttpRequest', get: jest.fn(), } as unknown as express.Request; @@ -281,6 +286,7 @@ describe('OAuthAdapter', () => { await oauthProvider.logout(mockRequest, mockResponse); expect(mockRequest.get).toHaveBeenCalledTimes(1); + expect(logoutSpy).toHaveBeenCalledTimes(1); expect(mockResponse.cookie).toHaveBeenCalledTimes(1); expect(mockResponse.cookie).toHaveBeenCalledWith( expect.stringContaining('test-provider-refresh-token'), diff --git a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts index 8f08cfbbd0..85104e9608 100644 --- a/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts +++ b/plugins/auth-backend/src/lib/oauth/OAuthAdapter.ts @@ -39,6 +39,7 @@ import { OAuthStartRequest, OAuthRefreshRequest, OAuthState, + OAuthLogoutRequest, } from './types'; import { prepareBackstageIdentityResponse } from '../../providers/prepareBackstageIdentityResponse'; @@ -190,6 +191,14 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { throw new AuthenticationError('Invalid X-Requested-With header'); } + if (this.handlers.logout) { + const refreshToken = this.getRefreshTokenFromCookie(req); + const revokeRequest: OAuthLogoutRequest = Object.assign(req, { + refreshToken, + }); + await this.handlers.logout(revokeRequest); + } + // remove refresh token cookie if it is set const origin = req.get('origin'); const cookieConfig = this.getCookieConfig(origin); @@ -210,8 +219,7 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { } try { - const refreshToken = - req.cookies[`${this.options.providerId}-refresh-token`]; + const refreshToken = this.getRefreshTokenFromCookie(req); // throw error if refresh token is missing in the request if (!refreshToken) { @@ -286,6 +294,10 @@ export class OAuthAdapter implements AuthProviderRouteHandlers { }); }; + private getRefreshTokenFromCookie = (req: express.Request) => { + return req.cookies[`${this.options.providerId}-refresh-token`]; + }; + private getGrantedScopeFromCookie = (req: express.Request) => { return req.cookies[`${this.options.providerId}-granted-scope`]; }; diff --git a/plugins/auth-backend/src/lib/oauth/index.ts b/plugins/auth-backend/src/lib/oauth/index.ts index 671e8e48e9..3643898bed 100644 --- a/plugins/auth-backend/src/lib/oauth/index.ts +++ b/plugins/auth-backend/src/lib/oauth/index.ts @@ -26,5 +26,6 @@ export type { OAuthState, OAuthStartRequest, OAuthRefreshRequest, + OAuthLogoutRequest, OAuthResult, } from './types'; diff --git a/plugins/auth-backend/src/lib/oauth/types.ts b/plugins/auth-backend/src/lib/oauth/types.ts index e8b5282aad..3902c3f026 100644 --- a/plugins/auth-backend/src/lib/oauth/types.ts +++ b/plugins/auth-backend/src/lib/oauth/types.ts @@ -104,6 +104,11 @@ export type OAuthRefreshRequest = express.Request<{}> & { refreshToken: string; }; +/** @public */ +export type OAuthLogoutRequest = express.Request<{}> & { + refreshToken: string; +}; + /** * Any OAuth provider needs to implement this interface which has provider specific * handlers for different methods to perform authentication, get access tokens, @@ -136,5 +141,5 @@ export interface OAuthHandlers { /** * (Optional) Sign out of the auth provider. */ - logout?(): Promise; + logout?(req: OAuthLogoutRequest): Promise; } diff --git a/plugins/auth-backend/src/providers/google/provider.ts b/plugins/auth-backend/src/providers/google/provider.ts index 7689cd1a3a..afe5c27f6b 100644 --- a/plugins/auth-backend/src/providers/google/provider.ts +++ b/plugins/auth-backend/src/providers/google/provider.ts @@ -16,6 +16,7 @@ import express from 'express'; import passport from 'passport'; +import { OAuth2Client } from 'google-auth-library'; import { Strategy as GoogleStrategy } from 'passport-google-oauth20'; import { encodeState, @@ -27,6 +28,7 @@ import { OAuthResponse, OAuthResult, OAuthStartRequest, + OAuthLogoutRequest, } from '../../lib/oauth'; import { executeFetchUserProfileStrategy, @@ -119,6 +121,11 @@ export class GoogleAuthProvider implements OAuthHandlers { }; } + async logout(req: OAuthLogoutRequest) { + const oauthClient = new OAuth2Client(); + await oauthClient.revokeToken(req.refreshToken); + } + async refresh(req: OAuthRefreshRequest) { const { accessToken, refreshToken, params } = await executeRefreshTokenStrategy( From e2dc42e9f06a152336bbdc322e85f03f5fd46bd9 Mon Sep 17 00:00:00 2001 From: Francesco Saltori Date: Tue, 13 Sep 2022 16:39:25 +0200 Subject: [PATCH 159/279] Add changeset Signed-off-by: Francesco Saltori --- .changeset/hot-geese-vanish.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/hot-geese-vanish.md diff --git a/.changeset/hot-geese-vanish.md b/.changeset/hot-geese-vanish.md new file mode 100644 index 0000000000..b392c875c7 --- /dev/null +++ b/.changeset/hot-geese-vanish.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': minor +--- + +Google OAuth refresh tokens will now be revoked on logout by calling Google's API From 2bd3dec11d9776660da524e73d712d432028c57f Mon Sep 17 00:00:00 2001 From: Francesco Saltori Date: Tue, 13 Sep 2022 16:48:19 +0200 Subject: [PATCH 160/279] Update API report Signed-off-by: Francesco Saltori --- plugins/auth-backend/api-report.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/auth-backend/api-report.md b/plugins/auth-backend/api-report.md index ea5b923baa..cc6962cdbe 100644 --- a/plugins/auth-backend/api-report.md +++ b/plugins/auth-backend/api-report.md @@ -314,7 +314,7 @@ export interface OAuthHandlers { response: OAuthResponse; refreshToken?: string; }>; - logout?(): Promise; + logout?(req: OAuthLogoutRequest): Promise; refresh?(req: OAuthRefreshRequest): Promise<{ response: OAuthResponse; refreshToken?: string; @@ -322,6 +322,11 @@ export interface OAuthHandlers { start(req: OAuthStartRequest): Promise; } +// @public (undocumented) +export type OAuthLogoutRequest = express.Request<{}> & { + refreshToken: string; +}; + // @public (undocumented) export type OAuthProviderInfo = { accessToken: string; From 2cd4b2e55862d9a6ab411ec8ac598511ce5e7a6c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:15:25 +0000 Subject: [PATCH 161/279] Update dependency @swc/core to v1.3.3 Signed-off-by: Renovate Bot --- storybook/yarn.lock | 110 ++++++++++++++++++++++---------------------- yarn.lock | 110 ++++++++++++++++++++++---------------------- 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/storybook/yarn.lock b/storybook/yarn.lock index 4a5d57c5b2..1597d0728c 100644 --- a/storybook/yarn.lock +++ b/storybook/yarn.lock @@ -2977,126 +2977,126 @@ __metadata: languageName: node linkType: hard -"@swc/core-android-arm-eabi@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-android-arm-eabi@npm:1.3.2" +"@swc/core-android-arm-eabi@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-android-arm-eabi@npm:1.3.3" dependencies: "@swc/wasm": 1.2.122 conditions: os=android & cpu=arm languageName: node linkType: hard -"@swc/core-android-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-android-arm64@npm:1.3.2" +"@swc/core-android-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-android-arm64@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-darwin-arm64@npm:1.3.2" +"@swc/core-darwin-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-darwin-arm64@npm:1.3.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-darwin-x64@npm:1.3.2" +"@swc/core-darwin-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-darwin-x64@npm:1.3.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-freebsd-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-freebsd-x64@npm:1.3.2" +"@swc/core-freebsd-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-freebsd-x64@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.2" +"@swc/core-linux-arm-gnueabihf@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm64-gnu@npm:1.3.2" +"@swc/core-linux-arm64-gnu@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm64-gnu@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm64-musl@npm:1.3.2" +"@swc/core-linux-arm64-musl@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm64-musl@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-x64-gnu@npm:1.3.2" +"@swc/core-linux-x64-gnu@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-x64-gnu@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-x64-musl@npm:1.3.2" +"@swc/core-linux-x64-musl@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-x64-musl@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-arm64-msvc@npm:1.3.2" +"@swc/core-win32-arm64-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-arm64-msvc@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-ia32-msvc@npm:1.3.2" +"@swc/core-win32-ia32-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-ia32-msvc@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-x64-msvc@npm:1.3.2" +"@swc/core-win32-x64-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-x64-msvc@npm:1.3.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.2.239": - version: 1.3.2 - resolution: "@swc/core@npm:1.3.2" + version: 1.3.3 + resolution: "@swc/core@npm:1.3.3" dependencies: - "@swc/core-android-arm-eabi": 1.3.2 - "@swc/core-android-arm64": 1.3.2 - "@swc/core-darwin-arm64": 1.3.2 - "@swc/core-darwin-x64": 1.3.2 - "@swc/core-freebsd-x64": 1.3.2 - "@swc/core-linux-arm-gnueabihf": 1.3.2 - "@swc/core-linux-arm64-gnu": 1.3.2 - "@swc/core-linux-arm64-musl": 1.3.2 - "@swc/core-linux-x64-gnu": 1.3.2 - "@swc/core-linux-x64-musl": 1.3.2 - "@swc/core-win32-arm64-msvc": 1.3.2 - "@swc/core-win32-ia32-msvc": 1.3.2 - "@swc/core-win32-x64-msvc": 1.3.2 + "@swc/core-android-arm-eabi": 1.3.3 + "@swc/core-android-arm64": 1.3.3 + "@swc/core-darwin-arm64": 1.3.3 + "@swc/core-darwin-x64": 1.3.3 + "@swc/core-freebsd-x64": 1.3.3 + "@swc/core-linux-arm-gnueabihf": 1.3.3 + "@swc/core-linux-arm64-gnu": 1.3.3 + "@swc/core-linux-arm64-musl": 1.3.3 + "@swc/core-linux-x64-gnu": 1.3.3 + "@swc/core-linux-x64-musl": 1.3.3 + "@swc/core-win32-arm64-msvc": 1.3.3 + "@swc/core-win32-ia32-msvc": 1.3.3 + "@swc/core-win32-x64-msvc": 1.3.3 dependenciesMeta: "@swc/core-android-arm-eabi": optional: true @@ -3126,7 +3126,7 @@ __metadata: optional: true bin: swcx: run_swcx.js - checksum: c2c83d0e6b4c56d65fb3723aa0be5e777823a6efe5b12702d4d44827a6c6dd8fac3c5dec7ff45222c7b22b4084bffc846f8497d697e61a1706817977256a65dc + checksum: bead8463cd7c11e2cd87d3835045e4a245e755409e912a40c575026a0475cc0010fa6ef48936ea5f7e62c84cdc63c21a83d61755813f2ba9b565d397fad7c5f5 languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index ab32864850..39c676a57e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12184,126 +12184,126 @@ __metadata: languageName: node linkType: hard -"@swc/core-android-arm-eabi@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-android-arm-eabi@npm:1.3.2" +"@swc/core-android-arm-eabi@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-android-arm-eabi@npm:1.3.3" dependencies: "@swc/wasm": 1.2.122 conditions: os=android & cpu=arm languageName: node linkType: hard -"@swc/core-android-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-android-arm64@npm:1.3.2" +"@swc/core-android-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-android-arm64@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-arm64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-darwin-arm64@npm:1.3.2" +"@swc/core-darwin-arm64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-darwin-arm64@npm:1.3.3" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@swc/core-darwin-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-darwin-x64@npm:1.3.2" +"@swc/core-darwin-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-darwin-x64@npm:1.3.3" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@swc/core-freebsd-x64@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-freebsd-x64@npm:1.3.2" +"@swc/core-freebsd-x64@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-freebsd-x64@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@swc/core-linux-arm-gnueabihf@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.2" +"@swc/core-linux-arm-gnueabihf@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm-gnueabihf@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=linux & cpu=arm languageName: node linkType: hard -"@swc/core-linux-arm64-gnu@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm64-gnu@npm:1.3.2" +"@swc/core-linux-arm64-gnu@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm64-gnu@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-arm64-musl@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-arm64-musl@npm:1.3.2" +"@swc/core-linux-arm64-musl@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-arm64-musl@npm:1.3.3" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@swc/core-linux-x64-gnu@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-x64-gnu@npm:1.3.2" +"@swc/core-linux-x64-gnu@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-x64-gnu@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@swc/core-linux-x64-musl@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-linux-x64-musl@npm:1.3.2" +"@swc/core-linux-x64-musl@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-linux-x64-musl@npm:1.3.3" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@swc/core-win32-arm64-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-arm64-msvc@npm:1.3.2" +"@swc/core-win32-arm64-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-arm64-msvc@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@swc/core-win32-ia32-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-ia32-msvc@npm:1.3.2" +"@swc/core-win32-ia32-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-ia32-msvc@npm:1.3.3" dependencies: "@swc/wasm": 1.2.130 conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@swc/core-win32-x64-msvc@npm:1.3.2": - version: 1.3.2 - resolution: "@swc/core-win32-x64-msvc@npm:1.3.2" +"@swc/core-win32-x64-msvc@npm:1.3.3": + version: 1.3.3 + resolution: "@swc/core-win32-x64-msvc@npm:1.3.3" conditions: os=win32 & cpu=x64 languageName: node linkType: hard "@swc/core@npm:^1.2.239": - version: 1.3.2 - resolution: "@swc/core@npm:1.3.2" + version: 1.3.3 + resolution: "@swc/core@npm:1.3.3" dependencies: - "@swc/core-android-arm-eabi": 1.3.2 - "@swc/core-android-arm64": 1.3.2 - "@swc/core-darwin-arm64": 1.3.2 - "@swc/core-darwin-x64": 1.3.2 - "@swc/core-freebsd-x64": 1.3.2 - "@swc/core-linux-arm-gnueabihf": 1.3.2 - "@swc/core-linux-arm64-gnu": 1.3.2 - "@swc/core-linux-arm64-musl": 1.3.2 - "@swc/core-linux-x64-gnu": 1.3.2 - "@swc/core-linux-x64-musl": 1.3.2 - "@swc/core-win32-arm64-msvc": 1.3.2 - "@swc/core-win32-ia32-msvc": 1.3.2 - "@swc/core-win32-x64-msvc": 1.3.2 + "@swc/core-android-arm-eabi": 1.3.3 + "@swc/core-android-arm64": 1.3.3 + "@swc/core-darwin-arm64": 1.3.3 + "@swc/core-darwin-x64": 1.3.3 + "@swc/core-freebsd-x64": 1.3.3 + "@swc/core-linux-arm-gnueabihf": 1.3.3 + "@swc/core-linux-arm64-gnu": 1.3.3 + "@swc/core-linux-arm64-musl": 1.3.3 + "@swc/core-linux-x64-gnu": 1.3.3 + "@swc/core-linux-x64-musl": 1.3.3 + "@swc/core-win32-arm64-msvc": 1.3.3 + "@swc/core-win32-ia32-msvc": 1.3.3 + "@swc/core-win32-x64-msvc": 1.3.3 dependenciesMeta: "@swc/core-android-arm-eabi": optional: true @@ -12333,7 +12333,7 @@ __metadata: optional: true bin: swcx: run_swcx.js - checksum: c2c83d0e6b4c56d65fb3723aa0be5e777823a6efe5b12702d4d44827a6c6dd8fac3c5dec7ff45222c7b22b4084bffc846f8497d697e61a1706817977256a65dc + checksum: bead8463cd7c11e2cd87d3835045e4a245e755409e912a40c575026a0475cc0010fa6ef48936ea5f7e62c84cdc63c21a83d61755813f2ba9b565d397fad7c5f5 languageName: node linkType: hard From 6adcec07f63eeaf4c55aa32919a49a9d39679325 Mon Sep 17 00:00:00 2001 From: Francesco Saltori Date: Tue, 27 Sep 2022 14:45:05 +0200 Subject: [PATCH 162/279] Handle logout errors with errorApi Signed-off-by: Francesco Saltori --- .../AuthProviders/ProviderSettingsItem.tsx | 7 ++++++- .../UserSettingsAuthProviders.test.tsx | 2 +- .../src/components/General/UserSettingsMenu.tsx | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx b/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx index ab6ad8dff9..a5962d47ab 100644 --- a/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx +++ b/plugins/user-settings/src/components/AuthProviders/ProviderSettingsItem.tsx @@ -32,6 +32,7 @@ import { ProfileInfoApi, ProfileInfo, useApi, + errorApiRef, IconComponent, } from '@backstage/core-plugin-api'; import { ProviderSettingsAvatar } from './ProviderSettingsAvatar'; @@ -46,6 +47,7 @@ export const ProviderSettingsItem = (props: { const { title, description, icon: Icon, apiRef } = props; const api = useApi(apiRef); + const errorApi = useApi(errorApiRef); const [signedIn, setSignedIn] = useState(false); const emptyProfile: ProfileInfo = {}; const [profile, setProfile] = useState(emptyProfile); @@ -126,7 +128,10 @@ export const ProviderSettingsItem = (props: { diff --git a/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.test.tsx b/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.test.tsx index 4e14dec2ef..fe5440d355 100644 --- a/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.test.tsx +++ b/plugins/user-settings/src/components/AuthProviders/UserSettingsAuthProviders.test.tsx @@ -26,7 +26,7 @@ import { UserSettingsAuthProviders } from './UserSettingsAuthProviders'; import { ApiProvider, ConfigReader } from '@backstage/core-app-api'; import { configApiRef, googleAuthApiRef } from '@backstage/core-plugin-api'; -const mockSignInHandler = jest.fn().mockReturnValue(''); +const mockSignInHandler = jest.fn().mockReturnValue(Promise.resolve()); const mockGoogleAuth = { sessionState$: () => ({ [Symbol.observable]: jest.fn(), diff --git a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx index 2483f6cd36..c83bdd5b74 100644 --- a/plugins/user-settings/src/components/General/UserSettingsMenu.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsMenu.tsx @@ -18,10 +18,15 @@ import React from 'react'; import { IconButton, ListItemIcon, Menu, MenuItem } from '@material-ui/core'; import SignOutIcon from '@material-ui/icons/MeetingRoom'; import MoreVertIcon from '@material-ui/icons/MoreVert'; -import { identityApiRef, useApi } from '@backstage/core-plugin-api'; +import { + identityApiRef, + errorApiRef, + useApi, +} from '@backstage/core-plugin-api'; /** @public */ export const UserSettingsMenu = () => { + const errorApi = useApi(errorApiRef); const identityApi = useApi(identityApiRef); const [open, setOpen] = React.useState(false); const [anchorEl, setAnchorEl] = React.useState( @@ -48,7 +53,12 @@ export const UserSettingsMenu = () => { - identityApi.signOut()}> + + identityApi.signOut().catch(error => errorApi.post(error)) + } + > From 02ba465d072e9437f9703375da667a370a4cdf19 Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 15:23:53 +0200 Subject: [PATCH 163/279] Added a test for FetchedEntityRefLinks.tsx Signed-off-by: bnechyporenko --- .../EntityRefLink/EntityRefLinks.tsx | 2 +- .../FetchedEntityRefLinks.test.tsx | 84 +++++++++++++++++++ .../EntityRefLink/FetchedEntityRefLinks.tsx | 4 +- 3 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.test.tsx diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx index bb8950041a..71a60f3a15 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx @@ -37,7 +37,7 @@ export type EntityRefLinksProps< defaultKind?: string; entityRefs: TRef[]; fetchEntities: true; - getTitle?(entity: Entity): string | undefined; + getTitle(entity: Entity): string | undefined; } & Omit); /** diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.test.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.test.tsx new file mode 100644 index 0000000000..0a3ea1003e --- /dev/null +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.test.tsx @@ -0,0 +1,84 @@ +/* + * Copyright 2022 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FetchedEntityRefLinks } from './FetchedEntityRefLinks'; +import { entityRouteRef } from '../../routes'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; +import { Entity } from '@backstage/catalog-model'; +import React from 'react'; +import { JsonObject } from '@backstage/types'; +import { catalogApiRef } from '../../api'; +import { CatalogApi } from '@backstage/catalog-client'; + +describe('', () => { + it('should fetch entities and render the custom display text', async () => { + const entityRefs = [ + { + kind: 'Component', + namespace: 'default', + name: 'software', + }, + { + kind: 'API', + namespace: 'default', + name: 'interface', + }, + ]; + + const catalogApi: Partial = { + getEntities: () => + Promise.resolve({ + items: entityRefs.map(ref => ({ + apiVersion: 'backstage.io/v1alpha1', + kind: ref.kind, + metadata: { + name: ref.name, + namespace: ref.namespace, + }, + spec: { + profile: { + displayName: ref.name.toLocaleUpperCase('en-US'), + }, + type: 'organization', + }, + })), + }), + }; + + const getTitle = (e: Entity): string => + (e.spec?.profile!! as JsonObject).displayName!!.toString()!!; + + const rendered = await renderInTestApp( + + + , + { + mountedRoutes: { + '/catalog/:namespace/:kind/:name/*': entityRouteRef, + }, + }, + ); + + expect(rendered.getByText('SOFTWARE')).toHaveAttribute( + 'href', + '/catalog/default/component/software', + ); + + expect(rendered.getByText('INTERFACE')).toHaveAttribute( + 'href', + '/catalog/default/api/interface', + ); + }); +}); diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx index 6b6ead7872..629306014f 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx @@ -35,7 +35,7 @@ export type FetchedEntityRefLinksProps< > = { defaultKind?: string; entityRefs: TRef[]; - getTitle?(entity: Entity): string | undefined; + getTitle(entity: Entity): string | undefined; } & Omit; /** @@ -83,7 +83,7 @@ export function FetchedEntityRefLinks< {...linkProps} defaultKind={defaultKind} entityRef={r} - title={getTitle ? getTitle(r as Entity) : undefined} + title={getTitle(r as Entity)} /> ); From 2bc50cff236ed9ee2fc00377813d6241efd467ec Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 15:26:05 +0200 Subject: [PATCH 164/279] Fixed a wrong annotation Signed-off-by: bnechyporenko --- .../src/components/EntityRefLink/FetchedEntityRefLinks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx index 629306014f..17c0a9de37 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx @@ -26,7 +26,7 @@ import { catalogApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; /** - * Props for {@link EntityRefLink}. + * Props for {@link FetchedEntityRefLinks}. * * @public */ From f469ecc5cc6a0c696b3dfe5fbe2c02dcd6ba8a34 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 11:25:36 +0000 Subject: [PATCH 165/279] Update dependency graphql-ws to v5.11.2 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ab32864850..20bd90d06c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23685,11 +23685,11 @@ __metadata: linkType: hard "graphql-ws@npm:^5.4.1, graphql-ws@npm:^5.9.0": - version: 5.10.1 - resolution: "graphql-ws@npm:5.10.1" + version: 5.11.2 + resolution: "graphql-ws@npm:5.11.2" peerDependencies: graphql: ">=0.11 <=16" - checksum: ad8eb8a6823a32a7bd9bc6ec73a0b244f503e50318ef5db1312f1d09c5f0b0e4505ad75b08f06e4c40c6935cf5170444b19347b7b83222b4e1af01401418cb91 + checksum: 2c94b06c1919217dc15a0556474673de7aabcc7179a2982a87ded51856c105e4f4ee6d54a6c135a0a7f55d85a5997a6a15cff514959258885814adec6a61ff00 languageName: node linkType: hard From 9a5726a48d1f44feb4b7cc4fd8f518f190459ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 15:51:31 +0200 Subject: [PATCH 166/279] nerfed qs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/tech-insights/package.json | 2 +- yarn.lock | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 7d1d091095..89d19cc248 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,7 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "qs": "^6.11.0", + "qs": "^6.9.4", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 03e3a36d0b..0cdb5f55f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6937,7 +6937,7 @@ __metadata: "@types/node": ^16.11.26 cross-fetch: ^3.1.5 msw: ^0.47.0 - qs: ^6.11.0 + qs: ^6.9.4 react-use: ^17.2.4 peerDependencies: "@types/react": ^16.13.1 || ^17.0.0 @@ -34229,15 +34229,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: ^1.0.4 - checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 - languageName: node - linkType: hard - "qs@npm:~6.5.2": version: 6.5.2 resolution: "qs@npm:6.5.2" From 8bb14a6ae6818a3f6334d78d9b3117653600e52e Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 15:57:53 +0200 Subject: [PATCH 167/279] Fixed a problem in definition of EntityRefLinksProps Signed-off-by: bnechyporenko --- .../src/components/EntityRefLink/EntityRefLinks.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx index 71a60f3a15..2502fbbb6e 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/EntityRefLinks.tsx @@ -26,19 +26,21 @@ import { FetchedEntityRefLinks } from './FetchedEntityRefLinks'; */ export type EntityRefLinksProps< TRef extends string | CompoundEntityRef | Entity, -> = +> = ( | { defaultKind?: string; entityRefs: TRef[]; fetchEntities?: false; getTitle?(entity: TRef): string | undefined; } - | ({ + | { defaultKind?: string; entityRefs: TRef[]; fetchEntities: true; getTitle(entity: Entity): string | undefined; - } & Omit); + } +) & + Omit; /** * Shows a list of clickable links to entities. From 6e05d57fdf3fcb92a8b6aac2ae63c81f7a11c554 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 14:04:44 +0000 Subject: [PATCH 168/279] chore(deps): update dependency @types/tar to v6.1.3 Signed-off-by: Renovate Bot --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7776d00e77..57a331f80f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14598,12 +14598,12 @@ __metadata: linkType: hard "@types/tar@npm:^6.1.1": - version: 6.1.2 - resolution: "@types/tar@npm:6.1.2" + version: 6.1.3 + resolution: "@types/tar@npm:6.1.3" dependencies: "@types/node": "*" minipass: ^3.3.5 - checksum: 57e625e2db29e3b9c6d8d06774758cf6e4caa2096f4144f7c0fdb2760e1150146d2a86f0eb80b4d2e1ba0ecf07f06303775054c4f4d22bea5d51e8b54cdd0fd8 + checksum: 3a221f74adfcef8555b9c4cc951907dfd567630744ffe5211da1b44caf2a4c3b02297b73c9fb02d171e93a7a7c74fb15c1826e3f0438f0e5e8f4c790db59ddcf languageName: node linkType: hard From d3ae8eed67461d617fc6f2ff49b9bb074072fb7e Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 16:28:14 +0200 Subject: [PATCH 169/279] Fixed a problem in definition of EntityRefLinksProps Signed-off-by: bnechyporenko --- plugins/catalog-react/api-report.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index bb19e2a5b8..9e7a07c08b 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -279,14 +279,28 @@ export type EntityRefLinkProps = { } & Omit; // @public -export function EntityRefLinks(props: EntityRefLinksProps): JSX.Element; +export function EntityRefLinks< + TRef extends string | CompoundEntityRef | Entity, +>(props: EntityRefLinksProps): JSX.Element; // @public -export type EntityRefLinksProps = { - entityRefs: (string | Entity | CompoundEntityRef)[]; - defaultKind?: string; - getTitle?: (cer: CompoundEntityRef) => string | undefined; -} & Omit; +export type EntityRefLinksProps< + TRef extends string | CompoundEntityRef | Entity, +> = ( + | { + defaultKind?: string; + entityRefs: TRef[]; + fetchEntities?: false; + getTitle?(entity: TRef): string | undefined; + } + | { + defaultKind?: string; + entityRefs: TRef[]; + fetchEntities: true; + getTitle(entity: Entity): string | undefined; + } +) & + Omit; // @public export function entityRouteParams(entity: Entity): { From 174f02a00a0678f8645bbbdcdc9082ed245c3329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 17:10:43 +0200 Subject: [PATCH 170/279] fix installation instructions for user-settings that were stale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/loud-dots-sit.md | 5 +++++ plugins/user-settings/README.md | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/loud-dots-sit.md diff --git a/.changeset/loud-dots-sit.md b/.changeset/loud-dots-sit.md new file mode 100644 index 0000000000..fa6175358e --- /dev/null +++ b/.changeset/loud-dots-sit.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-user-settings': patch +--- + +Update installation instructions diff --git a/plugins/user-settings/README.md b/plugins/user-settings/README.md index abe66120fe..b240c2bbd3 100644 --- a/plugins/user-settings/README.md +++ b/plugins/user-settings/README.md @@ -29,11 +29,11 @@ import { Settings as SidebarSettings } from '@backstage/plugin-user-settings'; Add the page to the App routing: ```ts -import { Router as SettingsRouter } from '@backstage/plugin-user-settings'; +import { UserSettingsPage } from '@backstage/plugin-user-settings'; const AppRoutes = () => ( - } /> + }> ); ``` From 9e6b3c3adc52426230bda742877996b71c21fe2d Mon Sep 17 00:00:00 2001 From: bnechyporenko Date: Tue, 27 Sep 2022 17:44:53 +0200 Subject: [PATCH 171/279] Fixed an issue in filter in FetchedEntityRefLinks.tsx Signed-off-by: bnechyporenko --- .../components/EntityRefLink/FetchedEntityRefLinks.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx index 17c0a9de37..72c9aa5125 100644 --- a/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx +++ b/plugins/catalog-react/src/components/EntityRefLink/FetchedEntityRefLinks.tsx @@ -61,7 +61,15 @@ export function FetchedEntityRefLinks< }, new Array()); return refs - ? (await catalogApi.getEntities({ filter: refs })).items + ? ( + await catalogApi.getEntities({ + filter: refs.map(ref => ({ + kind: ref.kind, + 'metadata.namespace': ref.namespace, + 'metadata.name': ref.name, + })), + }) + ).items : (entityRefs as Array); }, [entityRefs]); From 6389362f0dcbdf0e7cea34b0ada6268bcf98e0de Mon Sep 17 00:00:00 2001 From: hram_wh Date: Wed, 28 Sep 2022 11:51:03 +0530 Subject: [PATCH 172/279] requested changes made Signed-off-by: hram_wh --- .../EntityContextMenu/EntityContextMenu.tsx | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index 92ed8c02a6..989682fde6 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -27,13 +27,13 @@ import { makeStyles } from '@material-ui/core/styles'; import BugReportIcon from '@material-ui/icons/BugReport'; import MoreVert from '@material-ui/icons/MoreVert'; import FileCopyTwoToneIcon from '@material-ui/icons/FileCopyTwoTone'; -import React, { useState } from 'react'; +import React, { useCallback, useState } from 'react'; import { IconComponent } from '@backstage/core-plugin-api'; import { useEntityPermission } from '@backstage/plugin-catalog-react'; import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common'; import { BackstageTheme } from '@backstage/theme'; import { UnregisterEntity, UnregisterEntityOptions } from './UnregisterEntity'; -import Snackbar from '@material-ui/core/Snackbar'; +import { useApi, alertApiRef } from '@backstage/core-plugin-api'; /** @public */ export type EntityContextMenuClassKey = 'button'; @@ -86,23 +86,13 @@ export function EntityContextMenu(props: EntityContextMenuProps) { setAnchorEl(undefined); }; - const [state, setState] = useState({ - open: false, - vertical: 'top', - horizontal: 'right', - }); + const alertApi = useApi(alertApiRef); - const { open, vertical, horizontal } = state; - - const handleClose = () => { - setState({ ...state, open: false }); - }; - - const copyToClipboard = () => { + const copyToClipboard = useCallback(() => { navigator.clipboard .writeText(window.location.toString()) - .then(() => setState({ ...state, open: true })); - }; + .then(() => alertApi.post({ message: 'Copied!', severity: 'info' })); + }, []); const extraItems = UNSTABLE_extraContextMenuItems && [ ...UNSTABLE_extraContextMenuItems.map(item => ( @@ -174,14 +164,6 @@ export function EntityContextMenu(props: EntityContextMenuProps) { - From cca379385193e72ecfcce84f419dfeea3cb18249 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 08:29:37 +0000 Subject: [PATCH 173/279] Update dependency @types/express to v4.17.14 Signed-off-by: Renovate Bot --- yarn.lock | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3bc5b112a2..c4bdcc4714 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3872,7 +3872,7 @@ __metadata: "@backstage/backend-common": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 "@types/http-proxy-middleware": ^0.19.3 "@types/supertest": ^2.0.8 express: ^4.17.1 @@ -4184,7 +4184,7 @@ __metadata: "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 express: ^4.17.1 jose: ^4.6.0 lodash: ^4.17.21 @@ -6212,7 +6212,7 @@ __metadata: "@backstage/backend-common": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 @@ -6267,7 +6267,7 @@ __metadata: "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-permission-common": "workspace:^" "@backstage/plugin-permission-node": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 "@types/lodash": ^4.14.151 "@types/supertest": ^2.0.8 dataloader: ^2.0.0 @@ -6385,7 +6385,7 @@ __metadata: "@backstage/plugin-permission-common": "workspace:^" "@backstage/plugin-permission-node": "workspace:^" "@backstage/plugin-playlist-common": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 @@ -6985,7 +6985,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" "@backstage/test-utils": "workspace:^" - "@types/express": "*" + "@types/express": ^4.17.6 "@types/supertest": ^2.0.12 express: ^4.18.1 express-promise-router: ^4.1.0 @@ -7604,7 +7604,7 @@ __metadata: "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" "@types/compression": ^1.7.2 - "@types/express": "*" + "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 compression: ^1.7.4 cors: ^2.8.5 @@ -13463,7 +13463,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:*, @types/express@npm:4.17.13, @types/express@npm:^4.17.13, @types/express@npm:^4.17.6": +"@types/express@npm:*, @types/express@npm:4.17.13, @types/express@npm:^4.17.13": version: 4.17.13 resolution: "@types/express@npm:4.17.13" dependencies: @@ -13475,6 +13475,18 @@ __metadata: languageName: node linkType: hard +"@types/express@npm:^4.17.6": + version: 4.17.14 + resolution: "@types/express@npm:4.17.14" + dependencies: + "@types/body-parser": "*" + "@types/express-serve-static-core": ^4.17.18 + "@types/qs": "*" + "@types/serve-static": "*" + checksum: 15c1af46d02de834e4a225eccaa9d85c0370fdbb3ed4e1bc2d323d24872309961542b993ae236335aeb3e278630224a6ea002078d39e651d78a3b0356b1eaa79 + languageName: node + linkType: hard + "@types/fs-extra@npm:^9.0.1, @types/fs-extra@npm:^9.0.3, @types/fs-extra@npm:^9.0.5, @types/fs-extra@npm:^9.0.6": version: 9.0.13 resolution: "@types/fs-extra@npm:9.0.13" From 4efadb69682bb59786828e74166d80bc9fe53659 Mon Sep 17 00:00:00 2001 From: Crevil Date: Thu, 11 Aug 2022 13:34:08 +0200 Subject: [PATCH 174/279] Respect initial filter Signed-off-by: Crevil --- .changeset/calm-moose-fetch.md | 8 + plugins/catalog-react/api-report.md | 4 +- .../EntityKindPicker.test.tsx | 178 +++++++++++--- .../EntityKindPicker/EntityKindPicker.tsx | 219 +++++++++++------- plugins/catalog-react/src/filters.ts | 15 +- .../src/hooks/useEntityListProvider.test.tsx | 7 + .../CatalogKindHeader/CatalogKindHeader.tsx | 9 + .../CatalogPage/DefaultCatalogPage.tsx | 2 +- .../components/CatalogTable/CatalogTable.tsx | 9 +- 9 files changed, 321 insertions(+), 130 deletions(-) create mode 100644 .changeset/calm-moose-fetch.md diff --git a/.changeset/calm-moose-fetch.md b/.changeset/calm-moose-fetch.md new file mode 100644 index 0000000000..29d581bf23 --- /dev/null +++ b/.changeset/calm-moose-fetch.md @@ -0,0 +1,8 @@ +--- +'@backstage/plugin-catalog-react': minor +'@backstage/plugin-catalog': patch +--- + +Implement `EntityKindPicker` which allows users to filter the catalog kinds much like the `CatalogKindHeader`. + +The new picker is more accessible though listed as any other filter options in the catalog. diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index ee43a0a5c1..8f95f5cb13 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -161,7 +161,7 @@ export type EntityFilter = { export class EntityKindFilter implements EntityFilter { constructor(value: string); // (undocumented) - getCatalogFilters(): Record; + getCatalogFilters(): Record; // (undocumented) toQueryValue(): string; // (undocumented) @@ -176,7 +176,7 @@ export const EntityKindPicker: ( // @public export interface EntityKindPickerProps { // (undocumented) - hidden: boolean; + hidden?: boolean; // (undocumented) initialFilter?: string; } diff --git a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.test.tsx b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.test.tsx index d6404fcf07..65ad3f227a 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.test.tsx +++ b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.test.tsx @@ -14,46 +14,170 @@ * limitations under the License. */ -import { render } from '@testing-library/react'; -import React from 'react'; -import { MockEntityListContextProvider } from '../../testUtils/providers'; +import { GetEntityFacetsResponse } from '@backstage/catalog-client'; +import { Entity } from '@backstage/catalog-model'; +import { ApiProvider } from '@backstage/core-app-api'; +import { alertApiRef } from '@backstage/core-plugin-api'; +import { renderWithEffects, TestApiRegistry } from '@backstage/test-utils'; +import { fireEvent, waitFor } from '@testing-library/react'; +import { capitalize } from 'lodash'; +import { default as React } from 'react'; +import { catalogApiRef } from '../../api'; import { EntityKindFilter } from '../../filters'; +import { MockEntityListContextProvider } from '../../testUtils/providers'; import { EntityKindPicker } from './EntityKindPicker'; +const entities: Entity[] = [ + { + apiVersion: '1', + kind: 'Component', + metadata: { + name: 'component', + }, + }, + { + apiVersion: '1', + kind: 'Domain', + metadata: { + name: 'domain', + }, + }, + { + apiVersion: '1', + kind: 'Group', + metadata: { + name: 'group', + }, + }, +]; + describe('', () => { + const apis = TestApiRegistry.from( + [ + catalogApiRef, + { + getEntityFacets: jest.fn().mockResolvedValue({ + facets: { + kind: entities.map(e => ({ + value: e.kind, + count: 1, + })), + }, + } as GetEntityFacetsResponse), + }, + ], + [ + alertApiRef, + { + post: jest.fn(), + }, + ], + ); + + it('renders available entity kinds', async () => { + const rendered = await renderWithEffects( + + + + + , + ); + expect(rendered.getByText('Kind')).toBeInTheDocument(); + + const input = rendered.getByTestId('select'); + fireEvent.click(input); + + await waitFor(() => rendered.getByText('Domain')); + + entities.forEach(entity => { + expect( + rendered.getByRole('option', { + name: capitalize(entity.kind as string), + }), + ).toBeInTheDocument(); + }); + }); + it('sets the selected kind filter', async () => { const updateFilters = jest.fn(); - render( - - , + const rendered = await renderWithEffects( + + + + + , + ); + const input = rendered.getByTestId('select'); + fireEvent.click(input); + + await waitFor(() => rendered.getByText('Domain')); + fireEvent.click(rendered.getByText('Domain')); + + expect(updateFilters).toHaveBeenLastCalledWith({ + kind: new EntityKindFilter('domain'), + }); + }); + + it('respects the query parameter filter value', async () => { + const updateFilters = jest.fn(); + const queryParameters = { kind: 'group' }; + await renderWithEffects( + + + + , + , ); + expect(updateFilters).toHaveBeenLastCalledWith({ + kind: new EntityKindFilter('group'), + }); + }); + + it('responds to external queryParameters changes', async () => { + const updateFilters = jest.fn(); + const rendered = await renderWithEffects( + + + + + , + ); expect(updateFilters).toHaveBeenLastCalledWith({ kind: new EntityKindFilter('component'), }); - }); - - it('respects the query parameter filter value', () => { - const updateFilters = jest.fn(); - const queryParameters = { kind: 'API' }; - render( - - , + rendered.rerender( + + + + + , ); - expect(updateFilters).toHaveBeenLastCalledWith({ - kind: new EntityKindFilter('API'), + kind: new EntityKindFilter('domain'), }); }); }); diff --git a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx index 774d07c544..36ac93101a 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx +++ b/plugins/catalog-react/src/components/EntityKindPicker/EntityKindPicker.tsx @@ -14,115 +14,168 @@ * limitations under the License. */ -import { useApi } from '@backstage/core-plugin-api'; -import { - Box, - Checkbox, - FormControlLabel, - makeStyles, - TextField, - Typography, -} from '@material-ui/core'; -import CheckBoxIcon from '@material-ui/icons/CheckBox'; -import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; -import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import { Autocomplete } from '@material-ui/lab'; -import React, { useEffect, useMemo, useState } from 'react'; +import { Select } from '@backstage/core-components'; +import { alertApiRef, useApi } from '@backstage/core-plugin-api'; +import { Box } from '@material-ui/core'; +import capitalize from 'lodash/capitalize'; +import sortBy from 'lodash/sortBy'; +import React, { useEffect, useMemo, useRef, useState } from 'react'; import useAsync from 'react-use/lib/useAsync'; import { catalogApiRef } from '../../api'; import { EntityKindFilter } from '../../filters'; import { useEntityList } from '../../hooks'; -const useStyles = makeStyles( - { - input: {}, - }, - { - name: 'CatalogReactEntityKindPicker', - }, -); +function useAvailableKinds() { + const catalogApi = useApi(catalogApiRef); -const icon = ; -const checkedIcon = ; + const [availableKinds, setAvailableKinds] = useState([]); -/** @public */ -export const EntityKindPicker = () => { - const classes = useStyles(); const { - updateFilters, + error, + loading, + value: facets, + } = useAsync(async () => { + const facet = 'kind'; + const items = await catalogApi + .getEntityFacets({ + facets: [facet], + }) + .then(response => response.facets[facet] || []); + + return items; + }, [catalogApi]); + + const facetsRef = useRef(facets); + useEffect(() => { + const oldFacets = facetsRef.current; + facetsRef.current = facets; + // Delay processing hook until facets load updates have settled to generate list of kinds; + // This prevents resetting the kind filter due to saved kind value from query params not matching the + // empty set of kind values while values are still being loaded; also only run this hook on changes + // to facets + if (loading || oldFacets === facets || !facets) { + return; + } + + const newKinds = [ + ...new Set( + sortBy(facets, f => f.value).map(f => + f.value.toLocaleLowerCase('en-US'), + ), + ), + ]; + + setAvailableKinds(newKinds); + }, [loading, facets, setAvailableKinds]); + + return { loading, error, availableKinds }; +} + +function useEntityKindFilter(opts: { initialFilter: string }): { + loading: boolean; + error?: Error; + availableKinds: string[]; + selectedKind: string; + setSelectedKind: (kind: string) => void; +} { + const { filters, - queryParameters: { kind: kindsParameter }, + queryParameters: { kind: kindParameter }, + updateFilters, } = useEntityList(); - const catalogApi = useApi(catalogApiRef); - const { value: availableKinds } = useAsync(async () => { - const facet = 'kind'; - const { facets } = await catalogApi.getEntityFacets({ - facets: [facet], - }); - - return facets[facet].map(({ value }) => value); - }, [filters.kind]); - - const queryParamKinds = useMemo( - () => [kindsParameter].flat().filter(Boolean) as string[], - [kindsParameter], + const flattenedQueryKind = useMemo( + () => [kindParameter].flat()[0], + [kindParameter], ); - const [selectedKinds, setSelectedKinds] = useState( - queryParamKinds.length ? queryParamKinds : filters.kind?.getKinds() ?? [], + const [selectedKind, setSelectedKind] = useState( + flattenedQueryKind ?? filters.kind?.value ?? opts.initialFilter, ); // Set selected kinds on query parameter updates; this happens at initial page load and from // external updates to the page location. useEffect(() => { - if (queryParamKinds.length) { - setSelectedKinds(queryParamKinds); + if (flattenedQueryKind) { + setSelectedKind(flattenedQueryKind); } - }, [queryParamKinds]); + }, [flattenedQueryKind]); + + // Set selected kind from filters; this happens when the kind filter is + // updated from another component + useEffect(() => { + if (filters.kind?.value) { + setSelectedKind(filters.kind?.value); + } + }, [filters.kind]); + + const { availableKinds, loading, error } = useAvailableKinds(); useEffect(() => { updateFilters({ - kind: selectedKinds.length - ? new EntityKindFilter(selectedKinds) - : undefined, + kind: selectedKind ? new EntityKindFilter(selectedKind) : undefined, }); - }, [selectedKinds, updateFilters]); + }, [selectedKind, updateFilters]); - if (!availableKinds?.length) return null; + return { + loading, + error, + availableKinds, + selectedKind, + setSelectedKind, + }; +} - return ( +/** + * Props for {@link EntityKindPicker}. + * + * @public + */ +export interface EntityKindPickerProps { + initialFilter?: string; + hidden?: boolean; +} + +/** @public */ +export const EntityKindPicker = (props: EntityKindPickerProps) => { + const { hidden, initialFilter = 'component' } = props; + + const alertApi = useApi(alertApiRef); + + const { error, availableKinds, selectedKind, setSelectedKind } = + useEntityKindFilter({ + initialFilter: initialFilter, + }); + + useEffect(() => { + if (error) { + alertApi.post({ + message: `Failed to load entity kinds`, + severity: 'error', + }); + } + if (initialFilter) { + setSelectedKind(initialFilter); + } + }, [error, alertApi, initialFilter, setSelectedKind]); + + if (availableKinds?.length === 0 || error) return null; + + const items = [ + ...availableKinds.map((kind: string) => ({ + value: kind, + label: capitalize(kind), + })), + ]; + + return hidden ? null : ( - - Kinds - setSelectedKinds(value)} - renderOption={(option, { selected }) => ( - - } - label={option} - /> - )} - size="small" - popupIcon={} - renderInput={params => ( - - )} - /> - +