Skip to content
Snippets Groups Projects
Commit 80e5c477 authored by Georges Racinet's avatar Georges Racinet
Browse files

Sending GitLab notifications for tags

Before this, neither pre-receive nor post-receive notifications
were sent. The former would be a major security concern for
upstream GitLab, much less for us, since most of the permission
checking is actually done by Mercurial.

The latter explains why there aren't pipelines running for tags
and why it takes a while for the tags to be visible in the
"Run pipeline" page.

Closes heptadod#260

What happened here is that the tags were correctly exported
and this was tested, but it happened before `update_references()`,
which is in particular the method that's responsible for sending
notifications.

Once the tags were written in the Git repo, of course
'update_references()` wouldn't see them. But it's worse than that:
`get_exportable()` only inspects heads (all these methods are
really ill-named in hg-git).

We considered not duplicating `export_hg_tags()` and comparing the
tags before and after, but it has the major drawback for us to
write immediately to the Git repo, whereas we want to send the
`pre-receive` notification to GitLab before writing.

Besides, `export_hg_tags()` wasn't so complicated, and our testing
is more thorough than in upstream hg-git.
parent 74a2f812
No related branches found
No related tags found
1 merge request!25Restore post-receive notifications about tags
Pipeline #6151 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment