Skip to content

Navigate through MR by commit #450

Open

Description

@sankargorthi

Feature Description

Gitlab MRs currently allow for reviewing changes made on each commit and commenting on specific SHAs. Providing a way of focusing on a specific commit could help with reviews that involve well-constructed incremental changes.

Activity

  1. jakubbortlik commented on Jan 8, 2025

    @jakubbortlik
    Collaborator

    Hi @sankargorthi, this sounds like a good idea but also like quite a lot of work. Is there any chance you'd like to create a PR for this?

    We could probably use something like :DiffviewFileHistory --range=origin..HEAD to get the relevant commit history in the reviewer. The tricky part would be to make this "mode" to work interchangeably with how it works now with :DiffviewOpen <base_sha>..<head_sha>. I imagine ideally we'd like to be able to switch between these two modes on the fly without restarting Neovim and changing the gitlab.nvim config.

    It'd be necessary to make changes around how the Diffview state is handled, how it interacts with the discussion tree (e.g., jumping to file could now respect the revision thus improving the UX related to issue #451), how comments are created (we'd need to find out the currently selected revision and include it into the Gitlab API call, and find out about Gitlab intricacies like that it doesn't support suggestions on old versions in a diff for two commits).

  2. sankargorthi commented on Jan 9, 2025

    @sankargorthi
    Author

    Thanks for fleshing out the implementation roadmap! That is definitely a lot of work and I have no experience with Go; it'd be a tall order. Was just hoping for a stopgap solution of going to the commit log and :DiffviewOpen <current_sha>~..<current_sha>, but easier said than done I suppose.

  3. jakubbortlik commented on Jan 9, 2025

    @jakubbortlik
    Collaborator

    I don't think you'd have to do any changes to the Go code, just Lua. But I admit it would still be hard without previous knowledge of the codebase. I think the feature would be useful but I'm currently working on different improvements of the plugin so I may get to this one later.

  4. jakubbortlik commented on Aug 14, 2026

    @jakubbortlik
    Collaborator

    Hi, @sankargorthi, review by commit is being implemented in #577. Your feedback will be appreciated.

  5. linked a pull request that will close this issuefeat(reviewer): browse MR commit history #577on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions