Skip to content

Adds deployment access management features to the CLI#245

Draft
ejacquier wants to merge 22 commits intofeature/charm-lib-refactoringfrom
feature/DEVSVCS-3722/deploy-request-refactor
Draft

Adds deployment access management features to the CLI#245
ejacquier wants to merge 22 commits intofeature/charm-lib-refactoringfrom
feature/DEVSVCS-3722/deploy-request-refactor

Conversation

@ejacquier
Copy link
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

Note: This PR is based on charm lib refactor branch - see PR

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 requested a review from a team as a code owner February 2, 2026 20:47
@ejacquier ejacquier marked this pull request as draft February 3, 2026 13:41
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

🚀 Preview Build Artifacts

You can download the preview builds for this PR from the following URL:

https://github.com/smartcontractkit/cre-cli/actions/runs/21761292603

Note: These are preview builds and are not signed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant