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

Gitlab: Nothing in the pipeline view #21

Open
hinricht opened this issue Nov 28, 2024 · 4 comments
Open

Gitlab: Nothing in the pipeline view #21

hinricht opened this issue Nov 28, 2024 · 4 comments

Comments

@hinricht
Copy link

Hi, I try to use this plugin with gitlab.com, but I can't make it work.
Could you please share a minimal config for gitlab ?

So far I have:

  • Installed the plugin using LazyVim. It installs fine and I can open the pipeline view
  • Installed yq and glab
  • glab auth status shows that I'm logged into gitlab.com
  • When I open the pipeline view, there's nothing to see besides the 0 pipeline.nvim header
  • No plugin key binding seems to work
  • Even verbose nvim logging I cannot see any error / information about the plugin
$ glab auth status  
gitlab.com
  ✓ Logged in to gitlab.com as … (/home/varac/.config/glab-cli/config.yml)
  ✓ Git operations for gitlab.com configured to use ssh protocol.
  ✓ API calls for gitlab.com are made over https protocol.
  ✓ REST API Endpoint: https://gitlab.com/api/v4/
  ✓ GraphQL Endpoint: https://gitlab.com/api/graphql/
  ! No token provided in configuration file.

! One of GITLAB_TOKEN, GITLAB_ACCESS_TOKEN, OAUTH_TOKEN environment variables is set. It will be used for all authentication.

My plugin config:

 {
    "topaxi/pipeline.nvim",
    keys = {
      { "<leader>ci", "<cmd>Pipeline<cr>", desc = "Open pipeline.nvim" },
    },
    -- optional, you can also install and use `yq` instead.
    -- build = "make",
    ---@type pipeline.Config
    --- https://github.com/topaxi/pipeline.nvim?tab=readme-ov-file#options
    opts = {
      browser = "xdg-open",
      allowed_hosts = {
        "gitlab.com",
      },
    },
  },

Thanks !

@topaxi
Copy link
Owner

topaxi commented Nov 28, 2024

I haven't tried it on the public gitlab instance yet, only the one from my current employer. I will take a look later this evening or latest this weekend.

@hinricht
Copy link
Author

Thanks !

@topaxi
Copy link
Owner

topaxi commented Dec 2, 2024

I encountered a similar issue as you did, where glab auth status also reported this:

One of GITLAB_TOKEN, GITLAB_ACCESS_TOKEN, OAUTH_TOKEN environment variables is set. It will be used for all authentication.

Could you try unsetting all of these env variables prior to starting neovim?

I've tried setting these or even GITLAB_HOST when running the glab command here:

return create_job {
command = 'glab',
args = args,
}

but setting any gitlab related environment variable somehow makes glab api no longer work.

@hinricht
Copy link
Author

hinricht commented Dec 3, 2024

I removed the GITLAB_TOKEN env var:

$ glab auth status        
gitlab.com
  ✓ Logged in to gitlab.com as hinricht (/home/varac/.config/glab-cli/config.yml)
  ✓ Git operations for gitlab.com configured to use ssh protocol.
  ✓ API calls for gitlab.com are made over https protocol.
  ✓ REST API Endpoint: https://gitlab.com/api/v4/
  ✓ GraphQL Endpoint: https://gitlab.com/api/graphql/
  ✓ Token: **************************
A new version of glab has been released: v1.46.1 -> v1.50.0
https://gitlab.com/gitlab-org/cli/-/releases/v1.50.0

But the result is the same, I don't see any more that the 0 pipeline.nvim header in the Pipeline window.

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

2 participants