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
Showing
- hgext3rd/heptapod/git.py 34 additions, 3 deletionshgext3rd/heptapod/git.py
- hgext3rd/heptapod/tests/git/test_inner.py 29 additions, 0 deletionshgext3rd/heptapod/tests/git/test_inner.py
- hgext3rd/heptapod/tests/git/test_integration.py 25 additions, 5 deletionshgext3rd/heptapod/tests/git/test_integration.py
Loading
Please register or sign in to comment