Detect missing tags: force maintainer to continue tagging upload commits if it was done before
While reviewing upload history of https://tracker.debian.org/pkg/xz-utils and commits and tags at https://salsa.debian.org/debian/xz-utils/-/commits/debian/unstable I noticed that @kibi uploaded both 5.4.5-0.2 and 5.4.5-0.3 to Debian unstable, but only tagged debian/5.4.5-0.2 and debian/5.4.5-0.3 is still missing today.
When @bigeasy pushed following commits in debian/xz-utils@eebe8611 to Salsa it would have been nice if Salsa-CI would have noticed that the Debian source code is out of sync with what is in Debian repositories and flagged it, forcing maintainer to take action to sync from Debian the source and add appropriate tags.
Not all maintainers use git tags or even gbp-buildpackage in a consistent way. Thus such a validation step should first check if tags were previously used, and the CI should fail only if usage of tags stopped, thus indicating error.
The check should also be branch-specific. In the case of xz-utils the maintainer never tagged any uploads to experimental even though there was several. The tagging practice was only on the debian/unstable
branch and never on the debian/experimental
branch.
If a command like gbp sync
existed already (requested in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060371), this would be fairly easy to adopt in Salsa-CI.