- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose the current phase in context #1883
Labels
Comments
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 26, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 26, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 27, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 27, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 27, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 27, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 27, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 28, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 29, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Jan 29, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 21, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 21, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 21, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 22, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 22, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Feb 28, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 1, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 1, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 1, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 1, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 1, 2025
noirbizarre
added a commit
to noirbizarre/copier
that referenced
this issue
Mar 2, 2025
Resolved via #1948. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actual Situation
Extensions have no way of knowing the current phase (aka. questions, render, tasks or migration).
As a consequence, they have to guess which context variable is available and safe for them to use.
Ex:
copier-templates-extensions
was guessing the rendering phase with the presence of_copier_conf
context var but is broken since 9.4 due to its heuristic not working anymoreDesired Situation
Jinja extension can selectively run during the phase they intend to, and they have a safe way of knowing which phase is currently being executed
Proposed solution
In addition to an
_operation
context variable which has already been proposed and pending merge (#1733), a_phase
context variable is also added.Its value can be one of
questions
(orprompt
),render
,migrate
ortasks
.The text was updated successfully, but these errors were encountered: