Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/commands/feed/summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ export const feedSummaryCommand: Command = {
const toMs = getArgNumber(args, 'to');

const api = new PolylaneAPI(config);
const result = await api.feedSummary({
workspaceId,
const result = await api.feedSummary(workspaceId, {
...(fromMs !== undefined ? { from: fromMs } : {}),
...(toMs !== undefined ? { to: toMs } : {}),
});
Expand Down
4 changes: 1 addition & 3 deletions src/commands/issue/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export const issueTimelineCommand: Command = {
const to = getArgNumber(args, 'to');

const api = new PolylaneAPI(config);
const result = await api.issuesTimelineList({
workspaceId,
issueId,
const result = await api.issuesTimelineList(workspaceId, issueId, {
perPage: limit,
...(types ? { types } : {}),
...(from !== undefined ? { from } : {}),
Expand Down
12 changes: 11 additions & 1 deletion src/commands/workspace/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ export const workspaceCreateCommand: Command = {
const slug = getArgString(args, 'slug');
const noDefault = args.noDefault === true;

const body: Parameters<PolylaneAPI['workspacesPost']>[0] = { name };
// Workspace creation accepts the terms on the user's behalf, so say so
// out loud first — on stderr, like every other notice, so piped stdout
// stays pure data. Printed before the call and regardless of --quiet.
process.stderr.write(
'By creating a workspace you accept the Polylane Terms of Service: https://console.polylane.com/terms\n',
);

// The non-literal assignment keeps typecheck green on spec versions from
// before acceptTerms existed.
const withTerms = { name, acceptTerms: true as const };
const body: Parameters<PolylaneAPI['workspacesPost']>[0] = withTerms;
if (description !== undefined) body.description = description;
if (slug !== undefined) body.slug = slug;

Expand Down
Loading