wandersoncferreira / code-review

Code Reviews in Emacs
https://wandersoncferreira.github.io/code-review/
GNU General Public License v3.0
462 stars 49 forks source link

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

Open innerout opened 2 years ago

innerout commented 2 years ago

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):

hjudt commented 2 years ago

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.

innerout commented 2 years ago

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.