Skip to content

feat: support dev orgs with runtime, in addition to entp#103

Merged
MichaelGoberling merged 3 commits into
masterfrom
feat/support-rt-dev-orgs
May 15, 2026
Merged

feat: support dev orgs with runtime, in addition to entp#103
MichaelGoberling merged 3 commits into
masterfrom
feat/support-rt-dev-orgs

Conversation

@MichaelGoberling
Copy link
Copy Markdown
Contributor

@MichaelGoberling MichaelGoberling commented May 15, 2026

Description

  • getOrganizations() now returns only selectable orgs: enterprise plus developer orgs that have the RUNTIME feature flag. If the dev console features api is down, we still show dev orgs
  • Added getOrganizationFeatures(orgId) and hasOrgFeature(orgId, name, { defaultOnError }) helpers
  • orgsToPromptChoices doesn't filter anymore, expects filtered org list

Related:

Related Issue

Motivation and Context

How Has This Been Tested?

Locally linked everything and tested with a dev and entp org

aio login 
aio console org list
aio console org select
aio app init 

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🤖 PR Reviewer

The diff cleanly implements org-type filtering at the getOrganizations layer rather than in the prompt-choice helper, which is the right architectural move. The logic is well-documented, error handling is conservative (fail-open for developer orgs), and the test coverage is thorough. There is one minor duplication issue: hasOrgFeature calls sdkClient.getOrganizationFeatures directly instead of delegating to the already-written getOrganizationFeatures method, meaning the error-handling/body-normalisation logic is duplicated.

📝 1 suggestion(s) - Please review inline comments below.


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

Comment thread lib/index.js
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🤖 PR Reviewer

The PR cleanly moves org-type filtering from the pure orgsToPromptChoices helper into LibConsoleCLI.getOrganizations, adds a proper getOrganizationFeatures wrapper, and includes good test coverage. The only remaining issue is the one previously raised: hasOrgFeature duplicates the SDK call and normalisation logic that getOrganizationFeatures already encapsulates, creating two diverging code paths and making the catch block in hasOrgFeature redundant for the body-null case.

🔄 1 re-raised suggestion(s) from previous review


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

Comment thread lib/index.js
@github-actions github-actions Bot dismissed their stale review May 15, 2026 03:07

Superseded by new review

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot dismissed their stale review May 15, 2026 03:11

Superseded by new review

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

🤖 PR Reviewer

The previous suggestion about delegating hasOrgFeature to getOrganizationFeatures has been correctly implemented. The new code is well-structured, clearly documented, and thoroughly tested. The fail-open strategy for developer orgs, the constant extraction for org types and feature flags, and the separation of filtering logic from prompt-choice building are all sound design decisions.

LGTM! This PR looks good to merge.


💡 How to re-trigger

Comment /review or /pr-reviewer on this PR

@MichaelGoberling MichaelGoberling merged commit ab3ab99 into master May 15, 2026
11 checks passed
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.

2 participants