~sircmpwn/sr.ht-discuss

2 2

Supporting renamed forks in dispatch

Details
Message ID
<1736964.CSqEvfHbRm@g550jk>
Sender timestamp
1561654464
DKIM signature
missing
Download raw message
Currently, when a pull request is opened on a GitHub repository that has 
dispatch.sr.ht configured, and the forked repository doesn't have the same name 
as the original one, then dispatch doesn't rewrite the source url to the 
commit the pull request is for but leaves it at the original url.

I've identified the part in dispatch.sr.ht that has to be changed
(https://paste.sr.ht/~z3ntu/9a1e5ec09a22e0b60b2808872576288bc0a676c1) but this 
causes the manifests' "cd" statements to be incorrect as the folder name is 
diferent then.

A solution for this problem (similar to what can be used in Arch Linux 
PKGBUILDs - "filename::url"), would be having support for renaming downloaded 
sources in the build manifest for builds.sr.ht; and dispatch could rewrite the 
source urls to $original_project_name::$url_of_fork_plus_commit then, which 
makes everything work properly :)

Any comments?

Luca
Details
Message ID
<3524989.Dmi1kdMR3F@g550jk>
In-Reply-To
<1736964.CSqEvfHbRm@g550jk> (view parent)
Sender timestamp
1561739538
DKIM signature
missing
Download raw message
On Donnerstag, 27. Juni 2019 18:54:24 CEST Luca Weiss wrote:
> Currently, when a pull request is opened on a GitHub repository that has
> dispatch.sr.ht configured, and the forked repository doesn't have the same
> name as the original one, then dispatch doesn't rewrite the source url to
> the commit the pull request is for but leaves it at the original url.

Hi again,
I've made proof of concept patches for both dispatch and builds that actually 
work now: https://paste.sr.ht/~z3ntu/2c6d9c153d22e5fe5cb86adb476f42d09a4280f6

Tested with https://github.com/RazerGenie/testrepo/pull/3 and the build 
results: http://builds.src.z3ntu.xyz/~z3ntu/job/19

Luca
Details
Message ID
<BV6GH5S6TCHJ.TR8B5APA57F5@homura>
In-Reply-To
<3524989.Dmi1kdMR3F@g550jk> (view parent)
Sender timestamp
1561835496
DKIM signature
missing
Download raw message
The approaches in these patches looks good to me, please send them along
to the sr.ht-dev list.
Reply to thread Export thread (mbox)