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

error when no discussions exist for MR #274

Closed
3 tasks done
jakubbortlik opened this issue Apr 20, 2024 · 1 comment
Closed
3 tasks done

error when no discussions exist for MR #274

jakubbortlik opened this issue Apr 20, 2024 · 1 comment

Comments

@jakubbortlik
Copy link
Collaborator

Prerequsities

  • I'm on the latest version of the plugin: develop f604c94
  • I've installed the required dependencies
  • I've run :h gitlab.nvim.troubleshooting and followed the steps there

Setup Configuration and Environment

{
  "harrisoncramer/gitlab.nvim",
  dependencies = {
    "MunifTanjim/nui.nvim",
    "nvim-lua/plenary.nvim",
  },
  build = function()
    require("gitlab.server").build()
  end,
  dir = "~/path/to/my/cloned/version",
  config = function()
    require("gitlab").setup({})
  end,
}

Bug Description

The split for discussions cannot be created when there are no discussions/notes.

Reproduction Steps

  1. Check out the feature branch for which no discussions exist in the MR
  2. Open Neovim
  3. Run :lua require("gitlab").review()
  4. You will get the following error:
gitlab.nvim: No discussions, notes, or draft notes for this MR
Error executing vim.schedule lua callback: ...b/projects/feat4/lua/gitlab/actions/discussions/init.lua:117: attempt to index field 'split' (a nil value)
stack traceback:
        ...b/projects/feat4/lua/gitlab/actions/discussions/init.lua:117: in function 'cb'
        /home/jakub/projects/feat4/lua/gitlab/async.lua:26: in function 'fetch'
        /home/jakub/projects/feat4/lua/gitlab/async.lua:42: in function 'callback'
        /home/jakub/projects/feat4/lua/gitlab/job.lua:40: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
@harrisoncramer
Copy link
Owner

harrisoncramer commented Apr 20, 2024

Fixed in develop by #273 and #275, if not let me know here with another comment. Thanks for pointing this out, there were some refresh issues with empty state.

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