Here's some sample code from an open-source project if you'd like to copy:
https://github.com/intersystems/git-source-control/blob/82d740af3ac035fe...
You might use a GitLab webhook to do this. The first step would be to create an endpoint on your IRIS environments that can be called over HTTP to run the Pull method of the git-source-control API. That will deploy a change by running "git pull" and loading the changed files into IRIS. A simple way to do that is by creating a new web application with a REST handler like this:
Class MyApp.PullHandler Extends %CSP.REST
{
ClassMethod Pull()
{
do ##class(SourceControl.Git.API).Pull()
}
XData UrlMap
{
<Routes>
<Route Url="/pull" Method="POST" Call="Pull"/>
</Routes>
}
You will also need to make sure that this endpoint is network accessible to your GitLab environment, and authenticated according to your security requirements.
The second step would be to configure a GitLab webhook to call this endpoint on the event of a PR being merged. Here is some documentation from GitLab about how to do that: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html
Hi Armin, which version of the Embedded Git plugin is running on your server? If you have IRIS terminal access, the following command will show the version:
zpm "list-installed git-source-control"