code-review icon indicating copy to clipboard operation
code-review copied to clipboard

code-review does not respect code-review-gitlab-base-url

Open innerout opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug code-review does not respect when the below variables are set. This seems to apply to github and gitlab custom instances as discovered by @gagbo in the doom emacs discord.

(setq code-review-gitlab-base-url "custom.url")
(setq code-review-gitlab-host "remaining.com/api")
(setq code-review-gitlab-graphql-host "remaining.com/api")

To Reproduce Steps to reproduce the behavior: Add this in your init.el

(setq code-review-gitlab-base-url "custom.url")
(setq code-review-gitlab-host "remaining.com/api")
(setq code-review-gitlab-graphql-host "remaining.com/api")
  1. Go to magit-status
  2. Open a MR that is yet to be merged.
  3. Execute code-review-forge-pr-at-point
  4. See the error code-review prepends gitlab. even when code-review-gitlab-base-url is set.

Expected behavior Respect and concatenate code-review-gitlab-base-url with host and graphql-host properly.

Screenshots image

Desktop (please complete the following information):

  • OS: ArchLinux
  • emacs version: emacs-pgtk-native-comp
  • Latest doom emacs version

innerout avatar Apr 03 '22 16:04 innerout

This might just be a cosmetic issue, see issue #48. Just be stubborn and proceed; I had to enter a user and confirm "set globally" three times. See the linked issue.

hjudt avatar Apr 04 '22 20:04 hjudt

Thanks! I missed the issue you mentioned. The behavior you describe seems like mine, still having unexpected behavior makes the package counterintuitive to use. I believe if the package uses the variables mentioned in my first post, things will work as expected as in magit-forge.

innerout avatar Apr 04 '22 21:04 innerout