feat(settings): add user settings support with defaults values and trusts#1940
feat(settings): add user settings support with defaults values and trusts#1940sisp merged 2 commits intocopier-org:masterfrom
defaults values and trusts#1940Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1940 +/- ##
==========================================
+ Coverage 97.85% 98.05% +0.20%
==========================================
Files 51 53 +2
Lines 5404 5511 +107
==========================================
+ Hits 5288 5404 +116
+ Misses 116 107 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pawamoy
left a comment
There was a problem hiding this comment.
Very nice! I like the prefix matching approach for trusted repositories, it's simple and it makes sense.
sisp
left a comment
There was a problem hiding this comment.
Fantastic work, @noirbizarre! 🎉 Thanks for working on and contributing these valuable features! 🙏
I have a few minor remarks. And would you mind fixing the formatting errors in the corresponding commit and drop the auto-fix commit? We'll likely want to rebase-merge this PR to keep the two feature commits, so the auto-fix commit would only add some noise to the Git history.
|
You're welcome ! 🙏🏼 |
ac3b856 to
f8a881c
Compare
sisp
left a comment
There was a problem hiding this comment.
Just a few more comments after another review iteration. 🙂
211835d to
c07fa2f
Compare
|
PR rebased to solve lock conflict |
sisp
left a comment
There was a problem hiding this comment.
Just some final polishing requests from my side. With two independent commits in a PR, we need to be extra careful to associate a change with the right commit. For instance, we have a formatting change in the first commit and the inverse change in the second commit, so there's no diff for this section under Files changed but there is a diff in each commit.
c07fa2f to
52a5b0a
Compare
|
Updated 👍🏼 |
df246e5 to
6547b51
Compare
6547b51 to
a5f76f6
Compare
sisp
left a comment
There was a problem hiding this comment.
Thank you very much again for this great PR and your patience with the review cycles, @noirbizarre! 🙏
I think we can merge this PR, only one tiny cosmetic detail I just stumbled over 🫣: Could you fix the second commit message?
-feat(settings): allows to defined some trusted repositories or prefixes
+feat(settings): allow to define some trusted repositories or prefixesa5f76f6 to
fbd4021
Compare
|
No problem, there it is, fixed. (Sorry, I do many typos currently 😅) |
|
No worries, thanks again for your efforts and patience! |
Hello 👋🏼
This PR adds support for user settings with initial support for:
Settings are stored in
<CONFIG_ROOT>/settings.ymlwhere<CONFIG_ROOT>is thestandard configuration directory for your platform:
$XDG_CONFIG_HOME/copier(~/.config/copierin most cases) on Linux as defined byXDG Base Directory Specifications
~/Library/Application Support/copieron macOS as defined byApple File System Basics
%USERPROFILE%\AppData\Local\copieron Windows as defined inKnown folders
This location can be overridden by setting the
COPIER_SETTINGSenvironment variable.The settings look like: