mk-5 / fjira

The golang fuzzy-find cli jira interface 🚀
GNU Affero General Public License v3.0
131 stars 3 forks source link

Can't Proceed Past Jira Token Type, Enter a Number: #103

Closed otherfutures closed 8 months ago

otherfutures commented 8 months ago

Desktop (please complete the following information):

Describe the bug Trying input any answer to answer Jira Token Type results in a response of e.g. '1\r is not a valid input. Answer by a number.' when trying to set up Fjira for the first time

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Additional notes Everything that could help to explain your problem. Ex. Screenshots

mk-5 commented 8 months ago

@otherfutures I will look on it right away

mk-5 commented 8 months ago

okay - I can reproduce it, fix is on a way. The ApiToken question is the only question where I use that lib: https://pkg.go.dev/github.com/tcnksm/go-input I think I will just refactor it to use something different

I also realised that Choco package is somehow broken - at least on my local. I will need to look on it as well

otherfutures commented 8 months ago

Choco is also how I downloaded it (forgot to mention it in the post above). It seemed to work fine on my machine though(?)

mk-5 commented 8 months ago

Choco is also how I downloaded it (forgot to mention it in the post above). It seemed to work fine on my machine though(?)

mhm okay - then it could be some problem with my Windows machine

mk-5 commented 8 months ago

@otherfutures as a "walkaround" for now - you can just create the configuration file manually.

File should be located under your user home directory, ~/.fjira/fjira.yaml

The configuration file structure goes like this:

current: default
workspaces:
    default:
        jiraRestUrl: https://something.atlassian.net
        jiraToken: $TOKEN_HERE
        jiraUsername: your@email.com
        jiraTokenType: api token
    another:
        jiraRestUrl: https://something.atlassian.net
        jiraToken: $TOKEN_HERE
        jiraUsername: your@email.com
        jiraTokenType: personal token

I have a plan to add a note about config structure to the README.md.

otherfutures commented 8 months ago

Are the lines above the only thing that should be in the fjira.yaml? Should I fill out both default & another or is just default fine for just one jira account/connection?

Also, will the program automatically use the yaml after it's made or do I need to configure something else?

Oh, also I just remembered something re the choco install: it didn't work at first so I had to uninstall & reinstall it to get the tar file & then either I had to manually unzip it using 7zip to get the .exe or choco did it for me (I can't remember which but I think it was the former).

Edit: I was able to log in (using just default & without further configuration in case someone sees this later), thank you :D

mk-5 commented 8 months ago

Are the lines above the only thing that should be in the fjira.yaml? Should I fill out both default & another or is just default fine for just one jira account/connection?

Also, will the program automatically use the yaml after it's made or do I need to configure something else?

Oh, also I just remembered something re the choco install: it didn't work at first so I had to uninstall & reinstall it to get the tar file & then either I had to manually unzip it using 7zip to get the .exe or choco did it for me (I can't remember which but I think it was the former).

Edit: I was able to log in (using just default & without further configuration in case someone sees this later), thank you :D

that "another" was just an example :)

New version 1.2.4 contains a fix for that api-token thing on windows. It will be release in a minutes

otherfutures commented 8 months ago

Many thanks for the quick response! I'll go ahead & close this now.