Skip to content

API call to fetch issues when adding dependent issue doesn't take ROOT_URL into account #5389

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

Closed
1 of 6 tasks
MarkusAmshove opened this issue Nov 23, 2018 · 1 comment · Fixed by #5392
Closed
1 of 6 tasks
Labels
Milestone

Comments

@MarkusAmshove
Copy link
Contributor

  • Gitea version (or commit ref): 1.6.0
  • Database (use [x]):
    • PostgreSQL
    • [X ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

I wanted to try out issue dependencies and when clicking wihtin the dropbox, or typing in an issue, I get the response:

There was an error contacting the server

In the JavaScript console I can see the following error:

API: Server gave an error: error /scm/api/v1/repos/scm/MY_USER/MY_REPO/issues?q=

The problem is, that my ROOT_URL looks like this:

https://mydomain.com/scm

and therefore the API call doesn't find the correct endpoint (see the additional scm after repos/).

It seems like the URL-building part of the API call doesn't take ROOT_URL into account, or simply uses everything after DOMAIN to concat it to v1/repos/

I currently see no workaround which I can do on my side to work around this at the moment.

Screenshots

grafik

@MarkusAmshove
Copy link
Contributor Author

I've found the API call here and it seems that the #repolink element in my HTML does have the /scm suffix.

I'm not sure what the correct way is here, either have a different #repolink (which might break other stuff) or have the call relativize the URL correctly taking ROOT_URL into account

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants