When creating a PR for pagure project that is a fork of some other
project, our pagure-events service is not able to trigger package
rebuilds in Copr. It doesn't find any candidates with
ScmPackage.get_candidates_for_rebuid(event_info.base_clone_url)
That is because event_info.base_clone_url
looks like this
https://pagure.io/forks/frostyx/copr/copr
but really, the URL is supposed to be
https://pagure.io/fork/frostyx/copr/copr
The first url returns 404. I don't know whether this is a pagure
or our issue, but I am fixing/workaround it here, so we don't
eventually need to wait for pagure release to get this fixed.
If you look at how
base_clone_url
is defined:'base_clone_url': base_url + data['msg']['pullrequest']['project']['fullname']
It seems to be pagure's fault (why would they put
forks
intofullname
, and notfork
). Could you please create the issue, and link it from commit message?Also, shouldn't we rather correctly define the
event.base_clone_url
inevent_info_from*
methods?