Skip to content

[codex] Expose richer issue output#12

Merged
dubscode merged 3 commits intomainfrom
issue-6
May 9, 2026
Merged

[codex] Expose richer issue output#12
dubscode merged 3 commits intomainfrom
issue-6

Conversation

@dubscode
Copy link
Copy Markdown
Contributor

@dubscode dubscode commented May 9, 2026

This PR expands issue output with state IDs/types, creator details, structured labels, and completion/cancellation/archive timestamps from the Linear gateway.
It also makes --fields apply to JSON output while preserving page metadata like nextCursor.
Tests cover JSON field projection and the new gateway issue fields.

Validation: pnpm verify.

Copilot AI review requested due to automatic review settings May 9, 2026 04:26
Comment thread packages/cli/src/formatters/output.ts Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Expands Linear issue payloads produced by the core gateway and updates CLI output handling so --fields also projects JSON output while preserving pagination metadata (e.g. nextCursor).

Changes:

  • Enrich IssueRecord with state identifiers/types, creator metadata, structured labels, and completion/cancellation/archive timestamps.
  • Update LinearGateway issue mapping to populate the new fields (including structured labels).
  • Apply --fields projection to JSON envelopes in the CLI formatter while keeping page-level metadata intact; update/extend tests accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/linear-core/tests/v2-gateway.test.ts Adds assertion for structured issue.labels in v2 gateway issue detail.
packages/linear-core/tests/linear-gateway.test.ts Extends test fixtures + assertions for new issue fields (state id/type, creator, timestamps).
packages/linear-core/src/entities/models.ts Extends IssueRecord and introduces IssueLabelSummary for richer issue output typing.
packages/linear-core/src/entities/linear-gateway.ts Populates new issue fields (creator, state metadata, structured labels, timestamps) in toIssue.
packages/cli/tests/output.test.ts Adds coverage for JSON field projection preserving nextCursor.
packages/cli/src/index.ts Updates --fields help text to reflect JSON + human output behavior.
packages/cli/src/formatters/output.ts Implements JSON data projection for --fields while preserving page structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/cli/tests/output.test.ts Outdated
@dubscode dubscode marked this pull request as ready for review May 9, 2026 04:29
Copilot AI review requested due to automatic review settings May 9, 2026 04:39
@dubscode dubscode merged commit e1feb0f into main May 9, 2026
7 checks passed
@dubscode dubscode deleted the issue-6 branch May 9, 2026 04:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comment on lines +125 to +137
function isSensitiveJsonKey(key: string): boolean {
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
return (
normalized.includes("apikey") ||
normalized.includes("password") ||
normalized.includes("secret") ||
normalized.includes("token") ||
normalized.includes("authorizationurl") ||
normalized.includes("clientid") ||
normalized.includes("redirecturi") ||
normalized.includes("scope") ||
normalized.includes("codeverifier")
);
Comment on lines +133 to +136
normalized.includes("clientid") ||
normalized.includes("redirecturi") ||
normalized.includes("scope") ||
normalized.includes("codeverifier")
Comment on lines +218 to +231
function projectJsonData(data: unknown, fields: readonly string[]): unknown {
if (Array.isArray(data)) {
return data.map((item) => (isRecord(item) ? pickFields(item, fields) : item));
}

if (isPageResult(data)) {
return {
...data,
items: data.items.map((item) => (isRecord(item) ? pickFields(item, fields) : item)),
};
}

if (isRecord(data)) {
return pickFields(data, fields);
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

🎉 This PR is included in version 1.5.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

🎉 This PR is included in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants