Skip to content

feat: add Releases API resources#51

Open
sriramveeraghanta wants to merge 1 commit into
mainfrom
feat/releases-resources
Open

feat: add Releases API resources#51
sriramveeraghanta wants to merge 1 commit into
mainfrom
feat/releases-resources

Conversation

@sriramveeraghanta

@sriramveeraghanta sriramveeraghanta commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds workspace-scoped Releases support to the SDK, mirroring the plane-ee external /api/v1 contract (apps/api/plane/api/{urls,views,serializers}/release.py + db/models/release.py, cross-checked against the contract tests in test_releases.py).

New client surface:

Accessor Endpoints
client.releases releases/ CRUD
client.releases.labels releases/labels/ CRUD + addLabels/removeLabels/listLabels on releases/{id}/labels/ ({label_ids})
client.releases.tags releases/tags/ CRUD (version identifiers)
client.releases.workItems add/remove/list on releases/{id}/work-items/ ({work_item_ids})
client.releases.comments releases/{id}/comments/ CRUD
client.releases.links releases/{id}/links/ CRUD

Structure mirrors the existing Initiatives pattern (parent resource composing sub-resources).

Models

Release (+ ReleaseStatus enum, nested ReleaseDescription), ReleaseTag, ReleaseLabel, ReleaseComment, ReleaseLink — fields derived directly from the serializers/DB models, with faithful return types:

  • labels.addLabelsReleaseLabel[]
  • workItems.add{ message: string }
  • removes → void, lists → PaginatedResponse<T> (cursor pagination: per_page/cursor)

Tests

  • Mocked unit tests (tests/unit/releases/, 6 files / 35 tests) — mock axios, assert exact URL/verb/body/query + response parsing + error handling. Run in CI with no credentials.
  • Live integration tests (tests/unit/release.test.ts, 28 tests) — describeIf-gated, real API calls (needs .env.test).
  • Shared helper: tests/helpers/mock-axios.ts.

Verification

  • pnpm build
  • pnpm check:lint — 0 errors/0 warnings on new files ✅
  • pnpm check:format
  • Mocked tests: 35 passed; full unit suite: 35 passed, 176 skipped (no creds), 0 failures ✅
  • Adversarial review workflow cross-checking each resource against the plane-ee source of truth: 0 confirmed defects.

Notes

  • Releases are feature-flag gated server-side (ReleasesFeatureFlagPermission); live integration tests require the RELEASES flag enabled on the test workspace.

Summary by CodeRabbit

  • New Features
    • Added releases API support, including release creation, updates, retrieval, deletion, and pagination.
    • Added management for release comments, labels, tags, external links, and work items.
    • Exposed release resources and related TypeScript models through the client and package exports.
  • Tests
    • Added comprehensive unit and integration coverage for release workflows and related resources.

Add workspace-scoped Releases support to the SDK, matching the plane-ee
external /api/v1 contract:

- releases: CRUD
- releases.labels: workspace CRUD + add/remove/list labels on a release
- releases.tags: workspace CRUD (version identifiers)
- releases.workItems: add/remove/list work items on a release
- releases.comments: CRUD (nested under a release)
- releases.links: CRUD (nested under a release)

Models derived from the plane-ee serializers/DB models (Release,
ReleaseTag, ReleaseLabel, ReleaseComment, ReleaseLink) with exact
request/response shapes and faithful return types (addLabels -> array,
workItems.add -> {message}, paginated lists).

Tests:
- Mocked unit tests (tests/unit/releases/, no creds) asserting exact
  URL/verb/body/params + response parsing + error handling.
- Live integration tests (tests/unit/release.test.ts, describeIf-gated).
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a typed Releases API with CRUD operations and sub-resources for comments, labels, links, tags, and work items. The resource is wired into PlaneClient, exported publicly, and covered by mocked unit tests plus conditional integration tests.

Changes

Release API

Layer / File(s) Summary
Release data contracts
src/models/Release*.ts, src/models/index.ts
Adds release models, lifecycle statuses, request payloads, response types, and pagination parameters.
Release resource operations
src/api/Releases/*
Implements release CRUD and typed comment, label, link, tag, and work-item endpoints.
SDK exposure and client wiring
src/client/plane-client.ts, src/index.ts
Adds client.releases and exports the Releases resource and sub-resources.
Release API validation
tests/helpers/mock-axios.ts, tests/unit/release.test.ts, tests/unit/releases/*
Adds Axios mocking helpers, endpoint tests, error handling coverage, and integration-style release tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: prashant-surya

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding new Releases API resources to the SDK.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/releases-resources
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/releases-resources

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/api/Releases/index.ts`:
- Around line 52-57: Rename the standard resource method from delete to del in
src/api/Releases/index.ts:52-57, src/api/Releases/Comments.ts:56-61,
src/api/Releases/Labels.ts:49-54, src/api/Releases/Links.ts:44-49, and
src/api/Releases/Tags.ts:36-41, preserving each method’s existing parameters,
return type, and HTTP deletion behavior.

In `@src/models/index.ts`:
- Around line 19-23: Rename the model files exported in the index from
PascalCase to kebab-case: Release, ReleaseComment, ReleaseLabel, ReleaseLink,
and ReleaseTag should become release.ts, release-comment.ts, release-label.ts,
release-link.ts, and release-tag.ts. Update the corresponding export paths and
all imports or references to use the new filenames.

In `@src/models/Release.ts`:
- Line 1: Rename the PascalCase files to kebab-case: src/models/Release.ts to
release.ts, ReleaseComment.ts to release-comment.ts, ReleaseLabel.ts to
release-label.ts, ReleaseLink.ts to release-link.ts, ReleaseTag.ts to
release-tag.ts, and src/api/Releases/Comments.ts, Labels.ts, Links.ts, Tags.ts,
and WorkItems.ts to comments.ts, labels.ts, links.ts, tags.ts, and work-items.ts
respectively; update all affected imports to use the new paths.
- Around line 49-66: Replace the manually duplicated Create DTO fields with
derived types using Pick, Omit, and Partial as appropriate: update CreateRelease
in src/models/Release.ts (49-66), CreateReleaseComment in
src/models/ReleaseComment.ts (22-26), CreateReleaseLabel in
src/models/ReleaseLabel.ts (16-20), CreateReleaseLink in
src/models/ReleaseLink.ts (15-19), and CreateReleaseTag in
src/models/ReleaseTag.ts (16-21) to derive from their corresponding Release,
ReleaseComment, ReleaseLabel, ReleaseLink, and ReleaseTag interfaces while
preserving each DTO’s current create-field optionality.
- Line 18: Replace every any type with unknown at the identified sites:
description_json and index signatures in src/models/Release.ts (lines 18-18,
52-52, 73-73), the index signatures in src/models/ReleaseComment.ts (33-33),
src/models/ReleaseLabel.ts (27-27), src/models/ReleaseLink.ts (26-26),
src/models/ReleaseTag.ts (28-28), and src/api/Releases/WorkItems.ts (27-27),
plus metadata in src/models/ReleaseLink.ts (11-11, 18-18). Preserve the existing
model shapes while removing all uses of any.

In `@tests/unit/release.test.ts`:
- Around line 218-260: Update the “Release Work Items” suite to use
describeIf(!!config.workItemId, ...) so it is reported as skipped when no work
item ID is configured. Remove the individual config.workItemId early-return
guards from the add, list, and remove tests while preserving their existing
assertions and operations.

In `@tests/unit/releases/releases.test.ts`:
- Around line 102-113: Rename release-resource deletion methods from delete to
del to match the standard resource contract, updating the corresponding
implementations and calls. In tests/unit/releases/releases.test.ts:102-113,
tests/unit/releases/tags.test.ts:64-73, tests/unit/release.test.ts:38-59,
301-306, and 351-356, tests/unit/releases/comments.test.ts:68-77,
tests/unit/releases/labels.test.ts:67-76, and
tests/unit/releases/links.test.ts:67-76, use del for releases, tags, labels,
comments, and links, including release, label, and tag cleanup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c831dba1-94a8-4842-af0d-15ad573c397d

📥 Commits

Reviewing files that changed from the base of the PR and between bfae758 and dd8acb6.

📒 Files selected for processing (22)
  • src/api/Releases/Comments.ts
  • src/api/Releases/Labels.ts
  • src/api/Releases/Links.ts
  • src/api/Releases/Tags.ts
  • src/api/Releases/WorkItems.ts
  • src/api/Releases/index.ts
  • src/client/plane-client.ts
  • src/index.ts
  • src/models/Release.ts
  • src/models/ReleaseComment.ts
  • src/models/ReleaseLabel.ts
  • src/models/ReleaseLink.ts
  • src/models/ReleaseTag.ts
  • src/models/index.ts
  • tests/helpers/mock-axios.ts
  • tests/unit/release.test.ts
  • tests/unit/releases/comments.test.ts
  • tests/unit/releases/labels.test.ts
  • tests/unit/releases/links.test.ts
  • tests/unit/releases/releases.test.ts
  • tests/unit/releases/tags.test.ts
  • tests/unit/releases/work-items.test.ts

Comment thread src/api/Releases/index.ts
Comment on lines +52 to +57
/**
* Delete a release
*/
async delete(workspaceSlug: string, releaseId: string): Promise<void> {
return this.httpDelete(`/workspaces/${workspaceSlug}/releases/${releaseId}/`);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename the delete method to del.

These resource classes define a delete method, which violates the coding guideline requiring standard resource methods to be named: list, create, retrieve, update, del.

  • src/api/Releases/index.ts#L52-L57: Rename method from delete to del.
  • src/api/Releases/Comments.ts#L56-L61: Rename method from delete to del.
  • src/api/Releases/Labels.ts#L49-L54: Rename method from delete to del.
  • src/api/Releases/Links.ts#L44-L49: Rename method from delete to del.
  • src/api/Releases/Tags.ts#L36-L41: Rename method from delete to del.
📍 Affects 5 files
  • src/api/Releases/index.ts#L52-L57 (this comment)
  • src/api/Releases/Comments.ts#L56-L61
  • src/api/Releases/Labels.ts#L49-L54
  • src/api/Releases/Links.ts#L44-L49
  • src/api/Releases/Tags.ts#L36-L41
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/api/Releases/index.ts` around lines 52 - 57, Rename the standard resource
method from delete to del in src/api/Releases/index.ts:52-57,
src/api/Releases/Comments.ts:56-61, src/api/Releases/Labels.ts:49-54,
src/api/Releases/Links.ts:44-49, and src/api/Releases/Tags.ts:36-41, preserving
each method’s existing parameters, return type, and HTTP deletion behavior.

Source: Coding guidelines

Comment thread src/models/index.ts
Comment on lines +19 to +23
export * from "./Release";
export * from "./ReleaseComment";
export * from "./ReleaseLabel";
export * from "./ReleaseLink";
export * from "./ReleaseTag";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Rename the new model files to kebab-case.

These exports introduce PascalCase filenames. Rename them to release.ts, release-comment.ts, release-label.ts, release-link.ts, and release-tag.ts, then update their imports.

As per coding guidelines, “Use kebab-case for file names.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models/index.ts` around lines 19 - 23, Rename the model files exported in
the index from PascalCase to kebab-case: Release, ReleaseComment, ReleaseLabel,
ReleaseLink, and ReleaseTag should become release.ts, release-comment.ts,
release-label.ts, release-link.ts, and release-tag.ts. Update the corresponding
export paths and all imports or references to use the new filenames.

Source: Coding guidelines

Comment thread src/models/Release.ts
@@ -0,0 +1,106 @@
import { BaseModel } from "./common";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use kebab-case for file names.

These files use PascalCase for their names, which violates the coding guideline requiring kebab-case for all files in src/**/*.ts.

  • src/models/Release.ts#L1-L1: Rename file to release.ts.
  • src/models/ReleaseComment.ts#L1-L1: Rename file to release-comment.ts.
  • src/models/ReleaseLabel.ts#L1-L1: Rename file to release-label.ts.
  • src/models/ReleaseLink.ts#L1-L1: Rename file to release-link.ts.
  • src/models/ReleaseTag.ts#L1-L1: Rename file to release-tag.ts.
  • src/api/Releases/Comments.ts#L1-L1: Rename file to comments.ts.
  • src/api/Releases/Labels.ts#L1-L1: Rename file to labels.ts.
  • src/api/Releases/Links.ts#L1-L1: Rename file to links.ts.
  • src/api/Releases/Tags.ts#L1-L1: Rename file to tags.ts.
  • src/api/Releases/WorkItems.ts#L1-L1: Rename file to work-items.ts.
📍 Affects 10 files
  • src/models/Release.ts#L1-L1 (this comment)
  • src/models/ReleaseComment.ts#L1-L1
  • src/models/ReleaseLabel.ts#L1-L1
  • src/models/ReleaseLink.ts#L1-L1
  • src/models/ReleaseTag.ts#L1-L1
  • src/api/Releases/Comments.ts#L1-L1
  • src/api/Releases/Labels.ts#L1-L1
  • src/api/Releases/Links.ts#L1-L1
  • src/api/Releases/Tags.ts#L1-L1
  • src/api/Releases/WorkItems.ts#L1-L1
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models/Release.ts` at line 1, Rename the PascalCase files to kebab-case:
src/models/Release.ts to release.ts, ReleaseComment.ts to release-comment.ts,
ReleaseLabel.ts to release-label.ts, ReleaseLink.ts to release-link.ts,
ReleaseTag.ts to release-tag.ts, and src/api/Releases/Comments.ts, Labels.ts,
Links.ts, Tags.ts, and WorkItems.ts to comments.ts, labels.ts, links.ts,
tags.ts, and work-items.ts respectively; update all affected imports to use the
new paths.

Source: Coding guidelines

Comment thread src/models/Release.ts
*/
export interface ReleaseDescription {
description_html?: string;
description_json?: Record<string, any>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Avoid using any types.

These properties and parameters use the any type, bypassing type safety. As per coding guidelines, avoid any types and use proper typing or unknown instead.

  • src/models/Release.ts#L18-L18: Replace any with unknown in description_json.
  • src/models/Release.ts#L52-L52: Replace any with unknown in description_json.
  • src/models/Release.ts#L73-L73: Replace any with unknown in [key: string]: any.
  • src/models/ReleaseComment.ts#L33-L33: Replace any with unknown in [key: string]: any.
  • src/models/ReleaseLabel.ts#L27-L27: Replace any with unknown in [key: string]: any.
  • src/models/ReleaseLink.ts#L11-L11: Replace any with unknown in metadata.
  • src/models/ReleaseLink.ts#L18-L18: Replace any with unknown in metadata.
  • src/models/ReleaseLink.ts#L26-L26: Replace any with unknown in [key: string]: any.
  • src/models/ReleaseTag.ts#L28-L28: Replace any with unknown in [key: string]: any.
  • src/api/Releases/WorkItems.ts#L27-L27: Replace any with unknown in [key: string]: any.
📍 Affects 6 files
  • src/models/Release.ts#L18-L18 (this comment)
  • src/models/Release.ts#L52-L52
  • src/models/Release.ts#L73-L73
  • src/models/ReleaseComment.ts#L33-L33
  • src/models/ReleaseLabel.ts#L27-L27
  • src/models/ReleaseLink.ts#L11-L11
  • src/models/ReleaseLink.ts#L18-L18
  • src/models/ReleaseLink.ts#L26-L26
  • src/models/ReleaseTag.ts#L28-L28
  • src/api/Releases/WorkItems.ts#L27-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models/Release.ts` at line 18, Replace every any type with unknown at the
identified sites: description_json and index signatures in src/models/Release.ts
(lines 18-18, 52-52, 73-73), the index signatures in
src/models/ReleaseComment.ts (33-33), src/models/ReleaseLabel.ts (27-27),
src/models/ReleaseLink.ts (26-26), src/models/ReleaseTag.ts (28-28), and
src/api/Releases/WorkItems.ts (27-27), plus metadata in
src/models/ReleaseLink.ts (11-11, 18-18). Preserve the existing model shapes
while removing all uses of any.

Source: Coding guidelines

Comment thread src/models/Release.ts
Comment on lines +49 to +66
export interface CreateRelease {
name: string;
description_html?: string;
description_json?: Record<string, any>;
status?: ReleaseStatus;
// YYYY-MM-DD format
target_date?: string | null;
// YYYY-MM-DD format
release_date?: string | null;
// User id of the release lead
lead?: string | null;
// Release tag id
tag?: string | null;
is_latest?: boolean;
is_prerelease?: boolean;
external_id?: string;
external_source?: string;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Derive Create DTOs using Pick or Omit.

These DTO interfaces manually duplicate fields from their corresponding entity models. As per coding guidelines, use Pick, Omit, and Partial to define separate Create/Update DTOs derived from the main entity interfaces.

  • src/models/Release.ts#L49-L66: Refactor CreateRelease to derive from Release using Omit or Pick.
  • src/models/ReleaseComment.ts#L22-L26: Refactor CreateReleaseComment to derive from ReleaseComment using Omit or Pick.
  • src/models/ReleaseLabel.ts#L16-L20: Refactor CreateReleaseLabel to derive from ReleaseLabel using Omit or Pick.
  • src/models/ReleaseLink.ts#L15-L19: Refactor CreateReleaseLink to derive from ReleaseLink using Omit or Pick.
  • src/models/ReleaseTag.ts#L16-L21: Refactor CreateReleaseTag to derive from ReleaseTag using Omit or Pick.
📍 Affects 5 files
  • src/models/Release.ts#L49-L66 (this comment)
  • src/models/ReleaseComment.ts#L22-L26
  • src/models/ReleaseLabel.ts#L16-L20
  • src/models/ReleaseLink.ts#L15-L19
  • src/models/ReleaseTag.ts#L16-L21
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/models/Release.ts` around lines 49 - 66, Replace the manually duplicated
Create DTO fields with derived types using Pick, Omit, and Partial as
appropriate: update CreateRelease in src/models/Release.ts (49-66),
CreateReleaseComment in src/models/ReleaseComment.ts (22-26), CreateReleaseLabel
in src/models/ReleaseLabel.ts (16-20), CreateReleaseLink in
src/models/ReleaseLink.ts (15-19), and CreateReleaseTag in
src/models/ReleaseTag.ts (16-21) to derive from their corresponding Release,
ReleaseComment, ReleaseLabel, ReleaseLink, and ReleaseTag interfaces while
preserving each DTO’s current create-field optionality.

Source: Coding guidelines

Comment on lines +218 to +260
describe("Release Work Items", () => {
it("should add work items to a release", async () => {
if (!config.workItemId) {
return;
}

const result = await client.releases.workItems.add(workspaceSlug, release.id, {
work_item_ids: [config.workItemId],
});

expect(result).toBeDefined();
expect(result.message).toBeDefined();
});

it("should list work items in a release", async () => {
if (!config.workItemId) {
return;
}

const workItems = await client.releases.workItems.list(workspaceSlug, release.id);

expect(workItems).toBeDefined();
expect(Array.isArray(workItems.results)).toBe(true);

const found = workItems.results.find((wi) => wi.id === config.workItemId);
expect(found).toBeDefined();
expect(found?.project_id).toBeDefined();
expect(found?.name).toBeDefined();
});

it("should remove work items from a release", async () => {
if (!config.workItemId) {
return;
}

await client.releases.workItems.remove(workspaceSlug, release.id, {
work_item_ids: [config.workItemId],
});

const workItems = await client.releases.workItems.list(workspaceSlug, release.id);
const found = workItems.results.find((wi) => wi.id === config.workItemId);
expect(found).toBeUndefined();
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Skip the work-item suite instead of silently passing its tests.

When config.workItemId is absent, all three tests return successfully without assertions. Wrap this block with describeIf(!!config.workItemId, ...) and remove the per-test guards so the result is reported as skipped.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/release.test.ts` around lines 218 - 260, Update the “Release Work
Items” suite to use describeIf(!!config.workItemId, ...) so it is reported as
skipped when no work item ID is configured. Remove the individual
config.workItemId early-return guards from the add, list, and remove tests while
preserving their existing assertions and operations.

Comment on lines +102 to +113
describe("delete", () => {
it("DELETEs the release detail URL", async () => {
mockedAxios.delete.mockResolvedValueOnce(axiosResponse(undefined));

await client.releases.delete(MOCK_SLUG, "rel-1");

expect(mockedAxios.delete).toHaveBeenCalledWith(
mockUrl(`/workspaces/${MOCK_SLUG}/releases/rel-1/`),
expect.anything()
);
});
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Expose deletion operations as del, not delete.

The new release resources consistently expose delete, which conflicts with the SDK’s required standard resource-method contract. Rename the corresponding API methods to del and update these tests:

  • tests/unit/releases/releases.test.ts#L102-L113: call client.releases.del.
  • tests/unit/releases/tags.test.ts#L64-L73: call client.releases.tags.del.
  • tests/unit/release.test.ts#L38-L59: use del for release, label, and tag cleanup.
  • tests/unit/release.test.ts#L301-L306: call client.releases.comments.del.
  • tests/unit/release.test.ts#L351-L356: call client.releases.links.del.
  • tests/unit/releases/comments.test.ts#L68-L77: call client.releases.comments.del.
  • tests/unit/releases/labels.test.ts#L67-L76: call client.releases.labels.del.
  • tests/unit/releases/links.test.ts#L67-L76: call client.releases.links.del.

As per coding guidelines, standard API resource methods must be named list, create, retrieve, update, and del.

📍 Affects 6 files
  • tests/unit/releases/releases.test.ts#L102-L113 (this comment)
  • tests/unit/releases/tags.test.ts#L64-L73
  • tests/unit/release.test.ts#L38-L59
  • tests/unit/release.test.ts#L301-L306
  • tests/unit/release.test.ts#L351-L356
  • tests/unit/releases/comments.test.ts#L68-L77
  • tests/unit/releases/labels.test.ts#L67-L76
  • tests/unit/releases/links.test.ts#L67-L76
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/releases/releases.test.ts` around lines 102 - 113, Rename
release-resource deletion methods from delete to del to match the standard
resource contract, updating the corresponding implementations and calls. In
tests/unit/releases/releases.test.ts:102-113,
tests/unit/releases/tags.test.ts:64-73, tests/unit/release.test.ts:38-59,
301-306, and 351-356, tests/unit/releases/comments.test.ts:68-77,
tests/unit/releases/labels.test.ts:67-76, and
tests/unit/releases/links.test.ts:67-76, use del for releases, tags, labels,
comments, and links, including release, label, and tag cleanup.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant