Skip to content

Add users.links commands - #108

Merged
Royalflamejlh merged 2 commits into
mainfrom
john/feat/users-links-commands
Oct 5, 2026
Merged

Royalflamejlh merged 2 commits into
mainfrom
john/feat/users-links-commands

Conversation

@Royalflamejlh

@Royalflamejlh Royalflamejlh commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Adds dx users links create, delete, list, and set, wrapping the matching users.links.* Web API methods. Stacked on #109, which adds the dx users command group and dx users linkableAccounts list.

The user ID is a positional argument, and --source and --account-id are required flags, the same way workflowRuns addLink handles its required params. dx users links set takes --account-ids as a comma-separated list. Passing "" sends an empty array, which unlinks every account for that source, as the API docs describe.

@Royalflamejlh
Royalflamejlh marked this pull request as ready for review October 5, 2026 14:45

@BigGig17 BigGig17 left a comment

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.

I'd like to avoid 1000+ line PRs, could we break this one up a little bit?

@Royalflamejlh
Royalflamejlh force-pushed the john/feat/users-links-commands branch from 12e90e2 to e0ddc82 Compare October 5, 2026 15:20
@Royalflamejlh
Royalflamejlh force-pushed the john/feat/users-links-commands branch from e0ddc82 to d06b1bb Compare October 5, 2026 15:22
@Royalflamejlh
Royalflamejlh changed the base branch from main to john/feat/users-linkable-accounts October 5, 2026 15:22
@Royalflamejlh
Royalflamejlh added this pull request to stack #110 October 5, 2026 15:22
@Royalflamejlh
Royalflamejlh marked this pull request as draft October 5, 2026 15:22
@Royalflamejlh Royalflamejlh changed the title Add users.linkableAccounts and users.links commands Add users.links commands Oct 5, 2026
@Royalflamejlh
Royalflamejlh force-pushed the john/feat/users-links-commands branch 2 times, most recently from 0ebc2d2 to 1aaba59 Compare October 5, 2026 15:49
@Royalflamejlh
Royalflamejlh requested a review from BigGig17 October 5, 2026 15:53
@Royalflamejlh
Royalflamejlh marked this pull request as ready for review October 5, 2026 15:53
@Royalflamejlh
Royalflamejlh marked this pull request as draft October 5, 2026 16:32
@Royalflamejlh
Royalflamejlh marked this pull request as ready for review October 5, 2026 18:51
Base automatically changed from john/feat/users-linkable-accounts to main October 5, 2026 20:58
Adds `dx users links create`, `delete`, `list`, and `set`, wrapping
the matching `users.links.*` Web API methods.
Renders the `account` object that get-dx/app#18740 adds to each
`users.links.list` link, reusing the linkableAccounts detail rows.
@Royalflamejlh
Royalflamejlh force-pushed the john/feat/users-links-commands branch from 3676e7c to 3258477 Compare October 5, 2026 20:59
ok: true;
};

async function createLink(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: I see that the endpoint has a lot of domain-specific error codes defined. You may want to create a mapping of codes to human-readable labels to render with rich text, like this:

const ERROR_LABELS = {
  manual_link_conflict: "The account is manually linked to another user.",
  link_update_in_progress: "Another request for the same user and source did not finish in time. Retry the request."
  // etc.
}

We do a more minimal version of this in this teams error handling.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will open follow up PR for this

@Royalflamejlh
Royalflamejlh merged commit bb919a1 into main Oct 5, 2026
4 checks passed
@Royalflamejlh
Royalflamejlh deleted the john/feat/users-links-commands branch October 5, 2026 21:12
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.

3 participants