Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

repo search documentation is wrong #984

Open
gdzien opened this issue Mar 23, 2022 · 4 comments
Open

repo search documentation is wrong #984

gdzien opened this issue Mar 23, 2022 · 4 comments
Labels
bug Something isn't working stale

Comments

@gdzien
Copy link

gdzien commented Mar 23, 2022

Description

glab config set gitlab_uri https://example.com
failed to set "gitlab_uri" to "https://example.com": failed to write config: not a git repository
alias glab
alias glab='GITLAB_HOST=https://example.com glab'

$ glab repo search
required flag(s) "search" not set

$ glab repo search docker
accepts 0 arg(s), received 1

Expected Behavior vs Actual Behavior
Commands actually work and tool is useful.

Possible Fix

Steps to Reproduce
All should be obvious via description section.

Logs

Your Environment

  • Version used (Run glab --version): glab version 1.22.0 (2022-01-10)
  • Operating System and version:
    Mac OS (12.0.1) on M1 tool installed via homebrew.
@gdzien gdzien added the bug Something isn't working label Mar 23, 2022
@zemzale
Copy link
Collaborator

zemzale commented Mar 23, 2022

So few things here.

  1. glab config set gitlab_uri https://example.com/ needs to be run inside a git repository to make, sense. This sets the URI for the GitLab API for that directory.
  2. glab repo search error message is clear enough, although the help message is not great. You need to provide the --search flag instead of using an argument. e.g. glab repo search --search docker

@gdzien
Copy link
Author

gdzien commented Mar 24, 2022

  1. makes no sense to be directory sepecific when otherwise my calls to "search repo" says 401 unauthorised to gitlab.com
  2. Documentation and messages need to be updated, also adding "--search" to "repo search" is illogical.

@zemzale
Copy link
Collaborator

zemzale commented Mar 24, 2022

makes no sense to be directory specific when otherwise my calls to "search repo" says 401 unauthorized to gitlab.com

The API host is found by

  • GITLAB_HOST
  • Check if the host in the current git directory is authenticated
  • If neither of the above is true, fall back to gitlab.com

So you either have to set GITLAB_HOST and authenticate against the host using the glab auth login command

Documentation and messages need to be updated, also adding "--search" to "repo search" is illogical.

I agree with this. Since the tool is being adopted by GitLab( #983) feel free to open an issue there.

@zemzale zemzale changed the title Nothing really works repo search documentation is wrong Mar 24, 2022
@clemsbot
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.

@clemsbot clemsbot added the stale label Apr 24, 2022
ashumkin pushed a commit to ashumkin/glab that referenced this issue Sep 6, 2023
Transition copyright/license to GitLab

Closes profclems#984

See merge request gitlab-org/cli!987
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants