Skip to content

Adds deployment access management features to the CLI#242

Closed
ejacquier wants to merge 13 commits intomainfrom
feature/DEVSVCS-3722/deploy-request
Closed

Adds deployment access management features to the CLI#242
ejacquier wants to merge 13 commits intomainfrom
feature/DEVSVCS-3722/deploy-request

Conversation

@ejacquier
Copy link
Copy Markdown
Contributor

Summary

Adds deployment access management features to the CLI, allowing users to check their access status and request deployment access directly from the command line.

  • Add cre account access command to check status and request deployment access
  • Display deployment access status in cre whoami output
  • Prompt users to request access when running cre workflow deploy without access
  • Show deploy access hint after successful workflow simulation
  • Add deploy access hint to global help template for gated users

Changes

New Command: cre account access

  • Checks deployment access status from JWT claims (no API call)
  • If access enabled: displays confirmation and next steps
  • If no access: prompts user and submits request to Zendesk
  • Uses CRE_ZENDESK_USERNAME and CRE_ZENDESK_PASSWORD env vars for credentials

Updated Commands

  • cre whoami: Now displays Deploy Access: Enabled or Deploy Access: Not enabled (run 'cre account access' to request)
  • cre workflow deploy: Checks access before deploying; prompts to request access if not enabled
  • cre workflow simulate: Shows deploy access hint after successful simulation for gated users

Refactoring

  • Created internal/accessrequest/ package with shared logic for access requests
  • Added GetDeploymentAccessStatus() method to Credentials struct for reusable access checking
  • Refactored CheckIsUngatedOrganization() to use the new method

Help Updates

  • Updated cre account description to "Manage account and request deploy access"
  • Added deploy access hint to global help template (shows for all commands when user is gated)

@ejacquier ejacquier closed this Feb 2, 2026
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.

1 participant