-
Notifications
You must be signed in to change notification settings - Fork 2
⬆️ Update bitbucket schema and openapi-typescript #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThis update introduces the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant RepoSettings
Client->>API: GET /repositories/{workspace}/{repo_slug}/branching-model/settings
API->>RepoSettings: Retrieve settings
RepoSettings-->>API: Return settings (incl. default_branch_deletion)
API-->>Client: Respond with settings
Client->>API: PUT /repositories/{workspace}/{repo_slug}/branching-model/settings (with default_branch_deletion)
API->>RepoSettings: Update settings (set default_branch_deletion)
RepoSettings-->>API: Confirmation
API-->>Client: Respond with updated settings
Client->>API: GET /pullrequest
API-->>Client: Respond with pullrequest (incl. queued property)
Suggested labels
✨ Finishing Touches
🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
7c03fc1
to
cbebb44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (8)
.github/workflows/pnpm-publish.yaml (2)
48-48
: Use explicit asset path and ensure idempotent release creation
Relying oncoderabbitai-bitbucket-*.tgz
can accidentally match multiple files or miss the tarball if the working directory shifts. Prefer an explicit relative path, for example:- gh release create "$VERSION" --generate-notes --title "$VERSION" --verify-tag coderabbitai-bitbucket-*.tgz + gh release create "$VERSION" --generate-notes --title "$VERSION" --verify-tag ./coderabbitai-bitbucket-${VERSION}.tgzAlso note that
gh release create
will fail if the release already exists. To make this step idempotent, you can add--replace
(or usegh release upload --clobber
on an existing release).
51-51
: PromoteVERSION
to job-level env for broader reuse
DefiningVERSION
under this step’senv
limits its scope to only this run. If you ever need the tag in other steps (or in a matrix), move it underjobs.publish.env:
:jobs: publish: runs-on: ubuntu-latest env: VERSION: ${{ github.ref_name }} steps: # …This ensures consistency across all steps.
package.json (2)
53-53
: Verify lockfile regeneration after dependency bump.Please ensure
pnpm install
was run and the updated lockfile (e.g.,pnpm-lock.yaml
orpackage-lock.json
) has been committed to avoid CI inconsistencies.
64-64
: Ensure devDependencies lockfile consistency.After upgrading
openapi-typescript
, confirm that the lockfile reflects the new version and was checked into version control.src/cloud/openapi/openapi-typescript.ts (1)
1694-1698
: Consider the design choice of string boolean values.The documentation is clear, but using string values
"true"
and"false"
instead of actual boolean types is unusual and potentially error-prone. This design choice may lead to:
- Type safety issues where developers might accidentally pass actual booleans
- Runtime confusion when handling the values
- Additional string parsing logic required
If this design is constrained by the OpenAPI specification, consider adding a note in the documentation to clarify why strings are used instead of booleans.
src/cloud/openapi/swagger.v3.json (3)
1652-1652
: Clarify enumeration of default_branch_deletion in GET descriptionThe GET description adds
default_branch_deletion
but omits its type and valid values. Consider stating that it’s a string with"true"
or"false"
to match the PUT endpoint.
1763-1763
: Enhance clarity on handling invalid default_branch_deletion valuesThe PUT docs state that other values are ignored. To aid API consumers, consider elaborating whether invalid values are silently dropped or trigger a specific response.
23063-23063
: Align project GET description with repository GETThe project GET description mirrors the repository description but uses a different link style. For consistency, match the URL formatting and detail level between both endpoints.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
.github/dependabot.yaml
(1 hunks).github/workflows/node.js.yaml
(1 hunks).github/workflows/pnpm-publish.yaml
(1 hunks).github/workflows/pnpm-version-patch.yaml
(0 hunks)package.json
(2 hunks)src/cloud/openapi/openapi-typescript.ts
(5 hunks)src/cloud/openapi/swagger.v3.json
(10 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/pnpm-version-patch.yaml
🔇 Additional comments (12)
.github/workflows/node.js.yaml (1)
119-120
: Add conditional push to the fix jobThe new
if
guard correctly ensuresgit push
only runs when lockfile, format, or lint commits have been created. The syntax and logic look sound..github/dependabot.yaml (1)
22-24
: Approve the new "openapi" dependency group.Adding a dedicated group for dependencies matching
*openapi*
will help streamline maintenance of your OpenAPI-related packages.src/cloud/openapi/openapi-typescript.ts (4)
1592-1593
: LGTM! Clear documentation added.The documentation clearly explains the purpose of the
default_branch_deletion
property.
17692-17693
: LGTM! Consistent documentation across endpoints.The documentation is consistent with the repository-level endpoint, maintaining good API documentation standards.
17784-17788
: Consistent documentation maintained across API levels.The documentation is identical to the repository-level endpoint, which maintains good consistency. The same consideration about string boolean values mentioned in the repository-level endpoint applies here as well.
22246-22247
: LGTM! Well-implemented boolean property.The
queued
property is properly typed as a boolean with clear documentation. Good design choice using an actual boolean type rather than string values.src/cloud/openapi/swagger.v3.json (6)
1703-1704
: Verify type consistency for default_branch_deletion in GET response exampleThe example uses
"default_branch_deletion": "false"
(a string). Ensure the schema defines this property as a string. If the intent is a JSON boolean, update the example and schema accordingly.
1803-1804
: Confirm type definition in PUT response exampleThe PUT response shows
"default_branch_deletion": "true"
as a string. Double-check that theproperties
schema for this response declares it as a string.
23112-23113
: Verify schema inclusion of default_branch_deletion in project GET responseThe example shows
default_branch_deletion
. Please confirm the shared schema definitions for projects include this property underproperties
with the correct type and description.
23172-23172
: default_branch_deletion docs in project PUT look correctThe
default_branch_deletion
documentation aligns with the repository endpoint. This section clearly describes behaviour and valid values.
23212-23213
: default_branch_deletion example in project PUT response is correctThe example response includes
"default_branch_deletion": "false"
as expected. No issues found here.
25136-25136
: Sync x-revision across generated artifactsThe OpenAPI spec’s
x-revision
has been bumped. Ensure that the generated TypeScript client and any other artifacts reference this same revision to prevent mismatches.
Summary by CodeRabbit
New Features
Dependency Updates
Chores