Skip to content

feat: add support for pre-update and post-update messages #1288

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

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

sisp
Copy link
Member

@sisp sisp commented Aug 12, 2023

I've added support for pre-update and post-update messages that can be written in plain text. Messages can be written inline or included via Jinja includes, and messages are rendered.

This (simple) implementation became possible due to #1156 since there's no output of an internal copy call of the update algorithm anymore. Without this copy call output suppression, the internal copy call would print the pre-copy/post-copy messages in case they are configured which we wouldn't want to see when running an update.

Related to #723. Follow-up of #1194.

@sisp sisp force-pushed the feat/update-messages branch from afeb53c to afe315b Compare August 12, 2023 12:41
@codecov
Copy link

codecov bot commented Aug 12, 2023

Codecov Report

Merging #1288 (42f9bef) into master (c5eb24f) will increase coverage by 0.11%.
Report is 5 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1288      +/-   ##
==========================================
+ Coverage   96.96%   97.07%   +0.11%     
==========================================
  Files          48       48              
  Lines        4053     4143      +90     
==========================================
+ Hits         3930     4022      +92     
+ Misses        123      121       -2     
Flag Coverage Δ
unittests 97.07% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
copier/main.py 96.17% <100.00%> (+0.01%) ⬆️
copier/template.py 96.44% <100.00%> (+0.09%) ⬆️
tests/test_output.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Looks very nice. Just a suggestion for those regex

@sisp sisp force-pushed the feat/update-messages branch from afe315b to 42f9bef Compare August 23, 2023 07:33
@yajo yajo merged commit 00e51bd into copier-org:master Aug 25, 2023
@sisp sisp deleted the feat/update-messages branch August 25, 2023 10:06
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