Skip to content

[Feature]: Expose issueNumber in openclaw code run --json output #116

@zhyongrui

Description

@zhyongrui

Summary
Add one stable top-level numeric field to openclaw code run --json named issueNumber.

Problem to solve
Downstream tooling currently has to inspect issue.number directly just to read this nested numeric value. That is awkward for simple JSON consumers.

Proposed solution
Update src/commands/openclawcode.ts so the JSON output includes issueNumber: number | null.

  • set it to the nested issue.number value when present
  • otherwise emit null

Add or adjust unit tests in src/commands/openclawcode.test.ts to cover both cases.

Impact
Affected users/systems/channels
Tools and scripts that read openclaw code run --json.

Severity
Low.

Frequency
Whenever downstream tooling wants this numeric value without unpacking nested workflow metadata.

Consequence
Without the derived field, simple consumers keep reimplementing the same nested null-check logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions