diff --git a/.changeset/chilled-chefs-notice.md b/.changeset/chilled-chefs-notice.md new file mode 100644 index 0000000000..a12babb2a4 --- /dev/null +++ b/.changeset/chilled-chefs-notice.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-rails': patch +--- + +Make `containerRunner` argument optional diff --git a/.changeset/cold-cooks-care.md b/.changeset/cold-cooks-care.md new file mode 100644 index 0000000000..56c41a55e9 --- /dev/null +++ b/.changeset/cold-cooks-care.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-entity-validation': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-catalog': patch +--- + +Change default icon for unknown entities to nothing instead of the help icon. diff --git a/.changeset/famous-houses-thank.md b/.changeset/famous-houses-thank.md new file mode 100644 index 0000000000..8fa0eb2d75 --- /dev/null +++ b/.changeset/famous-houses-thank.md @@ -0,0 +1,7 @@ +--- +'@backstage/frontend-test-utils': patch +'@backstage/frontend-app-api': patch +'@backstage/core-compat-api': patch +--- + +Updates to use the new `RouteResolutionsApi`. diff --git a/.changeset/forty-cars-scream.md b/.changeset/forty-cars-scream.md new file mode 100644 index 0000000000..284acc3c44 --- /dev/null +++ b/.changeset/forty-cars-scream.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-react': patch +--- + +Allow defining default output text to be shown diff --git a/.changeset/giant-suits-switch.md b/.changeset/giant-suits-switch.md new file mode 100644 index 0000000000..77d0e62c73 --- /dev/null +++ b/.changeset/giant-suits-switch.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-devops-backend': patch +--- + +Fixed bug with `extractPartsFromAsset` that resulted in a leading `.` being removed from the path in an otherwise valid path (ex. `.assets/image.png`). The leading `.` will now only be moved for paths beginning with `./`. diff --git a/.changeset/good-lemons-lick.md b/.changeset/good-lemons-lick.md new file mode 100644 index 0000000000..3fde0c7d84 --- /dev/null +++ b/.changeset/good-lemons-lick.md @@ -0,0 +1,14 @@ +--- +'@backstage/plugin-scaffolder-backend-module-confluence-to-markdown': patch +'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch +'@backstage/plugin-scaffolder-backend-module-bitbucket': patch +'@backstage/plugin-scaffolder-backend-module-gerrit': patch +'@backstage/plugin-scaffolder-backend-module-github': patch +'@backstage/plugin-scaffolder-backend-module-gitlab': patch +'@backstage/plugin-scaffolder-backend-module-sentry': patch +'@backstage/plugin-scaffolder-backend-module-yeoman': patch +'@backstage/plugin-scaffolder-backend-module-azure': patch +'@backstage/plugin-scaffolder-backend-module-rails': patch +--- + +Exporting a default module for the new Backend System diff --git a/.changeset/large-frogs-grab.md b/.changeset/large-frogs-grab.md new file mode 100644 index 0000000000..2d36de3407 --- /dev/null +++ b/.changeset/large-frogs-grab.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Adding `supportedSubmitMethods` prop to `api-docs` to pass to the Swagger UI. This allows users to specify which HTTP methods they wish to allow end-users to make requests through the `Try It Out` button on the Swagger UI. diff --git a/.changeset/large-tables-wonder.md b/.changeset/large-tables-wonder.md new file mode 100644 index 0000000000..f54402dbd4 --- /dev/null +++ b/.changeset/large-tables-wonder.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Add experimental support for optional `auth` app entry point. diff --git a/.changeset/metal-elephants-sit.md b/.changeset/metal-elephants-sit.md new file mode 100644 index 0000000000..093936da3b --- /dev/null +++ b/.changeset/metal-elephants-sit.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': minor +--- + +Introduced a new `MultiEntityPicker` field that supports selecting multiple Entities diff --git a/.changeset/nine-olives-swim.md b/.changeset/nine-olives-swim.md new file mode 100644 index 0000000000..40852c08c2 --- /dev/null +++ b/.changeset/nine-olives-swim.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-node': minor +--- + +Added functions to clone a repo, create a branch, add files and push and commit to the branch. This allows for files to be added to the a PR for use in the bitbucket pull request action for issue #21762 diff --git a/.changeset/pre.json b/.changeset/pre.json index 1e62c27268..7b419c4250 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -262,7 +262,90 @@ "@backstage/plugin-vault": "0.1.24", "@backstage/plugin-vault-backend": "0.4.2", "@backstage/plugin-vault-node": "0.1.2", - "@backstage/plugin-xcmetrics": "0.2.47" + "@backstage/plugin-xcmetrics": "0.2.47", + "@backstage/plugin-auth-backend-module-oidc-provider": "0.0.0", + "@backstage/plugin-signals": "0.0.0", + "@backstage/plugin-signals-backend": "0.0.0", + "@backstage/plugin-signals-node": "0.0.0", + "@backstage/plugin-signals-react": "0.0.0" }, - "changesets": [] + "changesets": [ + "afraid-numbers-invite", + "angry-phones-arrive", + "brown-items-hammer", + "chilled-chefs-notice", + "chilly-seahorses-bake", + "cold-cooks-care", + "curvy-ladybugs-impress", + "cyan-bats-lick", + "cyan-icons-rest", + "dry-lizards-taste", + "dry-lobsters-flash", + "dull-dolphins-explain", + "dull-fireants-repeat", + "empty-ligers-hang", + "fast-jeans-walk", + "fifty-adults-watch", + "fifty-files-argue", + "flat-wasps-fold", + "forty-cars-scream", + "friendly-cheetahs-rescue", + "funny-timers-visit", + "good-lemons-lick", + "gorgeous-bobcats-press", + "grumpy-poets-study", + "hot-pillows-poke", + "hot-tips-doubt", + "kind-clouds-fly", + "large-frogs-grab", + "large-tables-wonder", + "lemon-cameras-remember", + "long-suns-bow", + "loud-walls-compare", + "lovely-starfishes-remain", + "many-pugs-change", + "metal-elephants-sit", + "metal-students-drive", + "neat-hotels-wink", + "nine-bulldogs-camp", + "nine-olives-swim", + "old-students-smoke", + "olive-singers-accept", + "polite-meals-hug", + "real-eggs-sip", + "renovate-47c1714", + "renovate-4b698fb", + "renovate-5f8d1ca", + "renovate-95b717a", + "renovate-f58dd5c", + "renovate-fb2e0b9", + "rotten-lemons-cry", + "serious-carpets-learn", + "seven-dots-serve", + "seven-plums-return", + "sharp-pandas-hunt", + "shy-carrots-decide", + "silent-hotels-knock", + "silent-poets-grab", + "six-melons-end", + "sixty-shoes-prove", + "soft-beans-tease", + "sour-rivers-fry", + "strange-parents-hammer", + "tame-numbers-smile", + "tame-rockets-sin", + "ten-numbers-happen", + "ten-planets-guess", + "tiny-kiwis-know", + "tough-drinks-scream", + "twenty-taxis-mate", + "two-coats-smile", + "two-singers-learn", + "unlucky-wasps-tan", + "warm-maps-scream", + "wet-emus-work", + "wicked-elephants-scream", + "wild-owls-doubt", + "young-rules-repeat" + ] } diff --git a/.changeset/rare-seals-thank.md b/.changeset/rare-seals-thank.md new file mode 100644 index 0000000000..345c1c91b4 --- /dev/null +++ b/.changeset/rare-seals-thank.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-plugin-api': patch +--- + +Added `RouteResolutionsApi` as a replacement for the routing context. diff --git a/.changeset/renovate-95b717a.md b/.changeset/renovate-95b717a.md new file mode 100644 index 0000000000..59beab8d04 --- /dev/null +++ b/.changeset/renovate-95b717a.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-bitbucket-cloud-common': patch +--- + +Updated dependency `ts-morph` to `^21.0.0`. diff --git a/.changeset/serious-carpets-learn.md b/.changeset/serious-carpets-learn.md new file mode 100644 index 0000000000..1f13420976 --- /dev/null +++ b/.changeset/serious-carpets-learn.md @@ -0,0 +1,9 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +'@backstage/plugin-scaffolder-common': minor +'@backstage/plugin-scaffolder-react': minor +'@backstage/plugin-scaffolder-node': minor +'@backstage/plugin-scaffolder': patch +--- + +Introduced the first version of recoverable tasks. diff --git a/.changeset/shiny-poets-tease.md b/.changeset/shiny-poets-tease.md new file mode 100644 index 0000000000..a991601a88 --- /dev/null +++ b/.changeset/shiny-poets-tease.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs-node': patch +--- + +Update to a newer version of `@trendyol-js/openstack-swift-sdk` diff --git a/.changeset/tall-tools-compare.md b/.changeset/tall-tools-compare.md new file mode 100644 index 0000000000..f55c8ef5a5 --- /dev/null +++ b/.changeset/tall-tools-compare.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-kubernetes-node': patch +--- + +Introduced `PinnipedHelper` class to enable authentication to Kubernetes clusters through Pinniped diff --git a/.changeset/tidy-cooks-mix.md b/.changeset/tidy-cooks-mix.md new file mode 100644 index 0000000000..873de64a45 --- /dev/null +++ b/.changeset/tidy-cooks-mix.md @@ -0,0 +1,32 @@ +--- +'@backstage/plugin-azure-sites-backend': patch +'@backstage/plugin-azure-sites-common': patch +'@backstage/plugin-azure-sites': patch +--- + +Azure Sites `start` and `stop` action is now protected with the Permissions framework. + +The below example describes an action that forbids anyone but the owner of the catalog entity to trigger actions towards a site tied to an entity. + +```typescript + // packages/backend/src/plugins/permission.ts + import { azureSitesActionPermission } from '@backstage/plugin-azure-sites-common'; + ... + class TestPermissionPolicy implements PermissionPolicy { + async handle(request: PolicyQuery, user?: BackstageIdentityResponse): Promise { + if (isPermission(request.permission, azureSitesActionPermission)) { + return createCatalogConditionalDecision( + request.permission, + catalogConditions.isEntityOwner({ + claims: user?.identity.ownershipEntityRefs ?? [], + }), + ); + } + ... + return { + result: AuthorizeResult.ALLOW, + }; + } + ... + } +``` diff --git a/.changeset/tidy-cooks-mixed.md b/.changeset/tidy-cooks-mixed.md new file mode 100644 index 0000000000..a72f1ee0df --- /dev/null +++ b/.changeset/tidy-cooks-mixed.md @@ -0,0 +1,31 @@ +--- +'@backstage/plugin-azure-sites-backend': minor +--- + +**BREAKING**: `catalogApi` and `permissionsApi` are now a requirement to be passed through to the `createRouter` function. + +You can fix the typescript issues by passing through the required dependencies like the below `diff` shows: + +```diff + import { + createRouter, + AzureSitesApi, + } from '@backstage/plugin-azure-sites-backend'; + import { Router } from 'express'; + import { PluginEnvironment } from '../types'; + + export default async function createPlugin( + env: PluginEnvironment, + ): Promise { ++ const catalogClient = new CatalogClient({ ++ discoveryApi: env.discovery, ++ }); + + return await createRouter({ + logger: env.logger, + azureSitesApi: AzureSitesApi.fromConfig(env.config), ++ catalogApi: catalogClient, ++ permissionsApi: env.permissions, + }); + } +``` diff --git a/.changeset/unlucky-wasps-tan.md b/.changeset/unlucky-wasps-tan.md new file mode 100644 index 0000000000..97813cb416 --- /dev/null +++ b/.changeset/unlucky-wasps-tan.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-bitbucket': patch +--- + +Enhanced the pull request action to allow for adding new content to the PR as described in this issue #21762 diff --git a/.changeset/wild-owls-doubt.md b/.changeset/wild-owls-doubt.md new file mode 100644 index 0000000000..84abffb159 --- /dev/null +++ b/.changeset/wild-owls-doubt.md @@ -0,0 +1,16 @@ +--- +'@backstage/plugin-scaffolder-backend': minor +--- + +The built-in module list has been trimmed down when using the new Backend System. Provider specific modules should now be installed with `backend.add` to provide additional actions to the scaffolder. These modules are as follows: + +- `@backstage/plugin-scaffolder-backend-module-github` +- `@backstage/plugin-scaffolder-backend-module-gitlab` +- `@backstage/plugin-scaffolder-backend-module-bitbucket` +- `@backstage/plugin-scaffolder-backend-module-gitea` +- `@backstage/plugin-scaffolder-backend-module-gerrit` +- `@backstage/plugin-scaffolder-backend-module-confluence-to-markdown` +- `@backstage/plugin-scaffolder-backend-module-cookiecutter` +- `@backstage/plugin-scaffolder-backend-module-rails` +- `@backstage/plugin-scaffolder-backend-module-sentry` +- `@backstage/plugin-scaffolder-backend-module-yeoman` diff --git a/.github/workflows/verify_storybook.yml b/.github/workflows/verify_storybook.yml index 191c326df4..1c3a5fd619 100644 --- a/.github/workflows/verify_storybook.yml +++ b/.github/workflows/verify_storybook.yml @@ -51,7 +51,7 @@ jobs: - run: yarn build-storybook - - uses: chromaui/action@7fb6b0407c69171ce521d08355a825958a5ef81a # v10 + - uses: chromaui/action@5f2cdb26c04c0364f5c8ca3fc41627a83d6ffc8a # v10 with: token: ${{ secrets.GITHUB_TOKEN }} # projectToken intentionally shared to allow collaborators to run Chromatic on forks diff --git a/docs/backend-system/building-backends/08-migrating.md b/docs/backend-system/building-backends/08-migrating.md index 45478d632e..fc1a6f1859 100644 --- a/docs/backend-system/building-backends/08-migrating.md +++ b/docs/backend-system/building-backends/08-migrating.md @@ -700,6 +700,26 @@ const backend = createBackend(); backend.add(import('@backstage/plugin-scaffolder-backend/alpha')); ``` +With the new Backend System version of the Scaffolder plugin, any provider specific actions will need to be installed separately. +For example - GitHub actions are now collected under the `@backstage/plugin-scaffolder-backend-module-github` package. + +```ts title="packages/backend/src/index.ts" +const backend = createBackend(); +backend.add(import('@backstage/plugin-scaffolder-backend/alpha')); + +/* highlight-add-next-line */ +backend.add(import('@backstage/plugin-scaffolder-backend-module-github')); +``` + +And of course you'll need to install those separately as well. + +```bash +# from the repository root +yarn add --cwd packages/backend @backstage/plugin-scaffolder-backend-module-github +``` + +You can find a list of the available modules under the [plugins directory](https://github.com/backstage/backstage/tree/master/plugins) in the monorepo. + If you have other customizations made to `plugins/scaffolder.ts`, such as adding custom actions, read on. Otherwise, you should be able to just delete that file at this point. diff --git a/docs/features/software-templates/ui-options-examples.md b/docs/features/software-templates/ui-options-examples.md index b402f68aee..7f0e5b225f 100644 --- a/docs/features/software-templates/ui-options-examples.md +++ b/docs/features/software-templates/ui-options-examples.md @@ -119,6 +119,117 @@ entity: defaultNamespace: payment ``` +## MultiEntityPicker + +The input props that can be specified under `ui:options` for the `MultiEntityPicker` field extension. + +### `allowArbitraryValues` + +Whether to allow arbitrary user input. Defaults to true. + +`allowArbitraryValues` provides input validation when selecting an entity as the values you enter will correspond to a valid entity. + +- Adding a valid entity with `allowArbitraryValues` as `false` + +```yaml +entity: + title: Entities + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + allowArbitraryValues: false +``` + +- Adding an arbitrary entity with `allowArbitraryValues` as `true` (default value) + +```yaml +entity: + title: Entities + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + allowArbitraryValues: true +``` + +### `catalogFilter` + +`catalogFilter` supports filtering options by any field(s) of an entity. + +- Get all entities of kind `Group` + +```yaml +entity: + title: Entities + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + catalogFilter: + - kind: Group +``` + +- Get entities of kind `Group` and spec.type `team` + +```yaml +entity: + title: Entities + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + catalogFilter: + - kind: Group + spec.type: team +``` + +For the full details on the spec.\* values see [here](../software-catalog/descriptor-format.md#kind-group). + +### `defaultKind` + +The default entity kind. + +```yaml +system: + title: System + type: array + description: Systems of the component + ui:field: MultiEntityPicker + ui:options: + catalogFilter: + kind: System + defaultKind: System +``` + +### `defaultNamespace` + +The ID of a namespace that the entity belongs to. The default value is `default`. + +- Listing all entities in the `default` namespace (default value) + +```yaml +entity: + title: Entity + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + defaultNamespace: default +``` + +- Listing all entities in the `payment` namespace + +```yaml +entity: + title: Entity + type: array + description: Entities of the component + ui:field: MultiEntityPicker + ui:options: + defaultNamespace: payment +``` + ## `OwnerPicker` The input props that can be specified under `ui:options` for the `OwnerPicker` field extension. diff --git a/docs/getting-started/contributors.md b/docs/getting-started/contributors.md index 123958d440..9ba338af96 100644 --- a/docs/getting-started/contributors.md +++ b/docs/getting-started/contributors.md @@ -11,4 +11,4 @@ Therefore we want to create a strong community of contributors -- all working to Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. ❤️ -To get you started we've put together a [Contributors Guide in the Backstage GitHub repo](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md) that has all the information you need +To get you started we've put together a [Contributors Guide in the Backstage GitHub repo](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md) that has all the information you need. diff --git a/docs/overview/threat-model.md b/docs/overview/threat-model.md index cb1379aa27..a5adf8025d 100644 --- a/docs/overview/threat-model.md +++ b/docs/overview/threat-model.md @@ -34,7 +34,7 @@ The integrator is also responsible for maintaining the resolved NPM dependencies There are many common facilities that are configured centrally and available to all Backstage backend plugins. For example there is a `DatabaseManager` that provides access to a SQL database, `TaskScheduler` for scheduling long-running tasks, `Logger` as a general logging facility, and `UrlReader` for reading content from external sources. These are all configured either directly in code, or within the `backend` block of the static configuration. The appropriate care needs to be taken to ensure that any secrets remain confidential and no malicious configuration is injected. -In a typical Backstage setup, there is no boundary between plugins that run on the same host. Likewise, there is no boundary between plugins that share the same database access. Any plugin that is running on a host that has access to the logical database of any other plugin should be considered to have full access to that other plugin. For example, if you deploy the `auth` and `catalog` plugins on separate hosts with separate configuration and credentials, the `catalog` plugin is still considered to have full access to the `auth` plugin if the `catalog` plugin has access to the `auth` plugin's logical database. The only way to create a boundary between the two plugins is to deploy them in such a way that they do not have access to each others’ database. This applies to the database facility as well as any other shared resources, such as the cache. +In a typical Backstage setup, there is no boundary between plugins that run on the same host. Likewise, there is no boundary between plugins that share the same database access. Any plugin that is running on a host that has access to the logical database of any other plugin should be considered to have full access to that other plugin. For example, even if you deploy the `auth` and `catalog` plugins on separate hosts with separate configuration and credentials, the `catalog` plugin is still considered to have full access to the `auth` plugin as long as the `catalog` plugin has access to the `auth` plugin's logical database. The only way to create a boundary between the two plugins is to deploy them in such a way that they do not have access to each others’ database. This applies to the database facility as well as any other shared resources, such as the cache. The `UrlReader` facility is of particular interest for a secure Backstage configuration. In particular the `backend.reading.allow` configuration lists the hosts that you trust the backend to be able to read content from on behalf of users. It is extremely important that this list does not, for example, allow access to instance metadata endpoints of cloud providers, or other endpoints that your Backstage instance may have access to which contain sensitive information. In general it is recommended to keep the list minimal and only allow reading from required endpoints. The same concerns apply to custom implementations of the `UrlReader` interface, if you need to implement these through code. diff --git a/docs/releases/v1.23.0-next.0-changelog.md b/docs/releases/v1.23.0-next.0-changelog.md new file mode 100644 index 0000000000..59257b1030 --- /dev/null +++ b/docs/releases/v1.23.0-next.0-changelog.md @@ -0,0 +1,2958 @@ +# Release v1.23.0-next.0 + +## @backstage/backend-common@0.21.0-next.0 + +### Minor Changes + +- e85aa98: drop databases after unit tests if the database instance is not running in docker + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/backend-dev-utils@0.1.3 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/types@1.1.1 + +## @backstage/backend-test-utils@0.3.0-next.0 + +### Minor Changes + +- e85aa98: drop databases after unit tests if the database instance is not running in docker + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/catalog-client@1.6.0-next.0 + +### Minor Changes + +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + +## @backstage/frontend-app-api@0.6.0-next.0 + +### Minor Changes + +- 86346c2: **BREAKING**: The `app.routes.bindings` app-config mapping has been simplified. You now only need to specify the plugin ID and route ID on both sides of the mapping. + + Old form: + + ```yaml + app: + routes: + bindings: + plugin.catalog.externalRoutes.viewTechDoc: plugin.techdocs.routes.docRoot + plugin.catalog.externalRoutes.createComponent: plugin.catalog-import.routes.importPage + ``` + + New form: + + ```yaml + app: + routes: + bindings: + catalog.viewTechDoc: techdocs.docRoot + catalog.createComponent: catalog-import.importPage + ``` + +### Patch Changes + +- 42ebf27: Added `IconsApi` implementation and the ability to configure icons through the `icons` option for `createApp` and `createSpecializedApp`. This is not a long-term solution as icons should be installable via extensions instead. This is just a stop-gap to make sure there is feature parity with the existing frontend system. +- e0a4dd1: Improved the error message when data input/output shapes do not match +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## @backstage/repo-tools@0.6.0-next.0 + +### Minor Changes + +- 04907c3: Updates the OpenAPI client template to support the new format for identifying plugin ID. You should now use `info.title` like so, + + ```diff + info: + + title: yourPluginId + - title: @internal/plugin-*-backend + + servers: + - / + - - yourPluginId + ``` + +- b10c603: Add support for `oneOf` in client generated by `schema openapi generate-client`. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/errors@1.2.3 + +## @backstage/test-utils@1.5.0-next.0 + +### Minor Changes + +- bb40898: Added `components` option to `TestAppOptions`, which will be forwarded as the `components` option to `createApp`. + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/plugin-auth-backend-module-oidc-provider@0.1.0-next.0 + +### Minor Changes + +- 5d2fcba: Created new `@backstage/plugin-auth-backend-module-oidc-provider` module package to house oidc auth provider migration. + +### Patch Changes + +- 8afb6f4: Updated dependency `passport` to `^0.7.0`. +- Updated dependencies + - @backstage/plugin-auth-backend@0.20.4-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-catalog@1.17.0-next.0 + +### Minor Changes + +- e541c0e: Exported `CatalogTable.defaultColumnsFunc` for defining the columns in `` of some Kinds while using the default columns for the others. + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- f899eec: Change default icon for `kind:resource` to the storage icon. +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- 797a329: Fixed inconsistencies in icons used for System and Template +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-catalog-backend@1.17.0-next.0 + +### Minor Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-cloudbuild@0.4.0-next.0 + +### Minor Changes + +- 0328d1b: Changed build list view to automatically filter builds based on repository name matching component-info's metadata.name. + Added optional `google.com/cloudbuild-repo-name` annotation which allows you to specify a different repository to filter on. + Added optional `google.com/cloudbuild-trigger-name` annotation which allows you to filter based on a trigger name instead of a repo name. + Updated the ReadMe with information about the filtering and some other minor verbiage updates. + Changed `substitutions.BRANCH_NAME` to `substitutions.REF_NAME` so that the Ref field is populated properly. + Added optional `google.com/cloudbuild-location` annotation which allows you to specify the Cloud Build location of your builds. Default is global scope. + Changed build list view to show builds in a specific location if the location annotation is used. + Updated ReadMe with information about the use of the location filtering. + +### Patch Changes + +- ef3cad4: Add telemetry HTTP header Google Cloud Platform +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-kubernetes-react@0.3.0-next.0 + +### Minor Changes + +- 0d526c8: **BREAKING** The pod exec terminal is now disabled by default since there are several scenarios where it is known not to work. It can be re-enabled at your own risk by setting the config parameter `kubernetes.podExecTerminal.enabled` to `true`. + +### Patch Changes + +- 536f67d: Fix broken XtermJS CSS import +- db1054b: Fixed a bug where the logs dialog and any other functionality depending on the proxy endpoint would fail for clusters configured with the OIDC auth provider. +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder@1.18.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- a86920b: Introduced a new `MultiEntityPicker` field that supports selecting multiple Entities + +### Patch Changes + +- b0d1d80: Added basic support for the new frontend system, exported from the `/alpha` subpath. +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- da059d7: Removed alpha symbol from Task List header +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- 11b9a08: Introduced the first version of recoverable tasks. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/plugin-scaffolder-backend@1.21.0-next.0 + +### Minor Changes + +- 11b9a08: Introduced the first version of recoverable tasks. +- e9a5228: The built-in module list has been trimmed down when using the new Backend System. Provider specific modules should now be installed with `backend.add` to provide additional actions to the scaffolder. These modules are as follows: + + - `@backstage/plugin-scaffolder-backend-module-github` + - `@backstage/plugin-scaffolder-backend-module-gitlab` + - `@backstage/plugin-scaffolder-backend-module-bitbucket` + - `@backstage/plugin-scaffolder-backend-module-gitea` + - `@backstage/plugin-scaffolder-backend-module-gerrit` + - `@backstage/plugin-scaffolder-backend-module-confluence-to-markdown` + - `@backstage/plugin-scaffolder-backend-module-cookiecutter` + - `@backstage/plugin-scaffolder-backend-module-rails` + - `@backstage/plugin-scaffolder-backend-module-sentry` + - `@backstage/plugin-scaffolder-backend-module-yeoman` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.2.13-next.0 + - @backstage/plugin-scaffolder-backend-module-azure@0.1.2-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-scaffolder-common@1.5.0-next.0 + +### Minor Changes + +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.4.3 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-scaffolder-node@0.3.0-next.0 + +### Minor Changes + +- 3a9ba42: Added functions to clone a repo, create a branch, add files and push and commit to the branch. This allows for files to be added to the a PR for use in the bitbucket pull request action for issue #21762 +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-react@1.8.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- 0b0c6b6: Allow defining default output text to be shown +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## @backstage/plugin-search-backend@1.5.0-next.0 + +### Minor Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/app-defaults@1.4.8-next.0 + +### Patch Changes + +- f899eec: Change default icon for `kind:resource` to the storage icon. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/backend-app-api@0.5.11-next.0 + +### Patch Changes + +- e0c18ef: Include the extension point ID and the module ID in the backend init error message. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/config-loader@1.6.1 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/backend-defaults@0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/backend-dynamic-feature-service@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-events-backend@0.2.19-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/backend-openapi-utils@0.1.3-next.0 + +### Patch Changes + +- 2067689: Internal updates due to `json-schema-to-ts` +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + +## @backstage/backend-plugin-api@0.6.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/backend-tasks@0.5.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/cli@0.25.2-next.0 + +### Patch Changes + +- c624938: Add experimental support for optional `auth` app entry point. +- acd2860: Updated dependency `vite-plugin-node-polyfills` to `^0.19.0`. +- 35725e2: Updated dependencies in frontend plugin templates +- c7259dc: Updated the backend module template to make the module instance the package default export. +- Updated dependencies + - @backstage/eslint-plugin@0.1.5-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/config-loader@1.6.1 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/release-manifests@0.0.11 + - @backstage/types@1.1.1 + +## @backstage/core-compat-api@0.1.2-next.0 + +### Patch Changes + +- 1fa5041: The backwards compatibility provider will now use the new `ComponentsApi` and `IconsApi` when implementing the old `AppContext`. +- 7155c30: Added `convertLegacyRouteRefs` for bulk conversion of plugin routes. +- 2f2a1d2: Plugins converted by `convertLegacyApp` now have their `routes` and `externalRoutes` included as well, allowing them to be used to bind external routes in configuration. +- 1184990: collectLegacyRoutes throws in case invalid element is found +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/version-bridge@1.0.7 + +## @backstage/create-app@0.5.11-next.0 + +### Patch Changes + +- aeec29c: Updated `packages/app` as well as the root `package.json` type resolutions to use React v18. + + The `@testing-library/*` dependencies have also been updated to the ones compatible with React v18, and the test at `packages/app/src/App.test.tsx` had been updated to use more modern patterns that work better with these new versions. + + For information on how to migrate existing apps to React v18, see the [migration guide](https://backstage.io/docs/tutorials/react18-migration) + +- Updated dependencies + - @backstage/cli-common@0.1.13 + +## @backstage/dev-utils@1.0.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + +## @backstage/eslint-plugin@0.1.5-next.0 + +### Patch Changes + +- 995d280: Added new `@backstage/no-top-level-material-ui-4-imports` rule that forbids top level imports from Material UI v4 packages + +## @backstage/frontend-plugin-api@0.5.1-next.0 + +### Patch Changes + +- 7eae3e0: Added initial `IconsApi` definition. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + +## @backstage/frontend-test-utils@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/types@1.1.1 + +## @techdocs/cli@1.8.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + +## @backstage/plugin-adr@0.6.13-next.0 + +### Patch Changes + +- 0b03962: Updated README +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-adr-common@0.2.19 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-adr-backend@0.4.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/plugin-adr-common@0.2.19 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-airbrake@0.3.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/dev-utils@1.0.27-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-airbrake-backend@0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-allure@0.1.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-api-docs@0.10.4-next.0 + +### Patch Changes + +- 170c023: Adding `supportedSubmitMethods` prop to `api-docs` to pass to the Swagger UI. This allows users to specify which HTTP methods they wish to allow end-users to make requests through the `Try It Out` button on the Swagger UI. +- c03f977: Updated dependency `graphiql` to `3.1.0`. +- 49b3b5e: Updated dependency `@asyncapi/react-component` to `1.2.13`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/plugin-app-backend@0.3.58-next.0 + +### Patch Changes + +- 9dfd57d: Do not force caching of the Javascript asset that contains the injected config. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-app-node@0.1.10-next.0 + +## @backstage/plugin-app-node@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-app-visualizer@0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-auth-backend@0.20.4-next.0 + +### Patch Changes + +- a3f1fa3: Use the externalized `auth-backend-module-microsoft-provider` again. +- 5d2fcba: Migrated oidc auth provider to new `@backstage/plugin-auth-backend-module-oidc-provider` module package. +- Updated dependencies + - @backstage/plugin-auth-backend-module-okta-provider@0.0.3-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.1.0-next.0 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.5-next.0 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-google-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.4-next.0 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.2-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-auth-backend-module-atlassian-provider@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-auth-backend-module-github-provider@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-gitlab-provider@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-google-provider@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-microsoft-provider@0.1.5-next.0 + +### Patch Changes + +- 1ff2684: Added the possibility to use custom scopes for performing login with Microsoft EntraID. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-oauth2-provider@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + +## @backstage/plugin-auth-backend-module-okta-provider@0.0.3-next.0 + +### Patch Changes + +- cd5114c: Added missing `additionalScopes` option to configuration schema. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-auth-backend-module-pinniped-provider@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-auth-backend-module-vmware-cloud-provider@0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + +## @backstage/plugin-auth-node@0.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-azure-devops@0.3.12-next.0 + +### Patch Changes + +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- cb0afaa: Prefer `dev.azure.com/build-definition` annotation when it is provided, as it is more specific than `dev.azure.com/project-repo`. This can also be used as a filter for mono-repos. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-azure-devops-common@0.3.2 + +## @backstage/plugin-azure-devops-backend@0.5.2-next.0 + +### Patch Changes + +- 353244d: Added a note about Service Principles +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-azure-devops-common@0.3.2 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-azure-sites@0.1.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-azure-sites-common@0.1.1 + +## @backstage/plugin-azure-sites-backend@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-azure-sites-common@0.1.1 + +## @backstage/plugin-badges@0.2.54-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-badges-backend@0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-bazaar@0.2.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-bazaar-backend@0.3.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 + +### Patch Changes + +- 2e6af00: Updated dependency `ts-morph` to `^21.0.0`. +- Updated dependencies + - @backstage/integration@1.8.0 + +## @backstage/plugin-bitrise@0.1.57-next.0 + +### Patch Changes + +- e24e4d3: Update README +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-catalog-backend-module-aws@0.3.4-next.0 + +### Patch Changes + +- a81b1ba: The default EKS cluster entity transformer now sets the new + `kubernetes.io/x-k8s-aws-id` annotation. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-azure@0.1.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-backstage-openapi@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-catalog-backend-module-bitbucket@0.2.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-cloud@0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-catalog-backend-module-bitbucket-server@0.1.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-catalog-backend-module-gcp@0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + +## @backstage/plugin-catalog-backend-module-gerrit@0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-catalog-backend-module-github@0.4.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-catalog-backend-module-github-org@0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-backend-module-github@0.4.8-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-catalog-backend-module-gitlab@0.3.7-next.0 + +### Patch Changes + +- 60e4c2a: Added the option to provide custom `groupTransformer`, `userTransformer` and `groupNameTransformer` to allow custom transformations of groups and users +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + +## @backstage/plugin-catalog-backend-module-incremental-ingestion@0.4.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-catalog-backend-module-ldap@0.5.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-msgraph@0.5.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-openapi@0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-puppetdb@0.1.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-backend-module-unprocessed@0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + +## @backstage/plugin-catalog-graph@0.3.4-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 + +## @backstage/plugin-catalog-import@0.10.6-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-catalog-node@1.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-catalog-react@1.9.4-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- 71c6d7a: Overflowing labels in OwnerPicker (Catalog) are now truncated. Hovering over them shows the full label +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/plugin-cicd-statistics@0.1.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-cicd-statistics-module-gitlab@0.1.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-cicd-statistics@0.1.32-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-circleci@0.3.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-code-climate@0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-code-coverage@0.2.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-code-coverage-backend@0.2.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-cost-insights@0.12.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/plugin-cost-insights-common@0.1.2 + +## @backstage/plugin-devtools@0.1.9-next.0 + +### Patch Changes + +- c12a86c: Refactored code to improve accessibility by moving elements outside the `ul` tag and placing them appropriately. Also adjusted theme to offer better contrast. +- b89d8be: Added alpha support for the New Frontend System (Declarative Integration) +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-devtools-common@0.1.8 + - @backstage/plugin-permission-react@0.4.19 + +## @backstage/plugin-devtools-backend@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-devtools-common@0.1.8 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-dynatrace@8.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-entity-feedback@0.2.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-entity-feedback-common@0.1.3 + +## @backstage/plugin-entity-feedback-backend@0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-entity-feedback-common@0.1.3 + +## @backstage/plugin-entity-validation@0.1.15-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- 1f70e46: Improves UX of the EntityValidationPage: Moves the validate button below the EntityTextArea which is actually validated, the location TextField can now be hidden to prevent confusion about what is validated and additional content can be added to the top of the validation page. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-events-backend@0.2.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-aws-sqs@0.2.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-azure@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-bitbucket-cloud@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-gerrit@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-github@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-module-gitlab@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-backend-test-utils@0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-events-node@0.2.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + +## @backstage/plugin-explore@0.4.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-explore-common@0.0.2 + - @backstage/plugin-explore-react@0.0.35 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-explore-backend@0.0.20-next.0 + +### Patch Changes + +- fd3d51c: Add support for the new backend system. + + A new backend plugin for the explore backend + was added and exported as `default`. + + You can use it with the new backend system like + + ```ts title="packages/backend/src/index.ts" + backend.add(import('@backstage/plugin-explore-backend')); + ``` + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-explore-common@0.0.2 + +## @backstage/plugin-firehydrant@0.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-fossa@0.2.62-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-github-actions@0.6.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + +## @backstage/plugin-github-deployments@0.1.61-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + +## @backstage/plugin-github-issues@0.2.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-github-pull-requests-board@0.1.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration@1.8.0 + +## @backstage/plugin-gocd@0.1.36-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-graphiql@0.3.3-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-home@0.6.2-next.0 + +### Patch Changes + +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- e9cdfd3: Fix typo in VisitsStorageApi +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-home-react@0.1.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + +## @backstage/plugin-home-react@0.1.8-next.0 + +### Patch Changes + +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-ilert@0.2.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-jenkins@0.9.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-jenkins-common@0.1.23 + +## @backstage/plugin-jenkins-backend@0.3.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-jenkins-common@0.1.23 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-kafka@0.3.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-kafka-backend@0.3.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-kubernetes@0.11.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-kubernetes-react@0.3.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-kubernetes-backend@0.14.2-next.0 + +### Patch Changes + +- 7233f57: Fixed an issue where a misleading error message would be logged when an + unsupported service locator method was specified. +- a775596: Enabled a way to include custom auth metadata info on the clusters endpoint. If you want to implement a Kubernetes auth strategy which requires surfacing custom auth metadata to the frontend, use the new presentAuthMetadata method on the AuthenticationStrategy interface. +- 7278d80: The purpose of this patch is to add a new login method which is `googleServiceAccount` configuring the kubernetes properties in the app-config.yaml file with authProvider key +- daad576: Clusters configured with the `aws` authentication strategy can now customize the + `x-k8s-aws-id` header value used to generate tokens. This value can be specified + specified via the `kubernetes.io/x-k8s-aws-id` parameter (in + `metadata.annotations` for clusters in the catalog, or the `authMetadata` block + on clusters in the app-config). This is particularly helpful when a Backstage + instance contains multiple AWS clusters with the same name in different regions + \-- using this new parameter, the clusters can be given different logical names + to distinguish them but still use the same ID for the purposes of generating + tokens. +- f180cba: Enabling authentication to kubernetes clusters with mTLS x509 client certs +- 7f6ff25: Custom per-cluster auth metadata (mainly for use with custom `AuthenticationStrategy` implementations) can now be specified in the `authMetadata` property of clusters in the app-config. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-node@0.1.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration-aws-node@0.1.8 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-kubernetes-cluster@0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-kubernetes-react@0.3.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-kubernetes-common@0.7.4-next.0 + +### Patch Changes + +- daad576: Clusters configured with the `aws` authentication strategy can now customize the + `x-k8s-aws-id` header value used to generate tokens. This value can be specified + specified via the `kubernetes.io/x-k8s-aws-id` parameter (in + `metadata.annotations` for clusters in the catalog, or the `authMetadata` block + on clusters in the app-config). This is particularly helpful when a Backstage + instance contains multiple AWS clusters with the same name in different regions + \-- using this new parameter, the clusters can be given different logical names + to distinguish them but still use the same ID for the purposes of generating + tokens. +- Updated dependencies + - @backstage/catalog-model@1.4.3 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-kubernetes-node@0.1.4-next.0 + +### Patch Changes + +- a775596: Enabled a way to include custom auth metadata info on the clusters endpoint. If you want to implement a Kubernetes auth strategy which requires surfacing custom auth metadata to the frontend, use the new presentAuthMetadata method on the AuthenticationStrategy interface. +- f180cba: Enabling authentication to kubernetes clusters with mTLS x509 client certs +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-lighthouse@0.4.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-lighthouse-common@0.1.4 + +## @backstage/plugin-lighthouse-backend@0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-lighthouse-common@0.1.4 + +## @backstage/plugin-linguist@0.1.15-next.0 + +### Patch Changes + +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-linguist-common@0.1.2 + +## @backstage/plugin-linguist-backend@0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-linguist-common@0.1.2 + +## @backstage/plugin-newrelic-dashboard@0.3.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-nomad@0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-nomad-backend@0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-octopus-deploy@0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-org@0.6.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-catalog-common@1.0.20 + +## @backstage/plugin-org-react@0.1.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-pagerduty@0.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-home-react@0.1.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-periskop@0.1.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-periskop-backend@0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-permission-backend@0.5.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-permission-backend-module-allow-all-policy@0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-permission-node@0.7.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-playlist@0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-playlist-common@0.1.14 + +## @backstage/plugin-playlist-backend@0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-playlist-common@0.1.14 + +## @backstage/plugin-proxy-backend@0.4.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-puppetdb@0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-rollbar@0.4.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-rollbar-backend@0.1.55-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-azure@0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-bitbucket@0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- fc98bb6: Enhanced the pull request action to allow for adding new content to the PR as described in this issue #21762 +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.11-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-cookiecutter@0.2.34-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-gerrit@0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-github@0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-gitlab@0.2.13-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-scaffolder-backend-module-rails@0.4.27-next.0 + +### Patch Changes + +- e9a5228: Make `containerRunner` argument optional +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-scaffolder-backend-module-sentry@0.1.18-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-scaffolder-backend-module-yeoman@0.2.31-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-search@1.4.6-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-elasticsearch@1.3.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-explore-common@0.0.2 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-pg@0.5.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-backend-node@1.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-search-react@1.7.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-sentry@0.5.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-signals@0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/plugin-signals-react@0.0.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-signals-backend@0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-signals-node@0.0.1-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-signals-node@0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + +## @backstage/plugin-signals-react@0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 + +## @backstage/plugin-sonarqube@0.7.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-sonarqube-react@0.1.12 + +## @backstage/plugin-sonarqube-backend@0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + +## @backstage/plugin-splunk-on-call@0.4.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-stack-overflow@0.1.25-next.0 + +### Patch Changes + +- c1bc331: Fixes a bug that made the API return questions not related to the tags provided +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/plugin-home-react@0.1.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-stack-overflow-backend@0.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.3-next.0 + +## @backstage/plugin-tech-insights@0.3.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + +## @backstage/plugin-tech-insights-backend@0.5.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + +## @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/errors@1.2.3 + - @backstage/plugin-tech-insights-common@0.2.12 + +## @backstage/plugin-tech-insights-node@0.4.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + +## @backstage/plugin-tech-radar@0.6.13-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + +## @backstage/plugin-techdocs@1.9.4-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-techdocs-react@1.1.15 + +## @backstage/plugin-techdocs-addons-test-utils@1.0.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-techdocs-react@1.1.15 + +## @backstage/plugin-techdocs-backend@1.9.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + +## @backstage/plugin-techdocs-module-addons-contrib@1.1.5-next.0 + +### Patch Changes + +- 131ffdc: Fix position of the ReportIssue component when is displaying at the top of the container. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-techdocs-react@1.1.15 + +## @backstage/plugin-techdocs-node@1.11.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-search-common@1.2.10 + +## @backstage/plugin-todo@0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-todo-backend@0.3.8-next.0 + +### Patch Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + +## @backstage/plugin-user-settings@0.8.1-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + +## @backstage/plugin-user-settings-backend@0.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + +## @backstage/plugin-vault@0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + +## @backstage/plugin-vault-backend@0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-vault-node@0.1.3-next.0 + +## @backstage/plugin-vault-node@0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + +## example-app@0.2.92-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-import@0.10.6-next.0 + - @backstage/plugin-catalog-graph@0.3.4-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-adr@0.6.13-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/plugin-scaffolder@1.18.0-next.0 + - @backstage/plugin-devtools@0.1.9-next.0 + - @backstage/plugin-user-settings@0.8.1-next.0 + - @backstage/plugin-tech-radar@0.6.13-next.0 + - @backstage/plugin-graphiql@0.3.3-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/plugin-search@1.4.6-next.0 + - @backstage/plugin-api-docs@0.10.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/plugin-stack-overflow@0.1.25-next.0 + - @backstage/plugin-signals@0.0.1-next.0 + - @backstage/plugin-home@0.6.2-next.0 + - @backstage/plugin-cloudbuild@0.4.0-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.5-next.0 + - @backstage/plugin-azure-devops@0.3.12-next.0 + - @backstage/plugin-linguist@0.1.15-next.0 + - @backstage/plugin-airbrake@0.3.30-next.0 + - @backstage/plugin-azure-sites@0.1.19-next.0 + - @backstage/plugin-badges@0.2.54-next.0 + - @backstage/plugin-code-coverage@0.2.23-next.0 + - @backstage/plugin-cost-insights@0.12.19-next.0 + - @backstage/plugin-dynatrace@8.0.4-next.0 + - @backstage/plugin-entity-feedback@0.2.13-next.0 + - @backstage/plugin-explore@0.4.16-next.0 + - @backstage/plugin-github-actions@0.6.11-next.0 + - @backstage/plugin-gocd@0.1.36-next.0 + - @backstage/plugin-jenkins@0.9.5-next.0 + - @backstage/plugin-kafka@0.3.30-next.0 + - @backstage/plugin-kubernetes@0.11.5-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.6-next.0 + - @backstage/plugin-lighthouse@0.4.15-next.0 + - @backstage/plugin-newrelic-dashboard@0.3.5-next.0 + - @backstage/plugin-nomad@0.1.11-next.0 + - @backstage/plugin-octopus-deploy@0.2.12-next.0 + - @backstage/plugin-org@0.6.20-next.0 + - @backstage/plugin-pagerduty@0.7.2-next.0 + - @backstage/plugin-playlist@0.2.4-next.0 + - @backstage/plugin-puppetdb@0.1.13-next.0 + - @backstage/plugin-rollbar@0.4.30-next.0 + - @backstage/plugin-sentry@0.5.15-next.0 + - @backstage/plugin-tech-insights@0.3.22-next.0 + - @backstage/plugin-todo@0.2.34-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-apache-airflow@0.2.19 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-catalog-unprocessed-entities@0.1.7 + - @backstage/plugin-gcalendar@0.3.22 + - @backstage/plugin-gcp-projects@0.3.45 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-microsoft-calendar@0.1.11 + - @backstage/plugin-newrelic@0.3.44 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-shortcuts@0.3.18 + - @backstage/plugin-stackstorm@0.1.10 + - @backstage/plugin-techdocs-react@1.1.15 + +## example-app-next@0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-import@0.10.6-next.0 + - @backstage/plugin-catalog-graph@0.3.4-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-adr@0.6.13-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/plugin-scaffolder@1.18.0-next.0 + - @backstage/plugin-devtools@0.1.9-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/plugin-user-settings@0.8.1-next.0 + - @backstage/plugin-tech-radar@0.6.13-next.0 + - @backstage/plugin-graphiql@0.3.3-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/plugin-search@1.4.6-next.0 + - @backstage/plugin-api-docs@0.10.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/plugin-home@0.6.2-next.0 + - @backstage/plugin-cloudbuild@0.4.0-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.5-next.0 + - @backstage/plugin-azure-devops@0.3.12-next.0 + - @backstage/plugin-linguist@0.1.15-next.0 + - @backstage/plugin-airbrake@0.3.30-next.0 + - @backstage/plugin-azure-sites@0.1.19-next.0 + - @backstage/plugin-badges@0.2.54-next.0 + - @backstage/plugin-code-coverage@0.2.23-next.0 + - @backstage/plugin-cost-insights@0.12.19-next.0 + - @backstage/plugin-dynatrace@8.0.4-next.0 + - @backstage/plugin-entity-feedback@0.2.13-next.0 + - @backstage/plugin-explore@0.4.16-next.0 + - @backstage/plugin-github-actions@0.6.11-next.0 + - @backstage/plugin-gocd@0.1.36-next.0 + - @backstage/plugin-jenkins@0.9.5-next.0 + - @backstage/plugin-kafka@0.3.30-next.0 + - @backstage/plugin-kubernetes@0.11.5-next.0 + - @backstage/plugin-lighthouse@0.4.15-next.0 + - @backstage/plugin-newrelic-dashboard@0.3.5-next.0 + - @backstage/plugin-octopus-deploy@0.2.12-next.0 + - @backstage/plugin-org@0.6.20-next.0 + - @backstage/plugin-pagerduty@0.7.2-next.0 + - @backstage/plugin-playlist@0.2.4-next.0 + - @backstage/plugin-puppetdb@0.1.13-next.0 + - @backstage/plugin-rollbar@0.4.30-next.0 + - @backstage/plugin-sentry@0.5.15-next.0 + - @backstage/plugin-tech-insights@0.3.22-next.0 + - @backstage/plugin-todo@0.2.34-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - app-next-example-plugin@0.0.6-next.0 + - @backstage/plugin-app-visualizer@0.1.1-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-apache-airflow@0.2.19 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-catalog-unprocessed-entities@0.1.7 + - @backstage/plugin-gcalendar@0.3.22 + - @backstage/plugin-gcp-projects@0.3.45 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-microsoft-calendar@0.1.11 + - @backstage/plugin-newrelic@0.3.44 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-shortcuts@0.3.18 + - @backstage/plugin-stackstorm@0.1.10 + - @backstage/plugin-techdocs-react@1.1.15 + +## app-next-example-plugin@0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + +## example-backend@0.2.92-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend-module-rails@0.4.27-next.0 + - @backstage/plugin-azure-devops-backend@0.5.2-next.0 + - @backstage/plugin-explore-backend@0.0.20-next.0 + - @backstage/plugin-auth-backend@0.20.4-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-backend@0.14.2-next.0 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.11-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-search-backend@1.5.0-next.0 + - @backstage/plugin-todo-backend@0.3.8-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-signals-backend@0.0.1-next.0 + - @backstage/plugin-signals-node@0.0.1-next.0 + - @backstage/plugin-scaffolder-backend@1.21.0-next.0 + - @backstage/plugin-app-backend@0.3.58-next.0 + - example-app@0.2.92-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-badges-backend@0.3.7-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-entity-feedback-backend@0.2.7-next.0 + - @backstage/plugin-events-backend@0.2.19-next.0 + - @backstage/plugin-linguist-backend@0.5.7-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-playlist-backend@0.3.14-next.0 + - @backstage/plugin-proxy-backend@0.4.8-next.0 + - @backstage/plugin-rollbar-backend@0.1.55-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + - @backstage/plugin-search-backend-module-pg@0.5.19-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-tech-insights-backend@0.5.24-next.0 + - @backstage/plugin-techdocs-backend@1.9.3-next.0 + - @backstage/plugin-adr-backend@0.4.7-next.0 + - @backstage/plugin-azure-sites-backend@0.1.20-next.0 + - @backstage/plugin-code-coverage-backend@0.2.24-next.0 + - @backstage/plugin-devtools-backend@0.2.7-next.0 + - @backstage/plugin-jenkins-backend@0.3.4-next.0 + - @backstage/plugin-kafka-backend@0.3.8-next.0 + - @backstage/plugin-lighthouse-backend@0.4.2-next.0 + - @backstage/plugin-nomad-backend@0.1.12-next.0 + - @backstage/plugin-permission-backend@0.5.33-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.3.13-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.42-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.3.7-next.0 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + +## example-backend-next@0.0.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-azure-devops-backend@0.5.2-next.0 + - @backstage/plugin-kubernetes-backend@0.14.2-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-search-backend@1.5.0-next.0 + - @backstage/plugin-todo-backend@0.3.8-next.0 + - @backstage/plugin-scaffolder-backend@1.21.0-next.0 + - @backstage/plugin-app-backend@0.3.58-next.0 + - @backstage/backend-defaults@0.2.10-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-badges-backend@0.3.7-next.0 + - @backstage/plugin-catalog-backend-module-openapi@0.1.27-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-entity-feedback-backend@0.2.7-next.0 + - @backstage/plugin-linguist-backend@0.5.7-next.0 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.7-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-playlist-backend@0.3.14-next.0 + - @backstage/plugin-proxy-backend@0.4.8-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-sonarqube-backend@0.2.12-next.0 + - @backstage/plugin-techdocs-backend@1.9.3-next.0 + - @backstage/plugin-adr-backend@0.4.7-next.0 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.1.3-next.0 + - @backstage/plugin-devtools-backend@0.2.7-next.0 + - @backstage/plugin-jenkins-backend@0.3.4-next.0 + - @backstage/plugin-lighthouse-backend@0.4.2-next.0 + - @backstage/plugin-nomad-backend@0.1.12-next.0 + - @backstage/plugin-permission-backend@0.5.33-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.3.7-next.0 + - @backstage/plugin-permission-common@0.7.12 + +## e2e-test@0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.5.11-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/errors@1.2.3 + +## techdocs-cli-embedded-app@0.2.91-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-techdocs-react@1.1.15 + +## @internal/plugin-todo-list-backend@1.0.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 diff --git a/microsite/docusaurus.config.js b/microsite/docusaurus.config.js index 3d175fb892..f07f9da6af 100644 --- a/microsite/docusaurus.config.js +++ b/microsite/docusaurus.config.js @@ -284,7 +284,7 @@ module.exports = { }, ], copyright: - '

Made with ❤️ at Spotify

', + '

Made with ❤️ at Spotify

', }, algolia: { apiKey: '1f0ba86672ccfc3576faa94583e5b318', diff --git a/package.json b/package.json index 483e02fdb5..e24cedb527 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:all": "backstage-cli repo build --all", "build:api-reports": "yarn build:api-reports:only --tsc", "build:api-reports:only": "backstage-repo-tools api-reports --allow-warnings 'packages/core-components,plugins/+(catalog|catalog-import|git-release-manager|jenkins|kubernetes)' -o ae-wrong-input-file-type --validate-release-tags", - "build:api-docs": "LANG=en_EN yarn build:api-reports --docs", + "build:api-docs": "LANG=en_EN yarn build:api-reports --docs --exclude 'plugins/@(adr|adr-backend|adr-common|airbrake|airbrake-backend|allure|analytics-module-ga|analytics-module-ga4|analytics-module-newrelic-browser|apache-airflow|api-docs|api-docs-module-protoc-gen-doc|apollo-explorer|app-visualizer|azure-devops|azure-devops-backend|azure-devops-common|azure-sites|azure-sites-backend|azure-sites-common|badges|badges-backend|bazaar|bazaar-backend|bitbucket-cloud-common|bitrise|catalog-graph|catalog-graphql|catalog-import|catalog-unprocessed-entities|cicd-statistics|cicd-statistics-module-gitlab|circleci|cloudbuild|code-climate|code-coverage|code-coverage-backend|codescene|config-schema|cost-insights|cost-insights-common|dynatrace|entity-feedback|entity-feedback-backend|entity-feedback-common|entity-validation|example-todo-list|example-todo-list-backend|example-todo-list-common|firehydrant|fossa|gcalendar|gcp-projects|git-release-manager|github-actions|github-deployments|github-issues|github-pull-requests-board|gitops-profiles|gocd|graphiql|graphql-backend|graphql-voyager|ilert|jenkins|jenkins-backend|jenkins-common|kafka|kafka-backend|lighthouse|lighthouse-backend|lighthouse-common|linguist|linguist-backend|linguist-common|microsoft-calendar|newrelic|newrelic-dashboard|nomad|nomad-backend|octopus-deploy|opencost|pagerduty|periskop|periskop-backend|playlist|playlist-backend|playlist-common|proxy-backend|puppetdb|rollbar|rollbar-backend|sentry|shortcuts|splunk-on-call|stack-overflow|stack-overflow-backend|stackstorm|tech-radar|tech-radar-2|todo|todo-backend|xcmetrics)'", "build:plugins-report": "node ./scripts/build-plugins-report", "tsc": "tsc", "tsc:full": "backstage-cli repo clean && tsc --skipLibCheck false --incremental false", @@ -56,7 +56,7 @@ "@material-ui/pickers@^3.3.10": "patch:@material-ui/pickers@npm%3A3.3.11#./.yarn/patches/@material-ui-pickers-npm-3.3.11-1c8f68ea20.patch", "@material-ui/pickers@^3.2.10": "patch:@material-ui/pickers@npm%3A3.3.11#./.yarn/patches/@material-ui-pickers-npm-3.3.11-1c8f68ea20.patch" }, - "version": "1.22.0", + "version": "1.23.0-next.0", "dependencies": { "@backstage/errors": "workspace:^", "@manypkg/get-packages": "^1.1.3", diff --git a/packages/app-defaults/CHANGELOG.md b/packages/app-defaults/CHANGELOG.md index 5f815f4b0e..9ac73e575a 100644 --- a/packages/app-defaults/CHANGELOG.md +++ b/packages/app-defaults/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/app-defaults +## 1.4.8-next.0 + +### Patch Changes + +- f899eec: Change default icon for `kind:resource` to the storage icon. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/plugin-permission-react@0.4.19 + ## 1.4.7 ### Patch Changes diff --git a/packages/app-defaults/package.json b/packages/app-defaults/package.json index bf7b56f8c2..4b15d5875a 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.4.7", + "version": "1.4.8-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/app-next-example-plugin/CHANGELOG.md b/packages/app-next-example-plugin/CHANGELOG.md index 6f0545a801..4e41b9690a 100644 --- a/packages/app-next-example-plugin/CHANGELOG.md +++ b/packages/app-next-example-plugin/CHANGELOG.md @@ -1,5 +1,13 @@ # app-next-example-plugin +## 0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + ## 0.0.5 ### Patch Changes diff --git a/packages/app-next-example-plugin/package.json b/packages/app-next-example-plugin/package.json index c7669d93cb..05d7e20823 100644 --- a/packages/app-next-example-plugin/package.json +++ b/packages/app-next-example-plugin/package.json @@ -1,7 +1,7 @@ { "name": "app-next-example-plugin", "description": "Backstage internal example plugin", - "version": "0.0.5", + "version": "0.0.6-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/app-next/CHANGELOG.md b/packages/app-next/CHANGELOG.md index 6272ef11df..e641aa8f71 100644 --- a/packages/app-next/CHANGELOG.md +++ b/packages/app-next/CHANGELOG.md @@ -1,5 +1,81 @@ # example-app-next +## 0.0.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-import@0.10.6-next.0 + - @backstage/plugin-catalog-graph@0.3.4-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-adr@0.6.13-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/plugin-scaffolder@1.18.0-next.0 + - @backstage/plugin-devtools@0.1.9-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/plugin-user-settings@0.8.1-next.0 + - @backstage/plugin-tech-radar@0.6.13-next.0 + - @backstage/plugin-graphiql@0.3.3-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/plugin-search@1.4.6-next.0 + - @backstage/plugin-api-docs@0.10.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/plugin-home@0.6.2-next.0 + - @backstage/plugin-cloudbuild@0.4.0-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.5-next.0 + - @backstage/plugin-azure-devops@0.3.12-next.0 + - @backstage/plugin-linguist@0.1.15-next.0 + - @backstage/plugin-airbrake@0.3.30-next.0 + - @backstage/plugin-azure-sites@0.1.19-next.0 + - @backstage/plugin-badges@0.2.54-next.0 + - @backstage/plugin-code-coverage@0.2.23-next.0 + - @backstage/plugin-cost-insights@0.12.19-next.0 + - @backstage/plugin-dynatrace@8.0.4-next.0 + - @backstage/plugin-entity-feedback@0.2.13-next.0 + - @backstage/plugin-explore@0.4.16-next.0 + - @backstage/plugin-github-actions@0.6.11-next.0 + - @backstage/plugin-gocd@0.1.36-next.0 + - @backstage/plugin-jenkins@0.9.5-next.0 + - @backstage/plugin-kafka@0.3.30-next.0 + - @backstage/plugin-kubernetes@0.11.5-next.0 + - @backstage/plugin-lighthouse@0.4.15-next.0 + - @backstage/plugin-newrelic-dashboard@0.3.5-next.0 + - @backstage/plugin-octopus-deploy@0.2.12-next.0 + - @backstage/plugin-org@0.6.20-next.0 + - @backstage/plugin-pagerduty@0.7.2-next.0 + - @backstage/plugin-playlist@0.2.4-next.0 + - @backstage/plugin-puppetdb@0.1.13-next.0 + - @backstage/plugin-rollbar@0.4.30-next.0 + - @backstage/plugin-sentry@0.5.15-next.0 + - @backstage/plugin-tech-insights@0.3.22-next.0 + - @backstage/plugin-todo@0.2.34-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - app-next-example-plugin@0.0.6-next.0 + - @backstage/plugin-app-visualizer@0.1.1-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-apache-airflow@0.2.19 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-catalog-unprocessed-entities@0.1.7 + - @backstage/plugin-gcalendar@0.3.22 + - @backstage/plugin-gcp-projects@0.3.45 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-microsoft-calendar@0.1.11 + - @backstage/plugin-newrelic@0.3.44 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-shortcuts@0.3.18 + - @backstage/plugin-stackstorm@0.1.10 + - @backstage/plugin-techdocs-react@1.1.15 + ## 0.0.5 ### Patch Changes diff --git a/packages/app-next/package.json b/packages/app-next/package.json index 2b0b1626ed..09cd302a4e 100644 --- a/packages/app-next/package.json +++ b/packages/app-next/package.json @@ -1,6 +1,6 @@ { "name": "example-app-next", - "version": "0.0.5", + "version": "0.0.6-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md index 6cf62774c1..370100920f 100644 --- a/packages/app/CHANGELOG.md +++ b/packages/app/CHANGELOG.md @@ -1,5 +1,82 @@ # example-app +## 0.2.92-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-import@0.10.6-next.0 + - @backstage/plugin-catalog-graph@0.3.4-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-adr@0.6.13-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/plugin-scaffolder@1.18.0-next.0 + - @backstage/plugin-devtools@0.1.9-next.0 + - @backstage/plugin-user-settings@0.8.1-next.0 + - @backstage/plugin-tech-radar@0.6.13-next.0 + - @backstage/plugin-graphiql@0.3.3-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/plugin-search@1.4.6-next.0 + - @backstage/plugin-api-docs@0.10.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/plugin-stack-overflow@0.1.25-next.0 + - @backstage/plugin-signals@0.0.1-next.0 + - @backstage/plugin-home@0.6.2-next.0 + - @backstage/plugin-cloudbuild@0.4.0-next.0 + - @backstage/plugin-techdocs-module-addons-contrib@1.1.5-next.0 + - @backstage/plugin-azure-devops@0.3.12-next.0 + - @backstage/plugin-linguist@0.1.15-next.0 + - @backstage/plugin-airbrake@0.3.30-next.0 + - @backstage/plugin-azure-sites@0.1.19-next.0 + - @backstage/plugin-badges@0.2.54-next.0 + - @backstage/plugin-code-coverage@0.2.23-next.0 + - @backstage/plugin-cost-insights@0.12.19-next.0 + - @backstage/plugin-dynatrace@8.0.4-next.0 + - @backstage/plugin-entity-feedback@0.2.13-next.0 + - @backstage/plugin-explore@0.4.16-next.0 + - @backstage/plugin-github-actions@0.6.11-next.0 + - @backstage/plugin-gocd@0.1.36-next.0 + - @backstage/plugin-jenkins@0.9.5-next.0 + - @backstage/plugin-kafka@0.3.30-next.0 + - @backstage/plugin-kubernetes@0.11.5-next.0 + - @backstage/plugin-kubernetes-cluster@0.0.6-next.0 + - @backstage/plugin-lighthouse@0.4.15-next.0 + - @backstage/plugin-newrelic-dashboard@0.3.5-next.0 + - @backstage/plugin-nomad@0.1.11-next.0 + - @backstage/plugin-octopus-deploy@0.2.12-next.0 + - @backstage/plugin-org@0.6.20-next.0 + - @backstage/plugin-pagerduty@0.7.2-next.0 + - @backstage/plugin-playlist@0.2.4-next.0 + - @backstage/plugin-puppetdb@0.1.13-next.0 + - @backstage/plugin-rollbar@0.4.30-next.0 + - @backstage/plugin-sentry@0.5.15-next.0 + - @backstage/plugin-tech-insights@0.3.22-next.0 + - @backstage/plugin-todo@0.2.34-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-apache-airflow@0.2.19 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-catalog-unprocessed-entities@0.1.7 + - @backstage/plugin-gcalendar@0.3.22 + - @backstage/plugin-gcp-projects@0.3.45 + - @backstage/plugin-linguist-common@0.1.2 + - @backstage/plugin-microsoft-calendar@0.1.11 + - @backstage/plugin-newrelic@0.3.44 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-shortcuts@0.3.18 + - @backstage/plugin-stackstorm@0.1.10 + - @backstage/plugin-techdocs-react@1.1.15 + ## 0.2.91 ### Patch Changes diff --git a/packages/app/package.json b/packages/app/package.json index 3775935bd9..7b81260b8b 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "example-app", - "version": "0.2.91", + "version": "0.2.92-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/app/src/index-public-experimental.tsx b/packages/app/src/index-public-experimental.tsx new file mode 100644 index 0000000000..9e5f89b4c2 --- /dev/null +++ b/packages/app/src/index-public-experimental.tsx @@ -0,0 +1,82 @@ +/* + * Copyright 2020 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 { createApp } from '@backstage/app-defaults'; +import { AppRouter } from '@backstage/core-app-api'; +import { + AlertDisplay, + OAuthRequestDialog, + SignInPage, +} from '@backstage/core-components'; +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { providers } from '../src/identityProviders'; +import { + configApiRef, + createApiFactory, + discoveryApiRef, + useApi, +} from '@backstage/core-plugin-api'; +import { AuthProxyDiscoveryApi } from '../src/AuthProxyDiscoveryApi'; + +// TODO(Rugvip): make this available via some util, or maybe Utility API? +function readBasePath(configApi: typeof configApiRef.T) { + let { pathname } = new URL( + configApi.getOptionalString('app.baseUrl') ?? '/', + 'http://sample.dev', // baseUrl can be specified as just a path + ); + pathname = pathname.replace(/\/*$/, ''); + return pathname; +} + +const app = createApp({ + apis: [ + createApiFactory({ + api: discoveryApiRef, + deps: { configApi: configApiRef }, + factory: ({ configApi }) => AuthProxyDiscoveryApi.fromConfig(configApi), + }), + ], + components: { + SignInPage: props => { + return ( + + ); + }, + }, +}); + +function RedirectToRoot() { + window.location.pathname = readBasePath(useApi(configApiRef)); + return
; +} + +const App = app.createRoot( + <> + + + + + + , +); + +ReactDOM.createRoot(document.getElementById('root')!).render(); diff --git a/packages/backend-app-api/CHANGELOG.md b/packages/backend-app-api/CHANGELOG.md index 16106ee354..6096ba5451 100644 --- a/packages/backend-app-api/CHANGELOG.md +++ b/packages/backend-app-api/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/backend-app-api +## 0.5.11-next.0 + +### Patch Changes + +- e0c18ef: Include the extension point ID and the module ID in the backend init error message. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/config-loader@1.6.1 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.5.10 ### Patch Changes diff --git a/packages/backend-app-api/package.json b/packages/backend-app-api/package.json index 37fa2c5258..b3b338031e 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.5.10", + "version": "0.5.11-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 de955b7ca1..ca05772aa5 100644 --- a/packages/backend-common/CHANGELOG.md +++ b/packages/backend-common/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/backend-common +## 0.21.0-next.0 + +### Minor Changes + +- e85aa98: drop databases after unit tests if the database instance is not running in docker + +### Patch Changes + +- Updated dependencies + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/backend-dev-utils@0.1.3 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/types@1.1.1 + ## 0.20.1 ### Patch Changes diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 3d746044b0..4df64738ce 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.20.1", + "version": "0.21.0-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 b8bacd3732..1b50491f54 100644 --- a/packages/backend-defaults/CHANGELOG.md +++ b/packages/backend-defaults/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-defaults +## 0.2.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.2.9 ### Patch Changes diff --git a/packages/backend-defaults/package.json b/packages/backend-defaults/package.json index 73a54720f5..3e8793cd3e 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.2.9", + "version": "0.2.10-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend-dynamic-feature-service/CHANGELOG.md b/packages/backend-dynamic-feature-service/CHANGELOG.md index 4b80750865..fa60b2d208 100644 --- a/packages/backend-dynamic-feature-service/CHANGELOG.md +++ b/packages/backend-dynamic-feature-service/CHANGELOG.md @@ -1,5 +1,28 @@ # @backstage/backend-dynamic-feature-service +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-events-backend@0.2.19-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.0 ### Minor Changes diff --git a/packages/backend-dynamic-feature-service/package.json b/packages/backend-dynamic-feature-service/package.json index 18bbd58550..51f7184c49 100644 --- a/packages/backend-dynamic-feature-service/package.json +++ b/packages/backend-dynamic-feature-service/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-dynamic-feature-service", "description": "Backstage dynamic feature service", - "version": "0.1.0", + "version": "0.1.1-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 96cb73808f..25474b6c54 100644 --- a/packages/backend-next/CHANGELOG.md +++ b/packages/backend-next/CHANGELOG.md @@ -1,5 +1,46 @@ # example-backend-next +## 0.0.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-azure-devops-backend@0.5.2-next.0 + - @backstage/plugin-kubernetes-backend@0.14.2-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-search-backend@1.5.0-next.0 + - @backstage/plugin-todo-backend@0.3.8-next.0 + - @backstage/plugin-scaffolder-backend@1.21.0-next.0 + - @backstage/plugin-app-backend@0.3.58-next.0 + - @backstage/backend-defaults@0.2.10-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-badges-backend@0.3.7-next.0 + - @backstage/plugin-catalog-backend-module-openapi@0.1.27-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-entity-feedback-backend@0.2.7-next.0 + - @backstage/plugin-linguist-backend@0.5.7-next.0 + - @backstage/plugin-permission-backend-module-allow-all-policy@0.1.7-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-playlist-backend@0.3.14-next.0 + - @backstage/plugin-proxy-backend@0.4.8-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-sonarqube-backend@0.2.12-next.0 + - @backstage/plugin-techdocs-backend@1.9.3-next.0 + - @backstage/plugin-adr-backend@0.4.7-next.0 + - @backstage/plugin-catalog-backend-module-backstage-openapi@0.1.3-next.0 + - @backstage/plugin-devtools-backend@0.2.7-next.0 + - @backstage/plugin-jenkins-backend@0.3.4-next.0 + - @backstage/plugin-lighthouse-backend@0.4.2-next.0 + - @backstage/plugin-nomad-backend@0.1.12-next.0 + - @backstage/plugin-permission-backend@0.5.33-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.3.7-next.0 + - @backstage/plugin-permission-common@0.7.12 + ## 0.0.19 ### Patch Changes diff --git a/packages/backend-next/package.json b/packages/backend-next/package.json index d6908f6e78..d230227889 100644 --- a/packages/backend-next/package.json +++ b/packages/backend-next/package.json @@ -1,6 +1,6 @@ { "name": "example-backend-next", - "version": "0.0.19", + "version": "0.0.20-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/backend-openapi-utils/CHANGELOG.md b/packages/backend-openapi-utils/CHANGELOG.md index 9cbaa84947..0b21b9aff3 100644 --- a/packages/backend-openapi-utils/CHANGELOG.md +++ b/packages/backend-openapi-utils/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/backend-openapi-utils +## 0.1.3-next.0 + +### Patch Changes + +- 2067689: Internal updates due to `json-schema-to-ts` +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + ## 0.1.2 ### Patch Changes diff --git a/packages/backend-openapi-utils/package.json b/packages/backend-openapi-utils/package.json index 2ca6c3b716..a9ce8c56e2 100644 --- a/packages/backend-openapi-utils/package.json +++ b/packages/backend-openapi-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-openapi-utils", "description": "OpenAPI typescript support.", - "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/packages/backend-plugin-api/CHANGELOG.md b/packages/backend-plugin-api/CHANGELOG.md index 80f9026e21..aa8a153f41 100644 --- a/packages/backend-plugin-api/CHANGELOG.md +++ b/packages/backend-plugin-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/backend-plugin-api +## 0.6.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + ## 0.6.9 ### Patch Changes diff --git a/packages/backend-plugin-api/package.json b/packages/backend-plugin-api/package.json index 618a537bf5..2d099e7383 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.6.9", + "version": "0.6.10-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 d107e5b51d..654d092591 100644 --- a/packages/backend-tasks/CHANGELOG.md +++ b/packages/backend-tasks/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/backend-tasks +## 0.5.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.5.14 ### Patch Changes diff --git a/packages/backend-tasks/package.json b/packages/backend-tasks/package.json index 4af6a3462a..12ed0dc414 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.5.14", + "version": "0.5.15-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 66870f7f01..4b369454a0 100644 --- a/packages/backend-test-utils/CHANGELOG.md +++ b/packages/backend-test-utils/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/backend-test-utils +## 0.3.0-next.0 + +### Minor Changes + +- e85aa98: drop databases after unit tests if the database instance is not running in docker + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-app-api@0.5.11-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.2.10 ### Patch Changes diff --git a/packages/backend-test-utils/package.json b/packages/backend-test-utils/package.json index 8fcaff66ae..2e517d542f 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.2.10", + "version": "0.3.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 838b69f5ab..4b90e2631e 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,5 +1,65 @@ # example-backend +## 0.2.92-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-backend-module-rails@0.4.27-next.0 + - @backstage/plugin-azure-devops-backend@0.5.2-next.0 + - @backstage/plugin-explore-backend@0.0.20-next.0 + - @backstage/plugin-auth-backend@0.20.4-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-backend@0.14.2-next.0 + - @backstage/plugin-scaffolder-backend-module-confluence-to-markdown@0.2.11-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-search-backend@1.5.0-next.0 + - @backstage/plugin-todo-backend@0.3.8-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-signals-backend@0.0.1-next.0 + - @backstage/plugin-signals-node@0.0.1-next.0 + - @backstage/plugin-scaffolder-backend@1.21.0-next.0 + - @backstage/plugin-app-backend@0.3.58-next.0 + - example-app@0.2.92-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-badges-backend@0.3.7-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-entity-feedback-backend@0.2.7-next.0 + - @backstage/plugin-events-backend@0.2.19-next.0 + - @backstage/plugin-linguist-backend@0.5.7-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-playlist-backend@0.3.14-next.0 + - @backstage/plugin-proxy-backend@0.4.8-next.0 + - @backstage/plugin-rollbar-backend@0.1.55-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/plugin-search-backend-module-explore@0.1.14-next.0 + - @backstage/plugin-search-backend-module-pg@0.5.19-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-tech-insights-backend@0.5.24-next.0 + - @backstage/plugin-techdocs-backend@1.9.3-next.0 + - @backstage/plugin-adr-backend@0.4.7-next.0 + - @backstage/plugin-azure-sites-backend@0.1.20-next.0 + - @backstage/plugin-code-coverage-backend@0.2.24-next.0 + - @backstage/plugin-devtools-backend@0.2.7-next.0 + - @backstage/plugin-jenkins-backend@0.3.4-next.0 + - @backstage/plugin-kafka-backend@0.3.8-next.0 + - @backstage/plugin-lighthouse-backend@0.4.2-next.0 + - @backstage/plugin-nomad-backend@0.1.12-next.0 + - @backstage/plugin-permission-backend@0.5.33-next.0 + - @backstage/plugin-search-backend-module-elasticsearch@1.3.13-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.42-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-backend-module-unprocessed@0.3.7-next.0 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 0.2.91 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index 4223a92a28..f76a40a8f0 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.2.91", + "version": "0.2.92-next.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,6 +38,7 @@ "@backstage/plugin-auth-node": "workspace:^", "@backstage/plugin-azure-devops-backend": "workspace:^", "@backstage/plugin-azure-sites-backend": "workspace:^", + "@backstage/plugin-azure-sites-common": "workspace:^", "@backstage/plugin-badges-backend": "workspace:^", "@backstage/plugin-catalog-backend": "workspace:^", "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "workspace:^", diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index bade028597..323fc27005 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -41,6 +41,7 @@ import healthcheck from './plugins/healthcheck'; import { metricsHandler, metricsInit } from './metrics'; import auth from './plugins/auth'; import azureDevOps from './plugins/azure-devops'; +import azureSites from './plugins/azure-sites'; import catalog from './plugins/catalog'; import codeCoverage from './plugins/codecoverage'; import entityFeedback from './plugins/entityFeedback'; @@ -145,6 +146,7 @@ async function main() { const createEnv = makeCreateEnv(config); + const azureSitesEnv = useHotMemoize(module, () => createEnv('azure-sites')); const healthcheckEnv = useHotMemoize(module, () => createEnv('healthcheck')); const catalogEnv = useHotMemoize(module, () => createEnv('catalog')); const codeCoverageEnv = useHotMemoize(module, () => @@ -189,6 +191,7 @@ async function main() { apiRouter.use('/tech-insights', await techInsights(techInsightsEnv)); apiRouter.use('/auth', await auth(authEnv)); apiRouter.use('/azure-devops', await azureDevOps(azureDevOpsEnv)); + apiRouter.use('/azure-sites', await azureSites(azureSitesEnv)); apiRouter.use('/search', await search(searchEnv)); apiRouter.use('/techdocs', await techdocs(techdocsEnv)); apiRouter.use('/todo', await todo(todoEnv)); diff --git a/packages/backend/src/plugins/azure-sites.ts b/packages/backend/src/plugins/azure-sites.ts new file mode 100644 index 0000000000..54c7746cb2 --- /dev/null +++ b/packages/backend/src/plugins/azure-sites.ts @@ -0,0 +1,34 @@ +/* + * Copyright 2023 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 { + createRouter, + AzureSitesApi, +} from '@backstage/plugin-azure-sites-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from '../types'; +import { CatalogClient } from '@backstage/catalog-client'; + +export default async function createPlugin( + env: PluginEnvironment, +): Promise { + const catalogApi = new CatalogClient({ discoveryApi: env.discovery }); + return await createRouter({ + logger: env.logger, + permissions: env.permissions, + azureSitesApi: AzureSitesApi.fromConfig(env.config), + catalogApi, + }); +} diff --git a/packages/catalog-client/CHANGELOG.md b/packages/catalog-client/CHANGELOG.md index 78d126445e..0d1e91dc99 100644 --- a/packages/catalog-client/CHANGELOG.md +++ b/packages/catalog-client/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/catalog-client +## 1.6.0-next.0 + +### Minor Changes + +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + ## 1.5.2 ### Patch Changes diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json index cfa9399d97..da9611e8d4 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.5.2", + "version": "1.6.0-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 0c686ea8c4..1d79e73dfb 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/cli +## 0.25.2-next.0 + +### Patch Changes + +- c624938: Add experimental support for optional `auth` app entry point. +- acd2860: Updated dependency `vite-plugin-node-polyfills` to `^0.19.0`. +- 35725e2: Updated dependencies in frontend plugin templates +- c7259dc: Updated the backend module template to make the module instance the package default export. +- Updated dependencies + - @backstage/eslint-plugin@0.1.5-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/config-loader@1.6.1 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/release-manifests@0.0.11 + - @backstage/types@1.1.1 + ## 0.25.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 1c7447b7c3..5ca7d675d3 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.25.1", + "version": "0.25.2-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/cli/src/lib/bundler/bundle.ts b/packages/cli/src/lib/bundler/bundle.ts index 11e18320f1..d0624c93ff 100644 --- a/packages/cli/src/lib/bundler/bundle.ts +++ b/packages/cli/src/lib/bundler/bundle.ts @@ -25,7 +25,7 @@ import { import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages'; import { createConfig, resolveBaseUrl } from './config'; import { BuildOptions } from './types'; -import { resolveBundlingPaths } from './paths'; +import { resolveBundlingPaths, resolveOptionalBundlingPaths } from './paths'; import chalk from 'chalk'; import { createDetectedModulesEntryPoint } from './packageDetection'; @@ -47,18 +47,44 @@ export async function buildBundle(options: BuildOptions) { targetPath: paths.targetPath, }); - const config = await createConfig(paths, { + const commonConfigOptions = { ...options, checksEnabled: false, isDev: false, baseUrl: resolveBaseUrl(options.frontendConfig), getFrontendAppConfigs: () => options.frontendAppConfigs, - additionalEntryPoints: detectedModulesEntryPoint, + }; + const configs = [ + await createConfig(paths, { + ...commonConfigOptions, + additionalEntryPoints: detectedModulesEntryPoint, + }), + ]; + + const publicPaths = await resolveOptionalBundlingPaths({ + entry: 'src/index-public-experimental', + dist: 'dist/public', }); + if (publicPaths) { + console.log( + chalk.yellow( + `⚠️ WARNING: The app /auth entry point is an experimental feature that may receive immediate breaking changes.`, + ), + ); + configs.push( + await createConfig(publicPaths, { + ...commonConfigOptions, + publicSubPath: '/public', + }), + ); + } const isCi = yn(process.env.CI, { default: false }); const previousFileSizes = await measureFileSizesBeforeBuild(paths.targetDist); + const previousAuthSizes = publicPaths + ? await measureFileSizesBeforeBuild(publicPaths.targetDist) + : undefined; await fs.emptyDir(paths.targetDist); if (paths.targetPublic) { @@ -76,33 +102,43 @@ export async function buildBundle(options: BuildOptions) { ); } - const { stats } = await build(config, isCi); + const { stats } = await build(configs, isCi); if (!stats) { throw new Error('No stats returned'); } + const [mainStats, authStats] = stats.stats; if (statsJsonEnabled) { // No @types/bfj await require('bfj').write( resolvePath(paths.targetDist, 'bundle-stats.json'), - stats.toJson(), + mainStats.toJson(), ); } printFileSizesAfterBuild( - stats, + mainStats, previousFileSizes, paths.targetDist, WARN_AFTER_BUNDLE_GZIP_SIZE, WARN_AFTER_CHUNK_GZIP_SIZE, ); + if (publicPaths && previousAuthSizes) { + printFileSizesAfterBuild( + authStats, + previousAuthSizes, + publicPaths.targetDist, + WARN_AFTER_BUNDLE_GZIP_SIZE, + WARN_AFTER_CHUNK_GZIP_SIZE, + ); + } } -async function build(config: webpack.Configuration, isCi: boolean) { - const stats = await new Promise( +async function build(configs: webpack.Configuration[], isCi: boolean) { + const stats = await new Promise( (resolve, reject) => { - webpack(config, (err, buildStats) => { + webpack(configs, (err, buildStats) => { if (err) { if (err.message) { const { errors } = formatWebpackMessages({ diff --git a/packages/cli/src/lib/bundler/config.ts b/packages/cli/src/lib/bundler/config.ts index a9d5c2aa67..7c72dc81f7 100644 --- a/packages/cli/src/lib/bundler/config.ts +++ b/packages/cli/src/lib/bundler/config.ts @@ -92,7 +92,7 @@ export async function createConfig( paths: BundlingPaths, options: BundlingOptions, ): Promise { - const { checksEnabled, isDev, frontendConfig } = options; + const { checksEnabled, isDev, frontendConfig, publicSubPath = '' } = options; const { plugins, loaders } = transforms(options); // Any package that is part of the monorepo but outside the monorepo root dir need @@ -102,7 +102,11 @@ export async function createConfig( const baseUrl = frontendConfig.getString('app.baseUrl'); const validBaseUrl = new URL(baseUrl); - const publicPath = validBaseUrl.pathname.replace(/\/$/, ''); + let publicPath = validBaseUrl.pathname.replace(/\/$/, ''); + if (publicSubPath) { + publicPath = `${publicPath}${publicSubPath}`.replace('//', '/'); + } + if (checksEnabled) { plugins.push( new ForkTsCheckerWebpackPlugin({ diff --git a/packages/cli/src/lib/bundler/paths.ts b/packages/cli/src/lib/bundler/paths.ts index 3d4925c66b..572a96337f 100644 --- a/packages/cli/src/lib/bundler/paths.ts +++ b/packages/cli/src/lib/bundler/paths.ts @@ -23,6 +23,8 @@ export type BundlingPathsOptions = { entry: string; // Target directory, defaulting to paths.targetDir targetDir?: string; + // Relative dist directory, defaulting to 'dist' + dist?: string; }; export function resolveBundlingPaths(options: BundlingPathsOptions) { @@ -60,7 +62,7 @@ export function resolveBundlingPaths(options: BundlingPathsOptions) { targetPublic, targetPath: resolvePath(targetDir, '.'), targetRunFile: runFileExists ? targetRunFile : undefined, - targetDist: resolvePath(targetDir, 'dist'), + targetDist: resolvePath(targetDir, options.dist ?? 'dist'), targetAssets: resolvePath(targetDir, 'assets'), targetSrc: resolvePath(targetDir, 'src'), targetDev: resolvePath(targetDir, 'dev'), @@ -72,4 +74,14 @@ export function resolveBundlingPaths(options: BundlingPathsOptions) { }; } +export async function resolveOptionalBundlingPaths( + options: BundlingPathsOptions, +) { + const resolvedPaths = resolveBundlingPaths(options); + if (await fs.pathExists(resolvedPaths.targetEntry)) { + return resolvedPaths; + } + return undefined; +} + export type BundlingPaths = ReturnType; diff --git a/packages/cli/src/lib/bundler/server.ts b/packages/cli/src/lib/bundler/server.ts index 2fd1385584..f1eb2e923d 100644 --- a/packages/cli/src/lib/bundler/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -32,7 +32,7 @@ import { loadCliConfig } from '../config'; import { Lockfile } from '../versioning'; import { createConfig, resolveBaseUrl } from './config'; import { createDetectedModulesEntryPoint } from './packageDetection'; -import { resolveBundlingPaths } from './paths'; +import { resolveBundlingPaths, resolveOptionalBundlingPaths } from './paths'; import { ServeOptions } from './types'; import { hasReactDomClient } from './hasReactDomClient'; @@ -147,7 +147,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be }, }); - const config = await createConfig(paths, { + const commonConfigOptions = { ...options, checksEnabled: options.checksEnabled, isDev: true, @@ -156,6 +156,10 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be getFrontendAppConfigs: () => { return latestFrontendAppConfigs; }, + }; + + const config = await createConfig(paths, { + ...commonConfigOptions, additionalEntryPoints: detectedModulesEntryPoint, }); @@ -199,7 +203,26 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be root: paths.targetPath, }); } else { - const compiler = webpack(config); + const publicPaths = await resolveOptionalBundlingPaths({ + entry: 'src/index-public-experimental', + dist: 'dist/public', + }); + if (publicPaths) { + console.log( + chalk.yellow( + `⚠️ WARNING: The app /public entry point is an experimental feature that may receive immediate breaking changes.`, + ), + ); + } + const compiler = publicPaths + ? webpack([ + config, + await createConfig(publicPaths, { + ...commonConfigOptions, + publicSubPath: '/public', + }), + ]) + : webpack(config); webpackServer = new WebpackDevServer( { diff --git a/packages/cli/src/lib/bundler/types.ts b/packages/cli/src/lib/bundler/types.ts index 414414fa81..4a9424dedb 100644 --- a/packages/cli/src/lib/bundler/types.ts +++ b/packages/cli/src/lib/bundler/types.ts @@ -26,6 +26,8 @@ export type BundlingOptions = { baseUrl: URL; parallelism?: number; additionalEntryPoints?: string[]; + // Path to append to the detected public path, e.g. '/public' + publicSubPath?: string; }; export type ServeOptions = BundlingPathsOptions & { diff --git a/packages/core-compat-api/CHANGELOG.md b/packages/core-compat-api/CHANGELOG.md index 21c7782627..a8abcbc8fc 100644 --- a/packages/core-compat-api/CHANGELOG.md +++ b/packages/core-compat-api/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/core-compat-api +## 0.1.2-next.0 + +### Patch Changes + +- 1fa5041: The backwards compatibility provider will now use the new `ComponentsApi` and `IconsApi` when implementing the old `AppContext`. +- 7155c30: Added `convertLegacyRouteRefs` for bulk conversion of plugin routes. +- 2f2a1d2: Plugins converted by `convertLegacyApp` now have their `routes` and `externalRoutes` included as well, allowing them to be used to bind external routes in configuration. +- 1184990: collectLegacyRoutes throws in case invalid element is found +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/version-bridge@1.0.7 + ## 0.1.1 ### Patch Changes diff --git a/packages/core-compat-api/package.json b/packages/core-compat-api/package.json index dfeee979e1..157e95d6b2 100644 --- a/packages/core-compat-api/package.json +++ b/packages/core-compat-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/core-compat-api", - "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/packages/core-compat-api/src/compatWrapper/BackwardsCompatProvider.tsx b/packages/core-compat-api/src/compatWrapper/BackwardsCompatProvider.tsx index 8c6ef1f375..288f3f900b 100644 --- a/packages/core-compat-api/src/compatWrapper/BackwardsCompatProvider.tsx +++ b/packages/core-compat-api/src/compatWrapper/BackwardsCompatProvider.tsx @@ -18,6 +18,8 @@ import React, { useMemo } from 'react'; import { ReactNode } from 'react'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { AppContextProvider } from '../../../core-app-api/src/app/AppContext'; +// eslint-disable-next-line @backstage/no-relative-monorepo-imports +import { RouteResolver } from '../../../core-plugin-api/src/routing/useRouteRef'; import { createPlugin as createNewPlugin, BackstagePlugin as NewBackstagePlugin, @@ -26,13 +28,21 @@ import { coreComponentRefs, iconsApiRef, useApi, + routeResolutionApiRef, } from '@backstage/frontend-plugin-api'; import { AppComponents, IconComponent, BackstagePlugin as LegacyBackstagePlugin, + RouteRef, } from '@backstage/core-plugin-api'; -import { getOrCreateGlobalSingleton } from '@backstage/version-bridge'; +import { + VersionedValue, + createVersionedContext, + createVersionedValueMap, + getOrCreateGlobalSingleton, +} from '@backstage/version-bridge'; +import { convertLegacyRouteRef } from '../convertLegacyRouteRef'; // Make sure that we only convert each new plugin instance to its legacy equivalent once const legacyPluginStore = getOrCreateGlobalSingleton( @@ -156,6 +166,42 @@ function LegacyAppContextProvider(props: { children: ReactNode }) { ); } -export function BackwardsCompatProvider(props: { children: ReactNode }) { - return {props.children}; +const RoutingContext = createVersionedContext<{ 1: RouteResolver }>( + 'routing-context', +); + +function LegacyRoutingProvider(props: { children: ReactNode }) { + const routeResolutionApi = useApi(routeResolutionApiRef); + + const value = useMemo>(() => { + return createVersionedValueMap({ + 1: { + resolve(anyRouteRef, location) { + const sourcePath = + typeof location === 'string' ? location : location.pathname ?? ''; + + return routeResolutionApi.resolve( + // This removes the requirement to use convertLegacyRouteRef inside plugins, but + // they still need to converted when passed to the plugin instance + convertLegacyRouteRef(anyRouteRef as RouteRef), + { sourcePath }, + ); + }, + }, + }); + }, [routeResolutionApi]); + + return ( + + {props.children} + + ); +} + +export function BackwardsCompatProvider(props: { children: ReactNode }) { + return ( + + {props.children} + + ); } diff --git a/packages/core-compat-api/src/compatWrapper/compatWrapper.test.tsx b/packages/core-compat-api/src/compatWrapper/compatWrapper.test.tsx index 2e7dbd9d37..74b9f209eb 100644 --- a/packages/core-compat-api/src/compatWrapper/compatWrapper.test.tsx +++ b/packages/core-compat-api/src/compatWrapper/compatWrapper.test.tsx @@ -19,10 +19,18 @@ import { coreExtensionData, createExtension, } from '@backstage/frontend-plugin-api'; -import { createExtensionTester } from '@backstage/frontend-test-utils'; +import { + createExtensionTester, + renderInTestApp, +} from '@backstage/frontend-test-utils'; import { screen } from '@testing-library/react'; import { compatWrapper } from './compatWrapper'; -import { useApp } from '@backstage/core-plugin-api'; +import { + createRouteRef, + useApp, + useRouteRef, +} from '@backstage/core-plugin-api'; +import { convertLegacyRouteRef } from '../convertLegacyRouteRef'; describe('BackwardsCompatProvider', () => { it('should convert the app context', () => { @@ -64,4 +72,19 @@ describe('BackwardsCompatProvider', () => { icons: brokenImage, catalog, scaffolder, techdocs, search, chat, dashboard, docs, email, github, group, help, kind:api, kind:component, kind:domain, kind:group, kind:location, kind:system, kind:user, kind:resource, kind:template, user, warning" `); }); + + it('should convert the routing context', () => { + const routeRef = createRouteRef({ id: 'test' }); + + function Component() { + const link = useRouteRef(routeRef); + return
link: {link()}
; + } + + renderInTestApp(compatWrapper(), { + mountedRoutes: { '/test': convertLegacyRouteRef(routeRef) }, + }); + + expect(screen.getByText('link: /test')).toBeInTheDocument(); + }); }); diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md index 3008a3a03d..14ff49ff5c 100644 --- a/packages/create-app/CHANGELOG.md +++ b/packages/create-app/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/create-app +## 0.5.11-next.0 + +### Patch Changes + +- aeec29c: Updated `packages/app` as well as the root `package.json` type resolutions to use React v18. + + The `@testing-library/*` dependencies have also been updated to the ones compatible with React v18, and the test at `packages/app/src/App.test.tsx` had been updated to use more modern patterns that work better with these new versions. + + For information on how to migrate existing apps to React v18, see the [migration guide](https://backstage.io/docs/tutorials/react18-migration) + +- Updated dependencies + - @backstage/cli-common@0.1.13 + ## 0.5.9 ### Patch Changes diff --git a/packages/create-app/package.json b/packages/create-app/package.json index e9f73d6e1f..6d3fe75f1d 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.5.9", + "version": "0.5.11-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 602f2b563e..8ebf1aece5 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/dev-utils +## 1.0.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + ## 1.0.26 ### Patch Changes diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 40537c1a98..c74550550c 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.26", + "version": "1.0.27-next.0", "publishConfig": { "access": "public", "main": "dist/index.esm.js", diff --git a/packages/e2e-test/CHANGELOG.md b/packages/e2e-test/CHANGELOG.md index f130de43d4..2adedfd43d 100644 --- a/packages/e2e-test/CHANGELOG.md +++ b/packages/e2e-test/CHANGELOG.md @@ -1,5 +1,14 @@ # e2e-test +## 0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/create-app@0.5.11-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/errors@1.2.3 + ## 0.2.11 ### Patch Changes diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 40699588e2..c1731de8ea 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -1,7 +1,7 @@ { "name": "e2e-test", "description": "E2E test for verifying Backstage packages", - "version": "0.2.11", + "version": "0.2.12-next.0", "private": true, "backstage": { "role": "cli" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index dd931378ef..df1734deab 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,11 @@ # @backstage/eslint-plugin +## 0.1.5-next.0 + +### Patch Changes + +- 995d280: Added new `@backstage/no-top-level-material-ui-4-imports` rule that forbids top level imports from Material UI v4 packages + ## 0.1.4 ### Patch Changes diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index a0825c8816..8fbf790ee5 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/eslint-plugin", "description": "Backstage ESLint plugin", - "version": "0.1.4", + "version": "0.1.5-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/frontend-app-api/CHANGELOG.md b/packages/frontend-app-api/CHANGELOG.md index d7c7816449..0ef44ba882 100644 --- a/packages/frontend-app-api/CHANGELOG.md +++ b/packages/frontend-app-api/CHANGELOG.md @@ -1,5 +1,46 @@ # @backstage/frontend-app-api +## 0.6.0-next.0 + +### Minor Changes + +- 86346c2: **BREAKING**: The `app.routes.bindings` app-config mapping has been simplified. You now only need to specify the plugin ID and route ID on both sides of the mapping. + + Old form: + + ```yaml + app: + routes: + bindings: + plugin.catalog.externalRoutes.viewTechDoc: plugin.techdocs.routes.docRoot + plugin.catalog.externalRoutes.createComponent: plugin.catalog-import.routes.importPage + ``` + + New form: + + ```yaml + app: + routes: + bindings: + catalog.viewTechDoc: techdocs.docRoot + catalog.createComponent: catalog-import.importPage + ``` + +### Patch Changes + +- 42ebf27: Added `IconsApi` implementation and the ability to configure icons through the `icons` option for `createApp` and `createSpecializedApp`. This is not a long-term solution as icons should be installable via extensions instead. This is just a stop-gap to make sure there is feature parity with the existing frontend system. +- e0a4dd1: Improved the error message when data input/output shapes do not match +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + ## 0.5.0 ### Minor Changes diff --git a/packages/frontend-app-api/package.json b/packages/frontend-app-api/package.json index 440f0cdb3f..a95702aed5 100644 --- a/packages/frontend-app-api/package.json +++ b/packages/frontend-app-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-app-api", - "version": "0.5.0", + "version": "0.6.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/frontend-app-api/src/extensions/AppRoot.tsx b/packages/frontend-app-api/src/extensions/AppRoot.tsx index 2b709f4e42..f3a962dd10 100644 --- a/packages/frontend-app-api/src/extensions/AppRoot.tsx +++ b/packages/frontend-app-api/src/extensions/AppRoot.tsx @@ -31,7 +31,6 @@ import { createSignInPageExtension, } from '@backstage/frontend-plugin-api'; import { - ConfigApi, IdentityApi, SignInPageProps, configApiRef, @@ -42,6 +41,7 @@ import { InternalAppContext } from '../wiring/InternalAppContext'; import { AppIdentityProxy } from '../../../core-app-api/src/apis/implementations/IdentityApi/AppIdentityProxy'; import { BrowserRouter } from 'react-router-dom'; import { RouteTracker } from '../routing/RouteTracker'; +import { getBasePath } from '../routing/getBasePath'; export const AppRoot = createExtension({ namespace: 'app', @@ -97,20 +97,6 @@ export const AppRoot = createExtension({ }, }); -/** - * Read the configured base path. - * - * The returned path does not have a trailing slash. - */ -function getBasePath(configApi: ConfigApi) { - let { pathname } = new URL( - configApi.getOptionalString('app.baseUrl') ?? '/', - 'http://sample.dev', // baseUrl can be specified as just a path - ); - pathname = pathname.replace(/\/*$/, ''); - return pathname; -} - // This wraps the sign-in page and waits for sign-in to be completed before rendering the app function SignInPageWrapper({ component: Component, diff --git a/packages/frontend-app-api/src/routing/RouteResolver.test.ts b/packages/frontend-app-api/src/routing/RouteResolver.test.ts index 81e9d10be4..251241a7f9 100644 --- a/packages/frontend-app-api/src/routing/RouteResolver.test.ts +++ b/packages/frontend-app-api/src/routing/RouteResolver.test.ts @@ -45,20 +45,26 @@ const externalRef2 = createExternalRouteRef({ optional: true }); const externalRef3 = createExternalRouteRef({ params: ['x'] }); const externalRef4 = createExternalRouteRef({ optional: true, params: ['x'] }); +function src(sourcePath: string) { + return { sourcePath }; +} + describe('RouteResolver', () => { it('should not resolve anything with an empty resolver', () => { const r = new RouteResolver(new Map(), new Map(), [], new Map(), ''); - expect(r.resolve(ref1, '/')?.()).toBe(undefined); - expect(r.resolve(ref2, '/')?.({ x: '1x' })).toBe(undefined); - expect(r.resolve(subRef1, '/')?.()).toBe(undefined); - expect(r.resolve(subRef2, '/')?.({ a: '2a' })).toBe(undefined); - expect(r.resolve(subRef3, '/')?.({ x: '3x' })).toBe(undefined); - expect(r.resolve(subRef4, '/')?.({ x: '4x', a: '4a' })).toBe(undefined); - expect(r.resolve(externalRef1, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef2, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef3, '/')?.({ x: '5x' })).toBe(undefined); - expect(r.resolve(externalRef4, '/')?.({ x: '6x' })).toBe(undefined); + expect(r.resolve(ref1, src('/'))?.()).toBe(undefined); + expect(r.resolve(ref2, src('/'))?.({ x: '1x' })).toBe(undefined); + expect(r.resolve(subRef1, src('/'))?.()).toBe(undefined); + expect(r.resolve(subRef2, src('/'))?.({ a: '2a' })).toBe(undefined); + expect(r.resolve(subRef3, src('/'))?.({ x: '3x' })).toBe(undefined); + expect(r.resolve(subRef4, src('/'))?.({ x: '4x', a: '4a' })).toBe( + undefined, + ); + expect(r.resolve(externalRef1, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef2, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toBe(undefined); + expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe(undefined); }); it('should resolve an absolute route', () => { @@ -70,16 +76,20 @@ describe('RouteResolver', () => { '', ); - expect(r.resolve(ref1, '/')?.()).toBe('/my-route'); - expect(r.resolve(ref2, '/')?.({ x: '1x' })).toBe(undefined); - expect(r.resolve(subRef1, '/')?.()).toBe('/my-route/foo'); - expect(r.resolve(subRef2, '/')?.({ a: '2a' })).toBe('/my-route/foo/2a'); - expect(r.resolve(subRef3, '/')?.({ x: '3x' })).toBe(undefined); - expect(r.resolve(subRef4, '/')?.({ x: '4x', a: '4a' })).toBe(undefined); - expect(r.resolve(externalRef1, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef2, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef3, '/')?.({ x: '5x' })).toBe(undefined); - expect(r.resolve(externalRef4, '/')?.({ x: '6x' })).toBe(undefined); + expect(r.resolve(ref1, src('/'))?.()).toBe('/my-route'); + expect(r.resolve(ref2, src('/'))?.({ x: '1x' })).toBe(undefined); + expect(r.resolve(subRef1, src('/'))?.()).toBe('/my-route/foo'); + expect(r.resolve(subRef2, src('/'))?.({ a: '2a' })).toBe( + '/my-route/foo/2a', + ); + expect(r.resolve(subRef3, src('/'))?.({ x: '3x' })).toBe(undefined); + expect(r.resolve(subRef4, src('/'))?.({ x: '4x', a: '4a' })).toBe( + undefined, + ); + expect(r.resolve(externalRef1, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef2, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toBe(undefined); + expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe(undefined); }); it('should resolve an absolute route and sub route with an app base path', () => { @@ -104,37 +114,39 @@ describe('RouteResolver', () => { '/base', ); - expect(r.resolve(ref1, '/my-parent/1x')?.()).toBe( + expect(r.resolve(ref1, src('/my-parent/1x'))?.()).toBe( '/base/my-parent/1x/my-route', ); - expect(r.resolve(ref1, '/base/my-parent/1x')?.()).toBe( + expect(r.resolve(ref1, src('/base/my-parent/1x'))?.()).toBe( '/base/my-parent/1x/my-route', ); - expect(r.resolve(ref2, '/')?.({ x: '1x' })).toBe('/base/my-parent/1x'); - expect(r.resolve(ref2, '/base')?.({ x: '1x' })).toBe('/base/my-parent/1x'); - expect(r.resolve(ref3, '/')?.({ y: '1y' })).toBe(undefined); - expect(r.resolve(subRef1, '/my-parent/2x')?.()).toBe( + expect(r.resolve(ref2, src('/'))?.({ x: '1x' })).toBe('/base/my-parent/1x'); + expect(r.resolve(ref2, src('/base'))?.({ x: '1x' })).toBe( + '/base/my-parent/1x', + ); + expect(r.resolve(ref3, src('/'))?.({ y: '1y' })).toBe(undefined); + expect(r.resolve(subRef1, src('/my-parent/2x'))?.()).toBe( '/base/my-parent/2x/my-route/foo', ); - expect(r.resolve(subRef1, '/base/my-parent/2x')?.()).toBe( + expect(r.resolve(subRef1, src('/base/my-parent/2x'))?.()).toBe( '/base/my-parent/2x/my-route/foo', ); - expect(r.resolve(subRef2, '/my-parent/3x')?.({ a: '2a' })).toBe( + expect(r.resolve(subRef2, src('/my-parent/3x'))?.({ a: '2a' })).toBe( '/base/my-parent/3x/my-route/foo/2a', ); - expect(r.resolve(subRef2, '/base/my-parent/3x')?.({ a: '2a' })).toBe( + expect(r.resolve(subRef2, src('/base/my-parent/3x'))?.({ a: '2a' })).toBe( '/base/my-parent/3x/my-route/foo/2a', ); - expect(r.resolve(subRef3, '/')?.({ x: '5x' })).toBe( + expect(r.resolve(subRef3, src('/'))?.({ x: '5x' })).toBe( '/base/my-parent/5x/bar', ); - expect(r.resolve(subRef4, '/')?.({ x: '6x', a: '4a' })).toBe( + expect(r.resolve(subRef4, src('/'))?.({ x: '6x', a: '4a' })).toBe( '/base/my-parent/6x/bar/4a', ); - expect(r.resolve(externalRef1, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef2, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef3, '/')?.({ x: '5x' })).toBe(undefined); - expect(r.resolve(externalRef4, '/')?.({ x: '6x' })).toBe(undefined); + expect(r.resolve(externalRef1, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef2, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toBe(undefined); + expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe(undefined); }); it('should resolve an absolute route with a param and with a parent', () => { @@ -163,22 +175,26 @@ describe('RouteResolver', () => { '', ); - expect(r.resolve(ref1, '/')?.()).toBe('/my-route'); - expect(r.resolve(ref2, '/')?.({ x: '1x' })).toBe('/my-route/my-parent/1x'); - expect(r.resolve(subRef1, '/')?.()).toBe('/my-route/foo'); - expect(r.resolve(subRef2, '/')?.({ a: '2a' })).toBe('/my-route/foo/2a'); - expect(r.resolve(subRef3, '/')?.({ x: '3x' })).toBe( + expect(r.resolve(ref1, src('/'))?.()).toBe('/my-route'); + expect(r.resolve(ref2, src('/'))?.({ x: '1x' })).toBe( + '/my-route/my-parent/1x', + ); + expect(r.resolve(subRef1, src('/'))?.()).toBe('/my-route/foo'); + expect(r.resolve(subRef2, src('/'))?.({ a: '2a' })).toBe( + '/my-route/foo/2a', + ); + expect(r.resolve(subRef3, src('/'))?.({ x: '3x' })).toBe( '/my-route/my-parent/3x/bar', ); - expect(r.resolve(subRef4, '/')?.({ x: '4x', a: '4a' })).toBe( + expect(r.resolve(subRef4, src('/'))?.({ x: '4x', a: '4a' })).toBe( '/my-route/my-parent/4x/bar/4a', ); - expect(r.resolve(externalRef1, '/')?.()).toBe('/my-route'); - expect(r.resolve(externalRef2, '/')?.()).toBe(undefined); - expect(r.resolve(externalRef3, '/')?.({ x: '5x' })).toBe( + expect(r.resolve(externalRef1, src('/'))?.()).toBe('/my-route'); + expect(r.resolve(externalRef2, src('/'))?.()).toBe(undefined); + expect(r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toBe( '/my-route/my-parent/5x', ); - expect(r.resolve(externalRef4, '/')?.({ x: '6x' })).toBe( + expect(r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toBe( '/my-route/my-parent/6x/bar', ); }); @@ -221,18 +237,20 @@ describe('RouteResolver', () => { '', ); - expect(r.resolve(ref2, '/')?.({ x: 'x' })).toBe('/root/x'); - expect(r.resolve(ref3, '/root/x')?.({ y: 'y' })).toBe('/root/x/sub/y'); + expect(r.resolve(ref2, src('/'))?.({ x: 'x' })).toBe('/root/x'); + expect(r.resolve(ref3, src('/root/x'))?.({ y: 'y' })).toBe('/root/x/sub/y'); - expect(() => r.resolve(ref1, '/')?.()).toThrow( + expect(() => r.resolve(ref1, src('/'))?.()).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(() => r.resolve(ref1, '/root/x')?.()).toThrow( + expect(() => r.resolve(ref1, src('/root/x'))?.()).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(ref1, '/root/x/sub/y')?.()).toBe('/root/x/sub/y/deep'); + expect(r.resolve(ref1, src('/root/x/sub/y'))?.()).toBe( + '/root/x/sub/y/deep', + ); // Without the MATCH_ALL_ROUTE, we wouldn't properly match the route here - expect(r.resolve(ref1, '/root/x/sub/y/any/nested/path/here')?.()).toBe( + expect(r.resolve(ref1, src('/root/x/sub/y/any/nested/path/here'))?.()).toBe( '/root/x/sub/y/deep', ); }); @@ -276,62 +294,62 @@ describe('RouteResolver', () => { ); const l = '/my-grandparent/my-y/my-parent/my-x'; - expect(r.resolve(ref1, l)?.()).toBe( + expect(r.resolve(ref1, src(l))?.()).toBe( '/my-grandparent/my-y/my-parent/my-x/my-route', ); - expect(() => r.resolve(ref1, '/')?.()).toThrow( + expect(() => r.resolve(ref1, src('/'))?.()).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(ref2, l)?.({ x: '1x' })).toBe( + expect(r.resolve(ref2, src(l))?.({ x: '1x' })).toBe( '/my-grandparent/my-y/my-parent/1x', ); - expect(r.resolve(ref2, '/my-grandparent/my-y')?.({ x: '1x' })).toBe( + expect(r.resolve(ref2, src('/my-grandparent/my-y'))?.({ x: '1x' })).toBe( '/my-grandparent/my-y/my-parent/1x', ); - expect(() => r.resolve(ref2, '/')?.({ x: '1x' })).toThrow( + expect(() => r.resolve(ref2, src('/'))?.({ x: '1x' })).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(subRef1, l)?.()).toBe( + expect(r.resolve(subRef1, src(l))?.()).toBe( '/my-grandparent/my-y/my-parent/my-x/my-route/foo', ); - expect(() => r.resolve(subRef1, '/')?.()).toThrow( + expect(() => r.resolve(subRef1, src('/'))?.()).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(subRef2, l)?.({ a: '2a' })).toBe( + expect(r.resolve(subRef2, src(l))?.({ a: '2a' })).toBe( '/my-grandparent/my-y/my-parent/my-x/my-route/foo/2a', ); - expect(() => r.resolve(subRef2, '/')?.({ a: '2a' })).toThrow( + expect(() => r.resolve(subRef2, src('/'))?.({ a: '2a' })).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(subRef3, l)?.({ x: '3x' })).toBe( + expect(r.resolve(subRef3, src(l))?.({ x: '3x' })).toBe( '/my-grandparent/my-y/my-parent/3x/bar', ); - expect(r.resolve(subRef3, '/my-grandparent/my-y')?.({ x: '3x' })).toBe( + expect(r.resolve(subRef3, src('/my-grandparent/my-y'))?.({ x: '3x' })).toBe( '/my-grandparent/my-y/my-parent/3x/bar', ); - expect(r.resolve(subRef4, l)?.({ x: '4x', a: '4a' })).toBe( + expect(r.resolve(subRef4, src(l))?.({ x: '4x', a: '4a' })).toBe( '/my-grandparent/my-y/my-parent/4x/bar/4a', ); expect( - r.resolve(subRef4, '/my-grandparent/my-y')?.({ x: '4x', a: '4a' }), + r.resolve(subRef4, src('/my-grandparent/my-y'))?.({ x: '4x', a: '4a' }), ).toBe('/my-grandparent/my-y/my-parent/4x/bar/4a'); - expect(r.resolve(externalRef1, l)?.()).toBe( + expect(r.resolve(externalRef1, src(l))?.()).toBe( '/my-grandparent/my-y/my-parent/my-x/my-route', ); - expect(() => r.resolve(externalRef1, '/')?.()).toThrow( + expect(() => r.resolve(externalRef1, src('/'))?.()).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(externalRef2, l)?.()).toBe(undefined); - expect(r.resolve(externalRef3, l)?.({ x: '5x' })).toBe( + expect(r.resolve(externalRef2, src(l))?.()).toBe(undefined); + expect(r.resolve(externalRef3, src(l))?.({ x: '5x' })).toBe( '/my-grandparent/my-y/my-parent/5x', ); - expect(() => r.resolve(externalRef3, '/')?.({ x: '5x' })).toThrow( + expect(() => r.resolve(externalRef3, src('/'))?.({ x: '5x' })).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); - expect(r.resolve(externalRef4, l)?.({ x: '6x' })).toBe( + expect(r.resolve(externalRef4, src(l))?.({ x: '6x' })).toBe( '/my-grandparent/my-y/my-parent/6x/bar', ); - expect(() => r.resolve(externalRef4, '/')?.({ x: '6x' })).toThrow( + expect(() => r.resolve(externalRef4, src('/'))?.({ x: '6x' })).toThrow( /^Cannot route.*with parent.*as it has parameters$/, ); }); @@ -358,7 +376,7 @@ describe('RouteResolver', () => { '/base', ); - expect(r.resolve(ref2, '/')?.({ x: 'a/#&?b' })).toBe( + expect(r.resolve(ref2, src('/'))?.({ x: 'a/#&?b' })).toBe( '/base/my-parent/a%2F%23%26%3Fb', ); }); diff --git a/packages/frontend-app-api/src/routing/RouteResolver.ts b/packages/frontend-app-api/src/routing/RouteResolver.ts index 77336988e2..5405bb4d7f 100644 --- a/packages/frontend-app-api/src/routing/RouteResolver.ts +++ b/packages/frontend-app-api/src/routing/RouteResolver.ts @@ -21,6 +21,8 @@ import { SubRouteRef, AnyRouteRefParams, RouteFunc, + RouteResolutionApiResolveOptions, + RouteResolutionApi, } from '@backstage/frontend-plugin-api'; import mapValues from 'lodash/mapValues'; import { AnyRouteRef, BackstageRouteObject } from './types'; @@ -177,7 +179,7 @@ function resolveBasePath( return `${joinPaths(parentPath, ...diffPaths)}/`; } -export class RouteResolver { +export class RouteResolver implements RouteResolutionApi { constructor( private readonly routePaths: Map, private readonly routeParents: Map, @@ -189,13 +191,13 @@ export class RouteResolver { private readonly appBasePath: string, // base path without a trailing slash ) {} - resolve( + resolve( anyRouteRef: - | RouteRef - | SubRouteRef - | ExternalRouteRef, - sourceLocation: Parameters[1], - ): RouteFunc | undefined { + | RouteRef + | SubRouteRef + | ExternalRouteRef, + options?: RouteResolutionApiResolveOptions, + ): RouteFunc | undefined { // First figure out what our target absolute ref is, as well as our target path. const [targetRef, targetPath] = resolveTargetRef( anyRouteRef, @@ -208,17 +210,7 @@ export class RouteResolver { // The location that we get passed in uses the full path, so start by trimming off // the app base path prefix in case we're running the app on a sub-path. - let relativeSourceLocation: Parameters[1]; - if (typeof sourceLocation === 'string') { - relativeSourceLocation = this.trimPath(sourceLocation); - } else if (sourceLocation.pathname) { - relativeSourceLocation = { - ...sourceLocation, - pathname: this.trimPath(sourceLocation.pathname), - }; - } else { - relativeSourceLocation = sourceLocation; - } + const relativeSourceLocation = this.trimPath(options?.sourcePath ?? ''); // Next we figure out the base path, which is the combination of the common parent path // between our current location and our target location, as well as the additional path @@ -233,7 +225,7 @@ export class RouteResolver { this.routeObjects, ); - const routeFunc: RouteFunc = (...[params]) => { + const routeFunc: RouteFunc = (...[params]) => { // We selectively encode some some known-dangerous characters in the // params. The reason that we don't perform a blanket `encodeURIComponent` // here is that this encoding was added defensively long after the initial diff --git a/packages/frontend-app-api/src/routing/RoutingProvider.tsx b/packages/frontend-app-api/src/routing/RoutingProvider.tsx deleted file mode 100644 index 965faa3655..0000000000 --- a/packages/frontend-app-api/src/routing/RoutingProvider.tsx +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2020 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 React, { ReactNode } from 'react'; -import { - ExternalRouteRef, - RouteRef, - SubRouteRef, -} from '@backstage/frontend-plugin-api'; -import { - createVersionedValueMap, - createVersionedContext, -} from '@backstage/version-bridge'; -import { RouteResolver } from './RouteResolver'; -import { BackstageRouteObject } from './types'; - -const RoutingContext = createVersionedContext<{ 1: RouteResolver }>( - 'routing-context', -); - -type ProviderProps = { - routePaths: Map; - routeParents: Map; - routeObjects: BackstageRouteObject[]; - routeBindings: Map; - basePath?: string; - children: ReactNode; -}; - -// TODO(Rugvip): Migrate to a routing API instead -export const RoutingProvider = ({ - routePaths, - routeParents, - routeObjects, - routeBindings, - basePath = '', - children, -}: ProviderProps) => { - const resolver = new RouteResolver( - routePaths, - routeParents, - routeObjects, - routeBindings, - basePath, - ); - - const versionedValue = createVersionedValueMap({ 1: resolver }); - return ( - - {children} - - ); -}; diff --git a/packages/frontend-app-api/src/routing/getBasePath.ts b/packages/frontend-app-api/src/routing/getBasePath.ts new file mode 100644 index 0000000000..53a2230245 --- /dev/null +++ b/packages/frontend-app-api/src/routing/getBasePath.ts @@ -0,0 +1,27 @@ +/* + * Copyright 2024 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 { ConfigApi } from '@backstage/frontend-plugin-api'; + +/** @internal */ +export function getBasePath(configApi: ConfigApi) { + let { pathname } = new URL( + configApi.getOptionalString('app.baseUrl') ?? '/', + 'http://sample.dev', // baseUrl can be specified as just a path + ); + pathname = pathname.replace(/\/*$/, ''); + return pathname; +} diff --git a/packages/frontend-app-api/src/wiring/createApp.tsx b/packages/frontend-app-api/src/wiring/createApp.tsx index 832aa2663b..6966ef87c3 100644 --- a/packages/frontend-app-api/src/wiring/createApp.tsx +++ b/packages/frontend-app-api/src/wiring/createApp.tsx @@ -31,6 +31,8 @@ import { FrontendFeature, iconsApiRef, RouteRef, + RouteResolutionApi, + routeResolutionApiRef, useRouteRef, } from '@backstage/frontend-plugin-api'; import { App } from '../extensions/App'; @@ -89,7 +91,7 @@ import { translationApiRef, } from '@backstage/core-plugin-api/alpha'; import { CreateAppRouteBinder } from '../routing'; -import { RoutingProvider } from '../routing/RoutingProvider'; +import { RouteResolver } from '../routing/RouteResolver'; import { resolveRouteBindings } from '../routing/resolveRouteBindings'; import { collectRouteIds } from '../routing/collectRouteIds'; import { createAppTree } from '../tree'; @@ -110,6 +112,7 @@ import { DefaultIconsApi } from '../apis/implementations/IconsApi'; import { stringifyError } from '@backstage/errors'; // eslint-disable-next-line @backstage/no-relative-monorepo-imports import { icons as defaultIcons } from '../../../app-defaults/src/defaults'; +import { getBasePath } from '../routing/getBasePath'; const DefaultApis = defaultApis.map(factory => createApiExtension({ factory })); @@ -354,11 +357,25 @@ export function createSpecializedApp(options?: { config, }); + const routeInfo = extractRouteInfoFromAppNode(tree.root); + const routeBindings = resolveRouteBindings( + options?.bindRoutes, + config, + collectRouteIds(features), + ); + const appIdentityProxy = new AppIdentityProxy(); const apiHolder = createApiHolder( tree, config, appIdentityProxy, + new RouteResolver( + routeInfo.routePaths, + routeInfo.routeParents, + routeInfo.routeObjects, + routeBindings, + getBasePath(config), + ), options?.icons, ); @@ -381,24 +398,16 @@ export function createSpecializedApp(options?: { } } - const routeInfo = extractRouteInfoFromAppNode(tree.root); - const routeBindings = resolveRouteBindings( - options?.bindRoutes, - config, - collectRouteIds(features), - ); const rootEl = tree.root.instance!.getData(coreExtensionData.reactElement); const AppComponent = () => ( - - - {rootEl} - - + + {rootEl} + ); @@ -414,6 +423,7 @@ function createApiHolder( tree: AppTree, configApi: ConfigApi, appIdentityProxy: AppIdentityProxy, + routeResolutionApi: RouteResolutionApi, icons?: { [key in string]: IconComponent }, ): ApiHolder { const factoryRegistry = new ApiFactoryRegistry(); @@ -465,6 +475,12 @@ function createApiHolder( }), }); + factoryRegistry.register('static', { + api: routeResolutionApiRef, + deps: {}, + factory: () => routeResolutionApi, + }); + const componentsExtensions = tree.root.edges.attachments .get('components') diff --git a/packages/frontend-plugin-api/CHANGELOG.md b/packages/frontend-plugin-api/CHANGELOG.md index c6ae8056ec..07f74e3ff4 100644 --- a/packages/frontend-plugin-api/CHANGELOG.md +++ b/packages/frontend-plugin-api/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/frontend-plugin-api +## 0.5.1-next.0 + +### Patch Changes + +- 7eae3e0: Added initial `IconsApi` definition. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + ## 0.5.0 ### Minor Changes diff --git a/packages/frontend-plugin-api/api-report.md b/packages/frontend-plugin-api/api-report.md index 3a7a0f3ee6..4116469c2a 100644 --- a/packages/frontend-plugin-api/api-report.md +++ b/packages/frontend-plugin-api/api-report.md @@ -1079,6 +1079,26 @@ export interface RouteRef< readonly T: TParams; } +// @public (undocumented) +export interface RouteResolutionApi { + // (undocumented) + resolve( + anyRouteRef: + | RouteRef + | SubRouteRef + | ExternalRouteRef, + options?: RouteResolutionApiResolveOptions, + ): RouteFunc | undefined; +} + +// @public +export const routeResolutionApiRef: ApiRef; + +// @public (undocumented) +export type RouteResolutionApiResolveOptions = { + sourcePath?: string; +}; + export { SessionApi }; export { SessionState }; diff --git a/packages/frontend-plugin-api/package.json b/packages/frontend-plugin-api/package.json index bc92f6f632..1d97626cc8 100644 --- a/packages/frontend-plugin-api/package.json +++ b/packages/frontend-plugin-api/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-plugin-api", - "version": "0.5.0", + "version": "0.5.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/packages/frontend-plugin-api/src/apis/definitions/RouteResolutionApi.ts b/packages/frontend-plugin-api/src/apis/definitions/RouteResolutionApi.ts new file mode 100644 index 0000000000..06388cc966 --- /dev/null +++ b/packages/frontend-plugin-api/src/apis/definitions/RouteResolutionApi.ts @@ -0,0 +1,75 @@ +/* + * Copyright 2024 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 { + AnyRouteRefParams, + RouteRef, + SubRouteRef, + ExternalRouteRef, +} from '../../routing'; +import { createApiRef } from '@backstage/core-plugin-api'; + +/** + * TS magic for handling route parameters. + * + * @remarks + * + * The extra TS magic here is to require a single params argument if the RouteRef + * had at least one param defined, but require 0 arguments if there are no params defined. + * Without this we'd have to pass in empty object to all parameter-less RouteRefs + * just to make TypeScript happy, or we would have to make the argument optional in + * which case you might forget to pass it in when it is actually required. + * + * @public + */ +export type RouteFunc = ( + ...[params]: TParams extends undefined + ? readonly [] + : readonly [params: TParams] +) => string; + +/** + * @public + */ +export type RouteResolutionApiResolveOptions = { + /** + * An absolute path to use as a starting point when resolving the route. + * If no path is provided the route will be resolved from the root of the app. + */ + sourcePath?: string; +}; + +/** + * @public + */ +export interface RouteResolutionApi { + resolve( + anyRouteRef: + | RouteRef + | SubRouteRef + | ExternalRouteRef, + options?: RouteResolutionApiResolveOptions, + ): RouteFunc | undefined; +} + +/** + * The `ApiRef` of {@link RouteResolutionApi}. + * + * @public + */ +export const routeResolutionApiRef = createApiRef({ + id: 'core.route-resolution', +}); diff --git a/packages/frontend-plugin-api/src/apis/definitions/index.ts b/packages/frontend-plugin-api/src/apis/definitions/index.ts index c0a2101db0..d766a8dfdf 100644 --- a/packages/frontend-plugin-api/src/apis/definitions/index.ts +++ b/packages/frontend-plugin-api/src/apis/definitions/index.ts @@ -43,5 +43,6 @@ export * from './FetchApi'; export * from './IconsApi'; export * from './IdentityApi'; export * from './OAuthRequestApi'; +export * from './RouteResolutionApi'; export * from './StorageApi'; export * from './AnalyticsApi'; diff --git a/packages/frontend-plugin-api/src/routing/index.ts b/packages/frontend-plugin-api/src/routing/index.ts index 6c25f725b5..ea733394c6 100644 --- a/packages/frontend-plugin-api/src/routing/index.ts +++ b/packages/frontend-plugin-api/src/routing/index.ts @@ -21,5 +21,5 @@ export { createExternalRouteRef, type ExternalRouteRef, } from './ExternalRouteRef'; -export { useRouteRef, type RouteFunc } from './useRouteRef'; +export { useRouteRef } from './useRouteRef'; export { useRouteRefParams } from './useRouteRefParams'; diff --git a/packages/frontend-plugin-api/src/routing/useRouteRef.test.tsx b/packages/frontend-plugin-api/src/routing/useRouteRef.test.tsx index dcd56f81a6..4f43cf8d01 100644 --- a/packages/frontend-plugin-api/src/routing/useRouteRef.test.tsx +++ b/packages/frontend-plugin-api/src/routing/useRouteRef.test.tsx @@ -21,6 +21,8 @@ import { createVersionedContextForTesting } from '@backstage/version-bridge'; import { useRouteRef } from './useRouteRef'; import { createRouteRef } from './RouteRef'; import { createBrowserHistory } from 'history'; +import { TestApiProvider } from '@backstage/test-utils'; +import { routeResolutionApiRef } from '../apis'; describe('v1 consumer', () => { const context = createVersionedContextForTesting('routing-context'); @@ -31,13 +33,14 @@ describe('v1 consumer', () => { it('should resolve routes', () => { const resolve = jest.fn(() => () => '/hello'); - context.set({ 1: { resolve } }); const routeRef = createRouteRef(); const renderedHook = renderHook(() => useRouteRef(routeRef), { wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - + + + ), }); @@ -46,14 +49,13 @@ describe('v1 consumer', () => { expect(resolve).toHaveBeenCalledWith( routeRef, expect.objectContaining({ - pathname: '/my-page', + sourcePath: '/my-page', }), ); }); it('re-resolves the routeFunc when the search parameters change', () => { const resolve = jest.fn(() => () => '/hello'); - context.set({ 1: { resolve } }); const routeRef = createRouteRef(); const history = createBrowserHistory(); @@ -61,11 +63,13 @@ describe('v1 consumer', () => { const { rerender } = renderHook(() => useRouteRef(routeRef), { wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - + + + ), }); @@ -79,7 +83,7 @@ describe('v1 consumer', () => { it('does not re-resolve the routeFunc the location pathname does not change', () => { const resolve = jest.fn(() => () => '/hello'); - context.set({ 1: { resolve } }); + const api = { resolve }; const routeRef = createRouteRef(); const history = createBrowserHistory(); @@ -87,11 +91,13 @@ describe('v1 consumer', () => { const { rerender } = renderHook(() => useRouteRef(routeRef), { wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - + + + ), }); @@ -105,7 +111,7 @@ describe('v1 consumer', () => { it('does not re-resolve the routeFunc when the search parameter changes', () => { const resolve = jest.fn(() => () => '/hello'); - context.set({ 1: { resolve } }); + const api = { resolve }; const routeRef = createRouteRef(); const history = createBrowserHistory(); @@ -113,11 +119,13 @@ describe('v1 consumer', () => { const { rerender } = renderHook(() => useRouteRef(routeRef), { wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - + + + ), }); @@ -131,7 +139,7 @@ describe('v1 consumer', () => { it('does not re-resolve the routeFunc when the hash parameter changes', () => { const resolve = jest.fn(() => () => '/hello'); - context.set({ 1: { resolve } }); + const api = { resolve }; const routeRef = createRouteRef(); const history = createBrowserHistory(); @@ -139,11 +147,13 @@ describe('v1 consumer', () => { const { rerender } = renderHook(() => useRouteRef(routeRef), { wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - + + + ), }); diff --git a/packages/frontend-plugin-api/src/routing/useRouteRef.tsx b/packages/frontend-plugin-api/src/routing/useRouteRef.tsx index dfcb110930..1b096a6b5d 100644 --- a/packages/frontend-plugin-api/src/routing/useRouteRef.tsx +++ b/packages/frontend-plugin-api/src/routing/useRouteRef.tsx @@ -15,44 +15,12 @@ */ import { useMemo } from 'react'; -import { matchRoutes, useLocation } from 'react-router-dom'; -import { useVersionedContext } from '@backstage/version-bridge'; +import { useLocation } from 'react-router-dom'; import { AnyRouteRefParams } from './types'; import { RouteRef } from './RouteRef'; import { SubRouteRef } from './SubRouteRef'; import { ExternalRouteRef } from './ExternalRouteRef'; - -/** - * TS magic for handling route parameters. - * - * @remarks - * - * The extra TS magic here is to require a single params argument if the RouteRef - * had at least one param defined, but require 0 arguments if there are no params defined. - * Without this we'd have to pass in empty object to all parameter-less RouteRefs - * just to make TypeScript happy, or we would have to make the argument optional in - * which case you might forget to pass it in when it is actually required. - * - * @public - */ -export type RouteFunc = ( - ...[params]: TParams extends undefined - ? readonly [] - : readonly [params: TParams] -) => string; - -/** - * @internal - */ -export interface RouteResolver { - resolve( - anyRouteRef: - | RouteRef - | SubRouteRef - | ExternalRouteRef, - sourceLocation: Parameters[1], - ): RouteFunc | undefined; -} +import { RouteFunc, routeResolutionApiRef, useApi } from '../apis'; /** * React hook for constructing URLs to routes. @@ -105,26 +73,13 @@ export function useRouteRef( | ExternalRouteRef, ): RouteFunc | undefined { const { pathname } = useLocation(); - const versionedContext = useVersionedContext<{ 1: RouteResolver }>( - 'routing-context', - ); - if (!versionedContext) { - throw new Error('Routing context is not available'); - } + const routeResolutionApi = useApi(routeResolutionApiRef); - const resolver = versionedContext.atVersion(1); const routeFunc = useMemo( - () => resolver && resolver.resolve(routeRef, { pathname }), - [resolver, routeRef, pathname], + () => routeResolutionApi.resolve(routeRef, { sourcePath: pathname }), + [routeResolutionApi, routeRef, pathname], ); - if (!versionedContext) { - throw new Error('useRouteRef used outside of routing context'); - } - if (!resolver) { - throw new Error('RoutingContext v1 not available'); - } - const isOptional = 'optional' in routeRef && routeRef.optional; if (!routeFunc && !isOptional) { throw new Error(`No path for ${routeRef}`); diff --git a/packages/frontend-test-utils/CHANGELOG.md b/packages/frontend-test-utils/CHANGELOG.md index dc3555499e..31799581f6 100644 --- a/packages/frontend-test-utils/CHANGELOG.md +++ b/packages/frontend-test-utils/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/frontend-test-utils +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-app-api@0.6.0-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/types@1.1.1 + ## 0.1.1 ### Patch Changes diff --git a/packages/frontend-test-utils/api-report.md b/packages/frontend-test-utils/api-report.md index d67518050d..2605499a96 100644 --- a/packages/frontend-test-utils/api-report.md +++ b/packages/frontend-test-utils/api-report.md @@ -19,6 +19,7 @@ import { MockPermissionApi } from '@backstage/test-utils'; import { MockStorageApi } from '@backstage/test-utils'; import { MockStorageBucket } from '@backstage/test-utils'; import { RenderResult } from '@testing-library/react'; +import { RouteRef } from '@backstage/frontend-plugin-api'; import { setupRequestMockHandlers } from '@backstage/test-utils'; import { TestApiProvider } from '@backstage/test-utils'; import { TestApiProviderProps } from '@backstage/test-utils'; @@ -73,7 +74,10 @@ export { MockStorageApi }; export { MockStorageBucket }; // @public -export function renderInTestApp(element: JSX.Element): RenderResult; +export function renderInTestApp( + element: JSX.Element, + options?: TestAppOptions, +): RenderResult; export { setupRequestMockHandlers }; @@ -83,5 +87,12 @@ export { TestApiProviderProps }; export { TestApiRegistry }; +// @public +export type TestAppOptions = { + mountedRoutes?: { + [path: string]: RouteRef; + }; +}; + export { withLogCollector }; ``` diff --git a/packages/frontend-test-utils/package.json b/packages/frontend-test-utils/package.json index fbe9e3dec6..8b9b4382e8 100644 --- a/packages/frontend-test-utils/package.json +++ b/packages/frontend-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/frontend-test-utils", - "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/packages/frontend-test-utils/src/app/index.ts b/packages/frontend-test-utils/src/app/index.ts index 3f19146c5c..2351561022 100644 --- a/packages/frontend-test-utils/src/app/index.ts +++ b/packages/frontend-test-utils/src/app/index.ts @@ -19,4 +19,4 @@ export { type ExtensionTester, } from './createExtensionTester'; -export { renderInTestApp } from './renderInTestApp'; +export { renderInTestApp, type TestAppOptions } from './renderInTestApp'; diff --git a/packages/frontend-test-utils/src/app/renderInTestApp.tsx b/packages/frontend-test-utils/src/app/renderInTestApp.tsx index 0cd05741b0..e0483f68d8 100644 --- a/packages/frontend-test-utils/src/app/renderInTestApp.tsx +++ b/packages/frontend-test-utils/src/app/renderInTestApp.tsx @@ -14,17 +14,46 @@ * limitations under the License. */ +import React from 'react'; import { + RouteRef, coreExtensionData, createExtension, } from '@backstage/frontend-plugin-api'; import { createExtensionTester } from './createExtensionTester'; +/** + * Options to customize the behavior of the test app. + * @public + */ +export type TestAppOptions = { + /** + * An object of paths to mount route ref on, with the key being the path and the value + * being the RouteRef that the path will be bound to. This allows the route refs to be + * used by `useRouteRef` in the rendered elements. + * + * @example + * ```ts + * renderInTestApp(, { + * mountedRoutes: { + * '/my-path': myRouteRef, + * } + * }) + * // ... + * const link = useRouteRef(myRouteRef) + * ``` + */ + mountedRoutes?: { [path: string]: RouteRef }; +}; + /** * @public * Renders the given element in a test app, for use in unit tests. */ -export function renderInTestApp(element: JSX.Element) { +export function renderInTestApp( + element: JSX.Element, + options?: TestAppOptions, +) { const extension = createExtension({ namespace: 'test', attachTo: { id: 'app', input: 'root' }, @@ -34,5 +63,26 @@ export function renderInTestApp(element: JSX.Element) { factory: () => ({ element }), }); const tester = createExtensionTester(extension); + + if (options?.mountedRoutes) { + for (const [path, routeRef] of Object.entries(options.mountedRoutes)) { + // TODO(Rugvip): add support for external route refs + tester.add( + createExtension({ + kind: 'test-route', + name: path, + attachTo: { id: 'app/root', input: 'elements' }, + output: { + element: coreExtensionData.reactElement, + path: coreExtensionData.routePath, + routeRef: coreExtensionData.routeRef, + }, + factory() { + return { element: , path, routeRef }; + }, + }), + ); + } + } return tester.render(); } diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 02ecf90bdc..3d54277485 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,5 +1,32 @@ # @backstage/repo-tools +## 0.6.0-next.0 + +### Minor Changes + +- 04907c3: Updates the OpenAPI client template to support the new format for identifying plugin ID. You should now use `info.title` like so, + + ```diff + info: + + title: yourPluginId + - title: @internal/plugin-*-backend + + servers: + - / + - - yourPluginId + ``` + +- b10c603: Add support for `oneOf` in client generated by `schema openapi generate-client`. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/cli-node@0.2.2 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/errors@1.2.3 + ## 0.5.2 ### Patch Changes diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index c8f832af01..98af4149c3 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/repo-tools", "description": "CLI for Backstage repo tooling ", - "version": "0.5.2", + "version": "0.6.0-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/techdocs-cli-embedded-app/CHANGELOG.md b/packages/techdocs-cli-embedded-app/CHANGELOG.md index 0e6163e1b7..c55d4a3e6e 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.91-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/app-defaults@1.4.8-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/cli@0.25.2-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-techdocs-react@1.1.15 + ## 0.2.90 ### Patch Changes diff --git a/packages/techdocs-cli-embedded-app/package.json b/packages/techdocs-cli-embedded-app/package.json index 8e30395052..1641562040 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.90", + "version": "0.2.91-next.0", "private": true, "backstage": { "role": "frontend" diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md index f65ed4bd46..9639950663 100644 --- a/packages/techdocs-cli/CHANGELOG.md +++ b/packages/techdocs-cli/CHANGELOG.md @@ -1,5 +1,16 @@ # @techdocs/cli +## 1.8.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + ## 1.8.1 ### Patch Changes diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 4d4fc997b6..f4cf7e9dc6 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.8.1", + "version": "1.8.2-next.0", "publishConfig": { "access": "public" }, diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md index c4f342b554..101720cb30 100644 --- a/packages/test-utils/CHANGELOG.md +++ b/packages/test-utils/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/test-utils +## 1.5.0-next.0 + +### Minor Changes + +- bb40898: Added `components` option to `TestAppOptions`, which will be forwarded as the `components` option to `createApp`. + +### Patch Changes + +- Updated dependencies + - @backstage/config@1.1.1 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + ## 1.4.7 ### Patch Changes diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 43b9c29a10..3e1d751677 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.4.7", + "version": "1.5.0-next.0", "publishConfig": { "access": "public" }, diff --git a/plugins/adr-backend/CHANGELOG.md b/plugins/adr-backend/CHANGELOG.md index adc0cf284f..e4986f0ca2 100644 --- a/plugins/adr-backend/CHANGELOG.md +++ b/plugins/adr-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-adr-backend +## 0.4.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/plugin-adr-common@0.2.19 + - @backstage/plugin-search-common@1.2.10 + ## 0.4.6 ### Patch Changes diff --git a/plugins/adr-backend/package.json b/plugins/adr-backend/package.json index 24cebdff04..9f30c95581 100644 --- a/plugins/adr-backend/package.json +++ b/plugins/adr-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr-backend", - "version": "0.4.6", + "version": "0.4.7-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 8cf8b2c28e..4586b14522 100644 --- a/plugins/adr/CHANGELOG.md +++ b/plugins/adr/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-adr +## 0.6.13-next.0 + +### Patch Changes + +- 0b03962: Updated README +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-adr-common@0.2.19 + - @backstage/plugin-search-common@1.2.10 + ## 0.6.12 ### Patch Changes diff --git a/plugins/adr/package.json b/plugins/adr/package.json index 35c89ce255..d2157dcae7 100644 --- a/plugins/adr/package.json +++ b/plugins/adr/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-adr", - "version": "0.6.12", + "version": "0.6.13-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 2a7c655a2d..85f5e412ed 100644 --- a/plugins/airbrake-backend/CHANGELOG.md +++ b/plugins/airbrake-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-airbrake-backend +## 0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.3.6 ### Patch Changes diff --git a/plugins/airbrake-backend/package.json b/plugins/airbrake-backend/package.json index f424ba8ce7..d3424d130d 100644 --- a/plugins/airbrake-backend/package.json +++ b/plugins/airbrake-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake-backend", - "version": "0.3.6", + "version": "0.3.7-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 4636c27068..bf89516a38 100644 --- a/plugins/airbrake/CHANGELOG.md +++ b/plugins/airbrake/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-airbrake +## 0.3.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/dev-utils@1.0.27-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.3.29 ### Patch Changes diff --git a/plugins/airbrake/package.json b/plugins/airbrake/package.json index 3cf1107fe0..904dbcef76 100644 --- a/plugins/airbrake/package.json +++ b/plugins/airbrake/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-airbrake", - "version": "0.3.29", + "version": "0.3.30-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 bf9aaa61df..4b99d120fb 100644 --- a/plugins/allure/CHANGELOG.md +++ b/plugins/allure/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-allure +## 0.1.46-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.45 ### Patch Changes diff --git a/plugins/allure/package.json b/plugins/allure/package.json index 991c2a8944..9254b6c0c8 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.45", + "version": "0.1.46-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 f801bf9ba2..4a293884f1 100644 --- a/plugins/api-docs/CHANGELOG.md +++ b/plugins/api-docs/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-api-docs +## 0.10.4-next.0 + +### Patch Changes + +- 170c023: Adding `supportedSubmitMethods` prop to `api-docs` to pass to the Swagger UI. This allows users to specify which HTTP methods they wish to allow end-users to make requests through the `Try It Out` button on the Swagger UI. +- c03f977: Updated dependency `graphiql` to `3.1.0`. +- 49b3b5e: Updated dependency `@asyncapi/react-component` to `1.2.13`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + ## 0.10.3 ### Patch Changes diff --git a/plugins/api-docs/README.md b/plugins/api-docs/README.md index 4d4342de61..46d9df4628 100644 --- a/plugins/api-docs/README.md +++ b/plugins/api-docs/README.md @@ -263,3 +263,56 @@ createApiFactory({ ``` In the same way as the `requestInterceptor` you can override any property of Swagger UI + +### Provide Specific Supported Methods to Swagger UI + +This can be done through utilising the +[supportedSubmitMethods prop](https://github.com/swagger-api/swagger-ui/tree/master/flavors/swagger-ui-react#supportedsubmitmethods-proptypesarrayofproptypesoneofget-put-post-delete-options-head-patch-trace). +If you wish to limit the HTTP methods available for the `Try It Out` feature of an OpenAPI API +component, you will need to add the following to your `api.tsx`, listing the permitted methods for +your API in the `supportedSubmitMethods` parameter: + +```tsx +... +import { + OpenApiDefinitionWidget, + apiDocsConfigRef, + defaultDefinitionWidgets, +} from '@backstage/plugin-api-docs'; +import { ApiEntity } from '@backstage/catalog-model'; + +export const apis: AnyApiFactory[] = [ +... + createApiFactory({ + api: apiDocsConfigRef, + deps: {}, + factory: () => { + const supportedSubmitMethods = ['get', 'post', 'put', 'delete']; + const definitionWidgets = defaultDefinitionWidgets().map(obj => { + if (obj.type === 'openapi') { + return { + ...obj, + component: definition => ( + + ), + }; + } + return obj; + }); + + return { + getApiDefinitionWidget: (apiEntity: ApiEntity) => { + return definitionWidgets.find(d => d.type === apiEntity.spec.type); + } + }; + } + }) +] + +``` + +N.B. if you wish to disable the `Try It Out` feature for your API, you can provide an empty list to +the `supportedSubmitMethods` parameter. diff --git a/plugins/api-docs/api-report.md b/plugins/api-docs/api-report.md index a018dfcdb1..7523198298 100644 --- a/plugins/api-docs/api-report.md +++ b/plugins/api-docs/api-report.md @@ -166,6 +166,7 @@ export const OpenApiDefinitionWidget: ( export type OpenApiDefinitionWidgetProps = { definition: string; requestInterceptor?: (req: any) => any | Promise; + supportedSubmitMethods?: string[]; }; // @public (undocumented) diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index d6473d64d8..3147c080a8 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.10.3", + "version": "0.10.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx index d150525b05..524c416d2d 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.test.tsx @@ -97,11 +97,13 @@ paths: `; const requestInterceptor = (req: any) => req; + const supportedSubmitMethods = ['get', 'post', 'put', 'delete']; const { findByRole, getByRole, getByLabelText } = await renderInTestApp( , ); diff --git a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx index 152f1fd089..64ff324941 100644 --- a/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx +++ b/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinitionWidget.tsx @@ -29,15 +29,22 @@ const LazyOpenApiDefinition = React.lazy(() => export type OpenApiDefinitionWidgetProps = { definition: string; requestInterceptor?: (req: any) => any | Promise; + supportedSubmitMethods?: string[]; }; /** @public */ export const OpenApiDefinitionWidget = ( props: OpenApiDefinitionWidgetProps, ) => { + const validSubmitMethods = props.supportedSubmitMethods?.map(method => + method.toLocaleLowerCase(), + ); return ( }> - + ); }; diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md index 8550264a15..4a5361361d 100644 --- a/plugins/app-backend/CHANGELOG.md +++ b/plugins/app-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-app-backend +## 0.3.58-next.0 + +### Patch Changes + +- 9dfd57d: Do not force caching of the Javascript asset that contains the injected config. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-app-node@0.1.10-next.0 + ## 0.3.57 ### Patch Changes diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 0aecbec7f0..3722512874 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.57", + "version": "0.3.58-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/app-node/CHANGELOG.md b/plugins/app-node/CHANGELOG.md index d396e40aba..cef24b16ff 100644 --- a/plugins/app-node/CHANGELOG.md +++ b/plugins/app-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-app-node +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.9 ### Patch Changes diff --git a/plugins/app-node/package.json b/plugins/app-node/package.json index 38c5eadacf..345b3fbdc0 100644 --- a/plugins/app-node/package.json +++ b/plugins/app-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-node", "description": "Node.js library for the app plugin", - "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/app-visualizer/CHANGELOG.md b/plugins/app-visualizer/CHANGELOG.md index a4ddea2590..ee679a979b 100644 --- a/plugins/app-visualizer/CHANGELOG.md +++ b/plugins/app-visualizer/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-app-visualizer +## 0.1.1-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.0 ### Minor Changes diff --git a/plugins/app-visualizer/package.json b/plugins/app-visualizer/package.json index 197e97c464..49ebffd3f0 100644 --- a/plugins/app-visualizer/package.json +++ b/plugins/app-visualizer/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-app-visualizer", "description": "Visualizes the Backstage app structure", - "version": "0.1.0", + "version": "0.1.1-next.0", "publishConfig": { "access": "public" }, diff --git a/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md b/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md index 22f61ff088..580d58ae43 100644 --- a/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-atlassian-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-backend-module-atlassian-provider +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/auth-backend-module-atlassian-provider/package.json b/plugins/auth-backend-module-atlassian-provider/package.json index 3d73de88fc..311122fe54 100644 --- a/plugins/auth-backend-module-atlassian-provider/package.json +++ b/plugins/auth-backend-module-atlassian-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-atlassian-provider", "description": "The atlassian-provider backend module for the auth plugin.", - "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/auth-backend-module-gcp-iap-provider/CHANGELOG.md b/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md index e9e5d99224..87ccf9ad8e 100644 --- a/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-gcp-iap-provider/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-auth-backend-module-gcp-iap-provider +## 0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.2.3 ### Patch Changes diff --git a/plugins/auth-backend-module-gcp-iap-provider/package.json b/plugins/auth-backend-module-gcp-iap-provider/package.json index d167389b20..95fea863f3 100644 --- a/plugins/auth-backend-module-gcp-iap-provider/package.json +++ b/plugins/auth-backend-module-gcp-iap-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-gcp-iap-provider", "description": "A GCP IAP auth provider module for the Backstage auth backend", - "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/auth-backend-module-github-provider/CHANGELOG.md b/plugins/auth-backend-module-github-provider/CHANGELOG.md index ee59a1e269..11053b8487 100644 --- a/plugins/auth-backend-module-github-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-github-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-backend-module-github-provider +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/auth-backend-module-github-provider/package.json b/plugins/auth-backend-module-github-provider/package.json index bf84dc5ec7..8113a9e03f 100644 --- a/plugins/auth-backend-module-github-provider/package.json +++ b/plugins/auth-backend-module-github-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-github-provider", "description": "The github-provider backend module for the auth plugin.", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md b/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md index 92acc636c1..15688da6ee 100644 --- a/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-gitlab-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-backend-module-gitlab-provider +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/auth-backend-module-gitlab-provider/package.json b/plugins/auth-backend-module-gitlab-provider/package.json index c7f4d5ef04..e25ccfd547 100644 --- a/plugins/auth-backend-module-gitlab-provider/package.json +++ b/plugins/auth-backend-module-gitlab-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-gitlab-provider", "description": "The gitlab-provider backend module for the auth plugin.", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-google-provider/CHANGELOG.md b/plugins/auth-backend-module-google-provider/CHANGELOG.md index b43722644b..78a6e68eb4 100644 --- a/plugins/auth-backend-module-google-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-google-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-backend-module-google-provider +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/auth-backend-module-google-provider/package.json b/plugins/auth-backend-module-google-provider/package.json index 7528d9f8b6..c985192df6 100644 --- a/plugins/auth-backend-module-google-provider/package.json +++ b/plugins/auth-backend-module-google-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-google-provider", "description": "A Google auth provider module for the Backstage auth backend", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md b/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md index 496538fdf0..e61ab20c6b 100644 --- a/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-microsoft-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-microsoft-provider +## 0.1.5-next.0 + +### Patch Changes + +- 1ff2684: Added the possibility to use custom scopes for performing login with Microsoft EntraID. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.4 ### Patch Changes diff --git a/plugins/auth-backend-module-microsoft-provider/package.json b/plugins/auth-backend-module-microsoft-provider/package.json index 94dddfc7ac..e20f2d8a4c 100644 --- a/plugins/auth-backend-module-microsoft-provider/package.json +++ b/plugins/auth-backend-module-microsoft-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-microsoft-provider", "description": "The microsoft-provider backend module for the auth plugin.", - "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/auth-backend-module-oauth2-provider/CHANGELOG.md b/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md index 44cb96b97d..0b70811413 100644 --- a/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oauth2-provider/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-auth-backend-module-oauth2-provider +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.6 ### Patch Changes diff --git a/plugins/auth-backend-module-oauth2-provider/package.json b/plugins/auth-backend-module-oauth2-provider/package.json index 5edc0be4b8..83c14c7821 100644 --- a/plugins/auth-backend-module-oauth2-provider/package.json +++ b/plugins/auth-backend-module-oauth2-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-oauth2-provider", "description": "The oauth2-provider backend module for the auth plugin.", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md b/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md index 71c14a75e2..809e58fd6c 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-oauth2-proxy-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-oauth2-proxy-provider +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/errors@1.2.3 + ## 0.1.1 ### Patch Changes diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/package.json b/plugins/auth-backend-module-oauth2-proxy-provider/package.json index c3d49bfcd0..d0dabe9321 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/package.json +++ b/plugins/auth-backend-module-oauth2-proxy-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-oauth2-proxy-provider", "description": "The oauth2-proxy-provider backend module for the auth plugin.", - "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/auth-backend-module-oidc-provider/CHANGELOG.md b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md new file mode 100644 index 0000000000..4581738ffb --- /dev/null +++ b/plugins/auth-backend-module-oidc-provider/CHANGELOG.md @@ -0,0 +1,16 @@ +# @backstage/plugin-auth-backend-module-oidc-provider + +## 0.1.0-next.0 + +### Minor Changes + +- 5d2fcba: Created new `@backstage/plugin-auth-backend-module-oidc-provider` module package to house oidc auth provider migration. + +### Patch Changes + +- 8afb6f4: Updated dependency `passport` to `^0.7.0`. +- Updated dependencies + - @backstage/plugin-auth-backend@0.20.4-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 diff --git a/plugins/auth-backend-module-oidc-provider/package.json b/plugins/auth-backend-module-oidc-provider/package.json index 8d518227a1..2b133f2f21 100644 --- a/plugins/auth-backend-module-oidc-provider/package.json +++ b/plugins/auth-backend-module-oidc-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-oidc-provider", "description": "The oidc-provider backend module for the auth plugin.", - "version": "0.0.0", + "version": "0.1.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/auth-backend-module-okta-provider/CHANGELOG.md b/plugins/auth-backend-module-okta-provider/CHANGELOG.md index b059fa0bb4..313259dd3d 100644 --- a/plugins/auth-backend-module-okta-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-okta-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-okta-provider +## 0.0.3-next.0 + +### Patch Changes + +- cd5114c: Added missing `additionalScopes` option to configuration schema. +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.0.2 ### Patch Changes diff --git a/plugins/auth-backend-module-okta-provider/package.json b/plugins/auth-backend-module-okta-provider/package.json index 7159ab1292..2d2d3f857c 100644 --- a/plugins/auth-backend-module-okta-provider/package.json +++ b/plugins/auth-backend-module-okta-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-okta-provider", "description": "The okta-provider backend module for the auth plugin.", - "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/auth-backend-module-pinniped-provider/CHANGELOG.md b/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md index 147a13b97d..8b7c0a8214 100644 --- a/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-pinniped-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-pinniped-provider +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.1.3 ### Patch Changes diff --git a/plugins/auth-backend-module-pinniped-provider/package.json b/plugins/auth-backend-module-pinniped-provider/package.json index bda4cd9751..a414483000 100644 --- a/plugins/auth-backend-module-pinniped-provider/package.json +++ b/plugins/auth-backend-module-pinniped-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-pinniped-provider", "description": "The pinniped-provider backend module for the auth plugin.", - "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/auth-backend-module-vmware-cloud-provider/CHANGELOG.md b/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md index 8beb4ed11c..9613bb1499 100644 --- a/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md +++ b/plugins/auth-backend-module-vmware-cloud-provider/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-auth-backend-module-vmware-cloud-provider +## 0.1.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + ## 0.1.1 ### Patch Changes diff --git a/plugins/auth-backend-module-vmware-cloud-provider/package.json b/plugins/auth-backend-module-vmware-cloud-provider/package.json index b9b6a3cdaf..3a1cbe4aa5 100644 --- a/plugins/auth-backend-module-vmware-cloud-provider/package.json +++ b/plugins/auth-backend-module-vmware-cloud-provider/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-auth-backend-module-vmware-cloud-provider", "description": "The vmware-cloud-provider backend module for the auth plugin.", - "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/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md index a65f0bdb61..27b912aca1 100644 --- a/plugins/auth-backend/CHANGELOG.md +++ b/plugins/auth-backend/CHANGELOG.md @@ -1,5 +1,31 @@ # @backstage/plugin-auth-backend +## 0.20.4-next.0 + +### Patch Changes + +- a3f1fa3: Use the externalized `auth-backend-module-microsoft-provider` again. +- 5d2fcba: Migrated oidc auth provider to new `@backstage/plugin-auth-backend-module-oidc-provider` module package. +- Updated dependencies + - @backstage/plugin-auth-backend-module-okta-provider@0.0.3-next.0 + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-backend-module-oidc-provider@0.1.0-next.0 + - @backstage/plugin-auth-backend-module-microsoft-provider@0.1.5-next.0 + - @backstage/plugin-auth-backend-module-atlassian-provider@0.1.2-next.0 + - @backstage/plugin-auth-backend-module-github-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-gitlab-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-google-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-oauth2-provider@0.1.7-next.0 + - @backstage/plugin-auth-backend-module-gcp-iap-provider@0.2.4-next.0 + - @backstage/plugin-auth-backend-module-oauth2-proxy-provider@0.1.2-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.20.3 ### Patch Changes diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index f485f04311..16445713dc 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.20.3", + "version": "0.20.4-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 36d65e9fa3..97b69b0618 100644 --- a/plugins/auth-node/CHANGELOG.md +++ b/plugins/auth-node/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-auth-node +## 0.4.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.4.3 ### Patch Changes diff --git a/plugins/auth-node/package.json b/plugins/auth-node/package.json index fc8fb5b25c..0af59ecc53 100644 --- a/plugins/auth-node/package.json +++ b/plugins/auth-node/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-node", - "version": "0.4.3", + "version": "0.4.4-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 7b0a081b34..736fa6276b 100644 --- a/plugins/azure-devops-backend/CHANGELOG.md +++ b/plugins/azure-devops-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-azure-devops-backend +## 0.5.2-next.0 + +### Patch Changes + +- 353244d: Added a note about Service Principles +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-azure-devops-common@0.3.2 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.5.1 ### Patch Changes diff --git a/plugins/azure-devops-backend/package.json b/plugins/azure-devops-backend/package.json index 12b598f7e9..7b210e5759 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.5.1", + "version": "0.5.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts index 86a06b7b0b..c3e2cd1106 100644 --- a/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts +++ b/plugins/azure-devops-backend/src/utils/azure-devops-utils.test.ts @@ -235,6 +235,15 @@ describe('extractPartsFromAsset', () => { ext: '.gif', }); }); + + it('should return parts from asset with leading . without /', () => { + const result = extractPartsFromAsset('[Image 1](.images/sample-1.PNG)'); + expect(result).toEqual({ + label: 'Image 1', + path: '.images/sample-1', + ext: '.PNG', + }); + }); }); describe('replaceReadme', () => { diff --git a/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts b/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts index 7f5bf39ac4..d24b104bae 100644 --- a/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts +++ b/plugins/azure-devops-backend/src/utils/azure-devops-utils.ts @@ -325,7 +325,7 @@ export function extractPartsFromAsset(content: string): { return { ext, label, - path: path.startsWith('.') ? path.substring(1, path.length) : path, + path: path.startsWith('./') ? path.substring(1, path.length) : path, }; } diff --git a/plugins/azure-devops/CHANGELOG.md b/plugins/azure-devops/CHANGELOG.md index 8d851523f6..a2c1f6f118 100644 --- a/plugins/azure-devops/CHANGELOG.md +++ b/plugins/azure-devops/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-azure-devops +## 0.3.12-next.0 + +### Patch Changes + +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- cb0afaa: Prefer `dev.azure.com/build-definition` annotation when it is provided, as it is more specific than `dev.azure.com/project-repo`. This can also be used as a filter for mono-repos. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-azure-devops-common@0.3.2 + ## 0.3.11 ### Patch Changes diff --git a/plugins/azure-devops/package.json b/plugins/azure-devops/package.json index db744139ee..d0b5932b31 100644 --- a/plugins/azure-devops/package.json +++ b/plugins/azure-devops/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-devops", - "version": "0.3.11", + "version": "0.3.12-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/azure-sites-backend/CHANGELOG.md b/plugins/azure-sites-backend/CHANGELOG.md index c806c46925..1e9cd2162e 100644 --- a/plugins/azure-sites-backend/CHANGELOG.md +++ b/plugins/azure-sites-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-azure-sites-backend +## 0.1.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-azure-sites-common@0.1.1 + ## 0.1.19 ### Patch Changes diff --git a/plugins/azure-sites-backend/README.md b/plugins/azure-sites-backend/README.md index 23152f9760..5017be8a8f 100644 --- a/plugins/azure-sites-backend/README.md +++ b/plugins/azure-sites-backend/README.md @@ -36,11 +36,11 @@ Here's how to get the backend plugin up and running: 1. First we need to add the `@backstage/plugin-azure-sites-backend` package to your backend: ```sh - # From your Backstage root directory + # From the Backstage root directory yarn add --cwd packages/backend @backstage/plugin-azure-sites-backend ``` -2. Then we will create a new file named `packages/backend/src/plugins/azure.ts`, and add the following to it: +2. Then we will create a new file named `packages/backend/src/plugins/azure-sites.ts`, and add the following to it: ```ts import { @@ -56,6 +56,7 @@ Here's how to get the backend plugin up and running: return await createRouter({ logger: env.logger, azureSitesApi: AzureSitesApi.fromConfig(env.config), + permissions: env.permissions, }); } ``` @@ -63,7 +64,7 @@ Here's how to get the backend plugin up and running: 3. Next we wire this into the overall backend router, edit `packages/backend/src/index.ts`: ```ts - import azure from './plugins/azure'; + import azureSites from './plugins/azure-sites'; // Removed for clarity... @@ -76,10 +77,34 @@ Here's how to get the backend plugin up and running: // ... // Insert this line under the other lines that add their routers to apiRouter in the same way - apiRouter.use('/azure-sites', await azure(azureSitesEnv)); + apiRouter.use('/azure-sites', await azureSites(azureSitesEnv)); } ``` -4. Now run `yarn start-backend` from the repo root. +4. Enable permissions and that the below is just an example policy that forbids anyone but the owner of the catalog entity to trigger actions towards a site tied to an entity, edit your `packages/backend/src/plugins/permission.ts` -5. Finally, open `http://localhost:7007/api/azure-sites/health` in a browser, it should return `{"status":"ok"}`. + ```diff + // packages/backend/src/plugins/permission.ts + + import { azureSitesActionPermission } from '@backstage/plugin-azure-sites-common'; + ... + class TestPermissionPolicy implements PermissionPolicy { + - async handle(): Promise { + + async handle(request: PolicyQuery, user?: BackstageIdentityResponse): Promise { + if (isPermission(request.permission, azureSitesActionPermission)) { + return createCatalogConditionalDecision( + request.permission, + catalogConditions.isEntityOwner({ + claims: user?.identity.ownershipEntityRefs ?? [], + }), + ); + } + ... + return { + result: AuthorizeResult.ALLOW, + }; + } + ``` + +5. Now run `yarn start-backend` from the repo root. + +6. Finally, open `http://localhost:7007/api/azure/health` in a browser, it should return `{"status":"ok"}`. diff --git a/plugins/azure-sites-backend/api-report.md b/plugins/azure-sites-backend/api-report.md index 751ff3f033..04cd22596a 100644 --- a/plugins/azure-sites-backend/api-report.md +++ b/plugins/azure-sites-backend/api-report.md @@ -6,9 +6,11 @@ import { AzureSiteListRequest } from '@backstage/plugin-azure-sites-common'; import { AzureSiteListResponse } from '@backstage/plugin-azure-sites-common'; import { AzureSiteStartStopRequest } from '@backstage/plugin-azure-sites-common'; +import { CatalogApi } from '@backstage/catalog-client'; import { Config } from '@backstage/config'; import express from 'express'; import { Logger } from 'winston'; +import { PermissionEvaluator } from '@backstage/plugin-permission-common'; // @public (undocumented) export class AzureSitesApi { @@ -21,6 +23,8 @@ export class AzureSitesApi { start(request: AzureSiteStartStopRequest): Promise; // (undocumented) stop(request: AzureSiteStartStopRequest): Promise; + // (undocumented) + validateSite(annotationName: string, siteName: string): Promise; } // @public (undocumented) @@ -54,7 +58,11 @@ export interface RouterOptions { // (undocumented) azureSitesApi: AzureSitesApi; // (undocumented) + catalogApi: CatalogApi; + // (undocumented) logger: Logger; + // (undocumented) + permissions: PermissionEvaluator; } // (No @packageDocumentation comment for this package) diff --git a/plugins/azure-sites-backend/package.json b/plugins/azure-sites-backend/package.json index ae3a849810..2599bfc360 100644 --- a/plugins/azure-sites-backend/package.json +++ b/plugins/azure-sites-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-sites-backend", - "version": "0.1.19", + "version": "0.1.20-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -36,8 +36,14 @@ "@azure/arm-resourcegraph": "^4.2.1", "@azure/identity": "^4.0.0", "@backstage/backend-common": "workspace:^", + "@backstage/catalog-client": "workspace:^", + "@backstage/catalog-model": "workspace:^", "@backstage/config": "workspace:^", + "@backstage/errors": "workspace:^", + "@backstage/plugin-auth-node": "workspace:^", "@backstage/plugin-azure-sites-common": "workspace:^", + "@backstage/plugin-permission-common": "workspace:^", + "@backstage/plugin-permission-node": "workspace:^", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^4.1.0", diff --git a/plugins/azure-sites-backend/src/api/AzureSitesApi.ts b/plugins/azure-sites-backend/src/api/AzureSitesApi.ts index 73e92ea6a0..b8660c5989 100644 --- a/plugins/azure-sites-backend/src/api/AzureSitesApi.ts +++ b/plugins/azure-sites-backend/src/api/AzureSitesApi.ts @@ -95,4 +95,15 @@ export class AzureSitesApi { } return { items: items }; } + + async validateSite(annotationName: string, siteName: string) { + const azureSites = await this.list({ + name: annotationName, + }); + for (const site of azureSites.items) { + if (site.name === siteName) return true; + } + + return false; + } } diff --git a/plugins/azure-sites-backend/src/service/router.ts b/plugins/azure-sites-backend/src/service/router.ts index bea9a15396..9ed198cc20 100644 --- a/plugins/azure-sites-backend/src/service/router.ts +++ b/plugins/azure-sites-backend/src/service/router.ts @@ -19,19 +19,33 @@ import express from 'express'; import Router from 'express-promise-router'; import { Logger } from 'winston'; +import { InputError, NotAllowedError, NotFoundError } from '@backstage/errors'; +import { getBearerTokenFromAuthorizationHeader } from '@backstage/plugin-auth-node'; +import { + PermissionEvaluator, + AuthorizeResult, +} from '@backstage/plugin-permission-common'; +import { + azureSitesActionPermission, + AZURE_WEB_SITE_NAME_ANNOTATION, +} from '@backstage/plugin-azure-sites-common'; +import { CatalogApi } from '@backstage/catalog-client'; + import { AzureSitesApi } from '../api'; /** @public */ export interface RouterOptions { logger: Logger; azureSitesApi: AzureSitesApi; + catalogApi: CatalogApi; + permissions: PermissionEvaluator; } /** @public */ export async function createRouter( options: RouterOptions, ): Promise { - const { logger, azureSitesApi } = options; + const { logger, azureSitesApi, permissions, catalogApi } = options; const router = Router(); router.use(express.json()); @@ -52,28 +66,116 @@ export async function createRouter( '/:subscription/:resourceGroup/:name/start', async (request, response) => { const { subscription, resourceGroup, name } = request.params; - console.log('starting...'); - response.json( - await azureSitesApi.start({ - subscription, - resourceGroup, - name, - }), + const token = getBearerTokenFromAuthorizationHeader( + request.header('authorization'), ); + const entityRef = request.body.entityRef; + if (typeof entityRef !== 'string') { + throw new InputError('Invalid entityRef, not a string'); + } + const entity = await catalogApi.getEntityByRef(entityRef, { token }); + + if (entity) { + const annotationName = + entity.metadata.annotations?.[AZURE_WEB_SITE_NAME_ANNOTATION]; + if ( + annotationName && + !(await azureSitesApi.validateSite(annotationName, name)) + ) { + throw new NotFoundError(); + } + + const decision = permissions + ? ( + await permissions.authorize( + [ + { + permission: azureSitesActionPermission, + resourceRef: entityRef, + }, + ], + { + token, + }, + ) + )[0] + : undefined; + if (decision && decision.result === AuthorizeResult.DENY) { + throw new NotAllowedError('Unauthorized'); + } + + logger.info( + `entity ${entity.metadata.name} - azure site "${name}" is starting...`, + ); + response.json( + await azureSitesApi.start({ + subscription, + resourceGroup, + name, + }), + ); + } else { + throw new NotFoundError(); + } }, ); router.post( '/:subscription/:resourceGroup/:name/stop', async (request, response) => { const { subscription, resourceGroup, name } = request.params; - console.log('stopping...'); - response.json( - await azureSitesApi.stop({ - subscription, - resourceGroup, - name, - }), + const token = getBearerTokenFromAuthorizationHeader( + request.header('authorization'), ); + + const entityRef = request.body.entityRef; + if (typeof entityRef !== 'string') { + throw new InputError('Invalid entityRef, not a string'); + } + const entity = await catalogApi.getEntityByRef(entityRef, { token }); + + if (entity) { + const annotationName = + entity.metadata.annotations?.[AZURE_WEB_SITE_NAME_ANNOTATION]; + + if ( + annotationName && + !(await azureSitesApi.validateSite(annotationName, name)) + ) { + throw new NotFoundError('annotation mismatched!'); + } + + const decision = permissions + ? ( + await permissions.authorize( + [ + { + permission: azureSitesActionPermission, + resourceRef: entityRef, + }, + ], + { + token, + }, + ) + )[0] + : undefined; + if (decision && decision.result === AuthorizeResult.DENY) { + throw new NotAllowedError('Unauthorized'); + } + + logger.info( + `entity ${entity.metadata.name} - azure site "${name}" is stopping...`, + ); + response.json( + await azureSitesApi.stop({ + subscription, + resourceGroup, + name, + }), + ); + } else { + throw new NotFoundError(); + } }, ); router.use(errorHandler()); diff --git a/plugins/azure-sites-backend/src/service/standaloneServer.ts b/plugins/azure-sites-backend/src/service/standaloneServer.ts index 1998bee023..202c1a128d 100644 --- a/plugins/azure-sites-backend/src/service/standaloneServer.ts +++ b/plugins/azure-sites-backend/src/service/standaloneServer.ts @@ -17,11 +17,15 @@ import { createServiceBuilder, loadBackendConfig, + ServerTokenManager, + SingleHostDiscovery, } from '@backstage/backend-common'; import { Server } from 'http'; import { Logger } from 'winston'; import { AzureSitesApi } from '../api'; import { createRouter } from './router'; +import { ServerPermissionClient } from '@backstage/plugin-permission-node'; +import { CatalogClient } from '@backstage/catalog-client'; export interface ServerOptions { port: number; @@ -34,10 +38,21 @@ export async function startStandaloneServer( ): Promise { const logger = options.logger.child({ service: 'azure-backend' }); const config = await loadBackendConfig({ logger, argv: process.argv }); + const discovery = SingleHostDiscovery.fromConfig(config); + const tokenManager = ServerTokenManager.fromConfig(config, { + logger, + }); + const permissions = ServerPermissionClient.fromConfig(config, { + discovery, + tokenManager, + }); + const catalogApi = new CatalogClient({ discoveryApi: discovery }); logger.debug('Starting application server...'); const router = await createRouter({ logger, + permissions, azureSitesApi: AzureSitesApi.fromConfig(config), + catalogApi, }); let service = createServiceBuilder(module) diff --git a/plugins/azure-sites-common/api-report.md b/plugins/azure-sites-common/api-report.md index 64b4275085..e3f582107e 100644 --- a/plugins/azure-sites-common/api-report.md +++ b/plugins/azure-sites-common/api-report.md @@ -3,6 +3,11 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts +import { ResourcePermission } from '@backstage/plugin-permission-common'; + +// @public (undocumented) +export const AZURE_WEB_SITE_NAME_ANNOTATION = 'azure.com/microsoft-web-sites'; + // @public (undocumented) export type AzureSite = { href: string; @@ -19,6 +24,14 @@ export type AzureSite = { tags: {}; }; +// @public (undocumented) +export type AzureSiteBackendRequest = { + subscription: string; + resourceGroup: string; + name: string; + entityRef: string; +}; + // @public (undocumented) export type AzureSiteListRequest = { name: string; @@ -29,6 +42,12 @@ export type AzureSiteListResponse = { items: AzureSite[]; }; +// @public (undocumented) +export const azureSitesActionPermission: ResourcePermission<'catalog-entity'>; + +// @public (undocumented) +export const azureSitesPermissions: ResourcePermission<'catalog-entity'>[]; + // @public (undocumented) export type AzureSiteStartStopRequest = { subscription: string; diff --git a/plugins/azure-sites-common/package.json b/plugins/azure-sites-common/package.json index 05815edd02..0365daa844 100644 --- a/plugins/azure-sites-common/package.json +++ b/plugins/azure-sites-common/package.json @@ -32,6 +32,11 @@ "prepack": "backstage-cli package prepack", "postpack": "backstage-cli package postpack" }, + "dependencies": { + "@backstage/catalog-model": "workspace:^", + "@backstage/plugin-catalog-common": "workspace:^", + "@backstage/plugin-permission-common": "workspace:^" + }, "devDependencies": { "@backstage/cli": "workspace:^" }, diff --git a/plugins/azure-sites-common/src/index.ts b/plugins/azure-sites-common/src/index.ts index db229eae34..999a9c713c 100644 --- a/plugins/azure-sites-common/src/index.ts +++ b/plugins/azure-sites-common/src/index.ts @@ -15,3 +15,5 @@ */ export * from './types'; +export * from './utils'; +export * from './permissions'; diff --git a/plugins/azure-sites-common/src/permissions.ts b/plugins/azure-sites-common/src/permissions.ts new file mode 100644 index 0000000000..03b50f3edc --- /dev/null +++ b/plugins/azure-sites-common/src/permissions.ts @@ -0,0 +1,31 @@ +/* + * Copyright 2023 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 { createPermission } from '@backstage/plugin-permission-common'; +import { RESOURCE_TYPE_CATALOG_ENTITY } from '@backstage/plugin-catalog-common/alpha'; + +/** + * @public + */ +export const azureSitesActionPermission = createPermission({ + name: 'azure.sites.update', + attributes: { action: 'update' }, + resourceType: RESOURCE_TYPE_CATALOG_ENTITY, +}); + +/** + * @public + */ +export const azureSitesPermissions = [azureSitesActionPermission]; diff --git a/plugins/azure-sites-common/src/types.ts b/plugins/azure-sites-common/src/types.ts index 7c8be7ce24..4273085aab 100644 --- a/plugins/azure-sites-common/src/types.ts +++ b/plugins/azure-sites-common/src/types.ts @@ -46,3 +46,11 @@ export type AzureSiteStartStopRequest = { resourceGroup: string; name: string; }; + +/** @public */ +export type AzureSiteBackendRequest = { + subscription: string; + resourceGroup: string; + name: string; + entityRef: string; +}; diff --git a/plugins/azure-sites-common/src/utils.ts b/plugins/azure-sites-common/src/utils.ts new file mode 100644 index 0000000000..017f38a380 --- /dev/null +++ b/plugins/azure-sites-common/src/utils.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2023 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. + */ + +/** + * @public + */ +export const AZURE_WEB_SITE_NAME_ANNOTATION = 'azure.com/microsoft-web-sites'; diff --git a/plugins/azure-sites/CHANGELOG.md b/plugins/azure-sites/CHANGELOG.md index dd706132a6..66a6d4ecaa 100644 --- a/plugins/azure-sites/CHANGELOG.md +++ b/plugins/azure-sites/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-azure-sites +## 0.1.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-azure-sites-common@0.1.1 + ## 0.1.18 ### Patch Changes diff --git a/plugins/azure-sites/README.md b/plugins/azure-sites/README.md index 57bf84ccc5..a19b314b77 100644 --- a/plugins/azure-sites/README.md +++ b/plugins/azure-sites/README.md @@ -14,7 +14,7 @@ The following sections will help you get the Azure plugin setup and running ### Azure Sites Backend -You need to set up the Azure Sites Backend plugin before you move forward with any of these steps if you haven't already. +You need to set up the [Azure Sites Backend plugin](https://github.com/backstage/backstage/tree/master/plugins/azure-sites-backend) before you move forward with any of these steps if you haven't already. ### Entity Annotation diff --git a/plugins/azure-sites/api-report.md b/plugins/azure-sites/api-report.md index abc10ec723..92e785caa2 100644 --- a/plugins/azure-sites/api-report.md +++ b/plugins/azure-sites/api-report.md @@ -6,9 +6,9 @@ /// import { ApiRef } from '@backstage/core-plugin-api'; +import { AzureSiteBackendRequest } from '@backstage/plugin-azure-sites-common'; import { AzureSiteListRequest } from '@backstage/plugin-azure-sites-common'; import { AzureSiteListResponse } from '@backstage/plugin-azure-sites-common'; -import { AzureSiteStartStopRequest } from '@backstage/plugin-azure-sites-common'; import { BackstagePlugin } from '@backstage/core-plugin-api'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { Entity } from '@backstage/catalog-model'; @@ -23,8 +23,8 @@ export const azureSiteApiRef: ApiRef; // @public (undocumented) export type AzureSitesApi = { list: (request: AzureSiteListRequest) => Promise; - start: (request: AzureSiteStartStopRequest) => Promise; - stop: (request: AzureSiteStartStopRequest) => Promise; + start: (request: AzureSiteBackendRequest) => Promise; + stop: (request: AzureSiteBackendRequest) => Promise; }; // @public (undocumented) @@ -36,9 +36,9 @@ export class AzureSitesApiBackendClient implements AzureSitesApi { // (undocumented) list(request: AzureSiteListRequest): Promise; // (undocumented) - start(request: AzureSiteStartStopRequest): Promise; + start(request: AzureSiteBackendRequest): Promise; // (undocumented) - stop(request: AzureSiteStartStopRequest): Promise; + stop(request: AzureSiteBackendRequest): Promise; } // @public (undocumented) diff --git a/plugins/azure-sites/package.json b/plugins/azure-sites/package.json index cc16ab9e47..c9777e73da 100644 --- a/plugins/azure-sites/package.json +++ b/plugins/azure-sites/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-azure-sites", - "version": "0.1.18", + "version": "0.1.19-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -38,6 +38,9 @@ "@backstage/core-plugin-api": "workspace:^", "@backstage/plugin-azure-sites-common": "workspace:^", "@backstage/plugin-catalog-react": "workspace:^", + "@backstage/plugin-permission-common": "workspace:^", + "@backstage/plugin-permission-react": "workspace:^", + "@backstage/theme": "workspace:^", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.61", diff --git a/plugins/azure-sites/src/api/AzureSitesApi.ts b/plugins/azure-sites/src/api/AzureSitesApi.ts index 87a3b46a8d..067b2836a4 100644 --- a/plugins/azure-sites/src/api/AzureSitesApi.ts +++ b/plugins/azure-sites/src/api/AzureSitesApi.ts @@ -18,7 +18,7 @@ import { createApiRef } from '@backstage/core-plugin-api'; import { AzureSiteListRequest, AzureSiteListResponse, - AzureSiteStartStopRequest, + AzureSiteBackendRequest, } from '@backstage/plugin-azure-sites-common'; /** @public */ @@ -29,6 +29,6 @@ export const azureSiteApiRef = createApiRef({ /** @public */ export type AzureSitesApi = { list: (request: AzureSiteListRequest) => Promise; - start: (request: AzureSiteStartStopRequest) => Promise; - stop: (request: AzureSiteStartStopRequest) => Promise; + start: (request: AzureSiteBackendRequest) => Promise; + stop: (request: AzureSiteBackendRequest) => Promise; }; diff --git a/plugins/azure-sites/src/api/AzureSitesApiBackendClient.ts b/plugins/azure-sites/src/api/AzureSitesApiBackendClient.ts index b66a3cbb3f..59158df41a 100644 --- a/plugins/azure-sites/src/api/AzureSitesApiBackendClient.ts +++ b/plugins/azure-sites/src/api/AzureSitesApiBackendClient.ts @@ -18,7 +18,7 @@ import { AzureSitesApi } from './AzureSitesApi'; import { AzureSiteListRequest, AzureSiteListResponse, - AzureSiteStartStopRequest, + AzureSiteBackendRequest, } from '@backstage/plugin-azure-sites-common'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; @@ -34,30 +34,38 @@ export class AzureSitesApiBackendClient implements AzureSitesApi { this.identityApi = options.identityApi; } - async stop(request: AzureSiteStartStopRequest): Promise { + async stop(request: AzureSiteBackendRequest): Promise { const url = `${await this.discoveryApi.getBaseUrl('azure-sites')}/${ request.subscription }/${request.resourceGroup}/${request.name}/stop`; const { token: accessToken } = await this.identityApi.getCredentials(); + const entityRef = request.entityRef; await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', ...(accessToken && { Authorization: `Bearer ${accessToken}` }), }, + body: JSON.stringify({ + entityRef, + }), }); } - async start(request: AzureSiteStartStopRequest): Promise { + async start(request: AzureSiteBackendRequest): Promise { const url = `${await this.discoveryApi.getBaseUrl('azure-sites')}/${ request.subscription }/${request.resourceGroup}/${request.name}/start`; const { token: accessToken } = await this.identityApi.getCredentials(); + const entityRef = request.entityRef; await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', ...(accessToken && { Authorization: `Bearer ${accessToken}` }), }, + body: JSON.stringify({ + entityRef, + }), }); } diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx index dbed6cdbd6..71e5639da2 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewComponent/AzureSitesOverview.tsx @@ -17,11 +17,9 @@ import React from 'react'; import { Entity } from '@backstage/catalog-model'; import { useSites } from '../../hooks/useSites'; -import { - AZURE_WEB_SITE_NAME_ANNOTATION, - useServiceEntityAnnotations, -} from '../../hooks/useServiceEntityAnnotations'; import { ErrorBoundary, ResponseErrorPanel } from '@backstage/core-components'; +import { useServiceEntityAnnotations } from '../../hooks/useServiceEntityAnnotations'; +import { AZURE_WEB_SITE_NAME_ANNOTATION } from '@backstage/plugin-azure-sites-common'; import { useEntity, MissingAnnotationEmptyState, diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.test.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.test.tsx index 5d1a5ee73b..7676169551 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.test.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.test.tsx @@ -21,6 +21,11 @@ import { errorApiRef, identityApiRef, } from '@backstage/core-plugin-api'; +import { AuthorizeResult } from '@backstage/plugin-permission-common'; +import { + PermissionApi, + permissionApiRef, +} from '@backstage/plugin-permission-react'; import { rest } from 'msw'; import { renderInTestApp, @@ -41,15 +46,39 @@ const identityApiMock = (getCredentials: any) => ({ }); const azureSitesApiMock = {}; +jest.mock('@backstage/plugin-catalog-react', () => ({ + useEntity: () => { + return { loading: false, entity: undefined }; + }, +})); + +jest.mock('@backstage/plugin-catalog-react/alpha', () => ({ + useEntityPermission: () => { + return { loading: false, allowed: true }; + }, +})); + +jest.mock('@backstage/catalog-model', () => ({ + stringifyEntityRef: () => { + return {}; + }, +})); + const config = { getString: (_: string) => 'https://test-url', }; +const mockAuthorize = jest + .fn() + .mockImplementation(async () => ({ result: AuthorizeResult.ALLOW })); +const permissionApi: Partial = { authorize: mockAuthorize }; + const apis: [AnyApiRef, Partial][] = [ [errorApiRef, errorApiMock], [configApiRef, config], [azureSiteApiRef, azureSitesApiMock], [identityApiRef, identityApiMock], + [permissionApiRef, permissionApi], ]; describe('AzureSitesOverviewWidget', () => { diff --git a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx index c7f8befedb..2f891ec3d2 100644 --- a/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx +++ b/plugins/azure-sites/src/components/AzureSitesOverviewTableComponent/AzureSitesOverviewTable.tsx @@ -27,7 +27,10 @@ import { Tooltip, } from '@material-ui/core'; import { default as MuiAlert } from '@material-ui/lab/Alert'; -import { AzureSite } from '@backstage/plugin-azure-sites-common'; +import { + AzureSite, + azureSitesActionPermission, +} from '@backstage/plugin-azure-sites-common'; import { Table, TableColumn, Link } from '@backstage/core-components'; import { useTheme } from '@material-ui/core/styles'; import FlashOnIcon from '@material-ui/icons/FlashOn'; @@ -40,6 +43,9 @@ import OpenInNewIcon from '@material-ui/icons/OpenInNew'; import { DateTime } from 'luxon'; import { useApi } from '@backstage/core-plugin-api'; import { azureSiteApiRef } from '../../api'; +import { useEntity } from '@backstage/plugin-catalog-react'; +import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha'; +import { stringifyEntityRef } from '@backstage/catalog-model'; type States = 'Waiting' | 'Running' | 'Paused' | 'Failed' | 'Stopped'; type Kinds = 'app' | 'functionapp'; @@ -117,6 +123,8 @@ const ActionButtons = ({ onMenuItemClick: Dispatch>; }) => { const azureApi = useApi(azureSiteApiRef); + const { entity } = useEntity(); + const entityRef = stringifyEntityRef(entity); const [anchorEl, setAnchorEl] = useState(null); const open = Boolean(anchorEl); @@ -132,6 +140,7 @@ const ActionButtons = ({ name: value.name, resourceGroup: value.resourceGroup, subscription: value.subscription, + entityRef: entityRef, }); onMenuItemClick('Starting, this may take some time...'); handleClose(); @@ -141,11 +150,15 @@ const ActionButtons = ({ name: value.name, resourceGroup: value.resourceGroup, subscription: value.subscription, + entityRef: entityRef, }); onMenuItemClick('Stopping, this may take some time...'); handleClose(); }; + const { loading: loadingPermission, allowed: canDoAction } = + useEntityPermission(azureSitesActionPermission); + return (
- {value.state !== 'Running' && ( - + {value.state !== 'Running' && !loadingPermission && ( +  Start )} - {value.state !== 'Stopped' && ( - + {value.state !== 'Stopped' && !loadingPermission && ( +  Stop diff --git a/plugins/azure-sites/src/hooks/useServiceEntityAnnotations.ts b/plugins/azure-sites/src/hooks/useServiceEntityAnnotations.ts index 08070dc8e4..1695749640 100644 --- a/plugins/azure-sites/src/hooks/useServiceEntityAnnotations.ts +++ b/plugins/azure-sites/src/hooks/useServiceEntityAnnotations.ts @@ -15,8 +15,8 @@ */ import { Entity } from '@backstage/catalog-model'; +import { AZURE_WEB_SITE_NAME_ANNOTATION } from '@backstage/plugin-azure-sites-common'; -export const AZURE_WEB_SITE_NAME_ANNOTATION = 'azure.com/microsoft-web-sites'; export const useServiceEntityAnnotations = (entity: Entity) => { const webSiteName = entity?.metadata.annotations?.[AZURE_WEB_SITE_NAME_ANNOTATION] ?? ''; diff --git a/plugins/badges-backend/CHANGELOG.md b/plugins/badges-backend/CHANGELOG.md index c0135f7ee8..61fd11ec9e 100644 --- a/plugins/badges-backend/CHANGELOG.md +++ b/plugins/badges-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-badges-backend +## 0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.3.6 ### Patch Changes diff --git a/plugins/badges-backend/package.json b/plugins/badges-backend/package.json index 893a5b6969..cf9051198e 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.3.6", + "version": "0.3.7-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 0897cf4caf..4a85075f2f 100644 --- a/plugins/badges/CHANGELOG.md +++ b/plugins/badges/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-badges +## 0.2.54-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.2.53 ### Patch Changes diff --git a/plugins/badges/package.json b/plugins/badges/package.json index 688536d260..3d8e7d101d 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.53", + "version": "0.2.54-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 51dac2f648..9cf47046c5 100644 --- a/plugins/bazaar-backend/CHANGELOG.md +++ b/plugins/bazaar-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-bazaar-backend +## 0.3.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.3.7 ### Patch Changes diff --git a/plugins/bazaar-backend/package.json b/plugins/bazaar-backend/package.json index 82f4c66a76..1dfa398e26 100644 --- a/plugins/bazaar-backend/package.json +++ b/plugins/bazaar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar-backend", - "version": "0.3.7", + "version": "0.3.8-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 5e048efb1b..0f7122a74d 100644 --- a/plugins/bazaar/CHANGELOG.md +++ b/plugins/bazaar/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-bazaar +## 0.2.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.2.21 ### Patch Changes diff --git a/plugins/bazaar/package.json b/plugins/bazaar/package.json index 058ead5ca3..dd7629a14f 100644 --- a/plugins/bazaar/package.json +++ b/plugins/bazaar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-bazaar", - "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/bitbucket-cloud-common/CHANGELOG.md b/plugins/bitbucket-cloud-common/CHANGELOG.md index d2883dce02..f175f210ed 100644 --- a/plugins/bitbucket-cloud-common/CHANGELOG.md +++ b/plugins/bitbucket-cloud-common/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-bitbucket-cloud-common +## 0.2.16-next.0 + +### Patch Changes + +- 2e6af00: Updated dependency `ts-morph` to `^21.0.0`. +- Updated dependencies + - @backstage/integration@1.8.0 + ## 0.2.15 ### Patch Changes diff --git a/plugins/bitbucket-cloud-common/api-report.md b/plugins/bitbucket-cloud-common/api-report.md index 95e6f36836..0f4e82d5d1 100644 --- a/plugins/bitbucket-cloud-common/api-report.md +++ b/plugins/bitbucket-cloud-common/api-report.md @@ -271,9 +271,7 @@ export namespace Models { description?: string; fork_policy?: RepositoryForkPolicyEnum; full_name?: string; - // (undocumented) has_issues?: boolean; - // (undocumented) has_wiki?: boolean; // (undocumented) is_private?: boolean; diff --git a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json index 9de3c5f9b3..d897d83047 100644 --- a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json +++ b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json @@ -499,7 +499,7 @@ "/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```", + "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.", "summary": "Get a webhook resource", "responses": { "200": { @@ -508,6 +508,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/subject_types" + }, + "examples": { + "response": { + "value": { + "repository": { + "links": { + "events": { + "href": "https://api.bitbucket.org/2.0/hook_events/repository" + } + } + }, + "workspace": { + "links": { + "events": { + "href": "https://api.bitbucket.org/2.0/hook_events/workspace" + } + } + } + } + } } } } @@ -530,7 +550,7 @@ "/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```", + "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\nNOTE: The example response is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the other `subject_type` objects.", "summary": "List subscribable webhook types", "responses": { "200": { @@ -539,6 +559,41 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_hook_events" + }, + "examples": { + "response": { + "value": { + "page": 1, + "pagelen": 30, + "size": 4, + "values": [ + { + "category": "Repository", + "description": "Whenever a repository push occurs", + "event": "repo:push", + "label": "Push" + }, + { + "category": "Repository", + "description": "Whenever a repository fork occurs", + "event": "repo:fork", + "label": "Fork" + }, + { + "category": "Repository", + "description": "Whenever a repository import occurs", + "event": "repo:imported", + "label": "Import" + }, + { + "category": "Pull Request", + "label": "Approved", + "description": "When someone has approved a pull request", + "event": "pullrequest:approved" + } + ] + } + } } } } @@ -788,6 +843,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -853,6 +915,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["delete:repository:bitbucket"] + } ] }, "get": { @@ -901,6 +970,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -959,6 +1035,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -1043,6 +1126,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1143,11 +1233,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "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.", + "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`, `restrict_merges`, `require_tasks_to_be_completed`,\n`require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`,\n`require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`,\n`reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`,\n`reset_pullrequest_changes_requested_on_change`, `require_all_dependencies_merged`,\n`enforce_merge_checks`, and `allow_auto_merge_when_builds_pass`.\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": { @@ -1212,6 +1309,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1285,6 +1389,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "get": { @@ -1343,6 +1454,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -1412,6 +1530,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1447,7 +1572,7 @@ "/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```", + "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.", "summary": "Get the branching model for a repository", "responses": { "200": { @@ -1456,6 +1581,58 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "master", + "branch": { + "type": "branch", + "name": "master", + "target": { + "hash": "16dffcb0de1b22e249db6799532074cf32efe80f" + } + }, + "use_mainbranch": true + }, + "production": { + "name": "production", + "branch": { + "type": "branch", + "name": "production", + "target": { + "hash": "16dffcb0de1b22e249db6799532074cf32efe80f" + } + }, + "use_mainbranch": false + }, + "branch_types": [ + { + "kind": "release", + "prefix": "release/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "feature", + "prefix": "feature/" + }, + { + "kind": "bugfix", + "prefix": "bugfix/" + } + ], + "type": "branching_model", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model" + } + } + } + } } } } @@ -1501,6 +1678,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1527,7 +1711,7 @@ "/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```", + "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.", "summary": "Get the branching model config for a repository", "responses": { "200": { @@ -1536,6 +1720,51 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "is_valid": true, + "name": "null", + "use_mainbranch": true + }, + "production": { + "is_valid": true, + "name": "production", + "use_mainbranch": false, + "enabled": false + }, + "branch_types": [ + { + "kind": "release", + "enabled": true, + "prefix": "release/" + }, + { + "kind": "hotfix", + "enabled": true, + "prefix": "hotfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "bugfix", + "enabled": false, + "prefix": "bugfix/" + } + ], + "type": "branching_model_settings", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model/settings" + } + } + } + } } } } @@ -1581,11 +1810,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "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.", + "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\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": { @@ -1594,6 +1830,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "use_mainbranch": true + }, + "production": { + "enabled": true, + "use_mainbranch": false, + "name": "production" + }, + "branch_types": [ + { + "kind": "bugfix", + "enabled": true, + "prefix": "bugfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "release", + "enabled": false + } + ] + } + } } } } @@ -1649,6 +1919,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1675,7 +1952,7 @@ "/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```", + "description": "Returns the specified commit.", "summary": "Get a commit", "responses": { "200": { @@ -1684,6 +1961,107 @@ "application/json": { "schema": { "$ref": "#/components/schemas/commit" + }, + "examples": { + "response": { + "value": { + "rendered": { + "message": { + "raw": "Add a GEORDI_OUTPUT_DIR setting", + "markup": "markdown", + "html": "

Add a GEORDI_OUTPUT_DIR setting

", + "type": "rendered" + } + }, + "hash": "f7591a13eda445d9a9167f98eb870319f4b6c2d8", + "repository": { + "name": "geordi", + "type": "repository", + "full_name": "bitbucket/geordi", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260" + } + }, + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses" + } + }, + "author": { + "raw": "Brodie Rao ", + "type": "author", + "user": { + "display_name": "Brodie Rao", + "uuid": "{9484702e-c663-4afd-aefb-c93a8cd31c28}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/" + }, + "avatar": { + "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" + } + }, + "type": "user", + "nickname": "brodie", + "account_id": "557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca" + } + }, + "summary": { + "raw": "Add a GEORDI_OUTPUT_DIR setting", + "markup": "markdown", + "html": "

Add a GEORDI_OUTPUT_DIR setting

", + "type": "rendered" + }, + "participants": [], + "parents": [ + { + "type": "commit", + "hash": "f06941fec4ef6bcb0c2456927a0cf258fa4f899b", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b" + } + } + } + ], + "date": "2012-07-16T19:37:54+00:00", + "message": "Add a GEORDI_OUTPUT_DIR setting", + "type": "commit" + } + } } } } @@ -1709,6 +2087,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1771,6 +2156,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "post": { @@ -1809,6 +2201,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -1888,6 +2290,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -1934,6 +2343,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1967,6 +2383,37 @@ ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}": { + "delete": { + "tags": ["Commits"], + "description": "Deletes the specified commit comment.\n\nNote that deleting comments that have visible replies that point to\nthem will not really delete the resource. This is to retain the integrity\nof the original comment tree. Instead, the `deleted` element is set to\n`true` and the content is blanked out. The comment will continue to be\nreturned by the collections and self endpoints.", + "summary": "Delete a commit comment", + "responses": { + "204": { + "description": "Indicates the comment was deleted by this action or a previous delete." + }, + "404": { + "description": "If the comment doesn't exist" + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, "get": { "tags": ["Commits"], "description": "Returns the specified commit comment.", @@ -1993,6 +2440,63 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Commits"], + "description": "Used to update the contents of a comment. Only the content of the comment can be updated.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"}'\n```", + "summary": "Update a commit comment", + "responses": { + "201": { + "description": "The newly updated comment.", + "headers": { + "Location": { + "description": "The location of the newly updated comment.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "If the comment update was detected as spam" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commit_comment" + } + } + }, + "description": "The updated comment.", + "required": true + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -2094,7 +2598,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -2152,7 +2667,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -2217,7 +2743,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { @@ -2308,7 +2845,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports": { @@ -2357,7 +2912,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { @@ -2436,7 +3002,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "tags": ["Reports", "Commits"], @@ -2502,7 +3079,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Reports", "Commits"], @@ -2551,7 +3139,18 @@ "204": { "description": "No content" } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations": { @@ -2609,7 +3208,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Reports", "Commits"], @@ -2684,7 +3294,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { @@ -2761,7 +3382,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Reports", "Commits"], @@ -2847,7 +3479,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Reports", "Commits"], @@ -2905,7 +3548,18 @@ "204": { "description": "No content" } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses": { @@ -2968,6 +3622,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3050,6 +3711,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3122,6 +3790,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "put": { @@ -3173,6 +3848,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3251,6 +3933,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -3289,6 +3978,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3315,7 +4011,7 @@ "/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.", + "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 ref `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": { @@ -3349,6 +4045,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -3387,6 +4090,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3402,7 +4112,7 @@ { "name": "revision", "in": "path", - "description": "The commit's SHA1.", + "description": "A commit SHA1 or ref name.", "required": true, "schema": { "type": "string" @@ -3585,6 +4295,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -3648,6 +4365,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "get": { @@ -3696,6 +4420,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -3754,6 +4485,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -3789,7 +4527,7 @@ "/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```", + "description": "Returns all deploy-keys belonging to a repository.", "summary": "List repository deploy keys", "responses": { "200": { @@ -3798,6 +4536,37 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_deploy_keys" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "id": 123, + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "label": "mykey", + "type": "deploy_key", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123" + } + }, + "last_used": null, + "comment": "mleu@C02W454JHTD8" + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -3830,7 +4599,7 @@ }, "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```", + "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 -X POST \\\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```", "summary": "Add a repository deploy key", "responses": { "200": { @@ -3839,6 +4608,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "id": 123, + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "label": "mydeploykey", + "type": "deploy_key", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123" + } + }, + "last_used": null, + "comment": "mleu@C02W454JHTD8" + } + } } } } @@ -3896,7 +4689,7 @@ "/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```", + "description": "This deletes a deploy key from a repository.", "summary": "Delete a repository deploy key", "responses": { "204": { @@ -3930,7 +4723,7 @@ }, "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```", + "description": "Returns the deploy key belonging to a specific key.", "summary": "Get a repository deploy key", "responses": { "200": { @@ -3939,6 +4732,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "mleu@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234" + } + }, + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "label": "mykey", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "id": 1234, + "type": "deploy_key" + } + } } } } @@ -3971,7 +4788,7 @@ }, "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```", + "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 -X PUT \\\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```", "summary": "Update a repository deploy key", "responses": { "200": { @@ -3980,6 +4797,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "newcomment", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234" + } + }, + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "label": "newlabel", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "id": 1234, + "type": "deploy_key" + } + } } } } @@ -4050,7 +4891,7 @@ } ] }, - "/repositories/{workspace}/{repo_slug}/deployments/": { + "/repositories/{workspace}/{repo_slug}/deployments": { "get": { "tags": ["Deployments"], "description": "Find deployments", @@ -4087,7 +4928,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}": { @@ -4146,7 +5005,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables": { @@ -4195,7 +5072,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -4281,7 +5169,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { @@ -4360,7 +5259,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -4419,13 +5329,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/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`.", + "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, 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": { @@ -4491,7 +5412,7 @@ { "name": "merge", "in": "query", - "description": "This parameter is deprecated and will be removed at the end\nof 2022. The 'topic' parameter should be used instead. The\n'merge' and 'topic' parameters cannot be both used at the same\ntime.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diff from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diff between the source and\ndestination is returned. True if omitted.", + "description": "This parameter is deprecated. The 'topic' parameter should be used\ninstead. The 'merge' and 'topic' parameters cannot be both used at\nthe same time.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diff from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diff between the source and\ndestination is returned. True if omitted.", "required": false, "schema": { "type": "boolean" @@ -4517,6 +5438,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4552,7 +5480,7 @@ "/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```", + "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, 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`.", "summary": "Compare two commit diff stats", "responses": { "200": { @@ -4561,6 +5489,43 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_diffstats" + }, + "examples": { + "response": { + "value": { + "pagelen": 500, + "values": [ + { + "type": "diffstat", + "status": "modified", + "lines_removed": 1, + "lines_added": 2, + "old": { + "path": "setup.py", + "escaped_path": "setup.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py" + } + } + }, + "new": { + "path": "setup.py", + "escaped_path": "setup.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py" + } + } + } + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -4586,6 +5551,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4601,7 +5573,7 @@ { "name": "merge", "in": "query", - "description": "This parameter is deprecated and will be removed at the end\nof 2022. The 'topic' parameter should be used instead. The\n'merge' and 'topic' parameters cannot be both used at the same\ntime.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diffstat from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diffstat between the source and\ndestination is returned. True if omitted.", + "description": "This parameter is deprecated. The 'topic' parameter should be used\ninstead. The 'merge' and 'topic' parameters cannot be both used at\nthe same time.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diffstat from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diffstat between the source and\ndestination is returned. True if omitted.", "required": false, "schema": { "type": "boolean" @@ -4693,6 +5665,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -4807,6 +5786,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "get": { @@ -4937,6 +5923,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4963,7 +5956,7 @@ "/repositories/{workspace}/{repo_slug}/effective-default-reviewers": { "get": { "tags": ["Pullrequests"], - "description": "Returns the repository's effective default reviewers. This includes both default\nreviewers defined at the repository level as well as those inherited from its project.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/{workspace_slug}/{repo_slug}/effective-default-reviewers?page=1&pagelen=20\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"user\": {\n \"display_name\": \"Patrick Wolf\",\n \"uuid\": \"{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\",\n },\n {\n \"user\": {\n \"display_name\": \"Davis Lee\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n },\n \"reviewer_type\": \"repository\",\n \"type\": \"default_reviewer\",\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "description": "Returns the repository's effective default reviewers. This includes both default\nreviewers defined at the repository level as well as those inherited from its project.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.", "summary": "List effective default reviewers", "responses": { "200": { @@ -4972,6 +5965,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_default_reviewer_and_type" + }, + "examples": { + "response": { + "value": { + "pagelen": 20, + "values": [ + { + "user": { + "display_name": "Patrick Wolf", + "uuid": "{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + }, + { + "user": { + "display_name": "Davis Lee", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + }, + "reviewer_type": "repository", + "type": "default_reviewer" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -4997,6 +6017,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -5020,7 +6047,7 @@ } ] }, - "/repositories/{workspace}/{repo_slug}/environments/": { + "/repositories/{workspace}/{repo_slug}/environments": { "get": { "tags": ["Deployments"], "description": "Find environments", @@ -5057,7 +6084,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Deployments"], @@ -5134,7 +6179,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}": { @@ -5193,7 +6249,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Deployments"], @@ -5243,10 +6317,21 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/": { + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes": { "post": { "tags": ["Deployments"], "description": "Update an environment", @@ -5295,13 +6380,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/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`.", + "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\nThe example response returns commits made before 2011-05-18 against a file\nnamed `README.rst`. The results are filtered to only return the path and\ndate. This request can be made using:\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\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": { @@ -5310,6 +6406,32 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_files" + }, + "examples": { + "response": { + "value": { + "values": [ + { + "commit": { + "date": "2011-05-17T07:32:09+00:00" + }, + "path": "README.rst" + }, + { + "commit": { + "date": "2011-05-16T06:33:28+00:00" + }, + "path": "README.txt" + }, + { + "commit": { + "date": "2011-05-16T06:15:39+00:00" + }, + "path": "README.txt" + } + ] + } + } } } } @@ -5364,6 +6486,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -5462,6 +6591,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -5508,6 +6644,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -5582,7 +6728,7 @@ }, "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.", + "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 \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nWhen the `secret` is provided it will be used as the key to generate a HMAC\ndigest value sent in the `X-Hub-Signature` header at delivery time. Passing\na `null` or empty `secret` or not passing a `secret` will leave the webhook's\nsecret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's\nsecret is set.\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": { @@ -5739,7 +6885,7 @@ }, "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`", + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret can be left unchanged by not passing the `secret` field in the\nrequest.", "summary": "Update a webhook for a repository", "responses": { "200": { @@ -5955,7 +7101,7 @@ "/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.\"", + "description": "A POST request to this endpoint initiates a new background celery task that archives the repo's issues.\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": { @@ -6038,7 +7184,7 @@ "/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.", + "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 202 response\nwith in the response body a description of the current status.\n\nAfter the job has been scheduled, but before it starts executing, the endpoint\nreturns a 202 response with status `ACCEPTED`.\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 export status", "responses": { "202": { @@ -6047,6 +7193,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Initializing", + "total": 0, + "count": 0, + "pct": 0 + } + } } } } @@ -6136,7 +7294,7 @@ "/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.", + "description": "When using GET, this endpoint reports the status of the current import task.\n\nAfter the job has been scheduled, but before it starts executing, the endpoint\nreturns a 202 response with status `ACCEPTED`.\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": { @@ -6155,6 +7313,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Attachments", + "total": 15, + "count": 0, + "percent": 0 + } + } } } } @@ -6204,7 +7374,7 @@ }, "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```", + "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```", "summary": "Import issues", "responses": { "202": { @@ -6213,6 +7383,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Attachments", + "total": 15, + "count": 0, + "percent": 0 + } + } } } } @@ -6711,7 +7893,7 @@ "/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.", + "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\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": { @@ -6720,6 +7902,98 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_log_entries" + }, + "examples": { + "response": { + "value": { + "pagelen": 20, + "values": [ + { + "changes": { + "priority": { + "new": "trivial", + "old": "major" + }, + "assignee": { + "new": "", + "old": "evzijst" + }, + "assignee_account_id": { + "new": "", + "old": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443" + }, + "kind": { + "new": "enhancement", + "old": "bug" + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2" + }, + "html": { + "href": "https://bitbucket.org/evzijst/dogslow/issues/1#comment-2" + } + }, + "issue": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1" + } + }, + "type": "issue", + "id": 1, + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow" + }, + "html": { + "href": "https://bitbucket.org/evzijst/dogslow" + }, + "avatar": { + "href": "https://bitbucket.org/evzijst/dogslow/avatar/32/" + } + }, + "type": "repository", + "name": "dogslow", + "full_name": "evzijst/dogslow", + "uuid": "{988b17c6-1a47-4e70-84ee-854d5f012bf6}" + }, + "title": "Updated title" + }, + "created_on": "2018-03-03T00:35:28.353630+00:00", + "user": { + "username": "evzijst", + "nickname": "evzijst", + "display_name": "evzijst", + "type": "user", + "uuid": "{aaa7972b-38af-4fb1-802d-6e3854c95778}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/evzijst" + }, + "html": { + "href": "https://bitbucket.org/evzijst/" + }, + "avatar": { + "href": "https://bitbucket.org/account/evzijst/avatar/32/" + } + } + }, + "message": { + "raw": "Removed assignee, changed kind and priority.", + "markup": "markdown", + "html": "

Removed assignee, changed kind and priority.

", + "type": "rendered" + }, + "type": "issue_change", + "id": 2 + } + ], + "page": 1 + } + } } } } @@ -7597,6 +8871,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -7795,6 +9076,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -7826,6 +9114,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -7879,6 +9174,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -7914,7 +9216,7 @@ "/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```", + "description": "Returns a paginated list of explicit group permissions for the given repository.\nThis endpoint does not support BBQL features.", "summary": "List explicit group permissions for a repository", "responses": { "200": { @@ -7923,6 +9225,45 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_group_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/administrators" + } + } + }, + { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers" + }, + "permission": "read", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -7968,6 +9309,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -7994,7 +9342,7 @@ "/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", + "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.", "summary": "Delete an explicit group permission for a repository", "responses": { "204": { @@ -8021,7 +9369,7 @@ } }, "404": { - "description": "The workspace does not exist, the repository does not exist,or the group does not exist.", + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", "content": { "application/json": { "schema": { @@ -8045,7 +9393,7 @@ }, "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```", + "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`", "summary": "Get an explicit group permission for a repository", "responses": { "200": { @@ -8054,6 +9402,25 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers", + "full_slug": "atlassian_tutorial:developers" + }, + "permission": "read", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + } } } } @@ -8099,11 +9466,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "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```", + "description": "Updates the group permission, or grants a new permission if one does not already exist.\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`", "summary": "Update an explicit group permission for a repository", "responses": { "200": { @@ -8112,6 +9486,25 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers", + "full_slug": "atlassian_tutorial:developers" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + } } } } @@ -8157,7 +9550,7 @@ } }, "404": { - "description": "The workspace does not exist, the repository does not exist,or the group does not exist.", + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", "content": { "application/json": { "schema": { @@ -8167,6 +9560,9 @@ } } }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, "security": [ { "oauth2": ["repository:admin"] @@ -8212,7 +9608,7 @@ "/repositories/{workspace}/{repo_slug}/permissions-config/users": { "get": { "tags": ["Repositories"], - "description": "Returns a paginated list of explicit user 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/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```", + "description": "Returns a paginated list of explicit user permissions for the given repository.\nThis endpoint does not support BBQL features.", "summary": "List explicit user permissions for a repository", "responses": { "200": { @@ -8221,6 +9617,47 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_user_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -8266,6 +9703,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -8292,7 +9736,7 @@ "/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```", + "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.", "summary": "Delete an explicit user permission for a repository", "responses": { "204": { @@ -8343,7 +9787,7 @@ }, "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```", + "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`", "summary": "Get an explicit user permission for a repository", "responses": { "200": { @@ -8352,6 +9796,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a", + "nickname": "Colin Cameron" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } } } } @@ -8397,11 +9861,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "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```", + "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`", "summary": "Update an explicit user permission for a repository", "responses": { "200": { @@ -8410,6 +9881,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a", + "nickname": "Colin Cameron" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } } } } @@ -8465,6 +9956,9 @@ } } }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, "security": [ { "oauth2": ["repository:admin"] @@ -8507,168 +10001,7 @@ } ] }, - "/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.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_caches" - } - } - } - }, - "404": { - "description": "The account or repository was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/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, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "repo_slug", - "description": "The repository.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "cache_uuid", - "description": "The UUID of the cache to delete.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The cache was deleted." - }, - "404": { - "description": "The workspace, repository or cache_uuid with given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/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, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "repo_slug", - "description": "The repository.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "cache_uuid", - "description": "The UUID of the cache.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The cache content uri.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_cache_content_uri" - } - } - } - }, - "404": { - "description": "The workspace, repository or cache_uuid with given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/": { + "/repositories/{workspace}/{repo_slug}/pipelines": { "get": { "tags": ["Pipelines"], "summary": "List pipelines", @@ -8705,12 +10038,30 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "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", + "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 \"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \"hash\": \"9f848b7\"\n },\n \"commit\": {\n \"hash\": \"1a372fc\"\n },\n \"pullrequest\": {\n \"id\": \"3\"\n },\n \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n", "operationId": "createPipelineForRepository", "parameters": [ { @@ -8782,7 +10133,308 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/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.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_caches" + } + } + } + }, + "404": { + "description": "The account or repository was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete caches", + "description": "Delete repository cache versions by name.", + "operationId": "deleteRepositoryPipelineCaches", + "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" + } + }, + { + "name": "name", + "description": "The cache name.", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The caches were deleted." + }, + "404": { + "description": "The workspace, repository or cache name was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/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, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cache_uuid", + "description": "The UUID of the cache to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The cache was deleted." + }, + "404": { + "description": "The workspace, repository or cache_uuid with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/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, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cache_uuid", + "description": "The UUID of the cache.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The cache content uri.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_cache_content_uri" + } + } + } + }, + "404": { + "description": "The workspace, repository or cache_uuid with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}": { @@ -8841,10 +10493,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/": { + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps": { "get": { "tags": ["Pipelines"], "summary": "List steps for a pipeline", @@ -8890,7 +10560,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { @@ -8958,7 +10646,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { @@ -9039,7 +10745,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { @@ -9109,7 +10833,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { @@ -9169,7 +10911,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { @@ -9229,7 +10989,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { @@ -9298,7 +11076,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { @@ -9360,7 +11156,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config": { @@ -9400,7 +11214,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9449,7 +11274,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { @@ -9520,10 +11356,21 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules": { "post": { "tags": ["Pipelines"], "summary": "Create a schedule", @@ -9553,7 +11400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/pipeline_schedule" + "$ref": "#/components/schemas/pipeline_schedule_post_request_body" } } }, @@ -9601,7 +11448,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "tags": ["Pipelines"], @@ -9649,7 +11514,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { @@ -9708,7 +11591,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9748,7 +11649,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/pipeline_schedule" + "$ref": "#/components/schemas/pipeline_schedule_put_request_body" } } }, @@ -9776,7 +11677,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -9826,10 +11745,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions": { "get": { "tags": ["Pipelines"], "summary": "List executions of a schedule", @@ -9885,7 +11822,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { @@ -9935,7 +11890,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9994,7 +11967,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10035,10 +12019,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts": { "get": { "tags": ["Pipelines"], "summary": "List known hosts", @@ -10075,7 +12077,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -10152,7 +12172,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}": { @@ -10211,7 +12242,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -10279,7 +12328,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10329,10 +12389,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "summary": "List variables for a repository", @@ -10369,7 +12447,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -10446,7 +12542,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}": { @@ -10505,7 +12612,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -10573,7 +12698,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10623,7 +12759,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}": { @@ -10677,7 +12831,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -10726,7 +12891,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -10782,7 +12958,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pullrequests": { @@ -10836,6 +13023,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "post": { @@ -10902,6 +13096,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -10958,6 +13162,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11021,6 +13232,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -11089,6 +13307,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11154,6 +13382,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11195,6 +13430,16 @@ "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, + "400": { + "description": "Pull request cannot be unapproved because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -11226,6 +13471,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } ] }, "post": { @@ -11274,6 +13526,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11353,6 +13615,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "post": { @@ -11420,6 +13689,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11492,6 +13768,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "get": { @@ -11540,6 +13823,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -11599,6 +13889,166 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "comment_id", + "in": "path", + "description": "The id of the comment.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve": { + "delete": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Reopen a comment thread", + "responses": { + "204": { + "description": "The comment is reopened." + }, + "403": { + "description": "If the authenticated user does not have access to the pull request,\nor if the provided comment is not a top-level comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment does not exist, or if the comment has not been resolved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Resolve a comment thread", + "responses": { + "200": { + "description": "The comment resolution details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/comment_resolution" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request,\nif the provided comment is not a top-level comment,\nor if the comment is not on the diff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "If the comment has already been resolved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11680,6 +14130,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11749,6 +14206,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11801,6 +14268,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11853,6 +14327,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11945,6 +14426,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -12003,6 +14494,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12064,6 +14562,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12105,6 +14610,16 @@ "204": { "description": "An empty response indicating the authenticated user's request for change has been withdrawn." }, + "400": { + "description": "Pull request requested changes cannot be removed because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -12136,6 +14651,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } ] }, "post": { @@ -12153,6 +14675,16 @@ } } }, + "400": { + "description": "Pull request changes cannot be requested because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -12184,6 +14716,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -12276,6 +14818,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12308,6 +14857,434 @@ } ] }, + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's tasks.\n\nThis endpoint supports filtering and sorting of the results by the 'task' field.\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List tasks on a pull request", + "responses": { + "200": { + "description": "A paginated list of pull request tasks for the given pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_tasks" + } + } + } + }, + "400": { + "description": "If the user provides an invalid filter, sort, or fields query parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the pull request does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagelen", + "in": "query", + "description": "\nCurrent number of objects on the existing page.\nThe default value is 10 with 100 being the maximum allowed value.\nIndividual APIs may enforce different values.\n", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "Creates a new pull request task.\n\nReturns the newly created pull request task.\n\nTasks can optionally be created in relation to a comment specified by the comment's ID which\nwill cause the task to appear below the comment on a pull request when viewed in Bitbucket.", + "summary": "Create a task on a pull request", + "responses": { + "201": { + "description": "The newly created task.", + "headers": { + "Location": { + "description": "The URL of the new task", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "400": { + "description": "There is a missing required field in the request or the task content is blank.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the pull request does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_task_create" + } + } + }, + "description": "The contents of the task", + "required": true + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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}/pullrequests/{pull_request_id}/tasks/{task_id}": { + "delete": { + "tags": ["Pullrequests"], + "description": "Deletes a specific pull request task.", + "summary": "Delete a task on a pull request", + "responses": { + "204": { + "description": "Successful deletion." + }, + "403": { + "description": "If the authenticated user does not have access to delete the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "get": { + "tags": ["Pullrequests"], + "description": "Returns a specific pull request task.", + "summary": "Get a task on a pull request", + "responses": { + "200": { + "description": "The task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "put": { + "tags": ["Pullrequests"], + "description": "Updates a specific pull request task.", + "summary": "Update a task on a pull request", + "responses": { + "200": { + "description": "The updated task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "400": { + "description": "There is a missing required field in the request or the task content is blank.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_task_update" + } + } + }, + "description": "The updated state and content of the task.", + "required": true + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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": "task_id", + "in": "path", + "description": "The ID of the task.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}": { "put": { "responses": { @@ -12368,7 +15345,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -12426,7 +15414,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -12491,7 +15490,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/refs": { @@ -12559,6 +15569,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -12585,7 +15602,7 @@ "/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.", + "description": "Returns a list of all open branches within the specified repository.\nResults will be in the order the source control manager returns them.\n\nBranches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)\nthat can be used to search for specific branches. For instance, to find\nall branches that have \"stab\" in their name:\n\n```\ncurl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'\n```\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 branch --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 ?q= query parameter. When using ?q=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", "summary": "List open branches", "responses": { "200": { @@ -12594,6 +15611,121 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_branches" + }, + "examples": { + "response": { + "value": { + "pagelen": 1, + "size": 187, + "values": [ + { + "name": "issue-9.3/AUI-5343-assistive-class", + "links": { + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class" + } + }, + "default_merge_strategy": "squash", + "merge_strategies": [ + "merge_commit", + "squash", + "fast_forward" + ], + "type": "branch", + "target": { + "hash": "e5d1cde9069fcb9f0af90403a4de2150c125a148", + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" + } + }, + "type": "repository", + "name": "aui", + "full_name": "atlassian/aui", + "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses" + } + }, + "author": { + "raw": "Marcin Konopka ", + "type": "author", + "user": { + "display_name": "Marcin Konopka", + "uuid": "{47cc24f4-2a05-4420-88fe-0417535a110a}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/" + }, + "avatar": { + "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png" + } + }, + "nickname": "Marcin Konopka", + "type": "user", + "account_id": "60113d2b47a9540069f4de03" + } + }, + "parents": [ + { + "hash": "87f7fc92b00464ae47b13ef65c91884e4ac9be51", + "type": "commit", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51" + } + } + } + ], + "date": "2021-04-13T13:44:49+00:00", + "message": "wip\n", + "type": "commit" + } + } + ], + "page": 1, + "next": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2" + } + } } } } @@ -12647,6 +15779,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -12695,6 +15834,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -12758,11 +15907,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "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).", + "description": "Returns a branch object within the specified repository.\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nFor Git, the branch name should not include any prefixes (e.g.\nrefs/heads).", "summary": "Get a branch", "responses": { "200": { @@ -12771,6 +15927,113 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch" + }, + "examples": { + "response": { + "value": { + "name": "master", + "links": { + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/branch/master" + } + }, + "default_merge_strategy": "squash", + "merge_strategies": [ + "merge_commit", + "squash", + "fast_forward" + ], + "type": "branch", + "target": { + "hash": "e7d158ff7ed5538c28f94cd97a9ad569680fc94e", + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" + } + }, + "type": "repository", + "name": "aui", + "full_name": "atlassian/aui", + "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses" + } + }, + "author": { + "raw": "psre-renovate-bot ", + "type": "author", + "user": { + "display_name": "psre-renovate-bot", + "uuid": "{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/" + }, + "avatar": { + "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" + } + }, + "nickname": "Renovate Bot", + "type": "user", + "account_id": "5d5355e8c6b9320d9ea5b28d" + } + }, + "parents": [ + { + "hash": "eab868a309e75733de80969a7bed1ec6d4651e06", + "type": "commit", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06" + } + } + } + ], + "date": "2021-04-12T06:44:38+00:00", + "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", + "type": "commit" + } + } + } } } } @@ -12806,6 +16069,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -12903,6 +16173,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -12951,6 +16228,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -13014,6 +16301,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "get": { @@ -13062,6 +16356,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -13143,11 +16444,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "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.", + "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\nNote: `multipart/form-data` is currently not supported by Forge apps\nfor this API.\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": { @@ -13231,6 +16539,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "parameters": [ @@ -13281,7 +16596,7 @@ } }, "555": { - "description": "If the call times out, possibly because the specifiedrecursion depth is too large.", + "description": "If the call times out, possibly because the specified recursion depth is too large.", "content": { "application/json": { "schema": { @@ -13295,7 +16610,7 @@ { "name": "format", "in": "query", - "description": "If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.", + "description": "If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. The 'rendered' option only supports these filetypes: `.md`, `.markdown`, `.mkd`, `.mkdn`, `.mdown`, `.text`, `.rst`, and `.textile`. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.", "required": false, "schema": { "type": "string", @@ -13340,6 +16655,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -13537,6 +16859,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -15371,7 +18700,7 @@ } ] }, - "/teams/{username}/pipelines_config/variables/": { + "/teams/{username}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "summary": "List variables for an account", @@ -15400,7 +18729,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -15461,7 +18801,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/teams/{username}/pipelines_config/variables/{variable_uuid}": { @@ -15512,7 +18863,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -15564,7 +18926,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -15606,14 +18979,25 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/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", + "description": "Search for code in the repositories of the specified team.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\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, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", "operationId": "searchTeam", "parameters": [ { @@ -15664,6 +19048,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -15698,7 +19156,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/user": { @@ -15817,7 +19286,7 @@ "/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`.", + "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\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": { @@ -15826,6 +19295,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "nickname": "evzijst", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "bitbucket/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -15868,7 +19364,7 @@ "/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`.", + "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\n**When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on\n`workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the\n[deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**\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": { @@ -15877,6 +19373,35 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspace_memberships" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "page": 1, + "size": 1, + "values": [ + { + "type": "workspace_membership", + "permission": "owner", + "last_accessed": "2019-03-07T12:35:02.900024+00:00", + "added_on": "2018-10-11T17:42:02.961424+00:00", + "user": { + "type": "user", + "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}", + "nickname": "evzijst", + "display_name": "Erik van Zijst" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + } + ] + } + } } } } @@ -15969,7 +19494,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -15977,7 +19502,7 @@ } ] }, - "/users/{selected_user}/pipelines_config/variables/": { + "/users/{selected_user}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "deprecated": true, @@ -16006,7 +19531,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -16067,7 +19603,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/pipelines_config/variables/{variable_uuid}": { @@ -16118,7 +19665,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -16170,7 +19728,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -16212,7 +19781,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/properties/{app_key}/{property_name}": { @@ -16257,7 +19837,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -16297,7 +19888,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -16344,14 +19946,25 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/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", + "description": "Search for code in the repositories of the specified user.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\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, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n", "operationId": "searchAccount", "parameters": [ { @@ -16402,6 +20015,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -16436,13 +20123,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/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```", + "description": "Returns a paginated list of the user's SSH public keys.", "summary": "List SSH keys", "responses": { "200": { @@ -16451,6 +20149,49 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_ssh_user_keys" + }, + "examples": { + "response": { + "value": { + "page": 1, + "pagelen": 10, + "size": 1, + "values": [ + { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + ] + } + } } } } @@ -16483,7 +20224,7 @@ }, "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```", + "description": "Adds a new SSH public key to the specified user account and returns the resulting key.\n\nExample:\n\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```", "summary": "Add a new SSH key", "responses": { "201": { @@ -16492,6 +20233,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16546,7 +20323,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -16557,7 +20334,7 @@ "/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```", + "description": "Deletes a specific SSH public key from a user's account.", "summary": "Delete a SSH key", "responses": { "204": { @@ -16601,7 +20378,7 @@ }, "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```", + "description": "Returns a specific SSH public key belonging to a user.", "summary": "Get a SSH key", "responses": { "200": { @@ -16610,6 +20387,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16642,7 +20455,7 @@ }, "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```", + "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```\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```", "summary": "Update a SSH key", "responses": { "200": { @@ -16651,6 +20464,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "Work key", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16714,7 +20563,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -16725,7 +20574,7 @@ "/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/).**", + "description": "Returns a list of workspaces accessible by the authenticated user.\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": { @@ -16734,6 +20583,51 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspaces" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "page": 1, + "size": 1, + "values": [ + { + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "links": { + "owners": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1" + }, + "repositories": { + "href": "https://api.bitbucket.org/2.0/repositories/bbworkspace1" + }, + "snippets": { + "href": "https://api.bitbucket.org/2.0/snippets/bbworkspace1" + }, + "html": { + "href": "https://bitbucket.org/bbworkspace1/" + }, + "avatar": { + "href": "https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801" + }, + "members": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members" + }, + "projects": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects" + } + }, + "created_on": "2018-11-14T19:15:05.058566+00:00", + "type": "workspace", + "slug": "bbworkspace1", + "is_private": true, + "name": "Atlassian Bitbucket" + } + ] + } + } } } } @@ -16895,7 +20789,7 @@ }, "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.", + "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 \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nWhen the `secret` is provided it will be used as the key to generate a HMAC\ndigest value sent in the `X-Hub-Signature` header at delivery time. Passing\na `null` or empty `secret` or not passing a `secret` will leave the webhook's\nsecret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's\nsecret is set.\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": { @@ -17043,7 +20937,7 @@ }, "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`", + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret can be left unchanged by not passing the `secret` field in the\nrequest.", "summary": "Update a webhook for a workspace", "responses": { "200": { @@ -17147,6 +21041,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17208,6 +21109,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17234,7 +21142,7 @@ "/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\"`", + "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\n**When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on\n`workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the\n[deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**\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": { @@ -17243,6 +21151,48 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspace_memberships" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "permission": "owner", + "type": "workspace_membership", + "user": { + "type": "user", + "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}", + "display_name": "Erik van Zijst" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + }, + { + "permission": "member", + "type": "workspace_membership", + "user": { + "type": "user", + "nickname": "seanaty", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -17279,6 +21229,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17296,7 +21253,7 @@ "/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`.", + "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\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": { @@ -17305,6 +21262,62 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "write" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Jeff Zeng", + "uuid": "{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}" + }, + "repository": { + "type": "repository", + "name": "whee", + "full_name": "atlassian_tutorial/whee", + "uuid": "{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}" + }, + "permission": "admin" + } + ], + "page": 1, + "size": 3 + } + } } } } @@ -17350,6 +21363,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17367,7 +21387,7 @@ "/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`.", + "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\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": { @@ -17376,6 +21396,47 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "write" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -17421,6 +21482,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17475,7 +21543,18 @@ } } } - } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { @@ -17509,7 +21588,18 @@ } } } - } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/variables": { @@ -17540,7 +21630,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -17600,7 +21708,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}": { @@ -17650,7 +21769,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -17701,7 +21838,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -17742,7 +21890,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/projects": { @@ -17782,11 +21948,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket"] + } ] }, "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```", + "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/workspaces/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/workspaces/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```", "summary": "Create a project in a workspace", "responses": { "201": { @@ -17841,6 +22014,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -17858,7 +22038,7 @@ "/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```", + "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/workspaces/bbworkspace1/projects/PROJ\n```", "summary": "Delete a project for a workspace", "responses": { "204": { @@ -17895,6 +22075,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "get": { @@ -17953,6 +22140,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket"] + } ] }, "put": { @@ -18030,6 +22224,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18056,7 +22257,7 @@ "/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```", + "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.", "summary": "Get the branching model for a project", "responses": { "200": { @@ -18065,6 +22266,44 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_branching_model" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "master", + "use_mainbranch": true + }, + "production": { + "name": "production", + "use_mainbranch": false + }, + "branch_types": [ + { + "kind": "release", + "prefix": "release/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "feature", + "prefix": "feature/" + }, + { + "kind": "bugfix", + "prefix": "bugfix/" + } + ], + "type": "project_branching_model", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model" + } + } + } + } } } } @@ -18110,6 +22349,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -18136,7 +22382,7 @@ "/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```", + "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.", "summary": "Get the branching model config for a project", "responses": { "200": { @@ -18145,6 +22391,49 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "null", + "use_mainbranch": true + }, + "production": { + "name": "production", + "use_mainbranch": false, + "enabled": false + }, + "branch_types": [ + { + "kind": "release", + "enabled": true, + "prefix": "release/" + }, + { + "kind": "hotfix", + "enabled": true, + "prefix": "hotfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "bugfix", + "enabled": false, + "prefix": "bugfix/" + } + ], + "type": "branching_model_settings", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model/settings" + } + } + } + } } } } @@ -18190,11 +22479,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "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```", + "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.", "summary": "Update the branching model config for a project", "responses": { "200": { @@ -18203,6 +22499,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "use_mainbranch": true + }, + "production": { + "enabled": true, + "use_mainbranch": false, + "name": "production" + }, + "branch_types": [ + { + "kind": "bugfix", + "enabled": true, + "prefix": "bugfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "release", + "enabled": false + } + ] + } + } } } } @@ -18258,6 +22588,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18284,7 +22621,7 @@ "/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://api.bitbucket.org/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```", + "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.", "summary": "List the default reviewers in a project", "responses": { "200": { @@ -18293,6 +22630,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_default_reviewer_and_type" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "user": { + "display_name": "Davis Lee", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + }, + { + "user": { + "display_name": "Jorge Rodriguez", + "uuid": "{1aa43376-260d-4a0b-9660-f62672b9655d}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -18328,6 +22692,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -18358,7 +22729,7 @@ "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" + "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", @@ -18401,11 +22772,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "get": { "tags": ["Projects"], - "description": "Returns the specified default reviewer.\n\nExample:\n```\n$ curl https://api.bitbucket.org/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```", + "description": "Returns the specified default reviewer.", "summary": "Get a default reviewer", "responses": { "200": { @@ -18414,6 +22792,15 @@ "application/json": { "schema": { "$ref": "#/components/schemas/user" + }, + "examples": { + "response": { + "value": { + "display_name": "Davis Lee", + "type": "user", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + } + } } } } @@ -18459,19 +22846,48 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "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://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n-d { 'uuid': '{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}' }\n\nHTTP/1.1 204\n```", + "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.", "summary": "Add the specific user as a default reviewer for the project", "responses": { - "204": { + "200": { "description": "The specified user was added as a project default reviewer", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" + }, + "examples": { + "response": { + "value": { + "display_name": "Yaniv Sagy", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7Bdd5db7f2-6389-458d-a62a-716773910b7a%7D" + }, + "avatar": { + "href": "https://secure.gravatar.com/avatar/YS-2.png" + }, + "html": { + "href": "https://api.bitbucket.org/%7Bdd5db7f2-6389-458d-a62a-716773910b7a%7D/" + } + }, + "type": "user", + "uuid": "{dd5db7f2-6389-458d-a62a-716773910b7a}", + "account_id": "712020:4efe52fa-b4b4-475b-9eb0-c0a23b7eb194", + "nickname": "Yaniv Sagy" + } + } } } } @@ -18517,6 +22933,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18552,7 +22975,7 @@ "/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```", + "description": "Returns all deploy keys belonging to a project.", "summary": "List project deploy keys", "responses": { "200": { @@ -18561,6 +22984,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_project_deploy_keys" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "comment": "thakseth@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234" + } + }, + "label": "test", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-07-28T21:20:19.491721+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r", + "type": "project_deploy_key", + "id": 1234 + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -18600,7 +23059,7 @@ }, "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/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://api.bitbucket.org/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```", + "description": "Create a new deploy key in a project.\n\nExample:\n```\n$ curl -X POST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/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```", "summary": "Create a project deploy key", "responses": { "200": { @@ -18609,6 +23068,35 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "mleu@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/5/" + } + }, + "label": "myprojectkey", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-08-10T05:28:00.570859+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "type": "project_deploy_key", + "id": 5 + } + } } } } @@ -18680,7 +23168,7 @@ "/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```", + "description": "This deletes a deploy key from a project.", "summary": "Delete a deploy key from a project", "responses": { "204": { @@ -18721,7 +23209,7 @@ }, "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```", + "description": "Returns the deploy key belonging to a specific key ID.", "summary": "Get a project deploy key", "responses": { "200": { @@ -18730,6 +23218,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_deploy_key" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "comment": "thakseth@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234" + } + }, + "label": "test", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-07-28T21:20:19.491721+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r", + "type": "project_deploy_key", + "id": 1234 + } + ] + } + } } } } @@ -18797,11 +23319,795 @@ } ] }, + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups": { + "get": { + "tags": ["Projects"], + "description": "Returns a paginated list of explicit group permissions for the given project.\nThis endpoint does not support BBQL features.", + "summary": "List explicit group permissions for a project", + "responses": { + "200": { + "description": "Paginated list of project group permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_project_group_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\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}/permissions-config/groups/{group_slug}": { + "delete": { + "tags": ["Projects"], + "description": "Deletes the project group permission between the requested project and group, if one exists.\n\nOnly users with admin permission for the project may access this resource.", + "summary": "Delete an explicit group permission for a project", + "responses": { + "204": { + "description": "The project group permission was deleted and no content returned." + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the group permission for a given group and project.\n\nOnly users with admin permission for the project may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`\n* `none`", + "summary": "Get an explicit group permission for a project", + "responses": { + "200": { + "description": "Project group permission", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators" + } + } + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Updates the group permission, or grants a new permission if one does not already exist.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`", + "summary": "Update an explicit group permission for a project", + "responses": { + "200": { + "description": "Project group permission updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid(not one of read, write, create-repo, or admin).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "402": { + "description": "You have reached your plan's user limit and must upgrade before giving access to additional users.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "group_slug", + "in": "path", + "description": "Slug of the requested group.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\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}/permissions-config/users": { + "get": { + "tags": ["Projects"], + "description": "Returns a paginated list of explicit user permissions for the given project.\nThis endpoint does not support BBQL features.", + "summary": "List explicit user permissions for a project", + "responses": { + "200": { + "description": "Paginated list of explicit user permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_project_user_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\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}/permissions-config/users/{selected_user_id}": { + "delete": { + "tags": ["Projects"], + "description": "Deletes the project user permission between the requested project and user, if one exists.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.", + "summary": "Delete an explicit user permission for a project", + "responses": { + "204": { + "description": "The project user permission was deleted and no content returned." + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the explicit user permission for a given user and project.\n\nOnly users with admin permission for the project may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`\n* `none`", + "summary": "Get an explicit user permission for a project", + "responses": { + "200": { + "description": "Explicit user permission for user and project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Updates the explicit user permission for a given user and project. The selected\nuser must be a member of the workspace, and cannot be the workspace owner.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`", + "summary": "Update an explicit user permission for a project", + "responses": { + "200": { + "description": "Explicit user permission updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid (not one of read, write, create-repo, or admin)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "402": { + "description": "You have reached your plan's user limit and must upgrade before giving access to additional users.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user_id", + "in": "path", + "description": "This can either be the username, the user's UUID surrounded by curly-braces,\nfor example: {account UUID}, or the user's Atlassian ID.\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}/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", + "description": "Search for code in the repositories of the specified workspace.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\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, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", "operationId": "searchWorkspace", "parameters": [ { @@ -18852,6 +24158,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -18886,7 +24266,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } } }, @@ -18921,7 +24319,7 @@ }, { "name": "Issue tracker", - "description": "The issue resources provide functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to.\n" + "description": "The issue resources provide functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.\n" }, { "name": "Pipelines", @@ -18980,7 +24378,7 @@ "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": "607fbe8bfcb2", + "x-revision": "d8aa33b24a80", "x-atlassian-narrative": { "documents": [ { @@ -18988,7 +24386,7 @@ "title": "Authentication methods", "description": "How to authenticate API actions", "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* [Repository Access Tokens](#repository-access-tokens)\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\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n- [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n- [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n- [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides the [`repository`](#repository) scope permission for every repository under a project or projects.\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\nProvides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope 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#### repository\n\nProvides read access to a repository or repositories.\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 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\nProvides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, 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\nProvides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and 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 webhooks\n* initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read access to pull requests.\nThis scope implies the [`repository`](#repository) scope, 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\nImplicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.\nThis scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\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 scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook-related operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources the authorization mechanism can access, without needing further scopes. \nFor example:\n\n- A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.\n- Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\nTo create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to\nhave both the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\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\nProvides write access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.\n\n* create snippets\n* edit snippets\n* delete snippets\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 for apps or external applications.\n\n#### account\n\nAbility to see all the user's account information. Note that this doesn't include any ability to change 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* change a user's email addresses\n* change username, display name and avatar\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 using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.\n\nThis doesn't 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### Repository Access Tokens\n\nRepository Access Tokens are passwords (or tokens) that provide access to\n_a single repository_. These tokens can authenticate with Bitbucket APIs for\nscripting, CI/CD tools, Bitbucket Cloud-connected apps, and Bitbucket Cloud\nintegrations. The level of access provided by the token is set when a repository\nadmin creates it, by setting permission scopes. Repository Access Tokens are\nlinked to their repository, not a user or a workspace, preventing them from\nbeing used to access any other repositories or workspaces.\n\nWhen using Bitbucket APIs with a Repository Access Token, the token will be\ntreated as the \"user\" in the Bitbucket UI and Bitbucket logs. This includes\nusing the Repository Access Token to leave a comment on a pull request, push a\ncommit, or merge a pull request. The Bitbucket UI and API responses will show\nthe Repository Access Token as a user. This user uses the Repository Access\nToken name and a custom icon to differentiate it from a regular user in the UI.\n\nFor details on creating, managing, and using Repository Access Tokens, visit\n[Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\n#### Considerations for using Repository Access Tokens\n\n* After creation, a Repository Access Token can't be viewed or modified. The\ntoken's name, created date, last accessed date, and scopes are visible on the\nRepository Access Token page.\n* Repository Access Tokens can only be granted a limited set of Bitbucket's \npermission scopes.\n* Provided you set the correct permission scopes, you can use a Repository Access\nToken to clone (`repository`) and push (`repository:write`) code to the\ntoken's corresponding repository.\n* You can't use a Repository Access Token to log into the Bitbucket website.\n* Repository Access Tokens don't require two-step verification.\n* You can set permission scopes (specific access rights) for each Repository\nAccess Token.\n* You can't use a Repository Access Token to manipulate or query repository\npermissions.\n* Repository Access Tokens will not be listed in any repository or workspace \npermission API response.\n* Repository Access Tokens are deactivated when a repository is transferred or deleted.\n* Any content created by the Repository Access Token will persist after the\nRepository Access Token has been revoked.\n\n#### Available permissions scopes\n\nThe available scopes for Repository Access Tokens are:\n\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [webhook](#webhook)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\nThere are some APIs which are inaccessible for Repository Access Tokens, these are: \n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n* [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n* [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\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": "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Basic auth](#basic-auth)\n* [Access Tokens](#access-tokens)\n * [Repository Access Tokens](#repository-access-tokens)\n * [Project Access Tokens](#project-access-tokens)\n * [Workspace Access Tokens](#workspace-access-tokens)\n* [App passwords](#app-passwords)\n* [OAuth 2.0](#oauth-2-0)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Bitbucket OAuth 2.0 Scopes](#bitbucket-oauth-2-0-scopes)\n* [Forge App Scopes](#forge-app-scopes)\n\n---\n\n### Basic auth\n\nBasic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported).\nNote that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.\n\n### Access Tokens\n\nAccess Tokens are passwords (or tokens) that provide access to a _single_ repository, project or workspace.\nThese tokens can authenticate with Bitbucket APIs for scripting, CI/CD tools, Bitbucket Cloud-connected apps,\nand Bitbucket Cloud integrations.\n\nAccess Tokens are linked to a repository, project, or workspace, not a user account.\nThe level of access provided by the token is set when a repository, or workspace admin creates it,\nby setting permission scopes.\n\nThere are three types of Access Token:\n\n* **Repository Access Tokens** can connect to a single repository, preventing them from accessing any other repositories or workspaces.\n* **Project Access Tokens** can connect to a single project, providing access to any repositories within the project.\n* **Workspace Access Tokens** can connect to a single workspace and have access to any projects and repositories within that workspace.\n\nWhen using Bitbucket APIs with an Access Token, the token will be treated as the \"user\" in the\nBitbucket UI and Bitbucket logs. This includes when using the Access Token to leave a comment on a pull request,\npush a commit, or merge a pull request. The Bitbucket UI and API responses will show the\nRepository/Project/Workspace Access Token as a user. The username shown in the Bitbucket UI is the Access\nToken _name_, and a custom icon is used to differentiate it from a regular user in the UI.\n\n#### Considerations for using Access Tokens\n\n* After creation, an Access Token can't be viewed or modified. The token's name, created date,\nlast accessed date, and scopes are visible on the repository, project, or workspace **Access Tokens** page.\n* Access Tokens can access a limited set of Bitbucket's permission scopes.\n* Provided you set the correct permission scopes, you can use an Access Token to clone (`repository`)\nand push (`repository:write`) code to the token's repository or the repositories the token can access.\n* You can't use an Access Token to log into the Bitbucket website.\n* Access Tokens don't require two-step verification.\n* You can set permission scopes (specific access rights) for each Access Token.\n* You can't use an Access Token to manipulate or query repository, project, or workspace permissions.\n* Access Tokens are not listed in any repository or workspace permission API response.\n* Access Tokens are deactivated when deleting the resource tied to it (a repository, project, or workspace).\nRepository Access Tokens are also revoked when transferring the repository to another workspace.\n* Any content created by the Access Token will persist after the Access Token has been revoked.\n* Access Tokens can interact with branch restriction APIs, but the token can't be configured as a user with merge access when using branch restrictions.\n\nThere are some APIs which are inaccessible for Access Tokens, these are:\n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n* [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n* [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\n\n#### Repository Access Tokens\n\nFor details on creating, managing, and using Repository Access Tokens, visit\n[Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\nThe available scopes for Repository Access Tokens are:\n\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Project Access Tokens\n\nFor details on creating, managing, and using Project Access Tokens, visit\n[Project Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/).\n\nThe available scopes for Project Access Tokens are:\n\n- [`project`](#project)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Workspace Access Tokens\n\nFor details on creating, managing, and using Workspace Access Tokens, visit\n[Workspace Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/).\n\nThe available scopes for Workspace Access Tokens are:\n\n- [`project`](#project)\n- [`project:admin`](#project-admin)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`account`](#account)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\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\nFor details on creating, managing, and using App passwords, visit\n[App passwords](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/).\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### Bitbucket OAuth 2.0 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\nOAuth 2.0 Scopes are applicable for OAuth 2, Access Tokens, and App passwords auth mechanisms as well as Bitbucket Connect apps.\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 only 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\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n- [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n- [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n- [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides access to view the project or projects.\nThis scope implies the [`repository`](#repository) scope, giving read access to all the repositories in a project or projects.\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\nProvides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope 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#### repository\n\nProvides read access to a repository or repositories.\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 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\nProvides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, 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\nProvides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and 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 webhooks\n* Initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read access to pull requests.\nThis scope implies the [`repository`](#repository) scope, 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\nImplicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.\nThis scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\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 scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook-related operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources the authorization mechanism can access, without needing further scopes.\nFor example:\n\n- A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.\n- Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\nTo create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to\nhave both the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\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\nProvides write access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.\n\n* create snippets\n* edit snippets\n* delete snippets\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 for apps or external applications.\n\n#### account\n\nWhen used for:\n* **user-related APIs** — Gives read-only access to the user's account information.\nNote that this doesn't include any ability to change any of the data. This scope allows you to view the user's:\n * email addresses\n * language\n * location\n * website\n * full name\n * SSH keys\n * user groups\n* **workspace-related APIs** — Grants access to view the workspace's:\n * users\n * user permissions\n * projects\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* change a user's email addresses\n* change username, display name and avatar\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 using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.\n\nThis doesn't 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### Forge app scopes\n\nIn order for a Forge app integration to access Bitbucket API endpoints, it needs to include certain privilege scopes in the app manifest. These are different from Bitbucket OAuth 2.0 scopes.\n\nUnlike OAuth 2.0 scopes, Forge app scopes do not implicitly grant other scopes, for example, `write:repository:bitbucket` does not implicitly grant `read:repository:bitbucket`.\n\nOnly a subset of Bitbucket API endpoints are currently available for Forge app integrations. These will be labeled with Forge app scopes.\n\nOur best practice suggests you only add the scopes your app needs, but no more than it needs.\n\nThe available scopes are:\n\n- [`read:repository:bitbucket`](#read-repository-bitbucket)\n- [`write:repository:bitbucket`](#write-repository-bitbucket)\n- [`admin:repository:bitbucket`](#admin-repository-bitbucket)\n- [`delete:repository:bitbucket`](#delete-repository-bitbucket)\n- [`read:pullrequest:bitbucket`](#read-pullrequest-bitbucket)\n- [`write:pullrequest:bitbucket`](#write-pullrequest-bitbucket)\n- [`read:project:bitbucket`](#read-project-bitbucket)\n- [`admin:project:bitbucket`](#admin-project-bitbucket)\n- [`read:workspace:bitbucket`](#read-workspace-bitbucket)\n- [`read:user:bitbucket`](#read-user-bitbucket)\n- [`read:pipeline:bitbucket`](#read-pipeline-bitbucket)\n- [`write:pipeline:bitbucket`](#write-pipeline-bitbucket)\n- [`admin:pipeline:bitbucket`](#admin-pipeline-bitbucket)\n- [`read:runner:bitbucket`](#read-runner-bitbucket)\n- [`write:runner:bitbucket`](#write-runner-bitbucket)\n\n#### read:repository:bitbucket\n\nAllows viewing of repository data. Note that this scope does not give access to a repository's pull requests.\n* access to the repository's source code\n* access the file browsing API\n* access to certain repository configurations such as branching model, default reviewers, etc.\n\n#### write:repository:bitbucket\n\nAllows modification of repository data. No distinction is made between public and private repositories. This scope does not imply the `read:repository:bitbucket` scope, so you need to request that separately if required. This scope alone does not give access to the pull request API.\n* update/delete source, branches, tags, etc.\n* fork repositories\n\n#### admin:repository:bitbucket\n\nAllows admin activities on repositories. No distinction is made between public and private repositories. This scope does not implicitly grant the `read:repository:bitbucket` or the `write:repository:bitbucket` scopes. It gives access to the admin features of a repository only, not direct access to its contents. This scope does not allow modification of repository permissions. This scope comes with access to the following functionality:\n* create repository\n* view repository permissions\n* view and edit branch restrictions\n* edit branching model settings\n* edit default reviewers\n* view and edit inheritance state for repository settings\n\n#### delete:repository:bitbucket\nAllows deletion of repositories.\n\n#### read:pullrequest:bitbucket\nAllows viewing of pull requests, plus the ability to comment on pull requests.\n\nThis scope does not imply the `read:repository:bitbucket` scope. With this scope, you could retrieve some data specific to the source/destination repositories of a pull request using pull request endpoints, but it does not give access to repository API endpoints.\n\n#### write:pullrequest:bitbucket\nAllows the ability to create, update, approve, decline, and merge pull requests.\n\nThis scope does not imply the `write:repository:bitbucket` scope.\n\n#### read:project:bitbucket\nAllows viewing of project and project permission data.\n\n#### admin:project:bitbucket\nAllows the ability to create, update, and delete project. No distinction is made between public and private projects.\n\nThis scope does not implicitly grant the `read:project:bitbucket` scope or any repository scopes. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n#### read:workspace:bitbucket\nAllows viewing of workspace and workspace permission data.\n\n#### read:user:bitbucket\nAllows viewing of user data. This scope is typically required for permission related endpoints.\n\n#### read:pipeline:bitbucket\nAllows read access to all pipeline information (pipelines, steps, caches, artifacts, logs, tests, code-insights).\n\n#### write:pipeline:bitbucket\nAllows running pipelines (i.e., start/stop/create pipeline) and uploading tests/code-insights.\n\nThis scope does not imply the `read:pipeline:bitbucket` scope.\n\n#### admin:pipeline:bitbucket\nAllows admin activities, such as creating pipeline variables.\n\nThis scope does not implicitly grant the `read:pipeline:bitbucket` or the `write:pipeline:bitbucket` scopes.\n\n#### read:runner:bitbucket\nAllows viewing of runners information.\n\n#### write:runner:bitbucket\nAllows runners management.\n\nThis scope does not imply the `read:runners:bitbucket` scope.\n" }, { "anchor": "filtering", @@ -19048,6 +24446,17 @@ ], "components": { "requestBodies": { + "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + } + } + }, + "description": "The permission to grant", + "required": true + }, "application_property": { "content": { "application/json": { @@ -19081,6 +24490,17 @@ "description": "The new snippet object.", "required": true }, + "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + } + } + }, + "description": "The permission to grant", + "required": true + }, "pipeline_variable2": { "content": { "application/json": { @@ -19132,13 +24552,13 @@ "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", + "webhook": "Read and modify your repositories' webhooks", + "issue": "Read your repositories' issues", + "issue:write": "Read and modify your repositories' issues", "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" } } @@ -19152,6 +24572,128 @@ } }, "schemas": { + "A_pull_request_task": { + "allOf": [ + { + "$ref": "#/components/schemas/task" + }, + { + "type": "object", + "properties": { + "links": { + "type": "object", + "properties": { + "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 + }, + "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 + } + }, + "additionalProperties": false + } + ], + "title": "Pull Request Task", + "description": "A pull request task." + }, + "A_pullrequest_comment_task": { + "allOf": [ + { + "$ref": "#/components/schemas/A_pull_request_task" + }, + { + "type": "object", + "properties": { + "comment": { + "$ref": "#/components/schemas/comment" + } + }, + "additionalProperties": false + } + ], + "title": "Pull Request Comment Task", + "description": "A pullrequest comment task" + }, + "A_pullrequest_task_create": { + "type": "object", + "title": "Pull Request Task Create", + "description": "A pullrequest task create", + "properties": { + "comment": { + "$ref": "#/components/schemas/comment" + }, + "content": { + "type": "object", + "title": "Task Raw Content", + "description": "task raw content", + "properties": { + "raw": { + "type": "string", + "description": "The task contents" + } + }, + "required": ["raw"], + "additionalProperties": false + }, + "pending": { + "type": "boolean" + } + }, + "required": ["content"], + "additionalProperties": false + }, + "A_pullrequest_task_update": { + "type": "object", + "title": "Pull Request Task Update", + "description": "A pullrequest task update", + "properties": { + "content": { + "type": "object", + "title": "Task Raw Content", + "description": "task raw content", + "properties": { + "raw": { + "type": "string", + "description": "The task contents" + } + }, + "required": ["raw"], + "additionalProperties": false + }, + "state": { + "type": "string", + "enum": ["RESOLVED", "UNRESOLVED"] + } + }, + "additionalProperties": false + }, "account": { "allOf": [ { @@ -19314,6 +24856,28 @@ "title": "Base Commit", "description": "The common base type for both repository and snippet commits." }, + "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin"] + } + }, + "required": ["permission"], + "additionalProperties": false + }, + "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": ["read", "write", "admin"] + } + }, + "required": ["permission"], + "additionalProperties": false + }, "branch": { "allOf": [ { @@ -19672,6 +25236,26 @@ "title": "Comment", "description": "The base type for all comments. This type should be considered abstract. Each of the \"commentable\" resources defines its own subtypes (e.g. `issue_comment`)." }, + "comment_resolution": { + "type": "object", + "title": "Comment Resolution", + "description": "The resolution object for a Comment.", + "properties": { + "created_on": { + "type": "string", + "description": "The ISO8601 timestamp the resolution was created.", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/account" + } + }, + "required": ["type"], + "additionalProperties": true + }, "commit": { "allOf": [ { @@ -19809,7 +25393,7 @@ "state": { "type": "string", "description": "Provides some indication of the status of this commit", - "enum": ["INPROGRESS", "STOPPED", "FAILED", "SUCCESSFUL"] + "enum": ["STOPPED", "INPROGRESS", "FAILED", "SUCCESSFUL"] }, "updated_on": { "type": "string", @@ -20675,31 +26259,33 @@ "type": "string", "description": "The event identifier.", "enum": [ - "issue:created", - "repo:commit_status_updated", - "pullrequest:comment_created", - "pullrequest:created", + "issue:comment_created", + "repo:push", + "repo:transfer", + "pullrequest:changes_request_removed", + "pullrequest:comment_updated", "pullrequest:unapproved", - "repo:commit_status_created", + "pullrequest:comment_created", "repo:created", "pullrequest:changes_request_created", - "pullrequest:comment_updated", - "pullrequest:changes_request_removed", - "pullrequest:comment_deleted", "repo:imported", - "repo:commit_comment_created", + "repo:fork", "project:updated", - "repo:updated", + "issue:created", + "repo:deleted", "issue:updated", + "pullrequest:comment_reopened", + "pullrequest:updated", + "repo:commit_comment_created", + "pullrequest:created", + "pullrequest:approved", "pullrequest:rejected", "pullrequest:fulfilled", - "issue:comment_created", - "repo:fork", - "pullrequest:updated", - "repo:push", - "pullrequest:approved", - "repo:deleted", - "repo:transfer" + "pullrequest:comment_resolved", + "repo:commit_status_updated", + "repo:updated", + "pullrequest:comment_deleted", + "repo:commit_status_created" ] }, "label": { @@ -20869,6 +26455,7 @@ "state": { "type": "string", "enum": [ + "submitted", "new", "open", "resolved", @@ -21988,6 +27575,52 @@ } ] }, + "paginated_project_group_permissions": { + "title": "Paginated Project Group Permissions", + "description": "A paginated list of project group permissions.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_group_permission" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, + "paginated_project_user_permissions": { + "title": "Paginated Project User Permissions", + "description": "A paginated list of project user permissions.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_user_permission" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_projects": { "title": "Paginated Projects", "description": "A paginated list of projects", @@ -22308,6 +27941,29 @@ } ] }, + "paginated_tasks": { + "title": "Paginated Tasks", + "description": "A paginated list of tasks.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + }, + "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.", @@ -22502,6 +28158,14 @@ "uuid": { "type": "string", "description": "The UUID identifying the pipeline." + }, + "variables": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_variable" + }, + "description": "The variables for the pipeline." } } } @@ -22546,6 +28210,10 @@ "type": "integer", "description": "The size of the file containing the archive of the cache." }, + "key_hash": { + "type": "string", + "description": "The key hash of the cache version." + }, "name": { "type": "string", "description": "The name of the cache." @@ -22738,17 +28406,14 @@ }, "cron_pattern": { "type": "string", - "description": "The cron expression that the schedule applies." + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." }, "enabled": { "type": "boolean", "description": "Whether the schedule is enabled." }, - "selector": { - "$ref": "#/components/schemas/pipeline_selector" - }, "target": { - "$ref": "#/components/schemas/pipeline_target" + "$ref": "#/components/schemas/pipeline_ref_target" }, "updated_on": { "type": "string", @@ -22813,6 +28478,66 @@ } ] }, + "pipeline_schedule_post_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "properties": { + "cron_pattern": { + "type": "string", + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." + }, + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + }, + "target": { + "type": "object", + "description": "The target on which the schedule will be executed.", + "properties": { + "ref_name": { + "type": "string", + "description": "The name of the reference." + }, + "ref_type": { + "type": "string", + "description": "The type of reference (branch only).", + "enum": ["branch"] + }, + "selector": { + "$ref": "#/components/schemas/pipeline_selector" + } + }, + "required": ["selector", "ref_name", "ref_type"] + } + }, + "required": ["target", "cron_pattern"] + } + ], + "title": "Request body for Pipeline Schedule POST request" + }, + "pipeline_schedule_put_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + } + } + } + ], + "title": "Request body for Pipeline Schedule PUT request" + }, "pipeline_selector": { "title": "Pipeline Selector", "description": "A representation of the selector that was used to identify the pipeline in the YML file.", @@ -23785,6 +29510,92 @@ "title": "Project Deploy Key", "description": "Represents deploy key for a project." }, + "project_group_permission": { + "type": "object", + "title": "Project Group Permission", + "description": "A group's permission for a given project.", + "properties": { + "group": { + "$ref": "#/components/schemas/group" + }, + "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 + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "type": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "project_user_permission": { + "type": "object", + "title": "Project User Permission", + "description": "A user's direct permission for a given project.", + "properties": { + "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 + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/user" + } + }, + "required": ["type"], + "additionalProperties": true + }, "pullrequest": { "allOf": [ { @@ -24126,8 +29937,14 @@ { "type": "object", "properties": { + "pending": { + "type": "boolean" + }, "pullrequest": { "$ref": "#/components/schemas/pullrequest" + }, + "resolution": { + "$ref": "#/components/schemas/comment_resolution" } }, "additionalProperties": true @@ -24478,10 +30295,12 @@ "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs." }, "has_issues": { - "type": "boolean" + "type": "boolean", + "description": "\nThe issue tracker for this repository is enabled. Issue Tracker\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n" }, "has_wiki": { - "type": "boolean" + "type": "boolean", + "description": "\nThe wiki for this repository is enabled. Wiki\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n" }, "is_private": { "type": "boolean" @@ -25245,6 +31064,63 @@ "title": "Tag", "description": "A tag object, representing a tag in a repository." }, + "task": { + "type": "object", + "title": "Task", + "description": "A task object.", + "properties": { + "content": { + "type": "object", + "properties": { + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + } + }, + "additionalProperties": false + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "creator": { + "$ref": "#/components/schemas/account" + }, + "id": { + "type": "integer" + }, + "pending": { + "type": "boolean" + }, + "resolved_by": { + "$ref": "#/components/schemas/account" + }, + "resolved_on": { + "type": "string", + "description": "The ISO8601 timestamp for when the task was resolved.", + "format": "date-time" + }, + "state": { + "type": "string", + "enum": ["RESOLVED", "UNRESOLVED"] + }, + "updated_on": { + "type": "string", + "format": "date-time" + } + }, + "required": ["created_on", "updated_on", "state", "content", "creator"], + "additionalProperties": false + }, "team": { "allOf": [ { @@ -25442,36 +31318,48 @@ "items": { "type": "string", "enum": [ - "issue:created", - "repo:commit_status_updated", - "pullrequest:comment_created", - "pullrequest:created", + "issue:comment_created", + "repo:push", + "repo:transfer", + "pullrequest:changes_request_removed", + "pullrequest:comment_updated", "pullrequest:unapproved", - "repo:commit_status_created", + "pullrequest:comment_created", "repo:created", "pullrequest:changes_request_created", - "pullrequest:comment_updated", - "pullrequest:changes_request_removed", - "pullrequest:comment_deleted", "repo:imported", - "repo:commit_comment_created", + "repo:fork", "project:updated", - "repo:updated", + "issue:created", + "repo:deleted", "issue:updated", + "pullrequest:comment_reopened", + "pullrequest:updated", + "repo:commit_comment_created", + "pullrequest:created", + "pullrequest:approved", "pullrequest:rejected", "pullrequest:fulfilled", - "issue:comment_created", - "repo:fork", - "pullrequest:updated", - "repo:push", - "pullrequest:approved", - "repo:deleted", - "repo:transfer" + "pullrequest:comment_resolved", + "repo:commit_status_updated", + "repo:updated", + "pullrequest:comment_deleted", + "repo:commit_status_created" ] }, "minItems": 1, "uniqueItems": true }, + "secret": { + "type": "string", + "description": "The secret to associate with the hook. The secret is never returned via the API. As such, this field is only used during updates. The secret can be set to `null` or \"\" to remove the secret (or create a hook with no secret). Leaving out the secret field during updates will leave the secret unchanged. Leaving out the secret during creation will create a hook with no secret.", + "minLength": 0, + "maxLength": 128 + }, + "secret_set": { + "type": "boolean", + "description": "Indicates whether or not the hook has an associated secret. It is not possible to see the hook's secret. This field is ignored during updates." + }, "subject": { "$ref": "#/components/schemas/object" }, diff --git a/plugins/bitbucket-cloud-common/package.json b/plugins/bitbucket-cloud-common/package.json index d9a11c9a5d..3c94cb30c3 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.2.15", + "version": "0.2.16-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -41,7 +41,7 @@ "@backstage/cli": "workspace:^", "@openapitools/openapi-generator-cli": "^2.4.26", "msw": "^1.0.0", - "ts-morph": "^20.0.0" + "ts-morph": "^21.0.0" }, "files": [ "dist" diff --git a/plugins/bitbucket-cloud-common/src/models/index.ts b/plugins/bitbucket-cloud-common/src/models/index.ts index d868e2926c..8fce389a32 100644 --- a/plugins/bitbucket-cloud-common/src/models/index.ts +++ b/plugins/bitbucket-cloud-common/src/models/index.ts @@ -373,7 +373,19 @@ export namespace Models { * The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs. */ full_name?: string; + /** + * + * The issue tracker for this repository is enabled. Issue Tracker + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + */ has_issues?: boolean; + /** + * + * The wiki for this repository is enabled. Wiki + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + */ has_wiki?: boolean; is_private?: boolean; language?: string; diff --git a/plugins/bitrise/CHANGELOG.md b/plugins/bitrise/CHANGELOG.md index efc87f6839..68defbcc7f 100644 --- a/plugins/bitrise/CHANGELOG.md +++ b/plugins/bitrise/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-bitrise +## 0.1.57-next.0 + +### Patch Changes + +- e24e4d3: Update README +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.56 ### Patch Changes diff --git a/plugins/bitrise/package.json b/plugins/bitrise/package.json index 2dd804f746..7c1677919e 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.56", + "version": "0.1.57-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 ff0c82bcc4..afb57360f9 100644 --- a/plugins/catalog-backend-module-aws/CHANGELOG.md +++ b/plugins/catalog-backend-module-aws/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-backend-module-aws +## 0.3.4-next.0 + +### Patch Changes + +- a81b1ba: The default EKS cluster entity transformer now sets the new + `kubernetes.io/x-k8s-aws-id` annotation. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.3.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-aws/package.json b/plugins/catalog-backend-module-aws/package.json index af507e3c68..613dea2f2f 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.3.3", + "version": "0.3.4-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 e33d32aa36..bb760f1136 100644 --- a/plugins/catalog-backend-module-azure/CHANGELOG.md +++ b/plugins/catalog-backend-module-azure/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-azure +## 0.1.29-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.1.28 ### Patch Changes diff --git a/plugins/catalog-backend-module-azure/package.json b/plugins/catalog-backend-module-azure/package.json index 05d2587746..c3c9ac8a81 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.28", + "version": "0.1.29-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md b/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md index 28d4c10240..ee80978b65 100644 --- a/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-backstage-openapi/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-backstage-openapi +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.1.2 ### Patch Changes diff --git a/plugins/catalog-backend-module-backstage-openapi/package.json b/plugins/catalog-backend-module-backstage-openapi/package.json index ff331aeca5..4f2b1a5b11 100644 --- a/plugins/catalog-backend-module-backstage-openapi/package.json +++ b/plugins/catalog-backend-module-backstage-openapi/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend-module-backstage-openapi", - "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-module-bitbucket-cloud/CHANGELOG.md b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md index 0fb20563d0..a9c1aa2945 100644 --- a/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-cloud/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog-backend-module-bitbucket-cloud +## 0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + ## 0.1.24 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-cloud/package.json b/plugins/catalog-backend-module-bitbucket-cloud/package.json index e1352c6363..7dd551e15a 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.24", + "version": "0.1.25-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 d3abaf1608..c6eeebe0e6 100644 --- a/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket-server/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-bitbucket-server +## 0.1.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.22 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket-server/package.json b/plugins/catalog-backend-module-bitbucket-server/package.json index 00f8c6572f..ab8febdc20 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.22", + "version": "0.1.23-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 b39778b2fb..27fb897ae2 100644 --- a/plugins/catalog-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/catalog-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-bitbucket +## 0.2.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-bitbucket-cloud-common@0.2.16-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + ## 0.2.24 ### Patch Changes diff --git a/plugins/catalog-backend-module-bitbucket/package.json b/plugins/catalog-backend-module-bitbucket/package.json index 2625835a5b..8db2d2dabe 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.24", + "version": "0.2.25-next.0", "deprecated": true, "main": "src/index.ts", "types": "src/index.ts", diff --git a/plugins/catalog-backend-module-gcp/CHANGELOG.md b/plugins/catalog-backend-module-gcp/CHANGELOG.md index aef3c0c14a..bdf72f7171 100644 --- a/plugins/catalog-backend-module-gcp/CHANGELOG.md +++ b/plugins/catalog-backend-module-gcp/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-gcp +## 0.1.10-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + ## 0.1.9 ### Patch Changes diff --git a/plugins/catalog-backend-module-gcp/package.json b/plugins/catalog-backend-module-gcp/package.json index 5515feeb5b..ad5bdfa3f5 100644 --- a/plugins/catalog-backend-module-gcp/package.json +++ b/plugins/catalog-backend-module-gcp/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-gcp", "description": "A Backstage catalog backend module that helps integrate towards GCP", - "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-gerrit/CHANGELOG.md b/plugins/catalog-backend-module-gerrit/CHANGELOG.md index f43a1a7550..2b965a3267 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.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.25 ### Patch Changes diff --git a/plugins/catalog-backend-module-gerrit/package.json b/plugins/catalog-backend-module-gerrit/package.json index 95f90287c3..91097235d4 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.25", + "version": "0.1.26-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-github-org/CHANGELOG.md b/plugins/catalog-backend-module-github-org/CHANGELOG.md index 2dac3fa910..a8448fe5af 100644 --- a/plugins/catalog-backend-module-github-org/CHANGELOG.md +++ b/plugins/catalog-backend-module-github-org/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-catalog-backend-module-github-org +## 0.1.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-backend-module-github@0.4.8-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.1.3 ### Patch Changes diff --git a/plugins/catalog-backend-module-github-org/package.json b/plugins/catalog-backend-module-github-org/package.json index bd7e23f90d..585f032f05 100644 --- a/plugins/catalog-backend-module-github-org/package.json +++ b/plugins/catalog-backend-module-github-org/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-github-org", "description": "The github-org backend module for the catalog plugin.", - "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-github/CHANGELOG.md b/plugins/catalog-backend-module-github/CHANGELOG.md index 6ea0c50666..b00dfda365 100644 --- a/plugins/catalog-backend-module-github/CHANGELOG.md +++ b/plugins/catalog-backend-module-github/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-catalog-backend-module-github +## 0.4.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + ## 0.4.7 ### Patch Changes diff --git a/plugins/catalog-backend-module-github/package.json b/plugins/catalog-backend-module-github/package.json index 9231a0cd69..10c95c6c44 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.4.7", + "version": "0.4.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 138796de12..b78079c4e8 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.3.7-next.0 + +### Patch Changes + +- 60e4c2a: Added the option to provide custom `groupTransformer`, `userTransformer` and `groupNameTransformer` to allow custom transformations of groups and users +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + ## 0.3.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-gitlab/package.json b/plugins/catalog-backend-module-gitlab/package.json index 4092a1dab2..a364ddb584 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.3.6", + "version": "0.3.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md index 24fd6a0b30..042dfc6bb1 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md +++ b/plugins/catalog-backend-module-incremental-ingestion/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-catalog-backend-module-incremental-ingestion +## 0.4.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + ## 0.4.13 ### Patch Changes diff --git a/plugins/catalog-backend-module-incremental-ingestion/package.json b/plugins/catalog-backend-module-incremental-ingestion/package.json index 41c0abd811..96ccb49130 100644 --- a/plugins/catalog-backend-module-incremental-ingestion/package.json +++ b/plugins/catalog-backend-module-incremental-ingestion/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-incremental-ingestion", "description": "An entity provider for streaming large asset sources into the catalog", - "version": "0.4.13", + "version": "0.4.14-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 5e01cf2f97..b6f74f007c 100644 --- a/plugins/catalog-backend-module-ldap/CHANGELOG.md +++ b/plugins/catalog-backend-module-ldap/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-ldap +## 0.5.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.5.24 ### Patch Changes diff --git a/plugins/catalog-backend-module-ldap/package.json b/plugins/catalog-backend-module-ldap/package.json index 6a16e89ff1..c2ad4a8aa3 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.24", + "version": "0.5.25-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 8ea92b99b9..99e9e39a76 100644 --- a/plugins/catalog-backend-module-msgraph/CHANGELOG.md +++ b/plugins/catalog-backend-module-msgraph/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-backend-module-msgraph +## 0.5.17-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.5.16 ### Patch Changes diff --git a/plugins/catalog-backend-module-msgraph/package.json b/plugins/catalog-backend-module-msgraph/package.json index 1187c93262..56cf638689 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.5.16", + "version": "0.5.17-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 ff1f865a28..498291b002 100644 --- a/plugins/catalog-backend-module-openapi/CHANGELOG.md +++ b/plugins/catalog-backend-module-openapi/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-catalog-backend-module-openapi +## 0.1.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-catalog-backend@1.17.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.1.26 ### Patch Changes diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 1b3a2e46a0..92e7bdf618 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.26", + "version": "0.1.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md index dbc84f46f7..b2dd64e934 100644 --- a/plugins/catalog-backend-module-puppetdb/CHANGELOG.md +++ b/plugins/catalog-backend-module-puppetdb/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-backend-module-puppetdb +## 0.1.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.1.14 ### Patch Changes diff --git a/plugins/catalog-backend-module-puppetdb/package.json b/plugins/catalog-backend-module-puppetdb/package.json index d9bdb74b16..4aaf20ba8b 100644 --- a/plugins/catalog-backend-module-puppetdb/package.json +++ b/plugins/catalog-backend-module-puppetdb/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-puppetdb", "description": "A Backstage catalog backend module that helps integrate towards PuppetDB", - "version": "0.1.14", + "version": "0.1.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md index 4901341e46..de3ff6553a 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md +++ b/plugins/catalog-backend-module-scaffolder-entity-model/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-catalog-backend-module-scaffolder-entity-model +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.1.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-scaffolder-entity-model/package.json b/plugins/catalog-backend-module-scaffolder-entity-model/package.json index 3dc896f7c7..66d3c3d26f 100644 --- a/plugins/catalog-backend-module-scaffolder-entity-model/package.json +++ b/plugins/catalog-backend-module-scaffolder-entity-model/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-scaffolder-entity-model", "description": "Adds support for the scaffolder specific entity model (e.g. the Template kind) to the catalog backend plugin.", - "version": "0.1.6", + "version": "0.1.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md index 947fdb5914..3c34f951b5 100644 --- a/plugins/catalog-backend-module-unprocessed/CHANGELOG.md +++ b/plugins/catalog-backend-module-unprocessed/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-catalog-backend-module-unprocessed +## 0.3.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + ## 0.3.6 ### Patch Changes diff --git a/plugins/catalog-backend-module-unprocessed/package.json b/plugins/catalog-backend-module-unprocessed/package.json index 4412c4ef7c..22786152c9 100644 --- a/plugins/catalog-backend-module-unprocessed/package.json +++ b/plugins/catalog-backend-module-unprocessed/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-catalog-backend-module-unprocessed", "description": "Backstage Catalog module to view unprocessed entities", - "version": "0.3.6", + "version": "0.3.7-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 3330de7fd3..fcbad7031b 100644 --- a/plugins/catalog-backend/CHANGELOG.md +++ b/plugins/catalog-backend/CHANGELOG.md @@ -1,5 +1,33 @@ # @backstage/plugin-catalog-backend +## 1.17.0-next.0 + +### Minor Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-module-catalog@0.1.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-events-node@0.2.19-next.0 + - @backstage/plugin-permission-common@0.7.12 + ## 1.16.1 ### Patch Changes diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 42f40cccd2..d9ba73fe9e 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.16.1", + "version": "1.17.0-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 235e5c25fb..a377f5ca68 100644 --- a/plugins/catalog-graph/CHANGELOG.md +++ b/plugins/catalog-graph/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-catalog-graph +## 0.3.4-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 + ## 0.3.3 ### Patch Changes diff --git a/plugins/catalog-graph/package.json b/plugins/catalog-graph/package.json index a38f1a4480..709e764531 100644 --- a/plugins/catalog-graph/package.json +++ b/plugins/catalog-graph/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graph", - "version": "0.3.3", + "version": "0.3.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/DefaultRenderNode.tsx b/plugins/catalog-graph/src/components/EntityRelationsGraph/DefaultRenderNode.tsx index 88de8df686..d55f4c015b 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/DefaultRenderNode.tsx +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/DefaultRenderNode.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ import { DependencyGraphTypes } from '@backstage/core-components'; +import { useApp } from '@backstage/core-plugin-api'; import { humanizeEntityRef } from '@backstage/plugin-catalog-react'; import { makeStyles } from '@material-ui/core/styles'; import classNames from 'classnames'; @@ -63,6 +64,7 @@ export function DefaultRenderNode({ const classes = useStyles(); const [width, setWidth] = useState(0); const [height, setHeight] = useState(0); + const app = useApp(); const idRef = useRef(null); useLayoutEffect(() => { @@ -85,9 +87,12 @@ export function DefaultRenderNode({ metadata: { name, namespace = DEFAULT_NAMESPACE, title }, } = entity; + const hasKindIcon = app.getSystemIcon( + `kind:${kind.toLocaleLowerCase('en-US')}`, + ); const padding = 10; const iconSize = height; - const paddedIconWidth = kind ? iconSize + padding : 0; + const paddedIconWidth = hasKindIcon ? iconSize + padding : 0; const paddedWidth = paddedIconWidth + width + padding * 2; const paddedHeight = height + padding * 2; @@ -109,7 +114,7 @@ export function DefaultRenderNode({ height={paddedHeight} rx={10} /> - {kind && ( + {hasKindIcon && ( ; } diff --git a/plugins/catalog-import/CHANGELOG.md b/plugins/catalog-import/CHANGELOG.md index ea9d4cb61e..b77f3faf2b 100644 --- a/plugins/catalog-import/CHANGELOG.md +++ b/plugins/catalog-import/CHANGELOG.md @@ -1,5 +1,24 @@ # @backstage/plugin-catalog-import +## 0.10.6-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.10.5 ### Patch Changes diff --git a/plugins/catalog-import/package.json b/plugins/catalog-import/package.json index 865f60a842..066a073c48 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.10.5", + "version": "0.10.6-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx index dac83a4817..86030758a7 100644 --- a/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx +++ b/plugins/catalog-import/src/components/EntityListComponent/EntityListComponent.tsx @@ -32,7 +32,6 @@ import { import { makeStyles } from '@material-ui/core/styles'; import ExpandLessIcon from '@material-ui/icons/ExpandLess'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; -import WorkIcon from '@material-ui/icons/Work'; import React, { useState } from 'react'; const useStyles = makeStyles(theme => ({ @@ -127,10 +126,9 @@ export const EntityListComponent = (props: EntityListComponentProps) => { > {sortEntities(r.entities).map(entity => { - const Icon = - app.getSystemIcon( - `kind:${entity.kind.toLocaleLowerCase('en-US')}`, - ) ?? WorkIcon; + const Icon = app.getSystemIcon( + `kind:${entity.kind.toLocaleLowerCase('en-US')}`, + ); return ( { } : {})} > - - - + {Icon && } ); diff --git a/plugins/catalog-node/CHANGELOG.md b/plugins/catalog-node/CHANGELOG.md index cda3c22b0f..7327411bf2 100644 --- a/plugins/catalog-node/CHANGELOG.md +++ b/plugins/catalog-node/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-catalog-node +## 1.6.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + ## 1.6.1 ### Patch Changes diff --git a/plugins/catalog-node/package.json b/plugins/catalog-node/package.json index 013577d0b9..944474bb9b 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.6.1", + "version": "1.6.2-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 9bd729a8e6..4bd71d05fe 100644 --- a/plugins/catalog-react/CHANGELOG.md +++ b/plugins/catalog-react/CHANGELOG.md @@ -1,5 +1,25 @@ # @backstage/plugin-catalog-react +## 1.9.4-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- 71c6d7a: Overflowing labels in OwnerPicker (Catalog) are now truncated. Hovering over them shows the full label +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + ## 1.9.3 ### Patch Changes diff --git a/plugins/catalog-react/package.json b/plugins/catalog-react/package.json index 93486c64db..d4114efc59 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.9.3", + "version": "1.9.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx index 90df738922..7148a051e8 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx @@ -26,7 +26,7 @@ import { Progress, ResponseErrorPanel, } from '@backstage/core-components'; -import { useApi, useRouteRef } from '@backstage/core-plugin-api'; +import { useApi, useApp, useRouteRef } from '@backstage/core-plugin-api'; import { Box, DialogContentText, makeStyles } from '@material-ui/core'; import classNames from 'classnames'; import React, { useLayoutEffect, useRef, useState } from 'react'; @@ -107,6 +107,7 @@ function CustomNode({ node }: DependencyGraphTypes.RenderNodeProps) { const entityRoute = useRouteRef(entityRouteRef); const [width, setWidth] = useState(0); const [height, setHeight] = useState(0); + const app = useApp(); const idRef = useRef(null); useLayoutEffect(() => { @@ -123,9 +124,12 @@ function CustomNode({ node }: DependencyGraphTypes.RenderNodeProps) { } }, [width, height]); + const hasKindIcon = app.getSystemIcon( + `kind:${node.kind.toLocaleLowerCase('en-US')}`, + ); const padding = 10; const iconSize = height; - const paddedIconWidth = iconSize + padding; + const paddedIconWidth = hasKindIcon ? iconSize + padding : 0; const paddedWidth = paddedIconWidth + width + padding * 2; const paddedHeight = height + padding * 2; @@ -160,17 +164,19 @@ function CustomNode({ node }: DependencyGraphTypes.RenderNodeProps) { height={paddedHeight} rx={10} /> - + {hasKindIcon && ( + + )} } {props.entities.map(entity => ( - - - } /> ))} diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/EntityKindIcon.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/EntityKindIcon.tsx index 4bb41c91c1..7fc95613e9 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/EntityKindIcon.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/EntityKindIcon.tsx @@ -16,10 +16,10 @@ import { parseEntityRef } from '@backstage/catalog-model'; import { useApp } from '@backstage/core-plugin-api'; -import WorkIcon from '@material-ui/icons/Work'; import React from 'react'; +import SvgIcon from '@material-ui/core/SvgIcon'; -const DEFAULT_ICON = WorkIcon; +const DEFAULT_ICON = SvgIcon; function getKind( kind: string | undefined, diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx index 8b3b69a55a..f4bd8d9f25 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/OverviewPage.tsx @@ -36,7 +36,6 @@ import { ListItemText, ListSubheader, } from './common'; -import { EntityKindIcon } from './EntityKindIcon'; import { stringifyEntityRef } from '@backstage/catalog-model'; import { CopyTextButton } from '@backstage/core-components'; @@ -155,9 +154,6 @@ export function OverviewPage(props: { entity: AlphaEntity }) { {type}}> {groupRelations.map(group => ( - - - diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md index a34341d585..4283ae0a74 100644 --- a/plugins/catalog/CHANGELOG.md +++ b/plugins/catalog/CHANGELOG.md @@ -1,5 +1,34 @@ # @backstage/plugin-catalog +## 1.17.0-next.0 + +### Minor Changes + +- e541c0e: Exported `CatalogTable.defaultColumnsFunc` for defining the columns in `` of some Kinds while using the default columns for the others. + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- f899eec: Change default icon for `kind:resource` to the storage icon. +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- 797a329: Fixed inconsistencies in icons used for System and Template +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-search-common@1.2.10 + ## 1.16.1 ### Patch Changes diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 4654a831f9..c30cddc08f 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.16.1", + "version": "1.17.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/catalog/src/apis/EntityPresentationApi/DefaultEntityPresentationApi.ts b/plugins/catalog/src/apis/EntityPresentationApi/DefaultEntityPresentationApi.ts index b610173421..82862be435 100644 --- a/plugins/catalog/src/apis/EntityPresentationApi/DefaultEntityPresentationApi.ts +++ b/plugins/catalog/src/apis/EntityPresentationApi/DefaultEntityPresentationApi.ts @@ -34,7 +34,6 @@ import { DEFAULT_BATCH_DELAY, DEFAULT_CACHE_TTL, DEFAULT_ICONS, - UNKNOWN_KIND_ICON, createDefaultRenderer, } from './defaults'; @@ -395,8 +394,6 @@ export class DefaultEntityPresentationApi implements EntityPresentationApi { return false; } - return ( - this.#kindIcons[kind.toLocaleLowerCase('en-US')] ?? UNKNOWN_KIND_ICON - ); + return this.#kindIcons[kind.toLocaleLowerCase('en-US')]; } } diff --git a/plugins/catalog/src/apis/EntityPresentationApi/defaults.tsx b/plugins/catalog/src/apis/EntityPresentationApi/defaults.tsx index 813f2e3eb8..34bfd64d63 100644 --- a/plugins/catalog/src/apis/EntityPresentationApi/defaults.tsx +++ b/plugins/catalog/src/apis/EntityPresentationApi/defaults.tsx @@ -20,7 +20,6 @@ import { HumanDuration } from '@backstage/types'; import ApartmentIcon from '@material-ui/icons/Apartment'; import CategoryIcon from '@material-ui/icons/Category'; import ExtensionIcon from '@material-ui/icons/Extension'; -import HelpIcon from '@material-ui/icons/Help'; import FeaturedPlayListIcon from '@material-ui/icons/FeaturedPlayList'; import LocationOnIcon from '@material-ui/icons/LocationOn'; import MemoryIcon from '@material-ui/icons/Memory'; @@ -33,8 +32,6 @@ export const DEFAULT_CACHE_TTL: HumanDuration = { seconds: 10 }; export const DEFAULT_BATCH_DELAY: HumanDuration = { milliseconds: 50 }; -export const UNKNOWN_KIND_ICON: IconComponent = HelpIcon; - export const DEFAULT_ICONS: Record = { api: ExtensionIcon, component: MemoryIcon, diff --git a/plugins/cicd-statistics-module-gitlab/CHANGELOG.md b/plugins/cicd-statistics-module-gitlab/CHANGELOG.md index 79d8cda7bf..1d134138ba 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.26-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-cicd-statistics@0.1.32-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.25 ### Patch Changes diff --git a/plugins/cicd-statistics-module-gitlab/package.json b/plugins/cicd-statistics-module-gitlab/package.json index f84457a781..9ab05f6aac 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.25", + "version": "0.1.26-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 e80e9d5d68..d1099764d9 100644 --- a/plugins/cicd-statistics/CHANGELOG.md +++ b/plugins/cicd-statistics/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-cicd-statistics +## 0.1.32-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.31 ### Patch Changes diff --git a/plugins/cicd-statistics/package.json b/plugins/cicd-statistics/package.json index aaa271baa7..a989af1820 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.31", + "version": "0.1.32-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 baabcaa66f..413ae8b12f 100644 --- a/plugins/circleci/CHANGELOG.md +++ b/plugins/circleci/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-circleci +## 0.3.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.3.29 ### Patch Changes diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 174dbda8d1..9eb43648af 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.29", + "version": "0.3.30-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 84cd321643..ff87a63e08 100644 --- a/plugins/cloudbuild/CHANGELOG.md +++ b/plugins/cloudbuild/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-cloudbuild +## 0.4.0-next.0 + +### Minor Changes + +- 0328d1b: Changed build list view to automatically filter builds based on repository name matching component-info's metadata.name. + Added optional `google.com/cloudbuild-repo-name` annotation which allows you to specify a different repository to filter on. + Added optional `google.com/cloudbuild-trigger-name` annotation which allows you to filter based on a trigger name instead of a repo name. + Updated the ReadMe with information about the filtering and some other minor verbiage updates. + Changed `substitutions.BRANCH_NAME` to `substitutions.REF_NAME` so that the Ref field is populated properly. + Added optional `google.com/cloudbuild-location` annotation which allows you to specify the Cloud Build location of your builds. Default is global scope. + Changed build list view to show builds in a specific location if the location annotation is used. + Updated ReadMe with information about the use of the location filtering. + +### Patch Changes + +- ef3cad4: Add telemetry HTTP header Google Cloud Platform +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.3.29 ### Patch Changes diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 8d7c9a3282..00f0a7ea11 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.29", + "version": "0.4.0-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 551e4fb262..9e653f5879 100644 --- a/plugins/code-climate/CHANGELOG.md +++ b/plugins/code-climate/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-code-climate +## 0.1.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.29 ### Patch Changes diff --git a/plugins/code-climate/package.json b/plugins/code-climate/package.json index 1c9971f476..b142f7bb40 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.29", + "version": "0.1.30-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 e55df807d1..ed75e028d1 100644 --- a/plugins/code-coverage-backend/CHANGELOG.md +++ b/plugins/code-coverage-backend/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-code-coverage-backend +## 0.2.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.2.23 ### Patch Changes diff --git a/plugins/code-coverage-backend/package.json b/plugins/code-coverage-backend/package.json index 4fa0a8e6ec..d929fd4006 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.23", + "version": "0.2.24-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 5155660c36..534fbc0d52 100644 --- a/plugins/code-coverage/CHANGELOG.md +++ b/plugins/code-coverage/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-code-coverage +## 0.2.23-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.2.22 ### Patch Changes diff --git a/plugins/code-coverage/package.json b/plugins/code-coverage/package.json index c37036f1ff..52dd2a18ec 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.22", + "version": "0.2.23-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 cd0c31e2f1..7f0a7dfd21 100644 --- a/plugins/cost-insights/CHANGELOG.md +++ b/plugins/cost-insights/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-cost-insights +## 0.12.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/plugin-cost-insights-common@0.1.2 + ## 0.12.18 ### Patch Changes diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index 2db994d466..798853d219 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.12.18", + "version": "0.12.19-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/devtools-backend/CHANGELOG.md b/plugins/devtools-backend/CHANGELOG.md index 62e91cc50c..ca367deadd 100644 --- a/plugins/devtools-backend/CHANGELOG.md +++ b/plugins/devtools-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-devtools-backend +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config-loader@1.6.1 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/cli-common@0.1.13 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-devtools-common@0.1.8 + - @backstage/plugin-permission-common@0.7.12 + ## 0.2.6 ### Patch Changes diff --git a/plugins/devtools-backend/package.json b/plugins/devtools-backend/package.json index 4d56c3e9dd..e35d8c4112 100644 --- a/plugins/devtools-backend/package.json +++ b/plugins/devtools-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools-backend", - "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/devtools/CHANGELOG.md b/plugins/devtools/CHANGELOG.md index 4237bd149a..be753cb664 100644 --- a/plugins/devtools/CHANGELOG.md +++ b/plugins/devtools/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-devtools +## 0.1.9-next.0 + +### Patch Changes + +- c12a86c: Refactored code to improve accessibility by moving elements outside the `ul` tag and placing them appropriately. Also adjusted theme to offer better contrast. +- b89d8be: Added alpha support for the New Frontend System (Declarative Integration) +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-devtools-common@0.1.8 + - @backstage/plugin-permission-react@0.4.19 + ## 0.1.8 ### Patch Changes diff --git a/plugins/devtools/package.json b/plugins/devtools/package.json index e972242c82..7639df94b8 100644 --- a/plugins/devtools/package.json +++ b/plugins/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-devtools", - "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/dynatrace/CHANGELOG.md b/plugins/dynatrace/CHANGELOG.md index 1cff141762..6d363c3bc3 100644 --- a/plugins/dynatrace/CHANGELOG.md +++ b/plugins/dynatrace/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-dynatrace +## 8.0.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 8.0.3 ### Patch Changes diff --git a/plugins/dynatrace/package.json b/plugins/dynatrace/package.json index c82b8a4d5b..23ff57d6c0 100644 --- a/plugins/dynatrace/package.json +++ b/plugins/dynatrace/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-dynatrace", - "version": "8.0.3", + "version": "8.0.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/entity-feedback-backend/CHANGELOG.md b/plugins/entity-feedback-backend/CHANGELOG.md index e9eec4b8f2..9248c16404 100644 --- a/plugins/entity-feedback-backend/CHANGELOG.md +++ b/plugins/entity-feedback-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-entity-feedback-backend +## 0.2.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-entity-feedback-common@0.1.3 + ## 0.2.6 ### Patch Changes diff --git a/plugins/entity-feedback-backend/package.json b/plugins/entity-feedback-backend/package.json index 8e5deafdf1..013aff7146 100644 --- a/plugins/entity-feedback-backend/package.json +++ b/plugins/entity-feedback-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-entity-feedback-backend", - "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/entity-feedback/CHANGELOG.md b/plugins/entity-feedback/CHANGELOG.md index 5cc2ae9468..69f503b584 100644 --- a/plugins/entity-feedback/CHANGELOG.md +++ b/plugins/entity-feedback/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-entity-feedback +## 0.2.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-entity-feedback-common@0.1.3 + ## 0.2.12 ### Patch Changes diff --git a/plugins/entity-feedback/package.json b/plugins/entity-feedback/package.json index 226c76c106..d16702c230 100644 --- a/plugins/entity-feedback/package.json +++ b/plugins/entity-feedback/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-entity-feedback", - "version": "0.2.12", + "version": "0.2.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/entity-validation/CHANGELOG.md b/plugins/entity-validation/CHANGELOG.md index f1070960c8..3c7c1579cf 100644 --- a/plugins/entity-validation/CHANGELOG.md +++ b/plugins/entity-validation/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-entity-validation +## 0.1.15-next.0 + +### Patch Changes + +- 916da47: Change default icon for unknown entities to nothing instead of the help icon. +- 1f70e46: Improves UX of the EntityValidationPage: Moves the validate button below the EntityTextArea which is actually validated, the location TextField can now be hidden to prevent confusion about what is validated and additional content can be added to the top of the validation page. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.1.14 ### Patch Changes diff --git a/plugins/entity-validation/package.json b/plugins/entity-validation/package.json index 7e2389dd7a..cdf3dc88da 100644 --- a/plugins/entity-validation/package.json +++ b/plugins/entity-validation/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-entity-validation", - "version": "0.1.14", + "version": "0.1.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/entity-validation/src/components/EntityValidationOutput/EntityResult.tsx b/plugins/entity-validation/src/components/EntityValidationOutput/EntityResult.tsx index 85d47fa2c2..a9989f9f70 100644 --- a/plugins/entity-validation/src/components/EntityValidationOutput/EntityResult.tsx +++ b/plugins/entity-validation/src/components/EntityValidationOutput/EntityResult.tsx @@ -27,11 +27,11 @@ import { Paper, } from '@material-ui/core'; import { humanizeEntityRef } from '@backstage/plugin-catalog-react'; -import WorkIcon from '@material-ui/icons/Work'; import ExpandLessIcon from '@material-ui/icons/ExpandLess'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { MarkdownContent } from '@backstage/core-components'; import { ValidationOutputOk } from '../../types'; +import SvgIcon from '@material-ui/core/SvgIcon'; const useStyles = makeStyles(theme => ({ validationOk: { @@ -60,9 +60,9 @@ export const EntityResult = ({ const app = useApp(); const [expanded, setExpanded] = useState(isFirstError); - const Icon = - app.getSystemIcon(`kind:${item.entity.kind.toLocaleLowerCase('en-US')}`) ?? - WorkIcon; + const Icon = app.getSystemIcon( + `kind:${item.entity.kind.toLocaleLowerCase('en-US')}`, + ) as typeof SvgIcon; const fetchErrorMessages = (response: ValidateEntityResponse) => { if (!response.valid) { @@ -75,13 +75,15 @@ export const EntityResult = ({ <> - + {Icon && ( + + )} ; +} + +// @public (undocumented) +export type PinnipedParameters = { + clusterScopedIdToken: string; + authenticator: { + apiGroup: string; + kind: string; + name: string; + }; + tokenCredentialRequest?: { + apiGroup?: string; + }; +}; + // @public (undocumented) export interface ServiceLocatorRequestContext { // (undocumented) diff --git a/plugins/kubernetes-node/package.json b/plugins/kubernetes-node/package.json index 317f75063d..f09d1165e2 100644 --- a/plugins/kubernetes-node/package.json +++ b/plugins/kubernetes-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-node", "description": "Node.js library for the kubernetes plugin", - "version": "0.1.3", + "version": "0.1.4-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,7 +22,13 @@ "postpack": "backstage-cli package postpack" }, "devDependencies": { - "@backstage/cli": "workspace:^" + "@backstage/backend-app-api": "workspace:^", + "@backstage/backend-common": "workspace:^", + "@backstage/backend-test-utils": "workspace:^", + "@backstage/cli": "workspace:^", + "@backstage/plugin-kubernetes-backend": "workspace:^", + "msw": "^1.3.1", + "supertest": "^6.1.3" }, "files": [ "dist" @@ -31,6 +37,9 @@ "@backstage/backend-plugin-api": "workspace:^", "@backstage/catalog-model": "workspace:^", "@backstage/plugin-kubernetes-common": "workspace:^", - "@backstage/types": "workspace:^" + "@backstage/types": "workspace:^", + "@kubernetes/client-node": "^0.20.0", + "node-fetch": "^2.6.7", + "winston": "^3.2.1" } } diff --git a/plugins/kubernetes-node/src/auth/PinnipedHelper.test.ts b/plugins/kubernetes-node/src/auth/PinnipedHelper.test.ts new file mode 100644 index 0000000000..3cb25d7934 --- /dev/null +++ b/plugins/kubernetes-node/src/auth/PinnipedHelper.test.ts @@ -0,0 +1,399 @@ +/* + * Copyright 2024 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 { ExtendedHttpServer } from '@backstage/backend-app-api'; +import { ClusterDetails } from '../types'; +import { + mockServices, + setupRequestMockHandlers, + startTestBackend, +} from '@backstage/backend-test-utils'; +import { createBackendModule } from '@backstage/backend-plugin-api'; +import { + kubernetesAuthStrategyExtensionPoint, + kubernetesClusterSupplierExtensionPoint, +} from '../extensions'; +import request from 'supertest'; +import { + ANNOTATION_KUBERNETES_AUTH_PROVIDER, + KubernetesRequestAuth, +} from '@backstage/plugin-kubernetes-common'; +import { PinnipedHelper, PinnipedParameters } from './PinnipedHelper'; +import { getVoidLogger } from '@backstage/backend-common'; +import { HEADER_KUBERNETES_CLUSTER } from '@backstage/plugin-kubernetes-backend'; +import { JsonObject } from '@backstage/types'; +import { rest } from 'msw'; +import { setupServer } from 'msw/node'; + +describe('Pinniped - tokenCredentialRequest', () => { + let app: ExtendedHttpServer; + const logger = getVoidLogger(); + let httpsRequest: jest.SpyInstance; + const worker = setupServer(); + setupRequestMockHandlers(worker); + + beforeAll(() => { + httpsRequest = jest.spyOn( + // this is pretty egregious reverse engineering of msw. + // If the SetupServerApi constructor was exported, we wouldn't need + // to be quite so hacky here + (worker as any).interceptor.interceptors[0].modules.get('https'), + 'request', + ); + }); + + beforeEach(async () => { + httpsRequest.mockClear(); + + const clusterSupplierMock = { + getClusters: jest.fn().mockImplementation(_ => { + return Promise.resolve([ + { + name: 'custom-cluster', + url: 'https://my.cluster.url', + authMetadata: { + [ANNOTATION_KUBERNETES_AUTH_PROVIDER]: 'pinniped', + }, + skipTLSVerify: true, + }, + ]); + }), + }; + + const { server } = await startTestBackend({ + features: [ + mockServices.rootConfig.factory({ + data: { + kubernetes: { + serviceLocatorMethod: { + type: 'multiTenant', + }, + clusterLocatorMethods: [ + { + type: 'config', + clusters: [], + }, + ], + }, + }, + }), + import('@backstage/plugin-kubernetes-backend/alpha'), + createBackendModule({ + pluginId: 'kubernetes', + moduleId: 'testClusterSupplier', + register(env) { + env.registerInit({ + deps: { extension: kubernetesClusterSupplierExtensionPoint }, + async init({ extension }) { + extension.addClusterSupplier(clusterSupplierMock); + }, + }); + }, + }), + createBackendModule({ + pluginId: 'kubernetes', + moduleId: 'PinnipedAuthStrategy', + register(env) { + env.registerInit({ + deps: { extension: kubernetesAuthStrategyExtensionPoint }, + async init({ extension }) { + extension.addAuthStrategy('pinniped', { + getCredential: async ( + clusterDetails: ClusterDetails, + authConfig: KubernetesRequestAuth, + ) => { + const pinnipedHelper = new PinnipedHelper(logger); + const pinnipedParams: PinnipedParameters = { + clusterScopedIdToken: + ((authConfig.pinniped as JsonObject) + ?.clusteridtoken as string) || '', + authenticator: { + apiGroup: 'authentication.concierge.pinniped.dev', + kind: 'JWTAuthenticator', + name: 'supervisor', + }, + }; + const clientCerts = + await pinnipedHelper.tokenCredentialRequest( + clusterDetails, + pinnipedParams, + ); + return { + type: 'x509 client certificate', + key: clientCerts.key, + cert: clientCerts.cert, + }; + }, + validateCluster: jest.fn().mockReturnValue([]), + presentAuthMetadata: jest.fn().mockReturnValue({}), + }); + }, + }); + }, + }), + ], + }); + + app = server; + }); + + describe('TLS Clusters', () => { + it('Should get certs data from Concierge', async () => { + worker.use( + rest.get('https://my.cluster.url/api/v1/namespaces', (_, res, ctx) => { + return res(ctx.json({ items: [] })); + }), + ); + + const myCert = 'MOCKCert'; + const myKey = 'MOCKKey'; + + worker.use( + rest.post( + 'https://my.cluster.url/apis/login.concierge.pinniped.dev/v1alpha1/tokencredentialrequests', + (_, res, ctx) => { + return res( + ctx.json({ + status: { + credential: { + clientKeyData: myKey, + clientCertificateData: myCert, + expirationTimestamp: '2024-01-04T14:30:30.373Z', + }, + }, + }), + ); + }, + ), + ); + + const proxyEndpointRequest = request(app) + .get('/api/kubernetes/proxy/api/v1/namespaces') + .set(HEADER_KUBERNETES_CLUSTER, 'custom-cluster') + .set( + 'Backstage-Kubernetes-Authorization-Pinniped-ClusterIDToken', + 'ClusterID Specific Token', + ); + + worker.use(rest.all(proxyEndpointRequest.url, req => req.passthrough())); + + const result = await proxyEndpointRequest; + + expect(JSON.stringify(result)).toMatch(/PEM/); + + expect(httpsRequest).toHaveBeenCalledTimes(2); + const [{ cert, key }] = httpsRequest.mock.calls[1]; + expect(cert).toEqual(myCert); + expect(key).toEqual(myKey); + }); + + it('Should get certs data from TMC-flavoured Pinniped', async () => { + worker.use( + rest.get('https://my.cluster.url/api/v1/namespaces', (_, res, ctx) => { + return res(ctx.json({ items: [] })); + }), + ); + + const myCert = 'MOCKCert2'; + const myKey = 'MOCKKey2'; + + worker.use( + rest.post( + 'https://my.cluster.url/apis/login.concierge.pinniped.tmc.cloud.vmware.com/v1alpha1/tokencredentialrequests', + (_, res, ctx) => { + return res( + ctx.json({ + status: { + credential: { + clientKeyData: myKey, + clientCertificateData: myCert, + expirationTimestamp: '2024-01-04T14:30:30.373Z', + }, + }, + }), + ); + }, + ), + ); + + const clusterSupplierMock = { + getClusters: jest.fn().mockImplementation(_ => { + return Promise.resolve([ + { + name: 'tmc-cluster', + url: 'https://my.cluster.url', + authMetadata: { + [ANNOTATION_KUBERNETES_AUTH_PROVIDER]: 'pinnipedtmc', + }, + skipTLSVerify: true, + }, + ]); + }), + }; + + const { server } = await startTestBackend({ + features: [ + mockServices.rootConfig.factory({ + data: { + kubernetes: { + serviceLocatorMethod: { + type: 'multiTenant', + }, + clusterLocatorMethods: [ + { + type: 'config', + clusters: [], + }, + ], + }, + }, + }), + import('@backstage/plugin-kubernetes-backend/alpha'), + createBackendModule({ + pluginId: 'kubernetes', + moduleId: 'testClusterSupplier', + register(env) { + env.registerInit({ + deps: { extension: kubernetesClusterSupplierExtensionPoint }, + async init({ extension }) { + extension.addClusterSupplier(clusterSupplierMock); + }, + }); + }, + }), + createBackendModule({ + pluginId: 'kubernetes', + moduleId: 'PinnipedAuthStrategy', + register(env) { + env.registerInit({ + deps: { extension: kubernetesAuthStrategyExtensionPoint }, + async init({ extension }) { + extension.addAuthStrategy('pinnipedtmc', { + getCredential: async ( + clusterDetails: ClusterDetails, + authConfig: KubernetesRequestAuth, + ) => { + const pinnipedHelper = new PinnipedHelper(logger); + const pinnipedParams: PinnipedParameters = { + clusterScopedIdToken: + ((authConfig.pinniped as JsonObject) + ?.clusteridtoken as string) || '', + authenticator: { + apiGroup: + 'authentication.concierge.pinniped.tmc.cloud.vmware.com', + kind: 'WebhookAuthenticator', + name: 'supervisor', + }, + tokenCredentialRequest: { + apiGroup: + 'login.concierge.pinniped.tmc.cloud.vmware.com/v1alpha1', + }, + }; + const clientCerts = + await pinnipedHelper.tokenCredentialRequest( + clusterDetails, + pinnipedParams, + ); + return { + type: 'x509 client certificate', + key: clientCerts.key, + cert: clientCerts.cert, + }; + }, + validateCluster: jest.fn().mockReturnValue([]), + presentAuthMetadata: jest.fn().mockReturnValue({}), + }); + }, + }); + }, + }), + ], + }); + + app = server; + + const proxyEndpointRequest = request(app) + .get('/api/kubernetes/proxy/api/v1/namespaces') + .set(HEADER_KUBERNETES_CLUSTER, 'tmc-cluster') + .set( + 'Backstage-Kubernetes-Authorization-Pinniped-ClusterIDToken', + 'ClusterID Specific Token', + ); + + worker.use(rest.all(proxyEndpointRequest.url, req => req.passthrough())); + + const result = await proxyEndpointRequest; + + expect(JSON.stringify(result)).toMatch(/PEM/); + + expect(httpsRequest).toHaveBeenCalledTimes(2); + const [{ cert, key }] = httpsRequest.mock.calls[1]; + expect(cert).toEqual(myCert); + expect(key).toEqual(myKey); + }); + + it('Should get an error when Concierge return an error', async () => { + worker.use( + rest.get('https://my.cluster.url/api/v1/namespaces', (_, res, ctx) => { + return res(ctx.json({ items: [] })); + }), + ); + + worker.use( + rest.post( + 'https://my.cluster.url/apis/login.concierge.pinniped.dev/v1alpha1/tokencredentialrequests', + (_, res, ctx) => { + return res( + ctx.json({ + kind: 'TokenCredentialRequest', + apiVersion: 'login.concierge.pinniped.dev/v1alpha1', + metadata: { + creationTimestamp: null, + }, + spec: { + authenticator: { + apiGroup: null, + kind: '', + name: '', + }, + }, + status: { + message: 'authentication failed', + }, + }), + ); + }, + ), + ); + + const proxyEndpointRequest = request(app) + .get('/api/kubernetes/proxy/api/v1/namespaces') + .set(HEADER_KUBERNETES_CLUSTER, 'custom-cluster') + .set( + 'Backstage-Kubernetes-Authorization-Pinniped-ClusterIDToken', + 'ClusterID Specific Token', + ); + + worker.use(rest.all(proxyEndpointRequest.url, req => req.passthrough())); + + const result = await proxyEndpointRequest; + + expect(JSON.stringify(result)).toMatch(/error/); + + expect(httpsRequest).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/plugins/kubernetes-node/src/auth/PinnipedHelper.ts b/plugins/kubernetes-node/src/auth/PinnipedHelper.ts new file mode 100644 index 0000000000..1f824bae33 --- /dev/null +++ b/plugins/kubernetes-node/src/auth/PinnipedHelper.ts @@ -0,0 +1,147 @@ +/* + * Copyright 2024 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 { ClusterDetails } from '@backstage/plugin-kubernetes-node'; +import * as https from 'https'; +import { bufferFromFileOrString } from '@kubernetes/client-node'; +import fetch, { RequestInit } from 'node-fetch'; +import { Logger } from 'winston'; + +/** + * + * @public + */ +export type PinnipedClientCerts = { + key: string; + cert: string; + expirationTimestamp: string; +}; + +/** + * + * @public + */ +export type PinnipedParameters = { + clusterScopedIdToken: string; + authenticator: { + apiGroup: string; + kind: string; + name: string; + }; + tokenCredentialRequest?: { + apiGroup?: string; + }; +}; + +/** + * + * @public + */ +export class PinnipedHelper { + constructor(private readonly logger: Logger) {} + + public async tokenCredentialRequest( + clusterDetails: ClusterDetails, + pinnipedParams: PinnipedParameters, + ): Promise { + this.logger.debug('Pinniped: Requesting client Certs to Concierge'); + return await this.exchangeClusterTokentoClientCerts( + clusterDetails, + pinnipedParams, + ); + } + + private async exchangeClusterTokentoClientCerts( + clusterDetails: ClusterDetails, + pinnipedParams: PinnipedParameters, + ): Promise { + const url: URL = new URL(clusterDetails.url); + const apiGroup = + pinnipedParams.tokenCredentialRequest?.apiGroup ?? + 'login.concierge.pinniped.dev/v1alpha1'; + + url.pathname = `/apis/${apiGroup}/tokencredentialrequests`; + + const requestInit: RequestInit = this.buildRequestForPinniped( + url, + clusterDetails, + pinnipedParams, + ); + + this.logger.info( + 'Fetching client certs for mTLS authentication on Pinniped', + ); + let response; + try { + response = await fetch(url, requestInit); + } catch (error) { + this.logger.error('Pinniped request error', error); + throw error; + } + + const data: any = await response.json(); + + if (data.status.credential) { + const result = { + key: data.status.credential.clientKeyData, + cert: data.status.credential.clientCertificateData, + expirationTimestamp: data.status.credential.expirationTimestamp, + }; + return Promise.resolve(result); + } + + this.logger.error('Unable to fetch client certs,', data.status); + return Promise.reject(data.status.message); + } + + private buildRequestForPinniped( + url: URL, + clusterDetails: ClusterDetails, + pinnipedParams: PinnipedParameters, + ): RequestInit { + const body = { + apiVersion: + pinnipedParams.tokenCredentialRequest?.apiGroup ?? + 'login.concierge.pinniped.dev/v1alpha1', + kind: 'TokenCredentialRequest', + spec: { + authenticator: pinnipedParams.authenticator, + token: pinnipedParams.clusterScopedIdToken, + }, + }; + const requestInit: RequestInit = { + method: 'POST', + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, + body: JSON.stringify(body), + }; + + if (url.protocol === 'https:') { + requestInit.agent = new https.Agent({ + ca: + bufferFromFileOrString( + clusterDetails.caFile, + clusterDetails.caData, + ) ?? undefined, + rejectUnauthorized: !clusterDetails.skipTLSVerify, + }); + } + + return requestInit; + } +} diff --git a/plugins/kubernetes-node/src/auth/index.ts b/plugins/kubernetes-node/src/auth/index.ts new file mode 100644 index 0000000000..8459f04f81 --- /dev/null +++ b/plugins/kubernetes-node/src/auth/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 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. + */ + +export * from './PinnipedHelper'; diff --git a/plugins/kubernetes-node/src/index.ts b/plugins/kubernetes-node/src/index.ts index 162d5baf26..e0f2688ca2 100644 --- a/plugins/kubernetes-node/src/index.ts +++ b/plugins/kubernetes-node/src/index.ts @@ -31,3 +31,4 @@ export * from './extensions'; export * from './types'; +export * from './auth'; diff --git a/plugins/kubernetes-node/src/types/types.ts b/plugins/kubernetes-node/src/types/types.ts index d7b2b67265..2881338868 100644 --- a/plugins/kubernetes-node/src/types/types.ts +++ b/plugins/kubernetes-node/src/types/types.ts @@ -182,7 +182,7 @@ export type KubernetesObjectTypes = * @public */ export interface ObjectToFetch { - objectType: KubernetesObjectTypes; // TODO - Review + objectType: KubernetesObjectTypes; group: string; apiVersion: string; plural: string; diff --git a/plugins/kubernetes-react/CHANGELOG.md b/plugins/kubernetes-react/CHANGELOG.md index 12e4f42147..643fea0159 100644 --- a/plugins/kubernetes-react/CHANGELOG.md +++ b/plugins/kubernetes-react/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-kubernetes-react +## 0.3.0-next.0 + +### Minor Changes + +- 0d526c8: **BREAKING** The pod exec terminal is now disabled by default since there are several scenarios where it is known not to work. It can be re-enabled at your own risk by setting the config parameter `kubernetes.podExecTerminal.enabled` to `true`. + +### Patch Changes + +- 536f67d: Fix broken XtermJS CSS import +- db1054b: Fixed a bug where the logs dialog and any other functionality depending on the proxy endpoint would fail for clusters configured with the OIDC auth provider. +- Updated dependencies + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.2.1 ### Patch Changes diff --git a/plugins/kubernetes-react/package.json b/plugins/kubernetes-react/package.json index d85cb7ba35..0d722402ba 100644 --- a/plugins/kubernetes-react/package.json +++ b/plugins/kubernetes-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-kubernetes-react", "description": "Web library for the kubernetes-react plugin", - "version": "0.2.1", + "version": "0.3.0-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 6f2cc8a23d..7cee4eda45 100644 --- a/plugins/kubernetes/CHANGELOG.md +++ b/plugins/kubernetes/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-kubernetes +## 0.11.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-kubernetes-react@0.3.0-next.0 + - @backstage/plugin-kubernetes-common@0.7.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.11.4 ### Patch Changes diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 858cc7a3c4..39a7a938a2 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.11.4", + "version": "0.11.5-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/lighthouse-backend/CHANGELOG.md b/plugins/lighthouse-backend/CHANGELOG.md index c41667aab4..ddfbe1a7c5 100644 --- a/plugins/lighthouse-backend/CHANGELOG.md +++ b/plugins/lighthouse-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-lighthouse-backend +## 0.4.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-lighthouse-common@0.1.4 + ## 0.4.1 ### Patch Changes diff --git a/plugins/lighthouse-backend/package.json b/plugins/lighthouse-backend/package.json index ac9c844456..9006c24488 100644 --- a/plugins/lighthouse-backend/package.json +++ b/plugins/lighthouse-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-lighthouse-backend", "description": "Backend functionalities for lighthouse", - "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/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md index 92d919b657..e93b449c5e 100644 --- a/plugins/lighthouse/CHANGELOG.md +++ b/plugins/lighthouse/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-lighthouse +## 0.4.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-lighthouse-common@0.1.4 + ## 0.4.14 ### Patch Changes diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index b71039ce2e..104396d6d4 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.4.14", + "version": "0.4.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/linguist-backend/CHANGELOG.md b/plugins/linguist-backend/CHANGELOG.md index 439c15066a..dd2ca24981 100644 --- a/plugins/linguist-backend/CHANGELOG.md +++ b/plugins/linguist-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-linguist-backend +## 0.5.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-linguist-common@0.1.2 + ## 0.5.6 ### Patch Changes diff --git a/plugins/linguist-backend/package.json b/plugins/linguist-backend/package.json index 6f137ad5f6..7acae2049c 100644 --- a/plugins/linguist-backend/package.json +++ b/plugins/linguist-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-linguist-backend", - "version": "0.5.6", + "version": "0.5.7-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/linguist/CHANGELOG.md b/plugins/linguist/CHANGELOG.md index 7e96d237e6..866d1f94f6 100644 --- a/plugins/linguist/CHANGELOG.md +++ b/plugins/linguist/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-linguist +## 0.1.15-next.0 + +### Patch Changes + +- 995d280: Updated imports from named to default imports to help with the Material UI v4 to v5 migration +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-linguist-common@0.1.2 + ## 0.1.14 ### Patch Changes diff --git a/plugins/linguist/package.json b/plugins/linguist/package.json index ed38f881de..6f20f2b007 100644 --- a/plugins/linguist/package.json +++ b/plugins/linguist/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-linguist", - "version": "0.1.14", + "version": "0.1.15-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 8b5a6e560a..ac5d043efe 100644 --- a/plugins/newrelic-dashboard/CHANGELOG.md +++ b/plugins/newrelic-dashboard/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-newrelic-dashboard +## 0.3.5-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.3.4 ### Patch Changes diff --git a/plugins/newrelic-dashboard/package.json b/plugins/newrelic-dashboard/package.json index 981441b479..e5a63a6971 100644 --- a/plugins/newrelic-dashboard/package.json +++ b/plugins/newrelic-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic-dashboard", - "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/nomad-backend/CHANGELOG.md b/plugins/nomad-backend/CHANGELOG.md index 786da63c37..2c93b3a3d0 100644 --- a/plugins/nomad-backend/CHANGELOG.md +++ b/plugins/nomad-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-nomad-backend +## 0.1.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.1.11 ### Patch Changes diff --git a/plugins/nomad-backend/package.json b/plugins/nomad-backend/package.json index d206b12398..c44721a581 100644 --- a/plugins/nomad-backend/package.json +++ b/plugins/nomad-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-nomad-backend", - "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/nomad/CHANGELOG.md b/plugins/nomad/CHANGELOG.md index 2640dca7bc..e9d5afb1a1 100644 --- a/plugins/nomad/CHANGELOG.md +++ b/plugins/nomad/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-nomad +## 0.1.11-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.10 ### Patch Changes diff --git a/plugins/nomad/package.json b/plugins/nomad/package.json index 90df893a93..17c345c761 100644 --- a/plugins/nomad/package.json +++ b/plugins/nomad/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-nomad", - "version": "0.1.10", + "version": "0.1.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/octopus-deploy/CHANGELOG.md b/plugins/octopus-deploy/CHANGELOG.md index 2acdc81710..ce7de86809 100644 --- a/plugins/octopus-deploy/CHANGELOG.md +++ b/plugins/octopus-deploy/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-octopus-deploy +## 0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.2.11 ### Patch Changes diff --git a/plugins/octopus-deploy/package.json b/plugins/octopus-deploy/package.json index 03dd65d5e8..f37205e60b 100644 --- a/plugins/octopus-deploy/package.json +++ b/plugins/octopus-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-octopus-deploy", - "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/org-react/CHANGELOG.md b/plugins/org-react/CHANGELOG.md index b56074f2cd..294d0f50d5 100644 --- a/plugins/org-react/CHANGELOG.md +++ b/plugins/org-react/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-org-react +## 0.1.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.1.18 ### Patch Changes diff --git a/plugins/org-react/package.json b/plugins/org-react/package.json index 07ae6b82b0..f07229e557 100644 --- a/plugins/org-react/package.json +++ b/plugins/org-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-org-react", - "version": "0.1.18", + "version": "0.1.19-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 c36bf88714..1d2534ee4d 100644 --- a/plugins/org/CHANGELOG.md +++ b/plugins/org/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-org +## 0.6.20-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-catalog-common@1.0.20 + ## 0.6.19 ### Patch Changes diff --git a/plugins/org/package.json b/plugins/org/package.json index c4035a8498..1050876a7b 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.6.19", + "version": "0.6.20-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 8e48fcf210..a97f2a9085 100644 --- a/plugins/pagerduty/CHANGELOG.md +++ b/plugins/pagerduty/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-pagerduty +## 0.7.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-home-react@0.1.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.7.1 ### Patch Changes diff --git a/plugins/pagerduty/package.json b/plugins/pagerduty/package.json index 2526d7ca99..383a7191bb 100644 --- a/plugins/pagerduty/package.json +++ b/plugins/pagerduty/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-pagerduty", "description": "This plugin has been deprecated, consider using [@pagerduty/backstage-plugin](https://github.com/pagerduty/backstage-plugin) instead.", - "version": "0.7.1", + "version": "0.7.2-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 2a94efd57e..a524779ac9 100644 --- a/plugins/periskop-backend/CHANGELOG.md +++ b/plugins/periskop-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-periskop-backend +## 0.2.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.2.7 ### Patch Changes diff --git a/plugins/periskop-backend/package.json b/plugins/periskop-backend/package.json index 992e047346..c342cf6ad4 100644 --- a/plugins/periskop-backend/package.json +++ b/plugins/periskop-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop-backend", - "version": "0.2.7", + "version": "0.2.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 b29b672e96..2b9409f9fa 100644 --- a/plugins/periskop/CHANGELOG.md +++ b/plugins/periskop/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-periskop +## 0.1.28-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.1.27 ### Patch Changes diff --git a/plugins/periskop/package.json b/plugins/periskop/package.json index acb7a68241..f8f5f02fbd 100644 --- a/plugins/periskop/package.json +++ b/plugins/periskop/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-periskop", - "version": "0.1.27", + "version": "0.1.28-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md b/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md index e5e4d93fa3..14855fcb35 100644 --- a/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md +++ b/plugins/permission-backend-module-policy-allow-all/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-permission-backend-module-allow-all-policy +## 0.1.7-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/plugin-permission-common@0.7.12 + ## 0.1.6 ### Patch Changes diff --git a/plugins/permission-backend-module-policy-allow-all/package.json b/plugins/permission-backend-module-policy-allow-all/package.json index f03a5481d3..e607bc84f3 100644 --- a/plugins/permission-backend-module-policy-allow-all/package.json +++ b/plugins/permission-backend-module-policy-allow-all/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-permission-backend-module-allow-all-policy", "description": "Allow all policy backend module for the permission plugin.", - "version": "0.1.6", + "version": "0.1.7-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 43c5e85b4f..287d320d61 100644 --- a/plugins/permission-backend/CHANGELOG.md +++ b/plugins/permission-backend/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-permission-backend +## 0.5.33-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + ## 0.5.32 ### Patch Changes diff --git a/plugins/permission-backend/package.json b/plugins/permission-backend/package.json index c8c908eccb..eb1f04273f 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.32", + "version": "0.5.33-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/permission-node/CHANGELOG.md b/plugins/permission-node/CHANGELOG.md index 5f66d4a337..9a954e9aca 100644 --- a/plugins/permission-node/CHANGELOG.md +++ b/plugins/permission-node/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-permission-node +## 0.7.21-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + ## 0.7.20 ### Patch Changes diff --git a/plugins/permission-node/package.json b/plugins/permission-node/package.json index 5ce7217d6c..168fbdaa81 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.7.20", + "version": "0.7.21-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 00e1c5be53..a4428bc5fe 100644 --- a/plugins/playlist-backend/CHANGELOG.md +++ b/plugins/playlist-backend/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-playlist-backend +## 0.3.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-playlist-common@0.1.14 + ## 0.3.13 ### Patch Changes diff --git a/plugins/playlist-backend/package.json b/plugins/playlist-backend/package.json index 8b872b6e67..976ae79ce1 100644 --- a/plugins/playlist-backend/package.json +++ b/plugins/playlist-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist-backend", - "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/playlist/CHANGELOG.md b/plugins/playlist/CHANGELOG.md index f35b2a149a..7c90e8f956 100644 --- a/plugins/playlist/CHANGELOG.md +++ b/plugins/playlist/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-playlist +## 0.2.4-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-permission-react@0.4.19 + - @backstage/plugin-playlist-common@0.1.14 + ## 0.2.3 ### Patch Changes diff --git a/plugins/playlist/package.json b/plugins/playlist/package.json index 34d2911685..9f9cbd6724 100644 --- a/plugins/playlist/package.json +++ b/plugins/playlist/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-playlist", - "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/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md index e6649758f7..49c650ce3e 100644 --- a/plugins/proxy-backend/CHANGELOG.md +++ b/plugins/proxy-backend/CHANGELOG.md @@ -1,5 +1,14 @@ # @backstage/plugin-proxy-backend +## 0.4.8-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + ## 0.4.7 ### Patch Changes diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 1e042a1bdc..eac4fa43e6 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.4.7", + "version": "0.4.8-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/puppetdb/CHANGELOG.md b/plugins/puppetdb/CHANGELOG.md index 9e8b991e02..255ac0f314 100644 --- a/plugins/puppetdb/CHANGELOG.md +++ b/plugins/puppetdb/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-puppetdb +## 0.1.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.1.12 ### Patch Changes diff --git a/plugins/puppetdb/package.json b/plugins/puppetdb/package.json index 0d1cc3d44e..005950f3a6 100644 --- a/plugins/puppetdb/package.json +++ b/plugins/puppetdb/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-puppetdb", "description": "Backstage plugin to visualize resource information and Puppet facts from PuppetDB.", - "version": "0.1.12", + "version": "0.1.13-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 4c14f2c9f9..c52f70327b 100644 --- a/plugins/rollbar-backend/CHANGELOG.md +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -1,5 +1,13 @@ # @backstage/plugin-rollbar-backend +## 0.1.55-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + ## 0.1.54 ### Patch Changes diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 730bc3e6f3..de6526701b 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.54", + "version": "0.1.55-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 494dce0fe9..ced8ca89fa 100644 --- a/plugins/rollbar/CHANGELOG.md +++ b/plugins/rollbar/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-rollbar +## 0.4.30-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.4.29 ### Patch Changes diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index a49254e366..a3898e64d3 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.29", + "version": "0.4.30-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend-module-azure/CHANGELOG.md b/plugins/scaffolder-backend-module-azure/CHANGELOG.md index 3f56f61339..50b2070b72 100644 --- a/plugins/scaffolder-backend-module-azure/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-azure/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-azure +## 0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-azure/api-report.md b/plugins/scaffolder-backend-module-azure/api-report.md index 427ed2d1bf..d48d00e0e0 100644 --- a/plugins/scaffolder-backend-module-azure/api-report.md +++ b/plugins/scaffolder-backend-module-azure/api-report.md @@ -3,11 +3,16 @@ > 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 { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; +// @public +const azureModule: () => BackendFeature; +export default azureModule; + // @public export function createPublishAzureAction(options: { integrations: ScmIntegrationRegistry; diff --git a/plugins/scaffolder-backend-module-azure/package.json b/plugins/scaffolder-backend-module-azure/package.json index ce53811f15..2613104d7a 100644 --- a/plugins/scaffolder-backend-module-azure/package.json +++ b/plugins/scaffolder-backend-module-azure/package.json @@ -1,18 +1,27 @@ { "name": "@backstage/plugin-scaffolder-backend-module-azure", "description": "The azure module for @backstage/plugin-scaffolder-backend", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -24,6 +33,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-azure/src/index.ts b/plugins/scaffolder-backend-module-azure/src/index.ts index e804f1a504..b5650d8723 100644 --- a/plugins/scaffolder-backend-module-azure/src/index.ts +++ b/plugins/scaffolder-backend-module-azure/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { azureModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-azure/src/module.ts b/plugins/scaffolder-backend-module-azure/src/module.ts new file mode 100644 index 0000000000..40ca3f0978 --- /dev/null +++ b/plugins/scaffolder-backend-module-azure/src/module.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2024 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 { + createBackendModule, + coreServices, +} from '@backstage/backend-plugin-api'; +import { ScmIntegrations } from '@backstage/integration'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createPublishAzureAction } from './actions'; + +/** + * @public + * The Azure Module for the Scaffolder Backend + */ +export const azureModule = createBackendModule({ + moduleId: 'azure', + pluginId: 'scaffolder', + register({ registerInit }) { + registerInit({ + deps: { + scaffolderActions: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + }, + async init({ scaffolderActions, config }) { + const integrations = ScmIntegrations.fromConfig(config); + scaffolderActions.addActions( + createPublishAzureAction({ + integrations, + config, + }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md index c94898c953..9a0344eed8 100644 --- a/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-bitbucket/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-bitbucket +## 0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- fc98bb6: Enhanced the pull request action to allow for adding new content to the PR as described in this issue #21762 +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-bitbucket/api-report.md b/plugins/scaffolder-backend-module-bitbucket/api-report.md index 0f5f09b5b8..7540b0c113 100644 --- a/plugins/scaffolder-backend-module-bitbucket/api-report.md +++ b/plugins/scaffolder-backend-module-bitbucket/api-report.md @@ -3,11 +3,16 @@ > 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 { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; +// @public +const bitbucketModule: () => BackendFeature; +export default bitbucketModule; + // @public export const createBitbucketPipelinesRunAction: (options: { integrations: ScmIntegrationRegistry; diff --git a/plugins/scaffolder-backend-module-bitbucket/package.json b/plugins/scaffolder-backend-module-bitbucket/package.json index 03ebab43fc..6f02655692 100644 --- a/plugins/scaffolder-backend-module-bitbucket/package.json +++ b/plugins/scaffolder-backend-module-bitbucket/package.json @@ -1,18 +1,27 @@ { "name": "@backstage/plugin-scaffolder-backend-module-bitbucket", "description": "The bitbucket module for @backstage/plugin-scaffolder-backend", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -24,10 +33,12 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", "@backstage/plugin-scaffolder-node": "workspace:^", + "fs-extra": "10.1.0", "node-fetch": "^2.6.7", "yaml": "^2.0.0" }, diff --git a/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucketServerPullRequest.ts b/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucketServerPullRequest.ts index dc75145ebc..fc123f0b80 100644 --- a/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucketServerPullRequest.ts +++ b/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucketServerPullRequest.ts @@ -21,10 +21,16 @@ import { } from '@backstage/integration'; import { createTemplateAction, + getRepoSourceDirectory, + commitAndPushBranch, + addFiles, + createBranch as createGitBranch, + cloneRepo, parseRepoUrl, } from '@backstage/plugin-scaffolder-node'; import fetch, { RequestInit, Response } from 'node-fetch'; import { Config } from '@backstage/config'; +import fs from 'fs-extra'; const createPullRequest = async (opts: { project: string; @@ -152,7 +158,51 @@ const findBranches = async (opts: { return undefined; }; +const createBranch = async (opts: { + project: string; + repo: string; + branchName: string; + authorization: string; + apiBaseUrl: string; + startPoint: string; +}) => { + const { project, repo, branchName, authorization, apiBaseUrl, startPoint } = + opts; + let response: Response; + const options: RequestInit = { + method: 'POST', + body: JSON.stringify({ + name: branchName, + startPoint, + }), + headers: { + Authorization: authorization, + 'Content-Type': 'application/json', + }, + }; + + try { + response = await fetch( + `${apiBaseUrl}/projects/${encodeURIComponent( + project, + )}/repos/${encodeURIComponent(repo)}/branches`, + options, + ); + } catch (e) { + throw new Error(`Unable to create branch, ${e}`); + } + + if (response.status !== 200) { + throw new Error( + `Unable to create branch, ${response.status} ${ + response.statusText + }, ${await response.text()}`, + ); + } + + return await response.json(); +}; /** * Creates a BitbucketServer Pull Request action. * @public @@ -161,7 +211,7 @@ export function createPublishBitbucketServerPullRequestAction(options: { integrations: ScmIntegrationRegistry; config: Config; }) { - const { integrations } = options; + const { integrations, config } = options; return createTemplateAction<{ repoUrl: string; @@ -268,7 +318,7 @@ export function createPublishBitbucketServerPullRequestAction(options: { apiBaseUrl, }); - const fromRef = await findBranches({ + let fromRef = await findBranches({ project, repo, branchName: sourceBranch, @@ -276,6 +326,83 @@ export function createPublishBitbucketServerPullRequestAction(options: { apiBaseUrl, }); + if (!fromRef) { + // create branch + ctx.logger.info( + `source branch not found -> creating branch named: ${sourceBranch} lastCommit: ${toRef.latestCommit}`, + ); + const latestCommit = toRef.latestCommit; + + fromRef = await createBranch({ + project, + repo, + branchName: sourceBranch, + authorization, + apiBaseUrl, + startPoint: latestCommit, + }); + + const remoteUrl = `https://${host}/scm/${project}/${repo}.git`; + + const auth = authConfig.token + ? { + token: token!, + } + : { + username: authConfig.username!, + password: authConfig.password!, + }; + + const gitAuthorInfo = { + name: config.getOptionalString('scaffolder.defaultAuthor.name'), + email: config.getOptionalString('scaffolder.defaultAuthor.email'), + }; + + const tempDir = await ctx.createTemporaryDirectory(); + const sourceDir = getRepoSourceDirectory(ctx.workspacePath, undefined); + await cloneRepo({ + url: remoteUrl, + dir: tempDir, + auth, + logger: ctx.logger, + ref: sourceBranch, + }); + + await createGitBranch({ + dir: tempDir, + auth, + logger: ctx.logger, + ref: sourceBranch, + }); + + // copy files + fs.cpSync(sourceDir, tempDir, { + recursive: true, + filter: path => { + return !(path.indexOf('.git') > -1); + }, + }); + + await addFiles({ + dir: tempDir, + auth, + logger: ctx.logger, + filepath: '.', + }); + + await commitAndPushBranch({ + dir: tempDir, + auth, + logger: ctx.logger, + commitMessage: + description ?? + config.getOptionalString('scaffolder.defaultCommitMessage') ?? + '', + gitAuthorInfo, + branch: sourceBranch, + }); + } + const pullRequestUrl = await createPullRequest({ project, repo, diff --git a/plugins/scaffolder-backend-module-bitbucket/src/index.ts b/plugins/scaffolder-backend-module-bitbucket/src/index.ts index 38d973efb8..26f186b6dc 100644 --- a/plugins/scaffolder-backend-module-bitbucket/src/index.ts +++ b/plugins/scaffolder-backend-module-bitbucket/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { bitbucketModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-bitbucket/src/module.ts b/plugins/scaffolder-backend-module-bitbucket/src/module.ts new file mode 100644 index 0000000000..19554270a7 --- /dev/null +++ b/plugins/scaffolder-backend-module-bitbucket/src/module.ts @@ -0,0 +1,57 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { + createBitbucketPipelinesRunAction, + createPublishBitbucketCloudAction, + createPublishBitbucketServerAction, + createPublishBitbucketServerPullRequestAction, +} from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The Bitbucket Module for the Scaffolder Backend + */ +export const bitbucketModule = createBackendModule({ + moduleId: 'bitbucket', + pluginId: 'scaffolder', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + }, + async init({ scaffolder, config }) { + const integrations = ScmIntegrations.fromConfig(config); + + scaffolder.addActions( + createPublishBitbucketCloudAction({ integrations, config }), + createPublishBitbucketServerAction({ integrations, config }), + createPublishBitbucketServerPullRequestAction({ + integrations, + config, + }), + createBitbucketPipelinesRunAction({ integrations }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md index 075d8db3b9..1b943777b0 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-confluence-to-markdown +## 0.2.11-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.2.10 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md b/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md index 70428f118c..e5701bfadb 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/api-report.md @@ -3,12 +3,17 @@ > 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 { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; import { UrlReader } from '@backstage/backend-common'; +// @public +const confluenceToMarkdownModule: () => BackendFeature; +export default confluenceToMarkdownModule; + // @public (undocumented) export const createConfluenceToMarkdownAction: (options: { reader: UrlReader; diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json index 2f0bd5188c..cf23ba1ba4 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/package.json +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/package.json @@ -1,14 +1,12 @@ { "name": "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown", "description": "The confluence-to-markdown module for @backstage/plugin-scaffolder-backend", - "version": "0.2.10", + "version": "0.2.11-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" @@ -19,6 +17,17 @@ "url": "https://github.com/backstage/backstage", "directory": "plugins/scaffolder-backend-module-confluence-to-markdown" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -31,6 +40,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/src/index.ts b/plugins/scaffolder-backend-module-confluence-to-markdown/src/index.ts index 80d2e35cb3..04dd3d3221 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/src/index.ts +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { confluenceToMarkdownModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/src/module.ts b/plugins/scaffolder-backend-module-confluence-to-markdown/src/module.ts new file mode 100644 index 0000000000..402f56c951 --- /dev/null +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/src/module.ts @@ -0,0 +1,50 @@ +/* + * Copyright 2024 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 { + createBackendModule, + coreServices, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createConfluenceToMarkdownAction } from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The Confluence to Markdown Module for the Scaffolder Backend + */ +export const confluenceToMarkdownModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'confluence-to-markdown', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + reader: coreServices.urlReader, + }, + async init({ scaffolder, config, reader }) { + const integrations = ScmIntegrations.fromConfig(config); + scaffolder.addActions( + createConfluenceToMarkdownAction({ + config, + integrations, + reader, + }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md index 541255a2d0..021b21be3e 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-cookiecutter/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-scaffolder-backend-module-cookiecutter +## 0.2.34-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + ## 0.2.33 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-cookiecutter/api-report.md b/plugins/scaffolder-backend-module-cookiecutter/api-report.md index 927d4b4c55..ed2b044189 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/api-report.md +++ b/plugins/scaffolder-backend-module-cookiecutter/api-report.md @@ -5,12 +5,17 @@ ```ts /// +import { BackendFeature } from '@backstage/backend-plugin-api'; import { ContainerRunner } from '@backstage/backend-common'; import { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; import { UrlReader } from '@backstage/backend-common'; +// @public +const cookiecutterModule: () => BackendFeature; +export default cookiecutterModule; + // @public export function createFetchCookiecutterAction(options: { reader: UrlReader; diff --git a/plugins/scaffolder-backend-module-cookiecutter/package.json b/plugins/scaffolder-backend-module-cookiecutter/package.json index 98e96a491d..32536047d1 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/package.json +++ b/plugins/scaffolder-backend-module-cookiecutter/package.json @@ -1,14 +1,12 @@ { "name": "@backstage/plugin-scaffolder-backend-module-cookiecutter", "description": "A module for the scaffolder backend that lets you template projects using cookiecutter", - "version": "0.2.33", + "version": "0.2.34-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" @@ -19,6 +17,17 @@ "url": "https://github.com/backstage/backstage", "directory": "plugins/scaffolder-backend-module-cookiecutter" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -30,6 +39,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-cookiecutter/src/index.ts b/plugins/scaffolder-backend-module-cookiecutter/src/index.ts index 4f0ba9a407..c6df8295d1 100644 --- a/plugins/scaffolder-backend-module-cookiecutter/src/index.ts +++ b/plugins/scaffolder-backend-module-cookiecutter/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { cookiecutterModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-cookiecutter/src/module.ts b/plugins/scaffolder-backend-module-cookiecutter/src/module.ts new file mode 100644 index 0000000000..df1b201518 --- /dev/null +++ b/plugins/scaffolder-backend-module-cookiecutter/src/module.ts @@ -0,0 +1,46 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createFetchCookiecutterAction } from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The Cookiecutter Module for the Scaffolder Backend + */ +export const cookiecutterModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'cookiecutter', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + reader: coreServices.urlReader, + }, + async init({ scaffolder, config, reader }) { + const integrations = ScmIntegrations.fromConfig(config); + scaffolder.addActions( + createFetchCookiecutterAction({ reader, integrations }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md index 361549275a..0b0d09dbbd 100644 --- a/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gerrit/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-scaffolder-backend-module-gerrit +## 0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gerrit/api-report.md b/plugins/scaffolder-backend-module-gerrit/api-report.md index 309de08574..e61de671a8 100644 --- a/plugins/scaffolder-backend-module-gerrit/api-report.md +++ b/plugins/scaffolder-backend-module-gerrit/api-report.md @@ -3,6 +3,7 @@ > 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 { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -40,4 +41,8 @@ export function createPublishGerritReviewAction(options: { }, JsonObject >; + +// @public +const gerritModule: () => BackendFeature; +export default gerritModule; ``` diff --git a/plugins/scaffolder-backend-module-gerrit/package.json b/plugins/scaffolder-backend-module-gerrit/package.json index 59159560b5..a1d3110bff 100644 --- a/plugins/scaffolder-backend-module-gerrit/package.json +++ b/plugins/scaffolder-backend-module-gerrit/package.json @@ -1,18 +1,27 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gerrit", "description": "The gerrit module for @backstage/plugin-scaffolder-backend", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -23,6 +32,7 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-gerrit/src/index.ts b/plugins/scaffolder-backend-module-gerrit/src/index.ts index b00c307fa5..a3c54a4ec7 100644 --- a/plugins/scaffolder-backend-module-gerrit/src/index.ts +++ b/plugins/scaffolder-backend-module-gerrit/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { gerritModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-gerrit/src/module.ts b/plugins/scaffolder-backend-module-gerrit/src/module.ts new file mode 100644 index 0000000000..32607431f3 --- /dev/null +++ b/plugins/scaffolder-backend-module-gerrit/src/module.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { + createPublishGerritAction, + createPublishGerritReviewAction, +} from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The Gerrit Module for the Scaffolder Backend + */ +export const gerritModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'geritt', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + }, + async init({ scaffolder, config }) { + const integrations = ScmIntegrations.fromConfig(config); + scaffolder.addActions( + createPublishGerritAction({ integrations, config }), + createPublishGerritReviewAction({ integrations, config }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-github/CHANGELOG.md b/plugins/scaffolder-backend-module-github/CHANGELOG.md index 0f0ce0a045..88f68d392e 100644 --- a/plugins/scaffolder-backend-module-github/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-github/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-github +## 0.1.2-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.1.1 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-github/api-report.md b/plugins/scaffolder-backend-module-github/api-report.md index 920be79d12..d6a759dfa6 100644 --- a/plugins/scaffolder-backend-module-github/api-report.md +++ b/plugins/scaffolder-backend-module-github/api-report.md @@ -3,6 +3,7 @@ > 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 { createPullRequest } from 'octokit-plugin-create-pull-request'; import { GithubCredentialsProvider } from '@backstage/integration'; @@ -377,4 +378,8 @@ export const createPublishGithubPullRequestAction: ( }, JsonObject >; + +// @public +const githubModule: () => BackendFeature; +export default githubModule; ``` diff --git a/plugins/scaffolder-backend-module-github/package.json b/plugins/scaffolder-backend-module-github/package.json index b035096dad..8e0272c876 100644 --- a/plugins/scaffolder-backend-module-github/package.json +++ b/plugins/scaffolder-backend-module-github/package.json @@ -1,18 +1,27 @@ { "name": "@backstage/plugin-scaffolder-backend-module-github", "description": "The github module for @backstage/plugin-scaffolder-backend", - "version": "0.1.1", + "version": "0.1.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -24,6 +33,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-github/src/index.ts b/plugins/scaffolder-backend-module-github/src/index.ts index 948a79d957..219ba54dbb 100644 --- a/plugins/scaffolder-backend-module-github/src/index.ts +++ b/plugins/scaffolder-backend-module-github/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { githubModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-github/src/module.ts b/plugins/scaffolder-backend-module-github/src/module.ts new file mode 100644 index 0000000000..79c954a6dd --- /dev/null +++ b/plugins/scaffolder-backend-module-github/src/module.ts @@ -0,0 +1,97 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { + createGithubActionsDispatchAction, + createGithubAutolinksAction, + createGithubDeployKeyAction, + createGithubEnvironmentAction, + createGithubIssuesLabelAction, + createGithubRepoCreateAction, + createGithubRepoPushAction, + createGithubWebhookAction, + createPublishGithubAction, + createPublishGithubPullRequestAction, +} from './actions'; +import { + DefaultGithubCredentialsProvider, + ScmIntegrations, +} from '@backstage/integration'; + +/** + * @public + * The GitHub Module for the Scaffolder Backend + */ +export const githubModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'github', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + }, + async init({ scaffolder, config }) { + const integrations = ScmIntegrations.fromConfig(config); + const githubCredentialsProvider = + DefaultGithubCredentialsProvider.fromIntegrations(integrations); + + scaffolder.addActions( + createGithubActionsDispatchAction({ + integrations, + githubCredentialsProvider, + }), + createGithubAutolinksAction({ + integrations, + githubCredentialsProvider, + }), + createGithubDeployKeyAction({ + integrations, + }), + createGithubEnvironmentAction({ + integrations, + }), + createGithubIssuesLabelAction({ + integrations, + githubCredentialsProvider, + }), + createGithubRepoCreateAction({ + integrations, + githubCredentialsProvider, + }), + createGithubRepoPushAction({ integrations, config }), + createGithubWebhookAction({ + integrations, + githubCredentialsProvider, + }), + createPublishGithubAction({ + integrations, + config, + githubCredentialsProvider, + }), + createPublishGithubPullRequestAction({ + integrations, + githubCredentialsProvider, + }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md index 9c7d462cda..fe7abefeda 100644 --- a/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-gitlab/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-backend-module-gitlab +## 0.2.13-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.2.12 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-gitlab/api-report.md b/plugins/scaffolder-backend-module-gitlab/api-report.md index 9b3eec5cdf..94aabe9b72 100644 --- a/plugins/scaffolder-backend-module-gitlab/api-report.md +++ b/plugins/scaffolder-backend-module-gitlab/api-report.md @@ -3,6 +3,7 @@ > 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 { JsonObject } from '@backstage/types'; import { ScmIntegrationRegistry } from '@backstage/integration'; @@ -191,6 +192,10 @@ export const createPublishGitlabMergeRequestAction: (options: { JsonObject >; +// @public +const gitlabModule: () => BackendFeature; +export default gitlabModule; + // @public export enum IssueType { // (undocumented) diff --git a/plugins/scaffolder-backend-module-gitlab/package.json b/plugins/scaffolder-backend-module-gitlab/package.json index ca7e90f8c8..bf709c6b7f 100644 --- a/plugins/scaffolder-backend-module-gitlab/package.json +++ b/plugins/scaffolder-backend-module-gitlab/package.json @@ -1,13 +1,11 @@ { "name": "@backstage/plugin-scaffolder-backend-module-gitlab", - "version": "0.2.12", + "version": "0.2.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" @@ -21,6 +19,17 @@ "keywords": [ "backstage" ], + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "start": "backstage-cli package start", "build": "backstage-cli package build", @@ -32,6 +41,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-gitlab/src/index.ts b/plugins/scaffolder-backend-module-gitlab/src/index.ts index 11d4247569..628b892296 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/index.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { gitlabModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-gitlab/src/module.ts b/plugins/scaffolder-backend-module-gitlab/src/module.ts new file mode 100644 index 0000000000..3571575827 --- /dev/null +++ b/plugins/scaffolder-backend-module-gitlab/src/module.ts @@ -0,0 +1,62 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { + createGitlabGroupEnsureExistsAction, + createGitlabIssueAction, + createGitlabProjectAccessTokenAction, + createGitlabProjectDeployTokenAction, + createGitlabProjectVariableAction, + createGitlabRepoPushAction, + createPublishGitlabAction, + createPublishGitlabMergeRequestAction, +} from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The GitLab Module for the Scaffolder Backend + */ +export const gitlabModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'gitlab', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + }, + async init({ scaffolder, config }) { + const integrations = ScmIntegrations.fromConfig(config); + + scaffolder.addActions( + createGitlabGroupEnsureExistsAction({ integrations }), + createGitlabIssueAction({ integrations }), + createGitlabProjectAccessTokenAction({ integrations }), + createGitlabProjectDeployTokenAction({ integrations }), + createGitlabProjectVariableAction({ integrations }), + createGitlabRepoPushAction({ integrations }), + createPublishGitlabAction({ config, integrations }), + createPublishGitlabMergeRequestAction({ integrations }), + ); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-rails/CHANGELOG.md b/plugins/scaffolder-backend-module-rails/CHANGELOG.md index a923feec27..e3aa1f0fe9 100644 --- a/plugins/scaffolder-backend-module-rails/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-rails/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-scaffolder-backend-module-rails +## 0.4.27-next.0 + +### Patch Changes + +- e9a5228: Make `containerRunner` argument optional +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + ## 0.4.26 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-rails/api-report.md b/plugins/scaffolder-backend-module-rails/api-report.md index 06b7dc457f..33ad052b14 100644 --- a/plugins/scaffolder-backend-module-rails/api-report.md +++ b/plugins/scaffolder-backend-module-rails/api-report.md @@ -3,6 +3,7 @@ > 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 { ContainerRunner } from '@backstage/backend-common'; import { JsonObject } from '@backstage/types'; import { ScmIntegrations } from '@backstage/integration'; @@ -13,7 +14,7 @@ import { UrlReader } from '@backstage/backend-common'; export function createFetchRailsAction(options: { reader: UrlReader; integrations: ScmIntegrations; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; allowedImageNames?: string[]; }): TemplateAction< { @@ -24,4 +25,8 @@ export function createFetchRailsAction(options: { }, JsonObject >; + +// @public +const railsModule: () => BackendFeature; +export default railsModule; ``` diff --git a/plugins/scaffolder-backend-module-rails/package.json b/plugins/scaffolder-backend-module-rails/package.json index 65969643c1..6c52665976 100644 --- a/plugins/scaffolder-backend-module-rails/package.json +++ b/plugins/scaffolder-backend-module-rails/package.json @@ -1,14 +1,12 @@ { "name": "@backstage/plugin-scaffolder-backend-module-rails", "description": "A module for the scaffolder backend that lets you template projects using Rails", - "version": "0.4.26", + "version": "0.4.27-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" @@ -19,6 +17,17 @@ "url": "https://github.com/backstage/backstage", "directory": "plugins/scaffolder-backend-module-rails" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "scripts": { "build": "backstage-cli package build", "start": "backstage-cli package start", @@ -30,6 +39,7 @@ }, "dependencies": { "@backstage/backend-common": "workspace:^", + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/integration": "workspace:^", diff --git a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.ts b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.ts index 2b34f978e3..dfc7bea418 100644 --- a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.ts +++ b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/index.ts @@ -40,7 +40,7 @@ import { RailsNewRunner } from './railsNewRunner'; export function createFetchRailsAction(options: { reader: UrlReader; integrations: ScmIntegrations; - containerRunner: ContainerRunner; + containerRunner?: ContainerRunner; /** A list of image names that are allowed to be passed as imageName input */ allowedImageNames?: string[]; }) { diff --git a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.ts b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.ts index 7e78c25d62..31cfea4a76 100644 --- a/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.ts +++ b/plugins/scaffolder-backend-module-rails/src/actions/fetch/rails/railsNewRunner.ts @@ -27,9 +27,9 @@ import { JsonObject } from '@backstage/types'; import { Writable } from 'stream'; export class RailsNewRunner { - private readonly containerRunner: ContainerRunner; + private readonly containerRunner?: ContainerRunner; - constructor({ containerRunner }: { containerRunner: ContainerRunner }) { + constructor({ containerRunner }: { containerRunner?: ContainerRunner }) { this.containerRunner = containerRunner; } @@ -77,6 +77,11 @@ export class RailsNewRunner { if (!imageName) { throw new Error('No imageName provided'); } + if (!this.containerRunner) { + throw new Error( + 'Command is not available and no container runner provided', + ); + } const arrayExtraArguments = railsArgumentResolver( '/input', railsArguments as RailsRunOptions, diff --git a/plugins/scaffolder-backend-module-rails/src/index.ts b/plugins/scaffolder-backend-module-rails/src/index.ts index 773e1feabd..ef89cc68d2 100644 --- a/plugins/scaffolder-backend-module-rails/src/index.ts +++ b/plugins/scaffolder-backend-module-rails/src/index.ts @@ -21,3 +21,4 @@ */ export * from './actions'; +export { railsModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-rails/src/module.ts b/plugins/scaffolder-backend-module-rails/src/module.ts new file mode 100644 index 0000000000..ec70610cd3 --- /dev/null +++ b/plugins/scaffolder-backend-module-rails/src/module.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createFetchRailsAction } from './actions'; +import { ScmIntegrations } from '@backstage/integration'; + +/** + * @public + * The Rails Module for the Scaffolder Backend + */ +export const railsModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'rails', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + reader: coreServices.urlReader, + }, + async init({ scaffolder, config, reader }) { + const integrations = ScmIntegrations.fromConfig(config); + + scaffolder.addActions(createFetchRailsAction({ integrations, reader })); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md index 5ba8dd0f05..a6a79787c2 100644 --- a/plugins/scaffolder-backend-module-sentry/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-sentry/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-scaffolder-backend-module-sentry +## 0.1.18-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.1.17 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-sentry/api-report.md b/plugins/scaffolder-backend-module-sentry/api-report.md index 746cce1348..960fe4ba24 100644 --- a/plugins/scaffolder-backend-module-sentry/api-report.md +++ b/plugins/scaffolder-backend-module-sentry/api-report.md @@ -3,6 +3,7 @@ > 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 { JsonObject } from '@backstage/types'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; @@ -21,5 +22,9 @@ export function createSentryCreateProjectAction(options: { JsonObject >; +// @public +const sentryModule: () => BackendFeature; +export default sentryModule; + // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/scaffolder-backend-module-sentry/package.json b/plugins/scaffolder-backend-module-sentry/package.json index 7828713d08..0039ad35a6 100644 --- a/plugins/scaffolder-backend-module-sentry/package.json +++ b/plugins/scaffolder-backend-module-sentry/package.json @@ -1,17 +1,26 @@ { "name": "@backstage/plugin-scaffolder-backend-module-sentry", - "version": "0.1.17", + "version": "0.1.18-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "homepage": "https://backstage.io", "repository": { "type": "git", @@ -28,6 +37,7 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", "@backstage/config": "workspace:^", "@backstage/errors": "workspace:^", "@backstage/plugin-scaffolder-node": "workspace:^", diff --git a/plugins/scaffolder-backend-module-sentry/src/alpha.ts b/plugins/scaffolder-backend-module-sentry/src/alpha.ts new file mode 100644 index 0000000000..94adcafa53 --- /dev/null +++ b/plugins/scaffolder-backend-module-sentry/src/alpha.ts @@ -0,0 +1,15 @@ +/* + * Copyright 2024 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. + */ diff --git a/plugins/scaffolder-backend-module-sentry/src/index.ts b/plugins/scaffolder-backend-module-sentry/src/index.ts index f6c0820874..dc1a68675b 100644 --- a/plugins/scaffolder-backend-module-sentry/src/index.ts +++ b/plugins/scaffolder-backend-module-sentry/src/index.ts @@ -15,3 +15,4 @@ */ export { createSentryCreateProjectAction } from './actions/createProject'; +export { sentryModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-sentry/src/module.ts b/plugins/scaffolder-backend-module-sentry/src/module.ts new file mode 100644 index 0000000000..dcde344262 --- /dev/null +++ b/plugins/scaffolder-backend-module-sentry/src/module.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2024 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 { + coreServices, + createBackendModule, +} from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createSentryCreateProjectAction } from './actions/createProject'; + +/** + * @public + * The Sentry Module for the Scaffolder Backend + */ +export const sentryModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'sentry', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + config: coreServices.rootConfig, + reade: coreServices.urlReader, + }, + async init({ scaffolder, config }) { + scaffolder.addActions(createSentryCreateProjectAction({ config })); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md index 1b4858dec9..b57b5a4c6e 100644 --- a/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md +++ b/plugins/scaffolder-backend-module-yeoman/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-scaffolder-backend-module-yeoman +## 0.2.31-next.0 + +### Patch Changes + +- e9a5228: Exporting a default module for the new Backend System +- Updated dependencies + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/types@1.1.1 + ## 0.2.30 ### Patch Changes diff --git a/plugins/scaffolder-backend-module-yeoman/api-report.md b/plugins/scaffolder-backend-module-yeoman/api-report.md index d8bdcb7b3b..b466ee152b 100644 --- a/plugins/scaffolder-backend-module-yeoman/api-report.md +++ b/plugins/scaffolder-backend-module-yeoman/api-report.md @@ -3,6 +3,7 @@ > 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 { JsonObject } from '@backstage/types'; import { TemplateAction } from '@backstage/plugin-scaffolder-node'; @@ -15,4 +16,8 @@ export function createRunYeomanAction(): TemplateAction< }, JsonObject >; + +// @public +const yeomanModule: () => BackendFeature; +export default yeomanModule; ``` diff --git a/plugins/scaffolder-backend-module-yeoman/package.json b/plugins/scaffolder-backend-module-yeoman/package.json index 94883084e4..68739803df 100644 --- a/plugins/scaffolder-backend-module-yeoman/package.json +++ b/plugins/scaffolder-backend-module-yeoman/package.json @@ -1,17 +1,26 @@ { "name": "@backstage/plugin-scaffolder-backend-module-yeoman", - "version": "0.2.30", + "version": "0.2.31-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "publishConfig": { - "access": "public", - "main": "dist/index.cjs.js", - "types": "dist/index.d.ts" + "access": "public" }, "backstage": { "role": "backend-plugin-module" }, + "exports": { + ".": "./src/index.ts", + "./package.json": "./package.json" + }, + "typesVersions": { + "*": { + "package.json": [ + "package.json" + ] + } + }, "homepage": "https://backstage.io", "repository": { "type": "git", @@ -28,6 +37,7 @@ "clean": "backstage-cli package clean" }, "dependencies": { + "@backstage/backend-plugin-api": "workspace:^", "@backstage/plugin-scaffolder-node": "workspace:^", "@backstage/types": "workspace:^", "winston": "^3.2.1", diff --git a/plugins/scaffolder-backend-module-yeoman/src/index.ts b/plugins/scaffolder-backend-module-yeoman/src/index.ts index 1aac8e12f9..97966d6c08 100644 --- a/plugins/scaffolder-backend-module-yeoman/src/index.ts +++ b/plugins/scaffolder-backend-module-yeoman/src/index.ts @@ -21,3 +21,4 @@ * @packageDocumentation */ export * from './actions'; +export { yeomanModule as default } from './module'; diff --git a/plugins/scaffolder-backend-module-yeoman/src/module.ts b/plugins/scaffolder-backend-module-yeoman/src/module.ts new file mode 100644 index 0000000000..1fdbda28a3 --- /dev/null +++ b/plugins/scaffolder-backend-module-yeoman/src/module.ts @@ -0,0 +1,37 @@ +/* + * Copyright 2024 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 { createBackendModule } from '@backstage/backend-plugin-api'; +import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; +import { createRunYeomanAction } from './actions'; + +/** + * @public + * The Yeoman Module for the Scaffolder Backend + */ +export const yeomanModule = createBackendModule({ + pluginId: 'scaffolder', + moduleId: 'yeoman', + register({ registerInit }) { + registerInit({ + deps: { + scaffolder: scaffolderActionsExtensionPoint, + }, + async init({ scaffolder }) { + scaffolder.addActions(createRunYeomanAction()); + }, + }); + }, +}); diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md index 2fb35e3d24..5e8c96ed91 100644 --- a/plugins/scaffolder-backend/CHANGELOG.md +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -1,5 +1,48 @@ # @backstage/plugin-scaffolder-backend +## 1.21.0-next.0 + +### Minor Changes + +- 11b9a08: Introduced the first version of recoverable tasks. +- e9a5228: The built-in module list has been trimmed down when using the new Backend System. Provider specific modules should now be installed with `backend.add` to provide additional actions to the scaffolder. These modules are as follows: + + - `@backstage/plugin-scaffolder-backend-module-github` + - `@backstage/plugin-scaffolder-backend-module-gitlab` + - `@backstage/plugin-scaffolder-backend-module-bitbucket` + - `@backstage/plugin-scaffolder-backend-module-gitea` + - `@backstage/plugin-scaffolder-backend-module-gerrit` + - `@backstage/plugin-scaffolder-backend-module-confluence-to-markdown` + - `@backstage/plugin-scaffolder-backend-module-cookiecutter` + - `@backstage/plugin-scaffolder-backend-module-rails` + - `@backstage/plugin-scaffolder-backend-module-sentry` + - `@backstage/plugin-scaffolder-backend-module-yeoman` + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-backend-module-bitbucket@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-gerrit@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-github@0.1.2-next.0 + - @backstage/plugin-scaffolder-backend-module-gitlab@0.2.13-next.0 + - @backstage/plugin-scaffolder-backend-module-azure@0.1.2-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-node@0.3.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.7-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + ## 1.20.0 ### Minor Changes diff --git a/plugins/scaffolder-backend/api-report.md b/plugins/scaffolder-backend/api-report.md index c928e5341e..cc16791390 100644 --- a/plugins/scaffolder-backend/api-report.md +++ b/plugins/scaffolder-backend/api-report.md @@ -20,6 +20,7 @@ import { HumanDuration } from '@backstage/types'; import { IdentityApi } from '@backstage/plugin-auth-node'; import { JsonObject } from '@backstage/types'; import { Knex } from 'knex'; +import { LifecycleService } from '@backstage/backend-plugin-api'; import { Logger } from 'winston'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; import { PermissionRule } from '@backstage/plugin-permission-node'; @@ -40,6 +41,7 @@ import { TaskBrokerDispatchResult as TaskBrokerDispatchResult_2 } from '@backsta import { TaskCompletionState as TaskCompletionState_2 } from '@backstage/plugin-scaffolder-node'; import { TaskContext as TaskContext_2 } from '@backstage/plugin-scaffolder-node'; import { TaskEventType as TaskEventType_2 } from '@backstage/plugin-scaffolder-node'; +import { TaskRecovery } from '@backstage/plugin-scaffolder-common'; import { TaskSecrets as TaskSecrets_2 } from '@backstage/plugin-scaffolder-node'; import { TaskSpec } from '@backstage/plugin-scaffolder-common'; import { TaskSpecV1beta3 } from '@backstage/plugin-scaffolder-common'; @@ -400,9 +402,14 @@ export class DatabaseTaskStore implements TaskStore { listStaleTasks(options: { timeoutS: number }): Promise<{ tasks: { taskId: string; + recovery?: TaskRecovery; }[]; }>; // (undocumented) + recoverTasks(options: TaskStoreRecoverTaskOptions): Promise<{ + ids: string[]; + }>; + // (undocumented) shutdownTask(options: TaskStoreShutDownTaskOptions): Promise; } @@ -435,6 +442,8 @@ export interface RouterOptions { // (undocumented) identity?: IdentityApi; // (undocumented) + lifecycle?: LifecycleService; + // (undocumented) logger: Logger; // (undocumented) permissionRules?: Array< @@ -552,6 +561,10 @@ export interface TaskStore { }[]; }>; // (undocumented) + recoverTasks?(options: TaskStoreRecoverTaskOptions): Promise<{ + ids: string[]; + }>; + // (undocumented) shutdownTask?(options: TaskStoreShutDownTaskOptions): Promise; } @@ -579,6 +592,11 @@ export type TaskStoreListEventsOptions = { after?: number | undefined; }; +// @public +export type TaskStoreRecoverTaskOptions = { + timeout: HumanDuration; +}; + // @public export type TaskStoreShutDownTaskOptions = { taskId: string; @@ -591,9 +609,13 @@ export class TaskWorker { // (undocumented) protected onReadyToClaimTask(): Promise; // (undocumented) + recoverTasks(): Promise; + // (undocumented) runOneTask(task: TaskContext): Promise; // (undocumented) start(): void; + // (undocumented) + stop(): void; } // @public @deprecated (undocumented) diff --git a/plugins/scaffolder-backend/config.d.ts b/plugins/scaffolder-backend/config.d.ts index 5914cddce7..477defe026 100644 --- a/plugins/scaffolder-backend/config.d.ts +++ b/plugins/scaffolder-backend/config.d.ts @@ -40,6 +40,22 @@ export interface Config { */ concurrentTasksLimit?: number; + /** + * Sets the tasks recoverability on system start up. + * + * If not specified, the default value is false. + */ + EXPERIMENTAL_recoverTasks?: boolean; + + /** + * Every task which is in progress state and having a last heartbeat longer than a specified timeout is going to + * be attempted to recover. + * + * If not specified, the default value is 5 seconds. + * + */ + EXPERIMENTAL_recoverTasksTimeout?: HumanDuration; + /** * Makes sure to auto-expire and clean up things that time out or for other reasons should not be left lingering. * diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 24325449b3..2325f7d17e 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.20.0", + "version": "1.21.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts index beabaa50aa..61c5ed12ee 100644 --- a/plugins/scaffolder-backend/src/ScaffolderPlugin.ts +++ b/plugins/scaffolder-backend/src/ScaffolderPlugin.ts @@ -32,7 +32,18 @@ import { scaffolderTaskBrokerExtensionPoint, scaffolderTemplatingExtensionPoint, } from '@backstage/plugin-scaffolder-node/alpha'; -import { createBuiltinActions } from './scaffolder'; +import { + createCatalogRegisterAction, + createCatalogWriteAction, + createDebugLogAction, + createFetchCatalogEntityAction, + createFetchPlainAction, + createFetchPlainFileAction, + createFetchTemplateAction, + createFilesystemDeleteAction, + createFilesystemRenameAction, + createWaitAction, +} from './scaffolder'; import { createRouter } from './service/router'; /** @@ -75,6 +86,7 @@ export const scaffolderPlugin = createBackendPlugin({ deps: { logger: coreServices.logger, config: coreServices.rootConfig, + lifecycle: coreServices.rootLifecycle, reader: coreServices.urlReader, permissions: coreServices.permissions, database: coreServices.database, @@ -84,6 +96,7 @@ export const scaffolderPlugin = createBackendPlugin({ async init({ logger, config, + lifecycle, reader, database, httpRouter, @@ -91,20 +104,39 @@ export const scaffolderPlugin = createBackendPlugin({ permissions, }) { const log = loggerToWinstonLogger(logger); + const integrations = ScmIntegrations.fromConfig(config); const actions = [ + // actions provided from other modules ...addedActions, - ...createBuiltinActions({ - integrations: ScmIntegrations.fromConfig(config), - catalogClient, + + // built-in actions for the scaffolder + createFetchPlainAction({ + reader, + integrations, + }), + createFetchPlainFileAction({ + reader, + integrations, + }), + createFetchTemplateAction({ + integrations, reader, - config, additionalTemplateFilters, additionalTemplateGlobals, }), + createDebugLogAction(), + createWaitAction(), + // todo(blam): maybe these should be a -catalog module? + createCatalogRegisterAction({ catalogClient, integrations }), + createFetchCatalogEntityAction({ catalogClient }), + createCatalogWriteAction(), + createFilesystemDeleteAction(), + createFilesystemRenameAction(), ]; const actionIds = actions.map(action => action.id).join(', '); + log.info( `Starting scaffolder with the following actions enabled ${actionIds}`, ); @@ -115,6 +147,7 @@ export const scaffolderPlugin = createBackendPlugin({ database, catalogClient, reader, + lifecycle, actions, taskBroker, additionalTemplateFilters, diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts index 6beb01e401..766db4646e 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/DatabaseTaskStore.ts @@ -29,14 +29,19 @@ import { TaskStoreCreateTaskOptions, TaskStoreCreateTaskResult, TaskStoreShutDownTaskOptions, + TaskStoreRecoverTaskOptions, } from './types'; import { SerializedTaskEvent, SerializedTask, TaskStatus, TaskEventType, + TaskSecrets, } from '@backstage/plugin-scaffolder-node'; -import { DateTime } from 'luxon'; +import { DateTime, Duration } from 'luxon'; +import { TaskRecovery, TaskSpec } from '@backstage/plugin-scaffolder-common'; +import { trimEventsTillLastRecovery } from './taskRecoveryHelper'; +import { intervalFromNowTill } from './dbUtil'; const migrationsDir = resolvePackagePath( '@backstage/plugin-scaffolder-backend', @@ -114,6 +119,30 @@ export class DatabaseTaskStore implements TaskStore { return new DatabaseTaskStore(client); } + private isRecoverableTask(spec: TaskSpec): boolean { + return ['startOver'].includes( + spec.EXPERIMENTAL_recovery?.EXPERIMENTAL_strategy ?? 'none', + ); + } + + private parseSpec({ spec, id }: { spec: string; id: string }): TaskSpec { + try { + return JSON.parse(spec); + } catch (error) { + throw new Error(`Failed to parse spec of task '${id}', ${error}`); + } + } + + private parseTaskSecrets(taskRow: RawDbTaskRow): TaskSecrets | undefined { + try { + return taskRow.secrets ? JSON.parse(taskRow.secrets) : undefined; + } catch (error) { + throw new Error( + `Failed to parse secrets of task '${taskRow.id}', ${error}`, + ); + } + } + private static async getClient( database: PluginDatabaseManager | Knex, ): Promise { @@ -223,34 +252,31 @@ export class DatabaseTaskStore implements TaskStore { return undefined; } + const spec = this.parseSpec(task); + const updateCount = await tx('tasks') .where({ id: task.id, status: 'open' }) .update({ status: 'processing', last_heartbeat_at: this.db.fn.now(), - // remove the secrets when moving to processing state. - secrets: null, + // remove the secrets for non-recoverable tasks when moving to processing state. + secrets: this.isRecoverableTask(spec) ? task.secrets : null, }); if (updateCount < 1) { return undefined; } - try { - const spec = JSON.parse(task.spec); - const secrets = task.secrets ? JSON.parse(task.secrets) : undefined; - return { - id: task.id, - spec, - status: 'processing', - lastHeartbeatAt: task.last_heartbeat_at, - createdAt: task.created_at, - createdBy: task.created_by ?? undefined, - secrets, - }; - } catch (error) { - throw new Error(`Failed to parse spec of task '${task.id}', ${error}`); - } + const secrets = this.parseTaskSecrets(task); + return { + id: task.id, + spec, + status: 'processing', + lastHeartbeatAt: task.last_heartbeat_at, + createdAt: task.created_at, + createdBy: task.created_by ?? undefined, + secrets, + }; }); } @@ -266,25 +292,15 @@ export class DatabaseTaskStore implements TaskStore { } async listStaleTasks(options: { timeoutS: number }): Promise<{ - tasks: { taskId: string }[]; + tasks: { taskId: string; recovery?: TaskRecovery }[]; }> { const { timeoutS } = options; - let heartbeatInterval = this.db.raw(`? - interval '${timeoutS} seconds'`, [ - this.db.fn.now(), - ]); - if (this.db.client.config.client.includes('mysql')) { - heartbeatInterval = this.db.raw( - `date_sub(now(), interval ${timeoutS} second)`, - ); - } else if (this.db.client.config.client.includes('sqlite3')) { - heartbeatInterval = this.db.raw(`datetime('now', ?)`, [ - `-${timeoutS} seconds`, - ]); - } + const heartbeatInterval = intervalFromNowTill(timeoutS, this.db); const rawRows = await this.db('tasks') .where('status', 'processing') .andWhere('last_heartbeat_at', '<=', heartbeatInterval); const tasks = rawRows.map(row => ({ + recovery: (JSON.parse(row.spec) as TaskSpec).EXPERIMENTAL_recovery, taskId: row.id, })); return { tasks }; @@ -297,7 +313,7 @@ export class DatabaseTaskStore implements TaskStore { }): Promise { const { taskId, status, eventBody } = options; - let oldStatus: string; + let oldStatus: TaskStatus; if (['failed', 'completed', 'cancelled'].includes(status)) { oldStatus = 'processing'; } else { @@ -322,6 +338,7 @@ export class DatabaseTaskStore implements TaskStore { .where(criteria) .update({ status, + secrets: null, }); if (updateCount !== 1) { @@ -409,7 +426,8 @@ export class DatabaseTaskStore implements TaskStore { ); } }); - return { events }; + + return trimEventsTillLastRecovery(events); } async shutdownTask(options: TaskStoreShutDownTaskOptions): Promise { @@ -462,4 +480,42 @@ export class DatabaseTaskStore implements TaskStore { body: serializedBody, }); } + + async recoverTasks( + options: TaskStoreRecoverTaskOptions, + ): Promise<{ ids: string[] }> { + const taskIdsToRecover: string[] = []; + const timeoutS = Duration.fromObject(options.timeout).as('seconds'); + + await this.db.transaction(async tx => { + const heartbeatInterval = intervalFromNowTill(timeoutS, this.db); + + const result = await tx('tasks') + .where('status', 'processing') + .andWhere('last_heartbeat_at', '<=', heartbeatInterval) + .update( + { + status: 'open', + last_heartbeat_at: this.db.fn.now(), + }, + ['id', 'spec'], + ); + + taskIdsToRecover.push(...result.map(i => i.id)); + + for (const { id, spec } of result) { + const taskSpec = JSON.parse(spec as string) as TaskSpec; + await this.db('task_events').insert({ + task_id: id, + event_type: 'recovered', + body: JSON.stringify({ + recoverStrategy: + taskSpec.EXPERIMENTAL_recovery?.EXPERIMENTAL_strategy ?? 'none', + }), + }); + } + }); + + return { ids: taskIdsToRecover }; + } } diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts index 139d91b7a2..ce1ad71c33 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/NunjucksWorkflowRunner.ts @@ -55,6 +55,7 @@ import { } from '@backstage/plugin-permission-common'; import { scaffolderActionRules } from '../../service/rules'; import { actionExecutePermission } from '@backstage/plugin-scaffolder-common/alpha'; +import { TaskRecovery } from '@backstage/plugin-scaffolder-common'; type NunjucksWorkflowRunnerOptions = { workingDirectory: string; @@ -68,6 +69,7 @@ type NunjucksWorkflowRunnerOptions = { type TemplateContext = { parameters: JsonObject; + EXPERIMENTAL_recovery?: TaskRecovery; steps: { [stepName: string]: { output: { [outputName: string]: JsonValue } }; }; @@ -119,6 +121,7 @@ const isActionAuthorized = createConditionAuthorizer( export class NunjucksWorkflowRunner implements WorkflowRunner { private readonly defaultTemplateFilters: Record; + constructor(private readonly options: NunjucksWorkflowRunnerOptions) { this.defaultTemplateFilters = createDefaultFilters({ integrations: this.options.integrations, diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts index 2255798d5c..a79624456a 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.test.ts @@ -47,10 +47,16 @@ describe('StorageTaskBroker', () => { storage = await createStore(); }); + const emptyTaskSpec = { spec: { steps: [] } as unknown as TaskSpec }; + const emptyTaskWithFakeSecretsSpec = { + spec: { steps: [] } as unknown as TaskSpec, + secrets: fakeSecrets, + }; + const logger = getVoidLogger(); it('should claim a dispatched work item', async () => { const broker = new StorageTaskBroker(storage, logger); - await broker.dispatch({ spec: {} as TaskSpec }); + await broker.dispatch(emptyTaskSpec); await expect(broker.claim()).resolves.toEqual( expect.any(TaskManager as any), ); @@ -62,7 +68,7 @@ describe('StorageTaskBroker', () => { await expect(Promise.race([promise, 'waiting'])).resolves.toBe('waiting'); - await broker.dispatch({ spec: {} as TaskSpec }); + await broker.dispatch(emptyTaskSpec); await expect(promise).resolves.toEqual(expect.any(TaskManager as any)); }); @@ -85,14 +91,14 @@ describe('StorageTaskBroker', () => { it('should store secrets', async () => { const broker = new StorageTaskBroker(storage, logger); - await broker.dispatch({ spec: {} as TaskSpec, secrets: fakeSecrets }); + await broker.dispatch(emptyTaskWithFakeSecretsSpec); const task = await broker.claim(); expect(task.secrets).toEqual(fakeSecrets); }, 10000); it('should complete a task', async () => { const broker = new StorageTaskBroker(storage, logger); - const dispatchResult = await broker.dispatch({ spec: {} as TaskSpec }); + const dispatchResult = await broker.dispatch(emptyTaskSpec); const task = await broker.claim(); await task.complete('completed'); const taskRow = await storage.getTask(dispatchResult.taskId); @@ -101,10 +107,7 @@ describe('StorageTaskBroker', () => { it('should remove secrets after picking up a task', async () => { const broker = new StorageTaskBroker(storage, logger); - const dispatchResult = await broker.dispatch({ - spec: {} as TaskSpec, - secrets: fakeSecrets, - }); + const dispatchResult = await broker.dispatch(emptyTaskWithFakeSecretsSpec); await broker.claim(); const taskRow = await storage.getTask(dispatchResult.taskId); @@ -113,7 +116,7 @@ describe('StorageTaskBroker', () => { it('should fail a task', async () => { const broker = new StorageTaskBroker(storage, logger); - const dispatchResult = await broker.dispatch({ spec: {} as TaskSpec }); + const dispatchResult = await broker.dispatch(emptyTaskSpec); const task = await broker.claim(); await task.complete('failed'); const taskRow = await storage.getTask(dispatchResult.taskId); @@ -124,7 +127,7 @@ describe('StorageTaskBroker', () => { const broker1 = new StorageTaskBroker(storage, logger); const broker2 = new StorageTaskBroker(storage, logger); - const { taskId } = await broker1.dispatch({ spec: {} as TaskSpec }); + const { taskId } = await broker1.dispatch(emptyTaskSpec); const logPromise = new Promise(resolve => { const observedEvents = new Array(); @@ -169,7 +172,7 @@ describe('StorageTaskBroker', () => { it('should heartbeat', async () => { const broker = new StorageTaskBroker(storage, logger); - const { taskId } = await broker.dispatch({ spec: {} as TaskSpec }); + const { taskId } = await broker.dispatch(emptyTaskSpec); const task = await broker.claim(); const initialTask = await storage.getTask(taskId); @@ -187,7 +190,7 @@ describe('StorageTaskBroker', () => { it('should be update the status to failed if heartbeat fails', async () => { const broker = new StorageTaskBroker(storage, logger); - const { taskId } = await broker.dispatch({ spec: {} as TaskSpec }); + const { taskId } = await broker.dispatch(emptyTaskSpec); const task = await broker.claim(); jest @@ -213,7 +216,7 @@ describe('StorageTaskBroker', () => { it('should list all tasks', async () => { const broker = new StorageTaskBroker(storage, logger); - const { taskId } = await broker.dispatch({ spec: {} as TaskSpec }); + const { taskId } = await broker.dispatch(emptyTaskSpec); const promise = broker.list(); await expect(promise).resolves.toEqual({ @@ -228,7 +231,7 @@ describe('StorageTaskBroker', () => { it('should list only tasks createdBy a specific user', async () => { const broker = new StorageTaskBroker(storage, logger); const { taskId } = await broker.dispatch({ - spec: {} as TaskSpec, + spec: { steps: [] } as unknown as TaskSpec, createdBy: 'user:default/foo', }); diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts index fc5a724e47..8b49f492e8 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/StorageTaskBroker.ts @@ -14,6 +14,7 @@ * limitations under the License. */ +import { Config } from '@backstage/config'; import { TaskSpec } from '@backstage/plugin-scaffolder-common'; import { TaskSecrets } from '@backstage/plugin-scaffolder-node'; import { JsonObject, Observable } from '@backstage/types'; @@ -28,6 +29,7 @@ import { TaskContext, TaskStore, } from './types'; +import { readDuration } from './helper'; /** * TaskManager @@ -160,6 +162,7 @@ export class StorageTaskBroker implements TaskBroker { constructor( private readonly storage: TaskStore, private readonly logger: Logger, + private readonly config?: Config, ) {} async list(options?: { @@ -202,6 +205,30 @@ export class StorageTaskBroker implements TaskBroker { }); } + public async recoverTasks(): Promise { + const enabled = + (this.config && + this.config.getOptionalBoolean( + 'scaffolder.EXPERIMENTAL_recoverTasks', + )) ?? + false; + + if (enabled) { + const defaultTimeout = { seconds: 30 }; + const timeout = readDuration( + this.config, + 'scaffolder.EXPERIMENTAL_recoverTasksTimeout', + defaultTimeout, + ); + const { ids: recoveredTaskIds } = (await this.storage.recoverTasks?.({ + timeout, + })) ?? { ids: [] }; + if (recoveredTaskIds.length > 0) { + this.signalDispatch(); + } + } + } + /** * {@inheritdoc TaskBroker.claim} */ diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts index 9f9b86b723..cd7dc06a91 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/TaskWorker.ts @@ -20,9 +20,10 @@ import { NunjucksWorkflowRunner } from './NunjucksWorkflowRunner'; import { Logger } from 'winston'; import { TemplateActionRegistry } from '../actions'; import { ScmIntegrations } from '@backstage/integration'; -import { assertError } from '@backstage/errors'; +import { assertError, stringifyError } from '@backstage/errors'; import { TemplateFilter, TemplateGlobal } from '../../lib'; import { PermissionEvaluator } from '@backstage/plugin-permission-common'; + /** * TaskWorkerOptions * @@ -35,6 +36,7 @@ export type TaskWorkerOptions = { }; concurrentTasksLimit: number; permissions?: PermissionEvaluator; + logger?: Logger; }; /** @@ -73,8 +75,12 @@ export type CreateWorkerOptions = { */ export class TaskWorker { private taskQueue: PQueue; + private logger: Logger | undefined; + private stopWorkers: boolean; private constructor(private readonly options: TaskWorkerOptions) { + this.stopWorkers = false; + this.logger = options.logger; this.taskQueue = new PQueue({ concurrency: options.concurrentTasksLimit, }); @@ -111,14 +117,34 @@ export class TaskWorker { }); } + async recoverTasks() { + try { + await this.options.taskBroker.recoverTasks?.(); + } catch (err) { + this.logger?.error(stringifyError(err)); + } + } + start() { (async () => { - for (;;) { - await this.onReadyToClaimTask(); - const task = await this.options.taskBroker.claim(); - this.taskQueue.add(() => this.runOneTask(task)); + while (!this.stopWorkers) { + await new Promise(resolve => setTimeout(resolve, 10000)); + await this.recoverTasks(); } })(); + (async () => { + while (!this.stopWorkers) { + await this.onReadyToClaimTask(); + if (!this.stopWorkers) { + const task = await this.options.taskBroker.claim(); + void this.taskQueue.add(() => this.runOneTask(task)); + } + } + })(); + } + + stop() { + this.stopWorkers = true; } protected onReadyToClaimTask(): Promise { diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.test.ts new file mode 100644 index 0000000000..9ccc17b8a4 --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.test.ts @@ -0,0 +1,40 @@ +/* + * Copyright 2024 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 knexFactory, { Knex } from 'knex'; +import { intervalFromNowTill } from './dbUtil'; + +class KnexBuilder { + public build(client: string): Knex { + return knexFactory({ client, useNullAsDefault: true }); + } +} + +describe('util', () => { + describe('intervalFromNowTill', () => { + const databases = [ + { client: 'sqlite3', expected: "datetime('now', '-5 seconds')" }, + { client: 'mysql', expected: 'date_sub(now(), interval 5 second)' }, + { client: 'pg', expected: "CURRENT_TIMESTAMP - interval '5 seconds'" }, + ]; + + it.each(databases)('for client $client', ({ client, expected }) => { + const knex = new KnexBuilder().build(client); + const result = intervalFromNowTill(5, knex); + + expect(result.toString()).toBe(expected); + }); + }); +}); diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.ts new file mode 100644 index 0000000000..afc4e8c0d6 --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/dbUtil.ts @@ -0,0 +1,32 @@ +/* + * Copyright 2024 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'; + +export const intervalFromNowTill = (timeoutS: number, knex: Knex) => { + let heartbeatInterval = knex.raw(`? - interval '${timeoutS} seconds'`, [ + knex.fn.now(), + ]); + if (knex.client.config.client.includes('mysql')) { + heartbeatInterval = knex.raw( + `date_sub(now(), interval ${timeoutS} second)`, + ); + } else if (knex.client.config.client.includes('sqlite3')) { + heartbeatInterval = knex.raw(`datetime('now', ?)`, [ + `-${timeoutS} seconds`, + ]); + } + return heartbeatInterval; +}; diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/helper.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/helper.ts index 76951afde4..41425affc9 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/helper.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/helper.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +import { Config, readDurationFromConfig } from '@backstage/config'; +import { HumanDuration } from '@backstage/types'; + import { isArray } from 'lodash'; import { Schema } from 'jsonschema'; @@ -53,3 +56,14 @@ export function generateExampleOutput(schema: Schema): unknown { } return ''; } + +export const readDuration = ( + config: Config | undefined, + key: string, + defaultValue: HumanDuration, +) => { + if (config?.has(key)) { + return readDurationFromConfig(config, { key }); + } + return defaultValue; +}; diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/index.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/index.ts index f1c1a7bdac..9d231d7e7c 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/index.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/index.ts @@ -35,5 +35,6 @@ export type { TaskBrokerDispatchResult, TaskBrokerDispatchOptions, TaskStoreCreateTaskOptions, + TaskStoreRecoverTaskOptions, TaskStoreCreateTaskResult, } from './types'; diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.test.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.test.ts new file mode 100644 index 0000000000..8224feab8e --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.test.ts @@ -0,0 +1,47 @@ +/* + * 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 { trimEventsTillLastRecovery } from './taskRecoveryHelper'; +import { SerializedTaskEvent } from './types'; + +const toLogEvent = (stepId: string) => + ({ + type: 'log', + body: { stepId }, + } as unknown as SerializedTaskEvent); + +const toRecoveredEvent = (recoverStrategy: string) => + ({ + type: 'recovered', + body: { recoverStrategy }, + } as unknown as SerializedTaskEvent); + +describe('taskRecoveryHelper', () => { + describe('compactEvents', () => { + it('should return only events related to a restarted task. Recover strategy: "startOver"', () => { + const logEvents = [ + 'fetch', + 'mock-step-1', + 'mock-step-2', + 'mock-step-3', + ].map(toLogEvent); + + const events = [...logEvents, toRecoveredEvent('startOver')]; + + expect(trimEventsTillLastRecovery(events)).toEqual({ events: [] }); + }); + }); +}); diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.ts new file mode 100644 index 0000000000..f3b8b321fe --- /dev/null +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/taskRecoveryHelper.ts @@ -0,0 +1,41 @@ +/* + * 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 { SerializedTaskEvent } from '@backstage/plugin-scaffolder-node'; +import { TaskRecoverStrategy } from '@backstage/plugin-scaffolder-common'; + +export const trimEventsTillLastRecovery = ( + events: SerializedTaskEvent[], +): { events: SerializedTaskEvent[] } => { + const recoveredEventInd = events + .slice() + .reverse() + .findIndex(event => event.type === 'recovered'); + + if (recoveredEventInd >= 0) { + const ind = events.length - recoveredEventInd - 1; + const { recoverStrategy } = events[ind].body as { + recoverStrategy: TaskRecoverStrategy; + }; + if (recoverStrategy === 'startOver') { + return { + events: recoveredEventInd === 0 ? [] : events.slice(ind), + }; + } + } + + return { events }; +}; diff --git a/plugins/scaffolder-backend/src/scaffolder/tasks/types.ts b/plugins/scaffolder-backend/src/scaffolder/tasks/types.ts index 4560f27c0b..c5783ccb49 100644 --- a/plugins/scaffolder-backend/src/scaffolder/tasks/types.ts +++ b/plugins/scaffolder-backend/src/scaffolder/tasks/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { JsonValue, JsonObject } from '@backstage/types'; +import { JsonValue, JsonObject, HumanDuration } from '@backstage/types'; import { TaskSpec, TaskStep } from '@backstage/plugin-scaffolder-common'; import { TaskSecrets } from '@backstage/plugin-scaffolder-node'; import { @@ -142,6 +142,14 @@ export type TaskStoreCreateTaskOptions = { secrets?: TaskSecrets; }; +/** + * The options passed to {@link TaskStore.recoverTasks} + * @public + */ +export type TaskStoreRecoverTaskOptions = { + timeout: HumanDuration; +}; + /** * The response from {@link TaskStore.createTask} * @public @@ -162,6 +170,10 @@ export interface TaskStore { options: TaskStoreCreateTaskOptions, ): Promise; + recoverTasks?( + options: TaskStoreRecoverTaskOptions, + ): Promise<{ ids: string[] }>; + getTask(taskId: string): Promise; claimTask(): Promise; diff --git a/plugins/scaffolder-backend/src/service/router.test.ts b/plugins/scaffolder-backend/src/service/router.test.ts index 7a0bcc6877..8bfbd6b915 100644 --- a/plugins/scaffolder-backend/src/service/router.test.ts +++ b/plugins/scaffolder-backend/src/service/router.test.ts @@ -85,6 +85,8 @@ const mockUrlReader = UrlReaders.default({ const getIdentity = jest.fn(); +const config = new ConfigReader({}); + describe('createRouter', () => { let app: express.Express; let loggerSpy: jest.SpyInstance; @@ -181,7 +183,7 @@ describe('createRouter', () => { const databaseTaskStore = await DatabaseTaskStore.create({ database: createDatabase(), }); - taskBroker = new StorageTaskBroker(databaseTaskStore, logger); + taskBroker = new StorageTaskBroker(databaseTaskStore, logger, config); jest.spyOn(taskBroker, 'dispatch'); jest.spyOn(taskBroker, 'get'); @@ -787,7 +789,7 @@ data: {"id":1,"taskId":"a-random-id","type":"completion","createdAt":"","body":{ const databaseTaskStore = await DatabaseTaskStore.create({ database: createDatabase(), }); - taskBroker = new StorageTaskBroker(databaseTaskStore, logger); + taskBroker = new StorageTaskBroker(databaseTaskStore, logger, config); jest.spyOn(taskBroker, 'dispatch'); jest.spyOn(taskBroker, 'get'); diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index de0087e7de..c0322af283 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -78,6 +78,7 @@ import { } from '@backstage/plugin-permission-node'; import { scaffolderActionRules, scaffolderTemplateRules } from './rules'; import { Duration } from 'luxon'; +import { LifecycleService } from '@backstage/backend-plugin-api'; /** * @@ -124,6 +125,7 @@ export interface RouterOptions { logger: Logger; config: Config; reader: UrlReader; + lifecycle?: LifecycleService; database: PluginDatabaseManager; catalogClient: CatalogApi; scheduler?: PluginTaskScheduler; @@ -266,7 +268,7 @@ export async function createRouter( let taskBroker: TaskBroker; if (!options.taskBroker) { const databaseTaskStore = await DatabaseTaskStore.create({ database }); - taskBroker = new StorageTaskBroker(databaseTaskStore, logger); + taskBroker = new StorageTaskBroker(databaseTaskStore, logger, config); if (scheduler && databaseTaskStore.listStaleTasks) { await scheduler.scheduleTask({ @@ -301,7 +303,7 @@ export async function createRouter( const actionRegistry = new TemplateActionRegistry(); - const workers = []; + const workers: TaskWorker[] = []; if (concurrentTasksLimit !== 0) { for (let i = 0; i < (taskWorkers || 1); i++) { const worker = await TaskWorker.create({ @@ -331,7 +333,19 @@ export async function createRouter( }); actionsToRegister.forEach(action => actionRegistry.register(action)); - workers.forEach(worker => worker.start()); + + const launchWorkers = () => workers.forEach(worker => worker.start()); + + const shutdownWorkers = () => { + workers.forEach(worker => worker.stop()); + }; + + if (options.lifecycle) { + options.lifecycle.addStartupHook(launchWorkers); + options.lifecycle.addShutdownHook(shutdownWorkers); + } else { + launchWorkers(); + } const dryRunner = createDryRunner({ actionRegistry, @@ -462,6 +476,7 @@ export async function createRouter( id: step.id ?? `step-${index + 1}`, name: step.name ?? step.action, })), + EXPERIMENTAL_recovery: template.spec.EXPERIMENTAL_recovery, output: template.spec.output ?? {}, parameters: values, user: { diff --git a/plugins/scaffolder-common/CHANGELOG.md b/plugins/scaffolder-common/CHANGELOG.md index dfc6b310ed..1e25a2c66e 100644 --- a/plugins/scaffolder-common/CHANGELOG.md +++ b/plugins/scaffolder-common/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-scaffolder-common +## 1.5.0-next.0 + +### Minor Changes + +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- Updated dependencies + - @backstage/catalog-model@1.4.3 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + ## 1.4.5 ### Patch Changes diff --git a/plugins/scaffolder-common/api-report.md b/plugins/scaffolder-common/api-report.md index 8cfbd2aaac..8d7a61910d 100644 --- a/plugins/scaffolder-common/api-report.md +++ b/plugins/scaffolder-common/api-report.md @@ -16,12 +16,21 @@ export const isTemplateEntityV1beta3: ( entity: Entity, ) => entity is TemplateEntityV1beta3; +// @public +export type TaskRecoverStrategy = 'none' | 'startOver'; + +// @public +export interface TaskRecovery { + EXPERIMENTAL_strategy?: TaskRecoverStrategy; +} + // @public export type TaskSpec = TaskSpecV1beta3; // @public export interface TaskSpecV1beta3 { apiVersion: 'scaffolder.backstage.io/v1beta3'; + EXPERIMENTAL_recovery?: TaskRecovery; output: { [name: string]: JsonValue; }; @@ -67,6 +76,7 @@ export interface TemplateEntityV1beta3 extends Entity { spec: { type: string; presentation?: TemplatePresentationV1beta3; + EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3; parameters?: TemplateParametersV1beta3 | TemplateParametersV1beta3[]; steps: Array; output?: { @@ -108,4 +118,9 @@ export interface TemplatePresentationV1beta3 extends JsonObject { reviewButtonText?: string; }; } + +// @public +export interface TemplateRecoveryV1beta3 extends JsonObject { + EXPERIMENTAL_strategy?: 'none' | 'startOver'; +} ``` diff --git a/plugins/scaffolder-common/package.json b/plugins/scaffolder-common/package.json index 699867fbb1..29a2f9bb74 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.4.5", + "version": "1.5.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-common/src/TaskSpec.ts b/plugins/scaffolder-common/src/TaskSpec.ts index 6b144b4f78..ce93c05ef0 100644 --- a/plugins/scaffolder-common/src/TaskSpec.ts +++ b/plugins/scaffolder-common/src/TaskSpec.ts @@ -44,6 +44,30 @@ export type TemplateInfo = { }; }; +/** + * + * none - not recover, let the task be marked as failed + * startOver - do recover, start the execution of the task from the first step. + * + * @public + */ +export type TaskRecoverStrategy = 'none' | 'startOver'; + +/** + * When task didn't have a chance to complete due to system restart you can define the strategy what to do with such tasks, + * by defining a strategy. + * + * By default, it is none, what means to not recover but updating the status from 'processing' to 'failed'. + * + * @public + */ +export interface TaskRecovery { + /** + * Depends on how you designed your task you might tailor the behaviour for each of them. + */ + EXPERIMENTAL_strategy?: TaskRecoverStrategy; +} + /** * An individual step of a scaffolder task, as stored in the database. * @@ -119,6 +143,10 @@ export interface TaskSpecV1beta3 { */ ref?: string; }; + /** + * How to recover the task after system restart or system crash. + */ + EXPERIMENTAL_recovery?: TaskRecovery; } /** diff --git a/plugins/scaffolder-common/src/Template.v1beta3.schema.json b/plugins/scaffolder-common/src/Template.v1beta3.schema.json index d7698511d8..99b0e0b7cb 100644 --- a/plugins/scaffolder-common/src/Template.v1beta3.schema.json +++ b/plugins/scaffolder-common/src/Template.v1beta3.schema.json @@ -157,6 +157,16 @@ } } }, + "EXPERIMENTAL_recovery": { + "type": "object", + "description": "A task recovery section.", + "properties": { + "EXPERIMENTAL_strategy": { + "type": "string", + "description": "Recovery strategy for your task (none or startOver). By default none" + } + } + }, "steps": { "type": "array", "description": "A list of steps to execute.", diff --git a/plugins/scaffolder-common/src/TemplateEntityV1beta3.ts b/plugins/scaffolder-common/src/TemplateEntityV1beta3.ts index 23cc3ca3d8..0e2fec4264 100644 --- a/plugins/scaffolder-common/src/TemplateEntityV1beta3.ts +++ b/plugins/scaffolder-common/src/TemplateEntityV1beta3.ts @@ -51,6 +51,11 @@ export interface TemplateEntityV1beta3 extends Entity { */ presentation?: TemplatePresentationV1beta3; + /** + * Recovery strategy for the template + */ + EXPERIMENTAL_recovery?: TemplateRecoveryV1beta3; + /** * This is a JSONSchema or an array of JSONSchema's which is used to render a form in the frontend * to collect user input and validate it against that schema. This can then be used in the `steps` part below to template @@ -73,6 +78,22 @@ export interface TemplateEntityV1beta3 extends Entity { }; } +/** + * Depends on how you designed your task you might tailor the behaviour for each of them. + * + * @public + */ +export interface TemplateRecoveryV1beta3 extends JsonObject { + /** + * + * none - not recover, let the task be marked as failed + * startOver - do recover, start the execution of the task from the first step. + * + * @public + */ + EXPERIMENTAL_strategy?: 'none' | 'startOver'; +} + /** * The presentation of the template. * diff --git a/plugins/scaffolder-common/src/index.ts b/plugins/scaffolder-common/src/index.ts index 3300aebf46..4d9b5e39c6 100644 --- a/plugins/scaffolder-common/src/index.ts +++ b/plugins/scaffolder-common/src/index.ts @@ -32,4 +32,5 @@ export type { TemplateEntityStepV1beta3, TemplateParametersV1beta3, TemplatePermissionsV1beta3, + TemplateRecoveryV1beta3, } from './TemplateEntityV1beta3'; diff --git a/plugins/scaffolder-node/CHANGELOG.md b/plugins/scaffolder-node/CHANGELOG.md index 49ea604b11..6f47b13296 100644 --- a/plugins/scaffolder-node/CHANGELOG.md +++ b/plugins/scaffolder-node/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-scaffolder-node +## 0.3.0-next.0 + +### Minor Changes + +- 3a9ba42: Added functions to clone a repo, create a branch, add files and push and commit to the branch. This allows for files to be added to the a PR for use in the bitbucket pull request action for issue #21762 +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/types@1.1.1 + ## 0.2.10 ### Patch Changes diff --git a/plugins/scaffolder-node/api-report.md b/plugins/scaffolder-node/api-report.md index 6bb1534679..6b1e6a54b6 100644 --- a/plugins/scaffolder-node/api-report.md +++ b/plugins/scaffolder-node/api-report.md @@ -45,6 +45,63 @@ export type ActionContext< each?: JsonObject; }; +// @public (undocumented) +export function addFiles(options: { + dir: string; + filepath: string; + auth: + | { + username: string; + password: string; + } + | { + token: string; + }; + logger?: Logger | undefined; +}): Promise; + +// @public (undocumented) +export function cloneRepo(options: { + url: string; + dir: string; + auth: + | { + username: string; + password: string; + } + | { + token: string; + }; + logger?: Logger | undefined; + ref?: string | undefined; + depth?: number | undefined; + noCheckout?: boolean | undefined; +}): Promise; + +// @public (undocumented) +export function commitAndPushBranch(options: { + dir: string; + auth: + | { + username: string; + password: string; + } + | { + token: string; + }; + logger?: Logger | undefined; + commitMessage: string; + gitAuthorInfo?: { + name?: string; + email?: string; + }; + branch?: string; + remoteRef?: string; + remote?: string; +}): Promise<{ + commitHash: string; +}>; + // @public (undocumented) export function commitAndPushRepo(input: { dir: string; @@ -68,6 +125,21 @@ export function commitAndPushRepo(input: { commitHash: string; }>; +// @public (undocumented) +export function createBranch(options: { + dir: string; + ref: string; + auth: + | { + username: string; + password: string; + } + | { + token: string; + }; + logger?: Logger | undefined; +}): Promise; + // @public export const createTemplateAction: < TInputParams extends JsonObject = JsonObject, @@ -238,6 +310,8 @@ export interface TaskBroker { tasks: SerializedTask[]; }>; // (undocumented) + recoverTasks?(): Promise; + // (undocumented) vacuumTasks(options: { timeoutS: number }): Promise; } @@ -279,7 +353,7 @@ export interface TaskContext { } // @public -export type TaskEventType = 'completion' | 'log' | 'cancelled'; +export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered'; // @public export type TaskSecrets = Record & { diff --git a/plugins/scaffolder-node/package.json b/plugins/scaffolder-node/package.json index b4c843ce65..e0e780131f 100644 --- a/plugins/scaffolder-node/package.json +++ b/plugins/scaffolder-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-node", "description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend", - "version": "0.2.10", + "version": "0.3.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-node/src/actions/gitHelpers.test.ts b/plugins/scaffolder-node/src/actions/gitHelpers.test.ts index 7bc3f64f46..b230b2cd06 100644 --- a/plugins/scaffolder-node/src/actions/gitHelpers.test.ts +++ b/plugins/scaffolder-node/src/actions/gitHelpers.test.ts @@ -15,7 +15,14 @@ */ import { Git, getVoidLogger } from '@backstage/backend-common'; -import { commitAndPushRepo, initRepoAndPush } from './gitHelpers'; +import { + commitAndPushRepo, + initRepoAndPush, + commitAndPushBranch, + addFiles, + createBranch, + cloneRepo, +} from './gitHelpers'; jest.mock('@backstage/backend-common', () => ({ Git: { @@ -29,10 +36,14 @@ jest.mock('@backstage/backend-common', () => ({ fetch: jest.fn(), addRemote: jest.fn(), push: jest.fn(), + clone: jest.fn(), }), }, getVoidLogger: jest.requireActual('@backstage/backend-common').getVoidLogger, })); +jest.mock('fs-extra', () => ({ + cpSync: jest.fn(), +})); const mockedGit = Git.fromAuth({ logger: getVoidLogger(), @@ -303,3 +314,333 @@ describe('commitAndPushRepo', () => { }); }); }); + +describe('cloneRepo', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('with minimal parameters', () => { + beforeEach(async () => { + await cloneRepo({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + }); + + it('clone the repo', () => { + expect(mockedGit.clone).toHaveBeenCalledWith({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + ref: undefined, + depth: undefined, + noCheckout: undefined, + }); + }); + }); + + it('with token', async () => { + await cloneRepo({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + auth: { + token: 'test-token', + }, + }); + + expect(mockedGit.clone).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + url: 'git@github.com:test/repo.git', + ref: undefined, + depth: undefined, + noCheckout: undefined, + }); + }); + + it('allows overriding the default branch', async () => { + await cloneRepo({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + ref: 'trunk', + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + + expect(mockedGit.clone).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + url: 'git@github.com:test/repo.git', + ref: 'trunk', + depth: undefined, + noCheckout: undefined, + }); + }); + + it('allows overriding the depth', async () => { + await cloneRepo({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + ref: 'trunk', + depth: 2, + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + + expect(mockedGit.clone).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + url: 'git@github.com:test/repo.git', + ref: 'trunk', + depth: 2, + noCheckout: undefined, + }); + }); + + it('allows overriding the noCheckout', async () => { + await cloneRepo({ + url: 'git@github.com:test/repo.git', + dir: '/tmp/repo/dir/', + ref: 'trunk', + depth: 2, + noCheckout: true, + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + + expect(mockedGit.clone).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + url: 'git@github.com:test/repo.git', + ref: 'trunk', + depth: 2, + noCheckout: true, + }); + }); +}); + +describe('createBranch', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('with minimal parameters', () => { + beforeEach(async () => { + await createBranch({ + dir: '/tmp/repo/dir/', + ref: 'trunk', + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + }); + + it('create the branch', () => { + expect(mockedGit.checkout).toHaveBeenCalledWith({ + ref: 'trunk', + dir: '/tmp/repo/dir/', + }); + }); + }); + + it('with token', async () => { + await createBranch({ + dir: '/tmp/repo/dir/', + ref: 'trunk', + auth: { + token: 'test-token', + }, + }); + + expect(mockedGit.checkout).toHaveBeenCalledWith({ + ref: 'trunk', + dir: '/tmp/repo/dir/', + }); + }); +}); + +describe('addFiles', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('with minimal parameters', () => { + beforeEach(async () => { + await addFiles({ + dir: '/tmp/repo/dir/', + filepath: '.', + auth: { + username: 'test-user', + password: 'test-password', + }, + }); + }); + + it('add files', () => { + expect(mockedGit.add).toHaveBeenCalledWith({ + filepath: '.', + dir: '/tmp/repo/dir/', + }); + }); + }); + + it('with token', async () => { + await addFiles({ + dir: '/tmp/repo/dir/', + filepath: '.', + auth: { + token: 'test-token', + }, + }); + + expect(mockedGit.add).toHaveBeenCalledWith({ + filepath: '.', + dir: '/tmp/repo/dir/', + }); + }); +}); + +describe('commitAndPushBranch', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('with minimal parameters', () => { + beforeEach(async () => { + await commitAndPushBranch({ + dir: '/tmp/repo/dir/', + auth: { + username: 'test-user', + password: 'test-password', + }, + commitMessage: 'commit message', + }); + }); + + it('create commit', () => { + expect(mockedGit.commit).toHaveBeenCalledWith({ + message: 'commit message', + dir: '/tmp/repo/dir/', + author: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + committer: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + }); + }); + + it('pushes to the remote', () => { + expect(mockedGit.push).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + remote: 'origin', + remoteRef: 'refs/heads/master', + }); + }); + }); + + it('with token', async () => { + await commitAndPushBranch({ + dir: '/tmp/repo/dir/', + auth: { + token: 'test-token', + }, + commitMessage: 'commit message', + gitAuthorInfo: { + name: 'gitCommitter', + email: 'gitCommitter@backstage.io', + }, + logger: getVoidLogger(), + }); + + expect(mockedGit.commit).toHaveBeenCalledWith({ + message: 'commit message', + dir: '/tmp/repo/dir/', + author: { + name: 'gitCommitter', + email: 'gitCommitter@backstage.io', + }, + committer: { + name: 'gitCommitter', + email: 'gitCommitter@backstage.io', + }, + }); + + expect(mockedGit.push).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + remote: 'origin', + remoteRef: 'refs/heads/master', + }); + }); + + it('allows overriding the default branch', async () => { + await commitAndPushBranch({ + dir: '/tmp/repo/dir/', + auth: { + username: 'test-user', + password: 'test-password', + }, + commitMessage: 'commit message', + branch: 'trunk', + }); + + expect(mockedGit.commit).toHaveBeenCalledWith({ + message: 'commit message', + dir: '/tmp/repo/dir/', + author: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + committer: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + }); + + expect(mockedGit.push).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + remote: 'origin', + remoteRef: 'refs/heads/trunk', + }); + }); + + it('allows overriding the remoteRef', async () => { + await commitAndPushBranch({ + dir: '/tmp/repo/dir/', + auth: { + username: 'test-user', + password: 'test-password', + }, + commitMessage: 'commit message', + remoteRef: 'ABC123', + }); + + expect(mockedGit.commit).toHaveBeenCalledWith({ + message: 'commit message', + dir: '/tmp/repo/dir/', + author: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + committer: { + name: 'Scaffolder', + email: 'scaffolder@backstage.io', + }, + }); + + expect(mockedGit.push).toHaveBeenCalledWith({ + dir: '/tmp/repo/dir/', + remote: 'origin', + remoteRef: 'ABC123', + }); + }); +}); diff --git a/plugins/scaffolder-node/src/actions/gitHelpers.ts b/plugins/scaffolder-node/src/actions/gitHelpers.ts index 6d449a0a29..2026e75247 100644 --- a/plugins/scaffolder-node/src/actions/gitHelpers.ts +++ b/plugins/scaffolder-node/src/actions/gitHelpers.ts @@ -134,3 +134,123 @@ export async function commitAndPushRepo(input: { return { commitHash }; } + +/** + * @public + */ +export async function cloneRepo(options: { + url: string; + dir: string; + // For use cases where token has to be used with Basic Auth + // it has to be provided as password together with a username + // which may be a fixed value defined by the provider. + auth: { username: string; password: string } | { token: string }; + logger?: Logger | undefined; + ref?: string | undefined; + depth?: number | undefined; + noCheckout?: boolean | undefined; +}): Promise { + const { url, dir, auth, logger, ref, depth, noCheckout } = options; + + const git = Git.fromAuth({ + ...auth, + logger, + }); + + await git.clone({ url, dir, ref, depth, noCheckout }); +} + +/** + * @public + */ +export async function createBranch(options: { + dir: string; + ref: string; + // For use cases where token has to be used with Basic Auth + // it has to be provided as password together with a username + // which may be a fixed value defined by the provider. + auth: { username: string; password: string } | { token: string }; + logger?: Logger | undefined; +}): Promise { + const { dir, ref, auth, logger } = options; + const git = Git.fromAuth({ + ...auth, + logger, + }); + + await git.checkout({ dir, ref }); +} + +/** + * @public + */ +export async function addFiles(options: { + dir: string; + filepath: string; + // For use cases where token has to be used with Basic Auth + // it has to be provided as password together with a username + // which may be a fixed value defined by the provider. + auth: { username: string; password: string } | { token: string }; + logger?: Logger | undefined; +}): Promise { + const { dir, filepath, auth, logger } = options; + const git = Git.fromAuth({ + ...auth, + logger, + }); + + await git.add({ dir, filepath }); +} + +/** + * @public + */ +export async function commitAndPushBranch(options: { + dir: string; + // For use cases where token has to be used with Basic Auth + // it has to be provided as password together with a username + // which may be a fixed value defined by the provider. + auth: { username: string; password: string } | { token: string }; + logger?: Logger | undefined; + commitMessage: string; + gitAuthorInfo?: { name?: string; email?: string }; + branch?: string; + remoteRef?: string; + remote?: string; +}): Promise<{ commitHash: string }> { + const { + dir, + auth, + logger, + commitMessage, + gitAuthorInfo, + branch = 'master', + remoteRef, + remote = 'origin', + } = options; + const git = Git.fromAuth({ + ...auth, + logger, + }); + + // use provided info if possible, otherwise use fallbacks + const authorInfo = { + name: gitAuthorInfo?.name ?? 'Scaffolder', + email: gitAuthorInfo?.email ?? 'scaffolder@backstage.io', + }; + + const commitHash = await git.commit({ + dir, + message: commitMessage, + author: authorInfo, + committer: authorInfo, + }); + + await git.push({ + dir, + remote, + remoteRef: remoteRef ?? `refs/heads/${branch}`, + }); + + return { commitHash }; +} diff --git a/plugins/scaffolder-node/src/actions/index.ts b/plugins/scaffolder-node/src/actions/index.ts index 74a0bb61f9..c1c8551c53 100644 --- a/plugins/scaffolder-node/src/actions/index.ts +++ b/plugins/scaffolder-node/src/actions/index.ts @@ -25,5 +25,12 @@ export { } from './executeShellCommand'; export { fetchContents, fetchFile } from './fetch'; export { type ActionContext, type TemplateAction } from './types'; -export { initRepoAndPush, commitAndPushRepo } from './gitHelpers'; +export { + initRepoAndPush, + commitAndPushRepo, + commitAndPushBranch, + addFiles, + createBranch, + cloneRepo, +} from './gitHelpers'; export { parseRepoUrl, getRepoSourceDirectory } from './util'; diff --git a/plugins/scaffolder-node/src/tasks/types.ts b/plugins/scaffolder-node/src/tasks/types.ts index 8c9cc29e31..7cdc044bdf 100644 --- a/plugins/scaffolder-node/src/tasks/types.ts +++ b/plugins/scaffolder-node/src/tasks/types.ts @@ -65,7 +65,7 @@ export type SerializedTask = { * * @public */ -export type TaskEventType = 'completion' | 'log' | 'cancelled'; +export type TaskEventType = 'completion' | 'log' | 'cancelled' | 'recovered'; /** * SerializedTaskEvent @@ -131,6 +131,8 @@ export interface TaskBroker { claim(): Promise; + recoverTasks?(): Promise; + dispatch( options: TaskBrokerDispatchOptions, ): Promise; diff --git a/plugins/scaffolder-react/CHANGELOG.md b/plugins/scaffolder-react/CHANGELOG.md index 89468800e8..ba40bc17fb 100644 --- a/plugins/scaffolder-react/CHANGELOG.md +++ b/plugins/scaffolder-react/CHANGELOG.md @@ -1,5 +1,30 @@ # @backstage/plugin-scaffolder-react +## 1.8.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- 11b9a08: Introduced the first version of recoverable tasks. + +### Patch Changes + +- 0b0c6b6: Allow defining default output text to be shown +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + ## 1.7.1 ### Patch Changes diff --git a/plugins/scaffolder-react/api-report.md b/plugins/scaffolder-react/api-report.md index 8589078f1e..400cf24c53 100644 --- a/plugins/scaffolder-react/api-report.md +++ b/plugins/scaffolder-react/api-report.md @@ -152,7 +152,7 @@ export type ListActionsResponse = Array; // @public export type LogEvent = { - type: 'log' | 'completion' | 'cancelled'; + type: 'log' | 'completion' | 'cancelled' | 'recovered'; body: { message: string; stepId?: string; @@ -277,6 +277,7 @@ export type ScaffolderOutputText = { title?: string; icon?: string; content?: string; + default?: boolean; }; // @public diff --git a/plugins/scaffolder-react/package.json b/plugins/scaffolder-react/package.json index fd6bcf5076..bb038cd2ee 100644 --- a/plugins/scaffolder-react/package.json +++ b/plugins/scaffolder-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-scaffolder-react", "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder", - "version": "1.7.1", + "version": "1.8.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder-react/src/api/types.ts b/plugins/scaffolder-react/src/api/types.ts index 2adecdd0d2..b4a3deea54 100644 --- a/plugins/scaffolder-react/src/api/types.ts +++ b/plugins/scaffolder-react/src/api/types.ts @@ -89,6 +89,7 @@ export type ScaffolderOutputText = { title?: string; icon?: string; content?: string; + default?: boolean; }; /** @public */ @@ -105,7 +106,7 @@ export type ScaffolderTaskOutput = { * @public */ export type LogEvent = { - type: 'log' | 'completion' | 'cancelled'; + type: 'log' | 'completion' | 'cancelled' | 'recovered'; body: { message: string; stepId?: string; diff --git a/plugins/scaffolder-react/src/hooks/useEventStream.ts b/plugins/scaffolder-react/src/hooks/useEventStream.ts index ad802dba99..f63f6024e6 100644 --- a/plugins/scaffolder-react/src/hooks/useEventStream.ts +++ b/plugins/scaffolder-react/src/hooks/useEventStream.ts @@ -62,12 +62,14 @@ type ReducerLogEntry = { message: string; output?: ScaffolderTaskOutput; error?: Error; + recoverStrategy?: 'none' | 'startOver'; }; }; type ReducerAction = | { type: 'INIT'; data: ScaffolderTask } | { type: 'CANCELLED' } + | { type: 'RECOVERED'; data: ReducerLogEntry } | { type: 'LOGS'; data: ReducerLogEntry[] } | { type: 'COMPLETED'; data: ReducerLogEntry } | { type: 'ERROR'; data: Error }; @@ -105,17 +107,19 @@ function reducer(draft: TaskStream, action: ReducerAction) { const currentStepLog = draft.stepLogs?.[entry.body.stepId]; const currentStep = draft.steps?.[entry.body.stepId]; - if (entry.body.status && entry.body.status !== currentStep.status) { - currentStep.status = entry.body.status; + if (currentStep) { + if (entry.body.status && entry.body.status !== currentStep.status) { + currentStep.status = entry.body.status; - if (currentStep.status === 'processing') { - currentStep.startedAt = entry.createdAt; - } + if (currentStep.status === 'processing') { + currentStep.startedAt = entry.createdAt; + } - if ( - ['cancelled', 'completed', 'failed'].includes(currentStep.status) - ) { - currentStep.endedAt = entry.createdAt; + if ( + ['cancelled', 'completed', 'failed'].includes(currentStep.status) + ) { + currentStep.endedAt = entry.createdAt; + } } } @@ -138,6 +142,17 @@ function reducer(draft: TaskStream, action: ReducerAction) { return; } + case 'RECOVERED': { + for (const stepId in draft.steps) { + if (draft.steps.hasOwnProperty(stepId)) { + draft.steps[stepId].startedAt = undefined; + draft.steps[stepId].endedAt = undefined; + draft.steps[stepId].status = 'open'; + } + } + return; + } + case 'ERROR': { draft.error = action.data; draft.loading = false; @@ -202,6 +217,7 @@ export const useTaskEventStream = (taskId: string): TaskStream => { subscription = observable.subscribe({ next: event => { + retryCount = 1; switch (event.type) { case 'log': return collectedLogEvents.push(event); @@ -212,6 +228,9 @@ export const useTaskEventStream = (taskId: string): TaskStream => { emitLogs(); dispatch({ type: 'COMPLETED', data: event }); return undefined; + case 'recovered': + dispatch({ type: 'RECOVERED', data: event }); + return undefined; default: throw new Error( `Unhandled event type ${event.type} in observer`, @@ -226,16 +245,18 @@ export const useTaskEventStream = (taskId: string): TaskStream => { // just to restart the fetch process // details here https://github.com/backstage/backstage/issues/15002 + const maxRetries = 3; + if (!error.message) { - error.message = `We cannot connect at the moment, trying again in some seconds... Retrying (${retryCount}/3 retries)`; + error.message = `We cannot connect at the moment, trying again in some seconds... Retrying (${ + retryCount > maxRetries ? maxRetries : retryCount + }/${maxRetries} retries)`; } - if (retryCount <= 3) { - setTimeout(() => { - retryCount += 1; - startStreamLogProcess(); - }, 15000); - } + setTimeout(() => { + retryCount += 1; + void startStreamLogProcess(); + }, 15000); dispatch({ type: 'ERROR', data: error }); }, @@ -247,7 +268,7 @@ export const useTaskEventStream = (taskId: string): TaskStream => { } }, ); - startStreamLogProcess(); + void startStreamLogProcess(); return () => { didCancel = true; if (subscription) { diff --git a/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx b/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx index c105c5a571..d3811e5011 100644 --- a/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx +++ b/plugins/scaffolder-react/src/next/components/TemplateOutputs/DefaultTemplateOutputs.tsx @@ -14,9 +14,12 @@ * limitations under the License. */ import { InfoCard, MarkdownContent } from '@backstage/core-components'; -import { ScaffolderTaskOutput } from '@backstage/plugin-scaffolder-react'; +import { + ScaffolderOutputText, + ScaffolderTaskOutput, +} from '@backstage/plugin-scaffolder-react'; import { Box, Paper } from '@material-ui/core'; -import React, { useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { LinkOutputs } from './LinkOutputs'; import { TextOutputs } from './TextOutputs'; @@ -30,9 +33,18 @@ export const DefaultTemplateOutputs = (props: { }) => { const { output } = props; const [textOutputIndex, setTextOutputIndex] = useState( - output?.text?.length ? 0 : undefined, + undefined, ); + useEffect(() => { + if (textOutputIndex === undefined && output?.text) { + const defaultIndex = output.text.findIndex( + (t: ScaffolderOutputText) => t.default, + ); + setTextOutputIndex(defaultIndex >= 0 ? defaultIndex : 0); + } + }, [textOutputIndex, output]); + const textOutput = useMemo( () => textOutputIndex !== undefined ? output?.text?.[textOutputIndex] : null, diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md index 8482d41538..2309a0554d 100644 --- a/plugins/scaffolder/CHANGELOG.md +++ b/plugins/scaffolder/CHANGELOG.md @@ -1,5 +1,39 @@ # @backstage/plugin-scaffolder +## 1.18.0-next.0 + +### Minor Changes + +- c56f1a2: Remove the old legacy exports from `/alpha` +- a86920b: Introduced a new `MultiEntityPicker` field that supports selecting multiple Entities + +### Patch Changes + +- b0d1d80: Added basic support for the new frontend system, exported from the `/alpha` subpath. +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- da059d7: Removed alpha symbol from Task List header +- 6a74ffd: Updated dependency `@rjsf/utils` to `5.16.1`. + Updated dependency `@rjsf/core` to `5.16.1`. + Updated dependency `@rjsf/material-ui` to `5.16.1`. + Updated dependency `@rjsf/validator-ajv8` to `5.16.1`. +- 11b9a08: Introduced the first version of recoverable tasks. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-scaffolder-react@1.8.0-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-scaffolder-common@1.5.0-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/types@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-react@0.4.19 + ## 1.17.1 ### Patch Changes diff --git a/plugins/scaffolder/api-report.md b/plugins/scaffolder/api-report.md index 4df1eff430..ccea88e27c 100644 --- a/plugins/scaffolder/api-report.md +++ b/plugins/scaffolder/api-report.md @@ -210,6 +210,34 @@ export function makeFieldSchemaFromZod< : never >; +// @public +export const MultiEntityPickerFieldExtension: FieldExtensionComponent_2< + string[], + { + defaultKind?: string | undefined; + allowArbitraryValues?: boolean | undefined; + defaultNamespace?: string | false | undefined; + catalogFilter?: + | Record< + string, + | string + | string[] + | { + exists?: boolean | undefined; + } + > + | Record< + string, + | string + | string[] + | { + exists?: boolean | undefined; + } + >[] + | undefined; + } +>; + // @public export const MyGroupsPickerFieldExtension: FieldExtensionComponent_2< string, diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 40364e2da7..eb6634218d 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.17.1", + "version": "1.18.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/scaffolder/src/api.ts b/plugins/scaffolder/src/api.ts index a66ac522c2..fe0d7c11d0 100644 --- a/plugins/scaffolder/src/api.ts +++ b/plugins/scaffolder/src/api.ts @@ -252,6 +252,7 @@ export class ScaffolderClient implements ScaffolderApi { : {}, }); eventSource.addEventListener('log', processEvent); + eventSource.addEventListener('recovered', processEvent); eventSource.addEventListener('cancelled', processEvent); eventSource.addEventListener('completion', (event: any) => { processEvent(event); diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.test.tsx b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.test.tsx new file mode 100644 index 0000000000..bc0a5ed32d --- /dev/null +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.test.tsx @@ -0,0 +1,694 @@ +/* + * Copyright 2020 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 { CATALOG_FILTER_EXISTS } from '@backstage/catalog-client'; +import { Entity } from '@backstage/catalog-model'; +import { CatalogApi, catalogApiRef } from '@backstage/plugin-catalog-react'; +import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; + +import { fireEvent, screen } from '@testing-library/react'; +import React from 'react'; +import { MultiEntityPicker } from './MultiEntityPicker'; +import { MultiEntityPickerProps } from './schema'; +import { ScaffolderRJSFFieldProps as FieldProps } from '@backstage/plugin-scaffolder-react'; + +const makeEntity = (kind: string, namespace: string, name: string): Entity => ({ + apiVersion: 'scaffolder.backstage.io/v1beta3', + kind, + metadata: { namespace, name }, +}); + +describe('', () => { + let entities: Entity[]; + const onChange = jest.fn(); + const schema = {}; + const required = false; + let uiSchema: MultiEntityPickerProps['uiSchema']; + const rawErrors: string[] = []; + const formData: string[] = []; + + let props: FieldProps; + + const catalogApi: jest.Mocked = { + getLocationById: jest.fn(), + getEntityByName: jest.fn(), + getEntities: jest.fn(async () => ({ items: entities })), + addLocation: jest.fn(), + getLocationByRef: jest.fn(), + removeEntityByUid: jest.fn(), + } as any; + let Wrapper: React.ComponentType>; + + beforeEach(() => { + entities = [ + makeEntity('Group', 'default', 'team-a'), + makeEntity('Group', 'default', 'squad-b'), + ]; + + Wrapper = ({ children }: { children?: React.ReactNode }) => ( + + {children} + + ); + }); + + afterEach(() => jest.resetAllMocks()); + + describe('without allowedKinds and catalogFilter', () => { + beforeEach(() => { + uiSchema = { 'ui:options': {} }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for all entities', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith(undefined); + }); + + it('updates even if there is not an exact match', async () => { + const { getByRole } = await renderInTestApp( + + + , + ); + + const input = getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'squ' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['squ']); + }); + }); + + describe('with catalogFilter', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for a specific group entity', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }); + }); + + it('allow single top level filter', async () => { + uiSchema = { + 'ui:options': { + catalogFilter: { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + }, + }; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + }); + }); + + it('search for entitities containing an specific key', async () => { + const uiSchemaWithBoolean = { + 'ui:options': { + catalogFilter: [ + { + kind: ['User'], + 'metadata.annotation.some/anotation': { exists: true }, + }, + ], + }, + }; + + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['User'], + 'metadata.annotation.some/anotation': CATALOG_FILTER_EXISTS, + }, + ], + }); + }); + }); + + describe('catalogFilter should take precedence over allowedKinds', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-group', + }, + ], + allowedKinds: ['User'], + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('searches for a Group entity', async () => { + await renderInTestApp( + + + , + ); + + expect(catalogApi.getEntities).toHaveBeenCalledWith({ + filter: [ + { + kind: ['Group'], + 'metadata.name': 'test-group', + }, + ], + }); + }); + }); + + describe('uses full entity ref', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + defaultKind: 'Group', + }, + }; + props = { + onChange, + schema, + required, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('returns the full entityRef when entity exists in the list', async () => { + const { getByRole } = await renderInTestApp( + + + , + ); + + const input = getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-a' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['group:default/team-a']); + }); + + it('returns the full entityRef when entity does not exist in the list', async () => { + const { getByRole } = await renderInTestApp( + + + , + ); + + const input = getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-b' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['group:default/team-b']); + }); + }); + + describe('Required MultiEntityPicker', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + }; + props = { + onChange, + schema, + required: true, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('User enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: '' } }); + fireEvent.blur(input); + + expect(input).toHaveValue(''); + }); + + it('User selects item', async () => { + await renderInTestApp( + + + , + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-a' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['team-a']); + }); + + it('User selects item and enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + // Open the Autocomplete dropdown + const input = screen.getByRole('textbox'); + fireEvent.click(input); + + // Select an option from the dropdown + fireEvent.change(input, { target: { value: 'team-a' } }); + + // Close the dropdown by clicking outside the Autocomplete component + const outside = screen.getByTestId('outside'); + fireEvent.mouseDown(outside); + + // Click back into the Autocomplete component + fireEvent.click(input); + + // Verify that the selected option is displayed in the input + expect(input).toHaveValue('team-a'); + + // Click the Clear button to clear the input + const clearButton = screen.getByLabelText('Clear'); + + fireEvent.click(clearButton); + + // Verify that the input is empty + expect(input).toHaveValue(''); + + // Verify that the handleChange function was called with an empty array + expect(onChange).toHaveBeenCalledWith([]); + }); + }); + + describe('Optional MultiEntityPicker', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + }; + props = { + onChange, + schema, + required: false, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('User enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: '' } }); + fireEvent.blur(input); + + expect(input).toHaveValue(''); + }); + + it('User selects item', async () => { + await renderInTestApp( + + + , + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-a' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['team-a']); + }); + + it('User selects item and enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + // Open the Autocomplete dropdown + const input = screen.getByRole('textbox'); + fireEvent.click(input); + + // Select an option from the dropdown + fireEvent.change(input, { target: { value: 'team-a' } }); + + // Close the dropdown by clicking outside the Autocomplete component + const outside = screen.getByTestId('outside'); + fireEvent.mouseDown(outside); + + // Click back into the Autocomplete component + fireEvent.click(input); + + // Verify that the selected option is displayed in the input + expect(input).toHaveValue('team-a'); + + // Click the Clear button to clear the input + const clearButton = screen.getByLabelText('Clear'); + fireEvent.click(clearButton); + + // Verify that the input is empty + expect(input).toHaveValue(''); + + // Verify that the handleChange function was called with an empty array + expect(onChange).toHaveBeenCalledWith([]); + }); + }); + + describe('Required Free Solo', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + allowArbitraryValues: true, + }; + props = { + onChange, + schema, + required: true, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('User enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: '' } }); + fireEvent.blur(input); + + expect(input).toHaveValue(''); + }); + + it('User selects item', async () => { + await renderInTestApp( + + + , + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-a' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['team-a']); + }); + + it('User selects item and enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + // Open the Autocomplete dropdown + const input = screen.getByRole('textbox'); + fireEvent.click(input); + + // Select an option from the dropdown + fireEvent.change(input, { target: { value: 'team-a' } }); + + // Close the dropdown by clicking outside the Autocomplete component + const outside = screen.getByTestId('outside'); + fireEvent.mouseDown(outside); + + // Click back into the Autocomplete component + fireEvent.click(input); + + // Verify that the selected option is displayed in the input + expect(input).toHaveValue('team-a'); + + // Click the Clear button to clear the input + const clearButton = screen.getByLabelText('Clear'); + fireEvent.click(clearButton); + + // Verify that the input is empty + expect(input).toHaveValue(''); + + // Verify that the handleChange function was called with an empty array + expect(onChange).toHaveBeenCalledWith([]); + }); + }); + + describe('Optional Free Solo', () => { + beforeEach(() => { + uiSchema = { + 'ui:options': { + catalogFilter: [ + { + kind: ['Group'], + 'metadata.name': 'test-entity', + }, + { + kind: ['User'], + 'metadata.name': 'test-entity', + }, + ], + }, + allowArbitraryValues: true, + }; + props = { + onChange, + schema, + required: false, + uiSchema, + rawErrors, + formData, + } as unknown as FieldProps; + + catalogApi.getEntities.mockResolvedValue({ items: entities }); + }); + + it('User enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: '' } }); + fireEvent.blur(input); + + expect(input).toHaveValue(''); + }); + + it('User selects item', async () => { + await renderInTestApp( + + + , + ); + + const input = screen.getByRole('textbox'); + + fireEvent.change(input, { target: { value: 'team-a' } }); + fireEvent.blur(input); + + expect(onChange).toHaveBeenCalledWith(['team-a']); + }); + + it('User selects item and enters clear input', async () => { + await renderInTestApp( + + +
Outside
+
, + ); + + // Open the Autocomplete dropdown + const input = screen.getByRole('textbox'); + fireEvent.click(input); + + // Select an option from the dropdown + fireEvent.change(input, { target: { value: 'team-a' } }); + + // Close the dropdown by clicking outside the Autocomplete component + const outside = screen.getByTestId('outside'); + fireEvent.mouseDown(outside); + + // Click back into the Autocomplete component + fireEvent.click(input); + + // Verify that the selected option is displayed in the input + expect(input).toHaveValue('team-a'); + + // Click the Clear button to clear the input + const clearButton = screen.getByLabelText('Clear'); + fireEvent.click(clearButton); + + // Verify that the input is empty + expect(input).toHaveValue(''); + + // Verify that the handleChange function was called with an empty array + expect(onChange).toHaveBeenCalledWith([]); + }); + }); +}); diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx new file mode 100644 index 0000000000..d850bbd435 --- /dev/null +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx @@ -0,0 +1,259 @@ +/* + * 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 { + type EntityFilterQuery, + CATALOG_FILTER_EXISTS, +} from '@backstage/catalog-client'; +import { + Entity, + parseEntityRef, + stringifyEntityRef, +} from '@backstage/catalog-model'; +import { useApi } from '@backstage/core-plugin-api'; +import { + catalogApiRef, + humanizeEntityRef, +} from '@backstage/plugin-catalog-react'; +import { TextField } from '@material-ui/core'; +import FormControl from '@material-ui/core/FormControl'; +import Autocomplete, { + AutocompleteChangeReason, +} from '@material-ui/lab/Autocomplete'; +import React, { useCallback, useEffect } from 'react'; +import useAsync from 'react-use/lib/useAsync'; +import { FieldValidation } from '@rjsf/utils'; +import { + MultiEntityPickerFilterQueryValue, + MultiEntityPickerProps, + MultiEntityPickerUiOptions, + MultiEntityPickerFilterQuery, +} from './schema'; + +export { MultiEntityPickerSchema } from './schema'; + +/** + * The underlying component that is rendered in the form for the `MultiEntityPicker` + * field extension. + */ +export const MultiEntityPicker = (props: MultiEntityPickerProps) => { + const { + onChange, + schema: { title = 'Entity', description = 'An entity from the catalog' }, + required, + uiSchema, + rawErrors, + formData, + idSchema, + } = props; + const catalogFilter = buildCatalogFilter(uiSchema); + const defaultKind = uiSchema['ui:options']?.defaultKind; + const defaultNamespace = + uiSchema['ui:options']?.defaultNamespace || undefined; + + const catalogApi = useApi(catalogApiRef); + + const { value: entities, loading } = useAsync(async () => { + const { items } = await catalogApi.getEntities( + catalogFilter ? { filter: catalogFilter } : undefined, + ); + return items; + }); + const allowArbitraryValues = + uiSchema['ui:options']?.allowArbitraryValues ?? true; + + const getLabel = useCallback( + (ref: string) => { + try { + return humanizeEntityRef( + parseEntityRef(ref, { defaultKind, defaultNamespace }), + { + defaultKind, + defaultNamespace, + }, + ); + } catch (err) { + return ref; + } + }, + [defaultKind, defaultNamespace], + ); + + const onSelect = useCallback( + (_: any, refs: (string | Entity)[], reason: AutocompleteChangeReason) => { + const values = refs + .map(ref => { + if (typeof ref !== 'string') { + // if ref does not exist: pass 'undefined' to trigger validation for required value + return ref ? stringifyEntityRef(ref as Entity) : undefined; + } + if (reason === 'blur' || reason === 'create-option') { + // Add in default namespace, etc. + let entityRef = ref; + try { + // Attempt to parse the entity ref into it's full form. + entityRef = stringifyEntityRef( + parseEntityRef(ref as string, { + defaultKind, + defaultNamespace, + }), + ); + } catch (err) { + // If the passed in value isn't an entity ref, do nothing. + } + + // We need to check against formData here as that's the previous value for this field. + if (formData.includes(ref) || allowArbitraryValues) { + return entityRef; + } + } + + return undefined; + }) + .filter(ref => ref !== undefined) as string[]; + + onChange(values); + }, + [onChange, formData, defaultKind, defaultNamespace, allowArbitraryValues], + ); + + useEffect(() => { + if (entities?.length === 1) { + onChange([stringifyEntityRef(entities[0])]); + } + }, [entities, onChange]); + + return ( + 0 && !formData} + > + formData && formData.includes(stringifyEntityRef(e)), + ) ?? (allowArbitraryValues && formData ? formData.map(getLabel) : []) + } + loading={loading} + onChange={onSelect} + options={entities || []} + getOptionLabel={option => + // option can be a string due to freeSolo. + typeof option === 'string' + ? option + : humanizeEntityRef(option, { defaultKind, defaultNamespace })! + } + autoSelect + freeSolo={allowArbitraryValues} + renderInput={params => ( + + )} + /> + + ); +}; + +export const validateMultiEntityPickerValidation = ( + values: string[], + validation: FieldValidation, +) => { + values.forEach(value => { + try { + parseEntityRef(value); + } catch { + validation.addError(`${value} is not a valid entity ref`); + } + }); +}; + +/** + * Converts a special `{exists: true}` value to the `CATALOG_FILTER_EXISTS` symbol. + * + * @param value - The value to convert. + * @returns The converted value. + */ +function convertOpsValues( + value: Exclude>, +): string | symbol { + if (typeof value === 'object' && value.exists) { + return CATALOG_FILTER_EXISTS; + } + return value?.toString(); +} + +/** + * Converts schema filters to entity filter query, replacing `{exists:true}` values + * with the constant `CATALOG_FILTER_EXISTS`. + * + * @param schemaFilters - An object containing schema filters with keys as filter names + * and values as filter values. + * @returns An object with the same keys as the input object, but with `{exists:true}` values + * transformed to `CATALOG_FILTER_EXISTS` symbol. + */ +function convertSchemaFiltersToQuery( + schemaFilters: MultiEntityPickerFilterQuery, +): Exclude> { + const query: EntityFilterQuery = {}; + + for (const [key, value] of Object.entries(schemaFilters)) { + if (Array.isArray(value)) { + query[key] = value; + } else { + query[key] = convertOpsValues(value); + } + } + + return query; +} + +/** + * Builds an `EntityFilterQuery` based on the `uiSchema` passed in. + * If `catalogFilter` is specified in the `uiSchema`, it is converted to a `EntityFilterQuery`. + * + * @param uiSchema The `uiSchema` of an `EntityPicker` component. + * @returns An `EntityFilterQuery` based on the `uiSchema`, or `undefined` if `catalogFilter` is not specified in the `uiSchema`. + */ +function buildCatalogFilter( + uiSchema: MultiEntityPickerProps['uiSchema'], +): EntityFilterQuery | undefined { + const catalogFilter: MultiEntityPickerUiOptions['catalogFilter'] | undefined = + uiSchema['ui:options']?.catalogFilter; + + if (!catalogFilter) { + return undefined; + } + + if (Array.isArray(catalogFilter)) { + return catalogFilter.map(convertSchemaFiltersToQuery); + } + + return convertSchemaFiltersToQuery(catalogFilter); +} diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/index.ts b/plugins/scaffolder/src/components/fields/MultiEntityPicker/index.ts new file mode 100644 index 0000000000..9a597b9b97 --- /dev/null +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/index.ts @@ -0,0 +1,20 @@ +/* + * 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. + */ + +export { + MultiEntityPickerFieldSchema, + type MultiEntityPickerUiOptions, +} from './schema'; diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/schema.ts b/plugins/scaffolder/src/components/fields/MultiEntityPicker/schema.ts new file mode 100644 index 0000000000..2621157d02 --- /dev/null +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/schema.ts @@ -0,0 +1,69 @@ +/* + * 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 { z } from 'zod'; +import { makeFieldSchemaFromZod } from '../utils'; + +export const entityQueryFilterExpressionSchema = z.record( + z + .string() + .or(z.object({ exists: z.boolean().optional() })) + .or(z.array(z.string())), +); + +export const MultiEntityPickerFieldSchema = makeFieldSchemaFromZod( + z.array(z.string()), + z.object({ + defaultKind: z + .string() + .optional() + .describe( + 'The default entity kind. Options of this kind will not be prefixed.', + ), + allowArbitraryValues: z + .boolean() + .optional() + .describe('Whether to allow arbitrary user input. Defaults to true'), + defaultNamespace: z + .union([z.string(), z.literal(false)]) + .optional() + .describe( + 'The default namespace. Options with this namespace will not be prefixed.', + ), + catalogFilter: z + .array(entityQueryFilterExpressionSchema) + .or(entityQueryFilterExpressionSchema) + .optional() + .describe('List of key-value filter expression for entities'), + }), +); + +/** + * The input props that can be specified under `ui:options` for the + * `EntityPicker` field extension. + */ +export type MultiEntityPickerUiOptions = + typeof MultiEntityPickerFieldSchema.uiOptionsType; + +export type MultiEntityPickerProps = typeof MultiEntityPickerFieldSchema.type; + +export const MultiEntityPickerSchema = MultiEntityPickerFieldSchema.schema; + +export type MultiEntityPickerFilterQuery = z.TypeOf< + typeof entityQueryFilterExpressionSchema +>; + +export type MultiEntityPickerFilterQueryValue = + MultiEntityPickerFilterQuery[keyof MultiEntityPickerFilterQuery]; diff --git a/plugins/scaffolder/src/extensions/default.ts b/plugins/scaffolder/src/extensions/default.ts index 2e4b7032de..a59f3e08e3 100644 --- a/plugins/scaffolder/src/extensions/default.ts +++ b/plugins/scaffolder/src/extensions/default.ts @@ -45,6 +45,11 @@ import { } from '../components/fields/MyGroupsPicker/MyGroupsPicker'; import { SecretInput } from '../components/fields/SecretInput'; +import { + MultiEntityPicker, + MultiEntityPickerSchema, + validateMultiEntityPickerValidation, +} from '../components/fields/MultiEntityPicker/MultiEntityPicker'; export const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [ { @@ -88,4 +93,10 @@ export const DEFAULT_SCAFFOLDER_FIELD_EXTENSIONS = [ component: SecretInput, name: 'Secret', }, + { + component: MultiEntityPicker, + name: 'MultiEntityPicker', + schema: MultiEntityPickerSchema, + validation: validateMultiEntityPickerValidation, + }, ]; diff --git a/plugins/scaffolder/src/index.ts b/plugins/scaffolder/src/index.ts index ee91d2988c..d809ec00f9 100644 --- a/plugins/scaffolder/src/index.ts +++ b/plugins/scaffolder/src/index.ts @@ -29,6 +29,7 @@ export { OwnedEntityPickerFieldExtension, MyGroupsPickerFieldExtension, RepoUrlPickerFieldExtension, + MultiEntityPickerFieldExtension, ScaffolderPage, scaffolderPlugin, } from './plugin'; diff --git a/plugins/scaffolder/src/plugin.tsx b/plugins/scaffolder/src/plugin.tsx index 7fa7dc1521..c053bfacd9 100644 --- a/plugins/scaffolder/src/plugin.tsx +++ b/plugins/scaffolder/src/plugin.tsx @@ -33,6 +33,11 @@ import { OwnerPicker, OwnerPickerSchema, } from './components/fields/OwnerPicker/OwnerPicker'; +import { + MultiEntityPicker, + MultiEntityPickerSchema, + validateMultiEntityPickerValidation, +} from './components/fields/MultiEntityPicker/MultiEntityPicker'; import { repoPickerValidation } from './components/fields/RepoUrlPicker'; import { RepoUrlPicker, @@ -134,6 +139,20 @@ export const EntityNamePickerFieldExtension = scaffolderPlugin.provide( }), ); +/** + * A field extension for selecting multiple entities that exists in the Catalog. + * + * @public + */ +export const MultiEntityPickerFieldExtension = scaffolderPlugin.provide( + createScaffolderFieldExtension({ + component: MultiEntityPicker, + name: 'MultiEntityPicker', + schema: MultiEntityPickerSchema, + validation: validateMultiEntityPickerValidation, + }), +); + /** * The field extension which provides the ability to select a RepositoryUrl. * Currently, this is an encoded URL that looks something like the following `github.com?repo=myRepoName&owner=backstage`. diff --git a/plugins/search-backend-module-catalog/CHANGELOG.md b/plugins/search-backend-module-catalog/CHANGELOG.md index 23827255ac..a9123460c3 100644 --- a/plugins/search-backend-module-catalog/CHANGELOG.md +++ b/plugins/search-backend-module-catalog/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-search-backend-module-catalog +## 0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.13 ### Patch Changes diff --git a/plugins/search-backend-module-catalog/package.json b/plugins/search-backend-module-catalog/package.json index 0b70450eb3..4fdecf1062 100644 --- a/plugins/search-backend-module-catalog/package.json +++ b/plugins/search-backend-module-catalog/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-catalog", "description": "A module for the search backend that exports catalog modules", - "version": "0.1.13", + "version": "0.1.14-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 6fd51ed2c3..5be019c3f9 100644 --- a/plugins/search-backend-module-elasticsearch/CHANGELOG.md +++ b/plugins/search-backend-module-elasticsearch/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend-module-elasticsearch +## 1.3.13-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-search-common@1.2.10 + ## 1.3.12 ### Patch Changes diff --git a/plugins/search-backend-module-elasticsearch/package.json b/plugins/search-backend-module-elasticsearch/package.json index 3a902ef255..81bc2fc72a 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.3.12", + "version": "1.3.13-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend-module-explore/CHANGELOG.md b/plugins/search-backend-module-explore/CHANGELOG.md index 42465f4002..50f12e9a3f 100644 --- a/plugins/search-backend-module-explore/CHANGELOG.md +++ b/plugins/search-backend-module-explore/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-search-backend-module-explore +## 0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-explore-common@0.0.2 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.13 ### Patch Changes diff --git a/plugins/search-backend-module-explore/package.json b/plugins/search-backend-module-explore/package.json index d238ca0c68..4c1fab7f04 100644 --- a/plugins/search-backend-module-explore/package.json +++ b/plugins/search-backend-module-explore/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-explore", "description": "A module for the search backend that exports explore modules", - "version": "0.1.13", + "version": "0.1.14-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 b186b5f409..1ea165328c 100644 --- a/plugins/search-backend-module-pg/CHANGELOG.md +++ b/plugins/search-backend-module-pg/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-search-backend-module-pg +## 0.5.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-search-common@1.2.10 + ## 0.5.18 ### Patch Changes diff --git a/plugins/search-backend-module-pg/package.json b/plugins/search-backend-module-pg/package.json index 17db1d9e38..8a39be16be 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.5.18", + "version": "0.5.19-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md index 49ddce1d45..be37af50b7 100644 --- a/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md +++ b/plugins/search-backend-module-stack-overflow-collator/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-search-backend-module-stack-overflow-collator +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.2 ### Patch Changes diff --git a/plugins/search-backend-module-stack-overflow-collator/package.json b/plugins/search-backend-module-stack-overflow-collator/package.json index 2c5508384c..865e277adc 100644 --- a/plugins/search-backend-module-stack-overflow-collator/package.json +++ b/plugins/search-backend-module-stack-overflow-collator/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-stack-overflow-collator", "description": "A module for the search backend that exports stack overflow modules", - "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/search-backend-module-techdocs/CHANGELOG.md b/plugins/search-backend-module-techdocs/CHANGELOG.md index 48ca80346c..811c7ccf5c 100644 --- a/plugins/search-backend-module-techdocs/CHANGELOG.md +++ b/plugins/search-backend-module-techdocs/CHANGELOG.md @@ -1,5 +1,23 @@ # @backstage/plugin-search-backend-module-techdocs +## 0.1.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.13 ### Patch Changes diff --git a/plugins/search-backend-module-techdocs/package.json b/plugins/search-backend-module-techdocs/package.json index 7db87300cf..dc349aa4fd 100644 --- a/plugins/search-backend-module-techdocs/package.json +++ b/plugins/search-backend-module-techdocs/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-search-backend-module-techdocs", "description": "A module for the search backend that exports techdocs modules", - "version": "0.1.13", + "version": "0.1.14-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 d9ada5e4ed..c3a8297475 100644 --- a/plugins/search-backend-node/CHANGELOG.md +++ b/plugins/search-backend-node/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-search-backend-node +## 1.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 1.2.13 ### Patch Changes diff --git a/plugins/search-backend-node/package.json b/plugins/search-backend-node/package.json index b598793b88..aa38da0003 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.2.13", + "version": "1.2.14-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 334c303d03..8ddbf86643 100644 --- a/plugins/search-backend/CHANGELOG.md +++ b/plugins/search-backend/CHANGELOG.md @@ -1,5 +1,27 @@ # @backstage/plugin-search-backend +## 1.5.0-next.0 + +### Minor Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/plugin-permission-node@0.7.21-next.0 + - @backstage/plugin-search-backend-node@1.2.14-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-permission-common@0.7.12 + - @backstage/plugin-search-common@1.2.10 + ## 1.4.9 ### Patch Changes diff --git a/plugins/search-backend/package.json b/plugins/search-backend/package.json index bea288f6b2..e66c92a05a 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.4.9", + "version": "1.5.0-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/search-react/CHANGELOG.md b/plugins/search-react/CHANGELOG.md index 08cb2bee1e..c2971227a6 100644 --- a/plugins/search-react/CHANGELOG.md +++ b/plugins/search-react/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-search-react +## 1.7.6-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-search-common@1.2.10 + ## 1.7.5 ### Patch Changes diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index c62e5e19b9..02fb2c130b 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-search-react", - "version": "1.7.5", + "version": "1.7.6-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 5acf5eea57..3611b01d8a 100644 --- a/plugins/search/CHANGELOG.md +++ b/plugins/search/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-search +## 1.4.6-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/version-bridge@1.0.7 + - @backstage/plugin-search-common@1.2.10 + ## 1.4.5 ### Patch Changes diff --git a/plugins/search/package.json b/plugins/search/package.json index 20ad8319e8..cf368caf87 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.4.5", + "version": "1.4.6-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 2ed4f848cf..fd317e88c8 100644 --- a/plugins/sentry/CHANGELOG.md +++ b/plugins/sentry/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-sentry +## 0.5.15-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.5.14 ### Patch Changes diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index f6bf651f69..7bf5a82661 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.5.14", + "version": "0.5.15-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/signals-backend/CHANGELOG.md b/plugins/signals-backend/CHANGELOG.md new file mode 100644 index 0000000000..81ad27a986 --- /dev/null +++ b/plugins/signals-backend/CHANGELOG.md @@ -0,0 +1,15 @@ +# @backstage/plugin-signals-backend + +## 0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-signals-node@0.0.1-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 diff --git a/plugins/signals-backend/package.json b/plugins/signals-backend/package.json index 2fe6d86480..58ab25c320 100644 --- a/plugins/signals-backend/package.json +++ b/plugins/signals-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals-backend", - "version": "0.0.0", + "version": "0.0.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/signals-node/CHANGELOG.md b/plugins/signals-node/CHANGELOG.md new file mode 100644 index 0000000000..ee01a4a078 --- /dev/null +++ b/plugins/signals-node/CHANGELOG.md @@ -0,0 +1,14 @@ +# @backstage/plugin-signals-node + +## 0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-events-node@0.2.19-next.0 diff --git a/plugins/signals-node/package.json b/plugins/signals-node/package.json index d3230432f1..bdfdfe396c 100644 --- a/plugins/signals-node/package.json +++ b/plugins/signals-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-signals-node", "description": "Node.js library for the signals plugin", - "version": "0.0.0", + "version": "0.0.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/signals-react/CHANGELOG.md b/plugins/signals-react/CHANGELOG.md new file mode 100644 index 0000000000..4370801b4f --- /dev/null +++ b/plugins/signals-react/CHANGELOG.md @@ -0,0 +1,10 @@ +# @backstage/plugin-signals-react + +## 0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/core-plugin-api@1.8.2 + - @backstage/types@1.1.1 diff --git a/plugins/signals-react/package.json b/plugins/signals-react/package.json index 06df050ccd..07fbd6dfbc 100644 --- a/plugins/signals-react/package.json +++ b/plugins/signals-react/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-signals-react", "description": "Web library for the signals plugin", - "version": "0.0.0", + "version": "0.0.1-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/signals/CHANGELOG.md b/plugins/signals/CHANGELOG.md new file mode 100644 index 0000000000..f180c1cc6f --- /dev/null +++ b/plugins/signals/CHANGELOG.md @@ -0,0 +1,13 @@ +# @backstage/plugin-signals + +## 0.0.1-next.0 + +### Patch Changes + +- 047bead: Add support to subscribe and publish messages through signals plugins +- Updated dependencies + - @backstage/plugin-signals-react@0.0.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 diff --git a/plugins/signals/package.json b/plugins/signals/package.json index cec95280c1..ea7953b0d4 100644 --- a/plugins/signals/package.json +++ b/plugins/signals/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-signals", - "version": "0.0.0", + "version": "0.0.1-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 87231ab9af..6d992b0442 100644 --- a/plugins/sonarqube-backend/CHANGELOG.md +++ b/plugins/sonarqube-backend/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-sonarqube-backend +## 0.2.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + ## 0.2.11 ### Patch Changes diff --git a/plugins/sonarqube-backend/package.json b/plugins/sonarqube-backend/package.json index 91f11aabfb..3819087933 100644 --- a/plugins/sonarqube-backend/package.json +++ b/plugins/sonarqube-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube-backend", - "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/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md index 36734946b6..00ac3e138b 100644 --- a/plugins/sonarqube/CHANGELOG.md +++ b/plugins/sonarqube/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-sonarqube +## 0.7.12-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-sonarqube-react@0.1.12 + ## 0.7.11 ### Patch Changes diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index 9d91262e01..99e333d170 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-sonarqube", "description": "", - "version": "0.7.11", + "version": "0.7.12-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 ae6eba08f7..2311bf211e 100644 --- a/plugins/splunk-on-call/CHANGELOG.md +++ b/plugins/splunk-on-call/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-splunk-on-call +## 0.4.19-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + ## 0.4.18 ### Patch Changes diff --git a/plugins/splunk-on-call/package.json b/plugins/splunk-on-call/package.json index ee5b1b17cd..e2045cfa8c 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.4.18", + "version": "0.4.19-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 ac375db564..103593ccc2 100644 --- a/plugins/stack-overflow-backend/CHANGELOG.md +++ b/plugins/stack-overflow-backend/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-stack-overflow-backend +## 0.2.14-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-search-backend-module-stack-overflow-collator@0.1.3-next.0 + ## 0.2.13 ### Patch Changes diff --git a/plugins/stack-overflow-backend/package.json b/plugins/stack-overflow-backend/package.json index 9356be7bd2..991eeff9f6 100644 --- a/plugins/stack-overflow-backend/package.json +++ b/plugins/stack-overflow-backend/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-stack-overflow-backend", "description": "Deprecated, consider using @backstage/plugin-search-backend-module-stack-overflow-collator instead", - "version": "0.2.13", + "version": "0.2.14-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 f13fefd91a..fd2c61a6c8 100644 --- a/plugins/stack-overflow/CHANGELOG.md +++ b/plugins/stack-overflow/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-stack-overflow +## 0.1.25-next.0 + +### Patch Changes + +- c1bc331: Fixes a bug that made the API return questions not related to the tags provided +- Updated dependencies + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/plugin-home-react@0.1.8-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/plugin-search-common@1.2.10 + ## 0.1.24 ### Patch Changes diff --git a/plugins/stack-overflow/package.json b/plugins/stack-overflow/package.json index dcce8e793f..de0aec1e61 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.24", + "version": "0.1.25-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 d90a7f158a..e5ea8b3a9d 100644 --- a/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md +++ b/plugins/tech-insights-backend-module-jsonfc/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-tech-insights-backend-module-jsonfc +## 0.1.42-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/errors@1.2.3 + - @backstage/plugin-tech-insights-common@0.2.12 + ## 0.1.41 ### Patch Changes diff --git a/plugins/tech-insights-backend-module-jsonfc/package.json b/plugins/tech-insights-backend-module-jsonfc/package.json index 3a17a952d8..1c34a2157b 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.41", + "version": "0.1.42-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 3812ef6d91..8a07042a2a 100644 --- a/plugins/tech-insights-backend/CHANGELOG.md +++ b/plugins/tech-insights-backend/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-tech-insights-backend +## 0.5.24-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/plugin-tech-insights-node@0.4.16-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + ## 0.5.23 ### Patch Changes diff --git a/plugins/tech-insights-backend/package.json b/plugins/tech-insights-backend/package.json index 92a3399683..50d86931ee 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.23", + "version": "0.5.24-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 a93118ad6a..c0208f7245 100644 --- a/plugins/tech-insights-node/CHANGELOG.md +++ b/plugins/tech-insights-node/CHANGELOG.md @@ -1,5 +1,15 @@ # @backstage/plugin-tech-insights-node +## 0.4.16-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/config@1.1.1 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + ## 0.4.15 ### Patch Changes diff --git a/plugins/tech-insights-node/package.json b/plugins/tech-insights-node/package.json index 824b4cb752..4cd03c38a7 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.4.15", + "version": "0.4.16-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 81349dfe8f..bd1b16e46f 100644 --- a/plugins/tech-insights/CHANGELOG.md +++ b/plugins/tech-insights/CHANGELOG.md @@ -1,5 +1,18 @@ # @backstage/plugin-tech-insights +## 0.3.22-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + - @backstage/plugin-tech-insights-common@0.2.12 + ## 0.3.21 ### Patch Changes diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index c37d516e06..4977053132 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.21", + "version": "0.3.22-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 073fe92739..d1eeb41b84 100644 --- a/plugins/tech-radar/CHANGELOG.md +++ b/plugins/tech-radar/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-tech-radar +## 0.6.13-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + ## 0.6.12 ### Patch Changes diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index b94382a239..ad7ca45e41 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.6.12", + "version": "0.6.13-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 9ceb5d0a09..a311522241 100644 --- a/plugins/techdocs-addons-test-utils/CHANGELOG.md +++ b/plugins/techdocs-addons-test-utils/CHANGELOG.md @@ -1,5 +1,20 @@ # @backstage/plugin-techdocs-addons-test-utils +## 1.0.27-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/plugin-catalog@1.17.0-next.0 + - @backstage/plugin-techdocs@1.9.4-next.0 + - @backstage/test-utils@1.5.0-next.0 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-techdocs-react@1.1.15 + ## 1.0.26 ### Patch Changes diff --git a/plugins/techdocs-addons-test-utils/package.json b/plugins/techdocs-addons-test-utils/package.json index bd150c9326..8f1e8e5156 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.26", + "version": "1.0.27-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 25116c2810..b5f6815373 100644 --- a/plugins/techdocs-backend/CHANGELOG.md +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-techdocs-backend +## 1.9.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-search-backend-module-techdocs@0.1.14-next.0 + - @backstage/plugin-techdocs-node@1.11.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/plugin-catalog-common@1.0.20 + - @backstage/plugin-permission-common@0.7.12 + ## 1.9.2 ### Patch Changes diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 1f13ed3d5c..d2e42c48ce 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.9.2", + "version": "1.9.3-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 c6c4070487..0405fc8948 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.1.5-next.0 + +### Patch Changes + +- 131ffdc: Fix position of the ReportIssue component when is displaying at the top of the container. +- Updated dependencies + - @backstage/core-components@0.13.10 + - @backstage/core-plugin-api@1.8.2 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/plugin-techdocs-react@1.1.15 + ## 1.1.4 ### Patch Changes diff --git a/plugins/techdocs-module-addons-contrib/package.json b/plugins/techdocs-module-addons-contrib/package.json index 1d296eb158..e19c9f3137 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.1.4", + "version": "1.1.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 c4aeb5c4d7..5da0d4f870 100644 --- a/plugins/techdocs-node/CHANGELOG.md +++ b/plugins/techdocs-node/CHANGELOG.md @@ -1,5 +1,19 @@ # @backstage/plugin-techdocs-node +## 1.11.2-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-aws-node@0.1.8 + - @backstage/plugin-search-common@1.2.10 + ## 1.11.1 ### Patch Changes diff --git a/plugins/techdocs-node/package.json b/plugins/techdocs-node/package.json index 592ae94151..dd7450bf64 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.11.1", + "version": "1.11.2-next.0", "main": "src/index.ts", "types": "src/index.ts", "publishConfig": { @@ -55,7 +55,7 @@ "@backstage/plugin-search-common": "workspace:^", "@google-cloud/storage": "^7.0.0", "@smithy/node-http-handler": "^2.1.7", - "@trendyol-js/openstack-swift-sdk": "^0.0.6", + "@trendyol-js/openstack-swift-sdk": "^0.0.7", "@types/express": "^4.17.6", "express": "^4.17.1", "fs-extra": "10.1.0", diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md index 9a982a80f5..b1b9b27eda 100644 --- a/plugins/techdocs/CHANGELOG.md +++ b/plugins/techdocs/CHANGELOG.md @@ -1,5 +1,26 @@ # @backstage/plugin-techdocs +## 1.9.4-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/plugin-search-react@1.7.6-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + - @backstage/integration-react@1.1.23 + - @backstage/theme@0.5.0 + - @backstage/plugin-search-common@1.2.10 + - @backstage/plugin-techdocs-react@1.1.15 + ## 1.9.3 ### Patch Changes diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 51c631e8ec..829aaa9475 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.9.3", + "version": "1.9.4-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 bbda40e0a7..fb9f17ab83 100644 --- a/plugins/todo-backend/CHANGELOG.md +++ b/plugins/todo-backend/CHANGELOG.md @@ -1,5 +1,22 @@ # @backstage/plugin-todo-backend +## 0.3.8-next.0 + +### Patch Changes + +- 126c2f9: Updates the OpenAPI spec to use plugin as `info.title` instead of package name. +- 04907c3: Updates the OpenAPI specification title to plugin ID instead of package name. +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-openapi-utils@0.1.3-next.0 + - @backstage/catalog-client@1.6.0-next.0 + - @backstage/plugin-catalog-node@1.6.2-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/catalog-model@1.4.3 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/integration@1.8.0 + ## 0.3.7 ### Patch Changes diff --git a/plugins/todo-backend/package.json b/plugins/todo-backend/package.json index ddf3baac3d..53c80f3b64 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.3.7", + "version": "0.3.8-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 bc736a73fc..6217ff3d99 100644 --- a/plugins/todo/CHANGELOG.md +++ b/plugins/todo/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-todo +## 0.2.34-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.2.33 ### Patch Changes diff --git a/plugins/todo/package.json b/plugins/todo/package.json index d7ee6b83c0..539a1ead3d 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.33", + "version": "0.2.34-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 c9ab9a3263..96bc93a65c 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.2.9-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/plugin-auth-node@0.4.4-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/types@1.1.1 + ## 0.2.8 ### Patch Changes diff --git a/plugins/user-settings-backend/package.json b/plugins/user-settings-backend/package.json index d3c3abca49..8cabb70468 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.2.8", + "version": "0.2.9-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 e733ca5372..2c4a5edf5d 100644 --- a/plugins/user-settings/CHANGELOG.md +++ b/plugins/user-settings/CHANGELOG.md @@ -1,5 +1,21 @@ # @backstage/plugin-user-settings +## 0.8.1-next.0 + +### Patch Changes + +- 912ca7b: Use `convertLegacyRouteRefs` to define routes in `/alpha` export plugin. +- Updated dependencies + - @backstage/core-compat-api@0.1.2-next.0 + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/frontend-plugin-api@0.5.1-next.0 + - @backstage/core-components@0.13.10 + - @backstage/core-app-api@1.11.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + - @backstage/theme@0.5.0 + - @backstage/types@1.1.1 + ## 0.8.0 ### Minor Changes diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index c873786874..015a13e143 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.8.0", + "version": "0.8.1-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 efc029a962..1bc3dc2bf3 100644 --- a/plugins/vault-backend/CHANGELOG.md +++ b/plugins/vault-backend/CHANGELOG.md @@ -1,5 +1,17 @@ # @backstage/plugin-vault-backend +## 0.4.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-common@0.21.0-next.0 + - @backstage/backend-tasks@0.5.15-next.0 + - @backstage/backend-plugin-api@0.6.10-next.0 + - @backstage/config@1.1.1 + - @backstage/errors@1.2.3 + - @backstage/plugin-vault-node@0.1.3-next.0 + ## 0.4.2 ### Patch Changes diff --git a/plugins/vault-backend/package.json b/plugins/vault-backend/package.json index ed98b0f441..247925856c 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.4.2", + "version": "0.4.3-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/plugins/vault-node/CHANGELOG.md b/plugins/vault-node/CHANGELOG.md index 7b7c8e0d6e..0105ba6667 100644 --- a/plugins/vault-node/CHANGELOG.md +++ b/plugins/vault-node/CHANGELOG.md @@ -1,5 +1,12 @@ # @backstage/plugin-vault-node +## 0.1.3-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/backend-plugin-api@0.6.10-next.0 + ## 0.1.2 ### Patch Changes diff --git a/plugins/vault-node/package.json b/plugins/vault-node/package.json index b3977cf3a5..4b0f3cc630 100644 --- a/plugins/vault-node/package.json +++ b/plugins/vault-node/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-vault-node", "description": "Node.js library for the vault plugin", - "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/vault/CHANGELOG.md b/plugins/vault/CHANGELOG.md index bb5e881c8f..888c06fc68 100644 --- a/plugins/vault/CHANGELOG.md +++ b/plugins/vault/CHANGELOG.md @@ -1,5 +1,16 @@ # @backstage/plugin-vault +## 0.1.25-next.0 + +### Patch Changes + +- Updated dependencies + - @backstage/plugin-catalog-react@1.9.4-next.0 + - @backstage/core-components@0.13.10 + - @backstage/catalog-model@1.4.3 + - @backstage/core-plugin-api@1.8.2 + - @backstage/errors@1.2.3 + ## 0.1.24 ### Patch Changes diff --git a/plugins/vault/package.json b/plugins/vault/package.json index 2ad4f60d66..5d2b3c5c7b 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.24", + "version": "0.1.25-next.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/yarn.lock b/yarn.lock index 6a3ba7215f..8819656d26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3468,6 +3468,18 @@ __metadata: languageName: unknown linkType: soft +"@backstage/catalog-client@npm:^1.5.2": + version: 1.5.2 + resolution: "@backstage/catalog-client@npm:1.5.2" + dependencies: + "@backstage/catalog-model": ^1.4.3 + "@backstage/errors": ^1.2.3 + cross-fetch: ^4.0.0 + uri-template: ^2.0.0 + checksum: 70fe43269c016830fa1b4c1a58425c38cdaa704e07d4913a39e1e9aaa8680614177f9d1b2f4b0d8c50f356868c745d69d8bb6d03f56e8be97c6a3502a41c9431 + 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" @@ -3972,7 +3984,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/errors@workspace:^, @backstage/errors@workspace:packages/errors": +"@backstage/errors@^1.2.3, @backstage/errors@workspace:^, @backstage/errors@workspace:packages/errors": version: 0.0.0-use.local resolution: "@backstage/errors@workspace:packages/errors" dependencies: @@ -4020,6 +4032,26 @@ __metadata: languageName: unknown linkType: soft +"@backstage/frontend-plugin-api@npm:^0.5.0": + version: 0.5.0 + resolution: "@backstage/frontend-plugin-api@npm:0.5.0" + dependencies: + "@backstage/core-components": ^0.13.10 + "@backstage/core-plugin-api": ^1.8.2 + "@backstage/types": ^1.1.1 + "@backstage/version-bridge": ^1.0.7 + "@material-ui/core": ^4.12.4 + "@types/react": ^16.13.1 || ^17.0.0 + lodash: ^4.17.21 + zod: ^3.22.4 + zod-to-json-schema: ^3.21.4 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: e21742463937f2ad14234dc2f75a650df50dcdaae596df38540a5a21bce28c6693f1c3fe43b6aaea9cca9fd4bcd5c0cab5a77880a6e2bf11f14811bcaa9b3c6c + languageName: node + linkType: hard + "@backstage/frontend-plugin-api@workspace:^, @backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api": version: 0.0.0-use.local resolution: "@backstage/frontend-plugin-api@workspace:packages/frontend-plugin-api" @@ -4083,7 +4115,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/integration-react@^1.1.21, @backstage/integration-react@workspace:^, @backstage/integration-react@workspace:packages/integration-react": +"@backstage/integration-react@^1.1.21, @backstage/integration-react@^1.1.23, @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: @@ -4887,9 +4919,15 @@ __metadata: "@azure/arm-resourcegraph": ^4.2.1 "@azure/identity": ^4.0.0 "@backstage/backend-common": "workspace:^" + "@backstage/catalog-client": "workspace:^" + "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" + "@backstage/errors": "workspace:^" + "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-azure-sites-common": "workspace:^" + "@backstage/plugin-permission-common": "workspace:^" + "@backstage/plugin-permission-node": "workspace:^" "@types/express": ^4.17.6 "@types/supertest": ^2.0.8 express: ^4.17.1 @@ -4904,7 +4942,10 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-azure-sites-common@workspace:plugins/azure-sites-common" dependencies: + "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" + "@backstage/plugin-catalog-common": "workspace:^" + "@backstage/plugin-permission-common": "workspace:^" languageName: unknown linkType: soft @@ -4919,7 +4960,10 @@ __metadata: "@backstage/dev-utils": "workspace:^" "@backstage/plugin-azure-sites-common": "workspace:^" "@backstage/plugin-catalog-react": "workspace:^" + "@backstage/plugin-permission-common": "workspace:^" + "@backstage/plugin-permission-react": "workspace:^" "@backstage/test-utils": "workspace:^" + "@backstage/theme": "workspace:^" "@material-ui/core": ^4.12.2 "@material-ui/icons": ^4.9.1 "@material-ui/lab": 4.0.0-alpha.61 @@ -5045,7 +5089,7 @@ __metadata: "@openapitools/openapi-generator-cli": ^2.4.26 cross-fetch: ^4.0.0 msw: ^1.0.0 - ts-morph: ^20.0.0 + ts-morph: ^21.0.0 languageName: unknown linkType: soft @@ -5651,7 +5695,43 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-catalog-react@^1.9.1, @backstage/plugin-catalog-react@^1.9.3, @backstage/plugin-catalog-react@workspace:^, @backstage/plugin-catalog-react@workspace:plugins/catalog-react": +"@backstage/plugin-catalog-react@npm:^1.9.1, @backstage/plugin-catalog-react@npm:^1.9.3": + version: 1.9.3 + resolution: "@backstage/plugin-catalog-react@npm:1.9.3" + dependencies: + "@backstage/catalog-client": ^1.5.2 + "@backstage/catalog-model": ^1.4.3 + "@backstage/core-components": ^0.13.10 + "@backstage/core-plugin-api": ^1.8.2 + "@backstage/errors": ^1.2.3 + "@backstage/frontend-plugin-api": ^0.5.0 + "@backstage/integration-react": ^1.1.23 + "@backstage/plugin-catalog-common": ^1.0.20 + "@backstage/plugin-permission-common": ^0.7.12 + "@backstage/plugin-permission-react": ^0.4.19 + "@backstage/types": ^1.1.1 + "@backstage/version-bridge": ^1.0.7 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": 4.0.0-alpha.61 + "@react-hookz/web": ^23.0.0 + "@types/react": ^16.13.1 || ^17.0.0 + classnames: ^2.2.6 + lodash: ^4.17.21 + material-ui-popup-state: ^1.9.3 + qs: ^6.9.4 + react-use: ^17.2.4 + yaml: ^2.0.0 + zen-observable: ^0.10.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: 2c24a269b2718e77a73c782138c8a68fea17353b517e664ac7dc8e079f9eea6415960efc92e99d555ff749c53df2d843566ae7632581f9f5d7e247b316dd54e4 + 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: @@ -6847,7 +6927,25 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-home-react@^0.1.5, @backstage/plugin-home-react@workspace:^, @backstage/plugin-home-react@workspace:plugins/home-react": +"@backstage/plugin-home-react@npm:^0.1.5": + version: 0.1.7 + resolution: "@backstage/plugin-home-react@npm:0.1.7" + dependencies: + "@backstage/core-components": ^0.13.10 + "@backstage/core-plugin-api": ^1.8.2 + "@material-ui/core": ^4.12.2 + "@material-ui/icons": ^4.9.1 + "@rjsf/utils": 5.15.1 + "@types/react": ^16.13.1 || ^17.0.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: 9777b3e3d696c93f49a0e20d704826faffb3afb550975e498c034dc9b3bb1202eb1defbe8e2639f979ccba949771ecece26e15dd1aa1f0268f2c20de97b6600c + languageName: node + linkType: hard + +"@backstage/plugin-home-react@workspace:^, @backstage/plugin-home-react@workspace:plugins/home-react": version: 0.0.0-use.local resolution: "@backstage/plugin-home-react@workspace:plugins/home-react" dependencies: @@ -7161,11 +7259,20 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-kubernetes-node@workspace:plugins/kubernetes-node" dependencies: + "@backstage/backend-app-api": "workspace:^" + "@backstage/backend-common": "workspace:^" "@backstage/backend-plugin-api": "workspace:^" + "@backstage/backend-test-utils": "workspace:^" "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" + "@backstage/plugin-kubernetes-backend": "workspace:^" "@backstage/plugin-kubernetes-common": "workspace:^" "@backstage/types": "workspace:^" + "@kubernetes/client-node": ^0.20.0 + msw: ^1.3.1 + node-fetch: ^2.6.7 + supertest: ^6.1.3 + winston: ^3.2.1 languageName: unknown linkType: soft @@ -7725,7 +7832,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-common@workspace:^, @backstage/plugin-permission-common@workspace:plugins/permission-common": +"@backstage/plugin-permission-common@^0.7.12, @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" dependencies: @@ -7763,7 +7870,7 @@ __metadata: languageName: unknown linkType: soft -"@backstage/plugin-permission-react@workspace:^, @backstage/plugin-permission-react@workspace:plugins/permission-react": +"@backstage/plugin-permission-react@^0.4.19, @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" dependencies: @@ -7974,6 +8081,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-azure@workspace:plugins/scaffolder-backend-module-azure" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" @@ -7989,12 +8097,14 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-bitbucket@workspace:plugins/scaffolder-backend-module-bitbucket" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" "@backstage/errors": "workspace:^" "@backstage/integration": "workspace:^" "@backstage/plugin-scaffolder-node": "workspace:^" + fs-extra: 10.1.0 msw: ^1.0.0 node-fetch: ^2.6.7 yaml: ^2.0.0 @@ -8006,6 +8116,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-confluence-to-markdown@workspace:plugins/scaffolder-backend-module-confluence-to-markdown" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8026,6 +8137,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-cookiecutter@workspace:plugins/scaffolder-backend-module-cookiecutter" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8047,6 +8159,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-gerrit@workspace:plugins/scaffolder-backend-module-gerrit" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8064,6 +8177,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-github@workspace:plugins/scaffolder-backend-module-github" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8088,6 +8202,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-gitlab@workspace:plugins/scaffolder-backend-module-gitlab" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8109,6 +8224,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-rails@workspace:plugins/scaffolder-backend-module-rails" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8129,6 +8245,7 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-scaffolder-backend-module-sentry@workspace:plugins/scaffolder-backend-module-sentry" dependencies: + "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/config": "workspace:^" @@ -8145,6 +8262,7 @@ __metadata: resolution: "@backstage/plugin-scaffolder-backend-module-yeoman@workspace:plugins/scaffolder-backend-module-yeoman" dependencies: "@backstage/backend-common": "workspace:^" + "@backstage/backend-plugin-api": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/plugin-scaffolder-node": "workspace:^" "@backstage/types": "workspace:^" @@ -9187,7 +9305,7 @@ __metadata: "@backstage/plugin-search-common": "workspace:^" "@google-cloud/storage": ^7.0.0 "@smithy/node-http-handler": ^2.1.7 - "@trendyol-js/openstack-swift-sdk": ^0.0.6 + "@trendyol-js/openstack-swift-sdk": ^0.0.7 "@types/express": ^4.17.6 "@types/fs-extra": ^9.0.5 "@types/js-yaml": ^4.0.0 @@ -9676,15 +9794,6 @@ __metadata: languageName: node linkType: hard -"@bundled-es-modules/js-levenshtein@npm:^2.0.1": - version: 2.0.1 - resolution: "@bundled-es-modules/js-levenshtein@npm:2.0.1" - dependencies: - js-levenshtein: ^1.1.6 - checksum: 13d0cbd2b00e563e09a797559dcff8c7e208c1f71e1787535a3d248f7e3d33ef3f0809b9f498d41788ab5fd399882dcca79917d70d97921b7dde94a282c1b7d8 - languageName: node - linkType: hard - "@bundled-es-modules/statuses@npm:^1.0.1": version: 1.0.1 resolution: "@bundled-es-modules/statuses@npm:1.0.1" @@ -14830,6 +14939,21 @@ __metadata: languageName: node linkType: hard +"@rjsf/utils@npm:5.15.1": + version: 5.15.1 + resolution: "@rjsf/utils@npm:5.15.1" + dependencies: + json-schema-merge-allof: ^0.8.1 + jsonpointer: ^5.0.1 + lodash: ^4.17.21 + lodash-es: ^4.17.21 + react-is: ^18.2.0 + peerDependencies: + react: ^16.14.0 || >=17 + checksum: ec0d56bf2627d55759a59090db0d59402244a6fae64528f66dde1f5de2eaaf2a6841dea7bbb185eb36fd344b3abd4825b2b422f3b1b0bb05365847073aa1e790 + languageName: node + linkType: hard + "@rjsf/utils@npm:5.16.1": version: 5.16.1 resolution: "@rjsf/utils@npm:5.16.1" @@ -17118,8 +17242,8 @@ __metadata: linkType: hard "@testing-library/jest-dom@npm:^6.0.0": - version: 6.2.0 - resolution: "@testing-library/jest-dom@npm:6.2.0" + version: 6.3.0 + resolution: "@testing-library/jest-dom@npm:6.3.0" dependencies: "@adobe/css-tools": ^4.3.2 "@babel/runtime": ^7.9.2 @@ -17131,19 +17255,22 @@ __metadata: redent: ^3.0.0 peerDependencies: "@jest/globals": ">= 28" + "@types/bun": "*" "@types/jest": ">= 28" jest: ">= 28" vitest: ">= 0.32" peerDependenciesMeta: "@jest/globals": optional: true + "@types/bun": + optional: true "@types/jest": optional: true jest: optional: true vitest: optional: true - checksum: 3d46e36b1b7c2cb3c92f64d55d458aab44ae135ac77299df14d14dcf567a286590de58b2f140011b8f7a343f0703ff88f144f27c6ae4921fd612741771d8ee2c + checksum: cea8aa17895cf4aff573fedee80e8a592611caf7bc724702fc70b3b7bfee94becd3a10873c818d931424018d6fdeeca9d1a2ea5f53b74092ad5e8e09f03dde90 languageName: node linkType: hard @@ -17220,15 +17347,15 @@ __metadata: languageName: node linkType: hard -"@trendyol-js/openstack-swift-sdk@npm:^0.0.6": - version: 0.0.6 - resolution: "@trendyol-js/openstack-swift-sdk@npm:0.0.6" +"@trendyol-js/openstack-swift-sdk@npm:^0.0.7": + version: 0.0.7 + resolution: "@trendyol-js/openstack-swift-sdk@npm:0.0.7" dependencies: agentkeepalive: ^4.1.4 - axios: ^0.21.1 + axios: ^1.0.0 axios-cached-dns-resolve: 0.5.2 file-type: ^16.5.4 - checksum: 999a1afa5f0dc2b1f41c1c13104f68d147c488b7ee5836581cc5acb485b9e963fb822177b6996a901339a06a9900dd8ff78ed7fd8b1d29f2c2f7809c5c54c62a + checksum: 06d39c350d9c70a4fee0ff7bc12f29784a92e162b5a72dd28aacccfa523826f113d599cbb706b631f534c2dcb48cc252078e853e3dfa953c6223606d052f64b8 languageName: node linkType: hard @@ -17239,15 +17366,15 @@ __metadata: languageName: node linkType: hard -"@ts-morph/common@npm:~0.21.0": - version: 0.21.0 - resolution: "@ts-morph/common@npm:0.21.0" +"@ts-morph/common@npm:~0.22.0": + version: 0.22.0 + resolution: "@ts-morph/common@npm:0.22.0" dependencies: - fast-glob: ^3.2.12 - minimatch: ^7.4.3 - mkdirp: ^2.1.6 + fast-glob: ^3.3.2 + minimatch: ^9.0.3 + mkdirp: ^3.0.1 path-browserify: ^1.0.1 - checksum: c322e2a58608d7d924646b10ba9ad432b03e7b119788c9f0f270550bd5aca22947fcaa1c63f27e80898a50de3ed99fc8d9c23569c6a2f3f36c9307e35ceba3ed + checksum: e549facfff2a68eeef4e3e2c4183e7216a02b57e62cdfe60ca15d5fdee24770bd3b5b6d1a0388cfce7b4dfaeb0ebe31ffa40585e36b9fb7948aea8081fa73769 languageName: node linkType: hard @@ -18101,7 +18228,7 @@ __metadata: languageName: node linkType: hard -"@types/js-levenshtein@npm:^1.1.1, @types/js-levenshtein@npm:^1.1.3": +"@types/js-levenshtein@npm:^1.1.1": version: 1.1.3 resolution: "@types/js-levenshtein@npm:1.1.3" checksum: eb338696da976925ea8448a42d775d7615a14323dceeb08909f187d0b3d3b4c1f67a1c36ef586b1c2318b70ab141bba8fc58311ba1c816711704605aec09db8b @@ -20886,7 +21013,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.6.5, axios@npm:^1.4.0, axios@npm:^1.6.0": +"axios@npm:1.6.5, axios@npm:^1.0.0, axios@npm:^1.4.0, axios@npm:^1.6.0": version: 1.6.5 resolution: "axios@npm:1.6.5" dependencies: @@ -26544,6 +26671,7 @@ __metadata: "@backstage/plugin-auth-node": "workspace:^" "@backstage/plugin-azure-devops-backend": "workspace:^" "@backstage/plugin-azure-sites-backend": "workspace:^" + "@backstage/plugin-azure-sites-common": "workspace:^" "@backstage/plugin-badges-backend": "workspace:^" "@backstage/plugin-catalog-backend": "workspace:^" "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "workspace:^" @@ -26919,16 +27047,16 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9": - version: 3.2.12 - resolution: "fast-glob@npm:3.2.12" +"fast-glob@npm:^3.2.11, fast-glob@npm:^3.2.12, fast-glob@npm:^3.2.9, fast-glob@npm:^3.3.2": + version: 3.3.2 + resolution: "fast-glob@npm:3.3.2" dependencies: "@nodelib/fs.stat": ^2.0.2 "@nodelib/fs.walk": ^1.2.3 glob-parent: ^5.1.2 merge2: ^1.3.0 micromatch: ^4.0.4 - checksum: 0b1990f6ce831c7e28c4d505edcdaad8e27e88ab9fa65eedadb730438cfc7cde4910d6c975d6b7b8dc8a73da4773702ebcfcd6e3518e73938bb1383badfe01c2 + checksum: 900e4979f4dbc3313840078419245621259f349950411ca2fa445a2f9a1a6d98c3b5e7e0660c5ccd563aa61abe133a21765c6c0dec8e57da1ba71d8000b05ec1 languageName: node linkType: hard @@ -34075,7 +34203,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:9.0.3, minimatch@npm:^9.0.1": +"minimatch@npm:9.0.3, minimatch@npm:^9.0.1, minimatch@npm:^9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" dependencies: @@ -34323,12 +34451,12 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^2.1.6": - version: 2.1.6 - resolution: "mkdirp@npm:2.1.6" +"mkdirp@npm:^3.0.1": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" bin: mkdirp: dist/cjs/src/bin.js - checksum: 8a1d09ffac585e55f41c54f445051f5bc33a7de99b952bb04c576cafdf1a67bb4bae8cb93736f7da6838771fbf75bc630430a3a59e1252047d2278690bd150ee + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d languageName: node linkType: hard @@ -34485,17 +34613,15 @@ __metadata: linkType: hard "msw@npm:^2.0.0, msw@npm:^2.0.8": - version: 2.1.3 - resolution: "msw@npm:2.1.3" + version: 2.1.4 + resolution: "msw@npm:2.1.4" dependencies: "@bundled-es-modules/cookie": ^2.0.0 - "@bundled-es-modules/js-levenshtein": ^2.0.1 "@bundled-es-modules/statuses": ^1.0.1 "@mswjs/cookies": ^1.1.0 "@mswjs/interceptors": ^0.25.14 "@open-draft/until": ^2.1.0 "@types/cookie": ^0.6.0 - "@types/js-levenshtein": ^1.1.3 "@types/statuses": ^2.0.4 chalk: ^4.1.2 chokidar: ^3.4.2 @@ -34503,7 +34629,6 @@ __metadata: headers-polyfill: ^4.0.2 inquirer: ^8.2.0 is-node-process: ^1.2.0 - js-levenshtein: ^1.1.6 outvariant: ^1.4.2 path-to-regexp: ^6.2.0 strict-event-emitter: ^0.5.1 @@ -34516,7 +34641,7 @@ __metadata: optional: true bin: msw: cli/index.js - checksum: 0380a2c5c03608f066037bd76e543406a8c625cdc138bc5de220ec1831fe36cf3616246bdb3eaed96c96c7e967b2874975aff899c8e673d64a0182835e73bacb + checksum: da8aaf9682ac48a635966beef9add9493297de797b266066bcd8ae0c2708488b81558251412e41489511a63deda1774b42e28197e9b73ddf14d9ecf8bb916e7a languageName: node linkType: hard @@ -42481,13 +42606,13 @@ __metadata: languageName: node linkType: hard -"ts-morph@npm:^20.0.0": - version: 20.0.0 - resolution: "ts-morph@npm:20.0.0" +"ts-morph@npm:^21.0.0": + version: 21.0.1 + resolution: "ts-morph@npm:21.0.1" dependencies: - "@ts-morph/common": ~0.21.0 + "@ts-morph/common": ~0.22.0 code-block-writer: ^12.0.0 - checksum: 8a96d72a26e4e3c4139c581834364a97207f78a5878f70aa6f58787c0f4003a9386a64f43b814bac7bf028e572ef8660939f56844641b05bfaf7ae7437be9011 + checksum: f8e6acd4cdb2842af47ccf4e8900dc3f230f20c3b0d28e1e8b58c395b0a16d7b3e03ef56f29da3fdb861c50e22eb52524e0fc4bfca0fde8448f81b8f4f6aa157 languageName: node linkType: hard