Skip to content

Add a way to configure user preferences #37

@Jackenmen

Description

@Jackenmen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions