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

Support JIRA_CONFG env variable #713

Open
weshouman opened this issue Mar 4, 2024 · 3 comments
Open

Support JIRA_CONFG env variable #713

weshouman opened this issue Mar 4, 2024 · 3 comments

Comments

@weshouman
Copy link

Is your feature request related to a problem? Please describe.
Managing multiple boards (or even multiple servers) would require setting the configuration flag every time.

Describe the solution you'd like
Exposing JIRA_CONFIG env variable which if set, the configuration file in it would be used.

Describe alternatives you've considered
Setting the -c config-file directly

Additional context
It's possible to define a bash function that wrap the command like the following
but it would be much cleaner if that's supported natively

jira() {
    if [ -n "$JIRA_CONFIG" ]; then
        # JIRA_CONFIG is set, use it with --config
        command jira --config "${JIRA_CONFIG}" "$@"
    else
        # JIRA_CONFIG is not set, call jira normally
        command jira "$@"
    fi
}
@ankitpokhrel
Copy link
Owner

Hi @weshouman, there is XDG_CONFIG_HOME env available, wondering if that works for your usecase?

@weshouman
Copy link
Author

Hello @ankitpokhrel, XDG_CONFIG_HOME would require having multiple dirs to have multiple configurations, while the -c flag allows having multiple configurations even in the same directory, I currently work around that by the provided snippet.

Note: may environment includes something like

$CONFIG_DIR/.jira/config1.config.yaml
$CONFIG_DIR/.jira/config2.config.yaml
...

@AutomationD
Copy link

My usecase for this is to have jira/repo project mapping in the repo .envrc. XDG_CONFIG_HOME wouldn't work as it would set config directories for all other tools (such as podman)

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

No branches or pull requests

3 participants