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

Using custom config path prints help text although keychain is setup #652

Open
oschrenk opened this issue Aug 11, 2023 · 0 comments
Open

Comments

@oschrenk
Copy link

oschrenk commented Aug 11, 2023

Describe the bug
When using a custom config path, jira will write the help text explaining how to retrieve a token although I have the token successfully setup in macOS keychain. It even then prints the output of the query after the help text.

jira issue --config ~/.config/.jira/TEST.yml list --plain --no-headers -a$(jira me) -s"In Progress" | head -3 | awk '{print $2}' | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}'

The tool needs a Jira API token to function.

For cloud server: you can generate the token using this link: https://id.atlassian.com/manage-profile/security/api-tokens
For local server: you can use the password you use to log in to Jira for basic auth or get a token from your Jira profile for PAT.

After generating the token, you can either:
  - Export API token to your shell as a JIRA_API_TOKEN env variable
  - Or, you can use a .netrc file to define required machine details

Once you are done with the above steps, run 'jira init' to generate the config if you haven't already.

For more details, see: https://github.com/ankitpokhrel/jira-cli#getting-started

TEST-115 TEST-111 TEST-94

when I rename TEST.yml to the default .config.yml

cd $HOME/.config/.jira
mv cp TEST.yml .config.yml
jira issue list --plain --no-headers -a$(jira me) -s"In Progress" | head -3 | awk '{print $2}' | awk -v d=" " '{s=(NR==1?s:s d)$0}END{print s}'
TEST-115 TEST-111 TEST-94

It works as expected

Please provide following details

  1. JiraCLI Version:
(Version="1.4.0", GitCommit="eb842e18014303a575fde8e19508b3c7c13982c5", CommitDate="2023-05-09T07:09:45+00:00", GoVersion="go1.19.4", Compiler="gc", Platform="darwin/arm64")
  1. Are you using Jira cloud or on-premise jira server?
Cloud
  1. What operating system are you using? Also mention version.
macOSSonoma 14.0 Beta (23A5312d)
  1. What terminal are you using? Also mention version.
alacritty --version
alacritty 0.12.2 (9d9982d)
fish --version
fish, version 3.6.1

To Reproduce

Steps to reproduce the behavior:

  1. Have macOS
  2. Configure jira with keychain
  3. Create config
  4. Move config to custom location
  5. See error

Expected behavior
No error text when using custom location

@oschrenk oschrenk changed the title Using custom config path prints help text although keychain is setuo Using custom config path prints help text although keychain is setup Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants