Skip to content

feat: add support for paths in resource commands#719

Open
cjbell wants to merge 3 commits intomainfrom
cb-support-paths
Open

feat: add support for paths in resource commands#719
cjbell wants to merge 3 commits intomainfrom
cb-support-paths

Conversation

@cjbell
Copy link
Contributor

@cjbell cjbell commented Feb 19, 2026

Description

Adds support for knock workflow push /some/path/to/workflow instead of just knock workflow push <key>.

Adding this because agents seem to default to it, and it feels like we should support it given it's essentially how our system works.

Tasks

KNO-11716

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


it("returns true for paths containing backslash", () => {
expect(isPathArg("workflows\\new-comment")).to.equal(true);
});
Copy link

Choose a reason for hiding this comment

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

Backslash path test fails on Linux and macOS

Medium Severity

The test asserts isPathArg("workflows\\new-comment") returns true, but on Linux/macOS where path.sep is /, the string (containing only \) doesn't match either check in isPathArg. The function correctly treats \ as a non-separator on Unix, but the test incorrectly assumes it's always recognized as a path separator. This test will fail on CI if it runs on Linux or macOS.

Fix in Cursor Fix in Web

const props = merge(this.props, {
flags: { annotate: true },
args: { workflowKey: workflow.key },
});
Copy link

Choose a reason for hiding this comment

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

Unnecessary args merge in push commands

Low Severity

The args: { workflowKey: workflow.key } merge (and equivalent for all other resource push commands) is unused. All upsert* methods in api-v1.ts destructure only { flags } from the props parameter and never read args. This dead code adds confusion about the API contract. The PR reviewers already flagged this concern.

Additional Locations (2)

Fix in Cursor Fix in Web

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.

2 participants