openSUSE / open-build-service

Build and distribute Linux packages from sources in an automatic, consistent and reproducible way #obs
https://openbuildservice.org
GNU General Public License v2.0
920 stars 437 forks source link

scmsync project link includes query parameters #16595

Open AdamMajer opened 1 month ago

AdamMajer commented 1 month ago

For example,

https://build.opensuse.org/project/show/home:autogits_obs_staging_bot:autogits:XObsPrj:PR:3

Includes the scmsync link verbose. The query parts meant as parameters for OBS should probably be stripped.

hennevogel commented 1 month ago

Not sure what this has to do with OBS...

AdamMajer commented 1 month ago

The links seems to be created with https://github.com/openSUSE/open-build-service/commit/3edc5fc5d034c80f2c972136ff0129c14c18e064#diff-5448eb52020e4874b7345447ebd9eac83900fba736722a906c6d58b4a2f86d2aR4

hennevogel commented 1 month ago

So you are talking about the link in the packages box

Screenshot from 2024-07-31 17-42-07

hennevogel commented 1 month ago

BTW what keeps you from sending a patch? :)

AdamMajer commented 1 month ago

With Gitea and OBS, this is a cosmetic bug.

For a patch, what would be optimal way of doing this? Add a helper function to https://github.com/openSUSE/open-build-service/blob/master/src/api/app/helpers/webui/webui_helper.rb to remove OBS query parameters?

hennevogel commented 1 month ago

For a patch, what would be optimal way of doing this?

I would say, write a getter on Project / Package that removes the query parameters. There are several other places we link to the scmsync URL. Like app/views/webui/package/side_links/_show_scmsync.html.haml