Bug: auto detection of organisation/repo from local .git/confg file in repository #452

Open
opened 6 months ago by suchademon · 0 comments

describe your environment

  • tea version used (tea -v): 0.8.0
  • Gitea version used: 1.15.10
    • the issue only occured after updating gitea recently
  • operating system: Debian 12
  • I make use of...
    • non-standard default branch names (no main,master, or trunk)
    • .ssh/config or .gitconfig host aliases in my git remotes
    • ssh_agent or similar
    • non-standard ports for gitea and/or ssh
    • something else that's likely to interact badly with tea: ...

describe the issue (observed vs expected behaviour)

I have tried to list current PRs for my local repository which was working back in the days. With version 0.8.0 it requiers to specify it with --repo and it also shows always NOTE: no gitea login detected, falling back to login 'my_default_login'.
What I have found is the following:

pr ls shows always that I have to add --repo or be located in a repository:

~/bin/tea pr ls 
NOTE: no gitea login detected, falling back to login 'my_default_login'
Remote repository required: Specify ID via --repo or execute from a local git repo.

~/bin/tea pr approve 75
NOTE: no gitea login detected, falling back to login 'my_default_login'
Remote repository required: Specify ID via --repo or execute from a local git repo.

but I am in a local repo:

git remote show origin
Certificate signed with disallowed algorithm
* remote origin
  Fetch URL: ssh://git@giteahost:/testorg/testrepo.git
  Push  URL: ssh://git@giteahost:/testorg/testrepo.git
  HEAD branch: master
  Remote branches:
    8140_1084   tracked
   ....

I have also tried to change the url, so that it gets invalid to see if the url is getting parsed and that was working (I removed the / infront of the org name):

~/bin/tea pr ls                  
2022/01/21 11:26:27 Git remote URL parse failed: parse "ssh://git@giteahost:testorg/testrepo.git": invalid port ":testorg" after host

when I add --repo testorg/testrepo it works as expected:

~/bin/tea pr ls --repo testorg/testrepo
NOTE: no gitea login detected, falling back to login 'my_default_login'
+-------+-------------------+-------+----------------+-----------+------------------+
| INDEX |       TITLE       | STATE |     AUTHOR     | MILESTONE |     UPDATED      |
+-------+-------------------+-------+----------------+-----------+------------------+
|    75 | test.sh: cli test | open  | xxxxxx xxxxxxx |           | 2022-01-21 10:52 |
+-------+-------------------+-------+----------------+-----------+------------------+
### describe your environment - tea version used (`tea -v`): 0.8.0 - [ ] I also reproduced the issue [with the latest master build](https://dl.gitea.io/tea/master) - Gitea version used: 1.15.10 - [ ] the issue only occured after updating gitea recently - operating system: Debian 12 - I make use of... - [X] non-standard default branch names (no `main`,`master`, or `trunk`) - [X] .ssh/config or .gitconfig host aliases in my git remotes - [X] ssh_agent or similar - [ ] non-standard ports for gitea and/or ssh - [ ] something else that's likely to interact badly with tea: ... ### describe the issue (observed vs expected behaviour) I have tried to list current PRs for my local repository which was working back in the days. With version 0.8.0 it requiers to specify it with `--repo` and it also shows always `NOTE: no gitea login detected, falling back to login 'my_default_login'`. What I have found is the following: `pr ls` shows always that I have to add --repo or be located in a repository: ```bash ~/bin/tea pr ls NOTE: no gitea login detected, falling back to login 'my_default_login' Remote repository required: Specify ID via --repo or execute from a local git repo. ~/bin/tea pr approve 75 NOTE: no gitea login detected, falling back to login 'my_default_login' Remote repository required: Specify ID via --repo or execute from a local git repo. ``` but I am in a local repo: ```bash git remote show origin Certificate signed with disallowed algorithm * remote origin Fetch URL: ssh://git@giteahost:/testorg/testrepo.git Push URL: ssh://git@giteahost:/testorg/testrepo.git HEAD branch: master Remote branches: 8140_1084 tracked .... ``` I have also tried to change the url, so that it gets invalid to see if the url is getting parsed and that was working (I removed the / infront of the org name): ```bash ~/bin/tea pr ls 2022/01/21 11:26:27 Git remote URL parse failed: parse "ssh://git@giteahost:testorg/testrepo.git": invalid port ":testorg" after host ``` when I add `--repo testorg/testrepo` it works as expected: ```bash ~/bin/tea pr ls --repo testorg/testrepo NOTE: no gitea login detected, falling back to login 'my_default_login' +-------+-------------------+-------+----------------+-----------+------------------+ | INDEX | TITLE | STATE | AUTHOR | MILESTONE | UPDATED | +-------+-------------------+-------+----------------+-----------+------------------+ | 75 | test.sh: cli test | open | xxxxxx xxxxxxx | | 2022-01-21 10:52 | +-------+-------------------+-------+----------------+-----------+------------------+ ```
suchademon added the
kind/bug
label 6 months ago
suchademon changed title from Bug: auto detection of organisation/repo from local ./git/confg file in repository to Bug: auto detection of organisation/repo from local .git/confg file in repository 6 months ago
noerw self-assigned this 4 months ago
Sign in to join this conversation.
Loading…
There is no content yet.