Skip to content

fix: Infer project from client-side environment key - #117

Open
Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:fix/project-from-environment
Open

Aditya030207 wants to merge 2 commits into
Flagsmith:mainfrom
Aditya030207:fix/project-from-environment

Conversation

@Aditya030207

Copy link
Copy Markdown
Contributor

Closes #66.

When a project is absent, resolve a client-side environment key with a single Admin API retrieve and use the project on the returned environment. This lets flag commands and environment get, update, delete, and clone operate with an environment key alone. An explicit project keeps the existing project-scoped lookup and mismatch behavior. An environment name still needs a project.

The regression tests exercise both flag key sources, JSON environment output without a second retrieve, the missing-project hint for an unknown key or name, and explicit project mismatches.

Validated with go test -race ./..., the docs generator, and git diff --check.

This contribution was prepared with AI coding assistance.

@Aditya030207 Aditya030207 changed the title fix: infer project from client-side environment key fix: Infer project from client-side environment key Nov 25, 2026
@Aditya030207
Aditya030207 marked this pull request as ready for review November 25, 2026 08:24
@Aditya030207
Aditya030207 requested a review from a team as a code owner November 25, 2026 08:24
@Aditya030207
Aditya030207 requested review from a team and emyller and a balanced review from Copilot and removed request for a team November 25, 2026 08:24

This comment was marked as outdated.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/cmd/resolve.go Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Auto-approval skipped because this PR is from an external contributor.

Re-trigger cubic

This branch has not been deployed

No deployments
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.

Can't list flags given an environment

2 participants