diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 2425228..6648d4a 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -19,6 +19,9 @@ updates: update-types: - minor dependency-type: production + openapi: + patterns: + - "*openapi*" eslint: patterns: - "*eslint*" diff --git a/.github/workflows/node.js.yaml b/.github/workflows/node.js.yaml index 12d496a..447a072 100644 --- a/.github/workflows/node.js.yaml +++ b/.github/workflows/node.js.yaml @@ -72,7 +72,6 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.ref }} - ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }} - uses: pnpm/action-setup@v4 with: version: latest @@ -117,11 +116,5 @@ jobs: [dependabot skip] skip-empty: true - - name: Push - if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit - run: | - eval `ssh-agent -s` - ssh-add - <<< "$DEPLOY_KEY_PRIVATE" - git push - env: - DEPLOY_KEY_PRIVATE: ${{ secrets.DEPLOY_KEY_PRIVATE }} + - if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit + run: git push diff --git a/.github/workflows/pnpm-publish.yaml b/.github/workflows/pnpm-publish.yaml index 6d831f3..0b1f97a 100644 --- a/.github/workflows/pnpm-publish.yaml +++ b/.github/workflows/pnpm-publish.yaml @@ -45,6 +45,7 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.CODERABBIT_NPM_TOKEN }} - run: pnpm pack --pack-gzip-level 9 - - run: gh release upload ${{ github.ref_name }} coderabbitai-bitbucket-*.tgz + - run: gh release create "$VERSION" --generate-notes --title "$VERSION" --verify-tag coderabbitai-bitbucket-*.tgz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ github.ref_name }} diff --git a/.github/workflows/pnpm-version-patch.yaml b/.github/workflows/pnpm-version-patch.yaml deleted file mode 100644 index e752fbf..0000000 --- a/.github/workflows/pnpm-version-patch.yaml +++ /dev/null @@ -1,96 +0,0 @@ -name: Node.js Patch - -on: workflow_dispatch - -jobs: - patch: - runs-on: ubuntu-latest - - if: github.actor != 'nektos/act' && github.ref_name == 'main' - - permissions: - contents: write - - outputs: - version: ${{ steps.patch.outputs.VERSION }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.ref }} - ssh-key: ${{ secrets.DEPLOY_KEY_PRIVATE }} - - uses: pnpm/action-setup@v4 - with: - version: latest - - - id: patch - run: | - echo "VERSION=$(pnpm version patch --no-git-tag-version)" >> "$GITHUB_OUTPUT" - git add . - - - id: commit - uses: qoomon/actions--create-commit@v1 - with: - message: 🔖 ${{ steps.patch.outputs.VERSION }} - - - name: Push - run: | - eval `ssh-agent -s` - ssh-add - <<< "$DEPLOY_KEY_PRIVATE" - git push - env: - DEPLOY_KEY_PRIVATE: ${{ secrets.DEPLOY_KEY_PRIVATE }} - - - run: gh release create "$VERSION" --generate-notes --target "$COMMIT" --title "$VERSION" - env: - COMMIT: ${{ steps.commit.outputs.commit }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ steps.patch.outputs.VERSION }} - - publish: - runs-on: ubuntu-latest - - needs: patch - - permissions: - contents: write # Upload the release files - id-token: write # Add `--provenance` - packages: write # Publish the package - - if: github.actor != 'nektos/act' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ needs.patch.outputs.version }} - - uses: pnpm/action-setup@v4 - with: - version: latest - - uses: actions/setup-node@v4 - with: - cache: pnpm - node-version: latest - - run: pnpm install - - run: pnpm build - - - uses: actions/setup-node@v4 - with: - registry-url: https://npm.pkg.github.com - scope: "@coderabbitai" - - run: pnpm publish --access public --no-git-checks --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/setup-node@v4 - with: - registry-url: https://registry.npmjs.org - scope: "@coderabbitai" - - run: pnpm publish --access public --no-git-checks --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.CODERABBIT_NPM_TOKEN }} - - - run: pnpm pack --pack-gzip-level 9 - - run: gh release upload "$VERSION" coderabbitai-bitbucket-*.tgz - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VERSION: ${{ needs.patch.outputs.version }} diff --git a/package.json b/package.json index bd66f30..3e236e4 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "postopenapi-typescript:server": "ts-autofix ./src/server/openapi && pnpm run lint:fix" }, "dependencies": { - "openapi-fetch": "^0.13.4" + "openapi-fetch": "~0.14.0" }, "devDependencies": { "@eslint/js": "^9.21.0", @@ -61,7 +61,7 @@ "eslint-config-prettier": "^10.0.2", "globals": "^16.0.0", "markdownlint-cli2": "^0.18.1", - "openapi-typescript": "^7.6.1", + "openapi-typescript": "^7.8.0", "prettier": "^3.5.2", "ts-autofix": "^1.0.0", "typedoc": "^0.28.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c350f24..010a4cd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: openapi-fetch: - specifier: ^0.13.4 - version: 0.13.8 + specifier: ~0.14.0 + version: 0.14.0 devDependencies: '@eslint/js': specifier: ^9.21.0 @@ -37,7 +37,7 @@ importers: specifier: ^0.18.1 version: 0.18.1 openapi-typescript: - specifier: ^7.6.1 + specifier: ^7.8.0 version: 7.8.0(typescript@5.8.3) prettier: specifier: ^3.5.2 @@ -1213,8 +1213,8 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - openapi-fetch@0.13.8: - resolution: {integrity: sha512-yJ4QKRyNxE44baQ9mY5+r/kAzZ8yXMemtNAOFwOzRXJscdjSxxzWSNlyBAr+o5JjkUw9Lc3W7OIoca0cY3PYnQ==} + openapi-fetch@0.14.0: + resolution: {integrity: sha512-PshIdm1NgdLvb05zp8LqRQMNSKzIlPkyMxYFxwyHR+UlKD4t2nUjkDhNxeRbhRSEd3x5EUNh2w5sJYwkhOH4fg==} openapi-typescript-helpers@0.0.15: resolution: {integrity: sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==} @@ -2732,7 +2732,7 @@ snapshots: natural-compare@1.4.0: {} - openapi-fetch@0.13.8: + openapi-fetch@0.14.0: dependencies: openapi-typescript-helpers: 0.0.15 diff --git a/src/cloud/openapi/openapi-typescript.ts b/src/cloud/openapi/openapi-typescript.ts index 7a0c5a0..1a46b02 100644 --- a/src/cloud/openapi/openapi-typescript.ts +++ b/src/cloud/openapi/openapi-typescript.ts @@ -1589,6 +1589,8 @@ export interface paths { * 2. Always a `production` property for the production branch. The * production branch can be disabled. * 3. The `branch_types` contains all the branch types. + * 4. `default_branch_deletion` indicates whether branches will be + * deleted by default on merge. * * This is the raw configuration for the branching model. A client * wishing to see the branching model with its actual current branches may @@ -1689,6 +1691,12 @@ export interface paths { * properties not passed will be left unchanged. Each branch type must * have a `kind` property to identify it. * + * The `default_branch_deletion` property is a string. The value of `true` + * indicates to delete branches by default. The value of `false` indicates + * that branches will not be deleted by default. A request without a + * `default_branch_deletion` property will leave it unchanged. Other values + * would be ignored. + * * There is currently a side effect when using this API endpoint. If the * repository is inheriting branching model settings from its project, * updating the branching model for this repository will disable the @@ -17681,6 +17689,8 @@ export interface paths { * 2. Always a `production` property for the production branch. The * production branch can be disabled. * 3. The `branch_types` contains all the branch types. + * 4. `default_branch_deletion` indicates whether branches will be + * deleted by default on merge. * * * This is the raw configuration for the branching model. A client @@ -17770,6 +17780,12 @@ export interface paths { * left disabled. Only the passed properties will be updated. The * properties not passed will be left unchanged. Each branch type must * have a `kind` property to identify it. + * + * The `default_branch_deletion` property is a string. The value of `true` + * indicates to delete branches by default. The value of `false` indicates + * that branches will not be deleted by default. A request without a + * `default_branch_deletion` property will leave it unchanged. Other values + * would be ignored. */ readonly put: { readonly parameters: { @@ -22227,6 +22243,8 @@ export interface components { * id. * */ readonly participants?: readonly components["schemas"]["participant"][] + /** @description A boolean flag indicating whether the pull request is queued */ + readonly queued?: boolean /** @description Explains why a pull request was declined. This field is only applicable to pull requests in rejected state. */ readonly reason?: string /** diff --git a/src/cloud/openapi/swagger.v3.json b/src/cloud/openapi/swagger.v3.json index 117d9ef..f9a8de3 100644 --- a/src/cloud/openapi/swagger.v3.json +++ b/src/cloud/openapi/swagger.v3.json @@ -1649,7 +1649,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.", + "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.\n4. `default_branch_deletion` indicates whether branches will be\n deleted by default on merge.\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": { @@ -1700,7 +1700,8 @@ "self": { "href": "https://api.bitbucket.org/.../branching-model/settings" } - } + }, + "default_branch_deletion": "false" } } } @@ -1759,7 +1760,7 @@ }, "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\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\nThe `default_branch_deletion` property is a string. The value of `true`\nindicates to delete branches by default. The value of `false` indicates\nthat branches will not be deleted by default. A request without a\n`default_branch_deletion` property will leave it unchanged. Other values\nwould be ignored.\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": { @@ -1799,7 +1800,8 @@ "kind": "release", "enabled": false } - ] + ], + "default_branch_deletion": "true" } } } @@ -23058,7 +23060,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.", + "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.\n4. `default_branch_deletion` indicates whether branches will be\n deleted by default on merge.\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": { @@ -23107,7 +23109,8 @@ "self": { "href": "https://api.bitbucket.org/.../branching-model/settings" } - } + }, + "default_branch_deletion": "false" } } } @@ -23166,7 +23169,7 @@ }, "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.", + "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\nThe `default_branch_deletion` property is a string. The value of `true`\nindicates to delete branches by default. The value of `false` indicates\nthat branches will not be deleted by default. A request without a\n`default_branch_deletion` property will leave it unchanged. Other values\nwould be ignored.", "summary": "Update the branching model config for a project", "responses": { "200": { @@ -23206,7 +23209,8 @@ "kind": "release", "enabled": false } - ] + ], + "default_branch_deletion": "false" } } } @@ -25129,7 +25133,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": "32491c199f63", + "x-revision": "fa7e8ae6f41f", "x-atlassian-narrative": { "documents": [ { @@ -30843,6 +30847,10 @@ "draft": { "type": "boolean", "description": "A boolean flag indicating whether the pull request is a draft." + }, + "queued": { + "type": "boolean", + "description": "A boolean flag indicating whether the pull request is queued" } }, "additionalProperties": true