Skip to content

(feat): Commands to cancel a spend request#77

Merged
kreese-stripe merged 7 commits intomainfrom
kreese/cancel-action
May 7, 2026
Merged

(feat): Commands to cancel a spend request#77
kreese-stripe merged 7 commits intomainfrom
kreese/cancel-action

Conversation

@kreese-stripe
Copy link
Copy Markdown
Collaborator

@kreese-stripe kreese-stripe commented May 6, 2026

Implements the SDK and CLI changes to support cancelling a SpendRequest via the cancellation endpoint.

@kreese-stripe kreese-stripe requested a review from a team as a code owner May 6, 2026 18:07
@kreese-stripe kreese-stripe changed the title Commands to cancel a spend request (feat): Commands to cancel a spend request May 6, 2026
Comment on lines +426 to +436
if (!storage.isAuthenticated()) {
return c.error({
code: 'NOT_AUTHENTICATED',
message: 'Not authenticated. Run "link-cli auth login" first.',
cta: {
commands: [
{ command: 'auth login', description: 'Log in to Link' },
],
},
});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Helper for this?

Comment on lines +452 to +454
waitUntilExit().then(() => {
resolve(capturedResult as SpendRequest);
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

async/await?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving as this sort of Promise structure mirrors other commands. If we wanted to change it we could, but I'd rather be consistent for now

Copy link
Copy Markdown
Contributor

@raubrey-stripe raubrey-stripe left a comment

Choose a reason for hiding this comment

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

Tested this locally on this build, and it worked! We can follow up here, we may want to consider putting something in the skill file around (we discussed in standup)

Comment on lines +67 to +69
<Text>
Status: <Text bold>{request?.status}</Text>
</Text>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: will this always be 200? If so, we can probably remove

| 'succeeded'
| 'failed';
| 'failed'
| 'canceled';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets make sure we add this into the various readme, skill, helper text etc

@kreese-stripe kreese-stripe merged commit 6e1e9d2 into main May 7, 2026
5 checks passed
@kreese-stripe kreese-stripe deleted the kreese/cancel-action branch May 7, 2026 18:43
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.

4 participants