Skip to content
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

Add a way to configure user preferences #37

Closed
Jackenmen opened this issue Aug 7, 2021 · 2 comments
Closed

Add a way to configure user preferences #37

Jackenmen opened this issue Aug 7, 2021 · 2 comments

Comments

@Jackenmen
Copy link
Contributor

Jackenmen commented Aug 7, 2021

At this point(where we have --pr-remote, --[no-]push, --upstream-remote (#35), and --no-auto-pr (#36) flags, it seems worth considering adding some way to configure user preferences on a global and perhaps local level.

The most obvious solution seems to be using git config since it supports both global and local user configuration already, it is used by cherry-picker already, and therefore should be relatively straight-forward.
Small note here: I think it would be better to choose a different section than cherry-picker as currently cherry-picker suggest to use git config --local --remove-section cherry-picker as last resort for resetting cherry-picker's state.

Of course, there could instead be a single file at some configuration path (~/.config/cherry_picker/preferences.toml?) for setting both global and local level preferences, i.e.:

[global]
upstream_remote = "the_real_deal"
pr_remote = "mine"
no_auto_pr = true

# I'm not entirely sold on the idea of using paths, but it would be the simplest to implement for sure
[local."/home/jack/CPython"]
upstream_remote = "python"

but I don't know if there are any upsides to this over just using git config

@Jackenmen
Copy link
Contributor Author

Note:
--no-push and -no-auto-pr should ideally be set separately for regular cherry_picker run and for cherry_picker --continue so that one can have a workflow like this (otherwise it won't be possible to configure it as such after #43 is merged) using only the user preferences:

# cherry-pick but don't push:
cherry_picker --no-push COMMIT_SHA1 BRANCH
# after successful cherry-pick, continue with a push and PR using:
cherry_picker --continue

@Jackenmen
Copy link
Contributor Author

Closing due to lack of interest per @ambv's comment on the linked PR.

@Jackenmen Jackenmen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
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 a pull request may close this issue.

1 participant