Hi!

On Sun, 2025-08-17 at 16:46:25 +0900, Charles Plessy wrote:
> Le Sun, Aug 17, 2025 at 12:18:57AM -0700, Otto Kekäläinen a écrit :
> > How about this strategy: instead of disabling or ignoring Merge
> > Requests on Salsa, take a peek at them at least once before uploading

> I only see this working if either Salsa would have a (scriptable ?) upload
> button, or if the usual command-line tools like dput would have a config 
> option
> to do so.  For instance maybe dgit - which I am looking forward to test after
> my holidays - or gbp could prompt at an appropriate time "There are xyz MRs
> that can be merged in this branch with no conflict" ?

Ah, that looks like a nice idea! So for people that use salsa MRs
and/or CI, I've implemented such an optional hook for dupload (which
complements other similar hooks such as its transitions, authorized
security or source-only uploads checks).

The prospective implementation can be found at:

  
https://git.hadrons.org/cgit/debian/dpkg/dupload.git/commit/?h=pu/hook-salsa&id=313f515b57f6708881f2589a1e774d2ee1694305

Which I guess I'll be merging for the next upload. I've not added it
as a default hook because it would require for people to setup a salsa
token, and adds a significant amount of time for the checks. The salsa
tool interface does not look ideal also to be used by another tool (had
to scrape the output, which seems fragile), make assumptions about exit
codes, and it would be nice to be able to specify the full repo URL
instead of having to hard-code the Salsa URL and strip that to find the
project name in there. Will probably file some reports against
devscripts about these issues.

A user will be able to add it either to /etc/dupload.conf by
uncommenting the hook, or to their own config, by doing something
like:

  ,---
  push @{$preupload_debian}, '/usr/share/dupload/debian-salsa %1';
  `---

Thanks,
Guillem

Reply via email to