Skip to content

feat: resolve commands against the active environment#219

Draft
angeloashmore wants to merge 1 commit into
aa/env-commandsfrom
aa/env-wire-commands
Draft

feat: resolve commands against the active environment#219
angeloashmore wants to merge 1 commit into
aa/env-commandsfrom
aa/env-wire-commands

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Jul 8, 2026

Copy link
Copy Markdown
Member

Resolves:

Note

Middle of the stack: #218#219 (this PR)#220. Merge #218 first — this PR targets its branch, and #220 targets this one.

Description

Migrates every repo-facing command (push, pull, sync, status, and the locale/preview/token/webhook groups) to resolve its target repository in priority order:

  1. the --repo flag, if passed (--env is a deprecated alias, still supported)
  2. the active environment, if set (from feat: add prismic env commands and active environment state #218)
  3. the project's repository domain (the production default)

--env becomes a deprecated alias for --repo, and the now-unused resolveEnvironment helper is removed.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

prismic env set my-repo-staging
prismic status            # now targets the environment without --env
prismic pull --repo my-other-repo   # --repo still overrides
prismic pull --env my-other-repo    # deprecated alias, still works

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Migrate pull, push, status, sync, and the locale/preview/token/webhook
commands to read the active environment from CLI state, falling back to
the repository name. `--env` becomes a deprecated alias for `--repo`, and
`resolveEnvironment` is removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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