Hi, I recently opened a thread on using Public Id integration with gitlab and I’ve been studying the documentation about relation auto-linking
And I came to the conclusion that the existing solution does not suit me, because my commits have the following structure
fix: fix incorrect behaviour
META: task/2, bug/3
as MR can close a bug or several tasks in parallel. Due to the fact that I didn’t find the Description field with Gitlab MR (there is only Name). I was forced to use the script below to get all the related entities with MR. it’s fragile and redundant, but it works. Could you please advise if there is any other way to accomplish this task?
what’s interesting:
Is there any way to set global variables? I used another database for storage and reading const token = await fibery.getEntityById('Runa/Env', 'd27260a0-e9f3-11ee-9f13-81b4ace4cd35', ['Value'])
How do I get the MP description otherwise? I only got it by querying gitlab.
The Description field for Gitlab merge requests should be included in the sync.
And given that it is, you can probably achieve what you need by using a ReplaceRegex([Description (Snippet)],....) function to extract the task and bug ids (assuming that the description does not exceed the limit for what’s included in a snippet (1000 chars).
To be honest, I didn’t understand how to use graphql in the context of automation, the examples in the documentation didn’t make it clear. maybe I was looking in the wrong place
Yeah, it is db specific, but addCollectionItem is db-specific too, so no real difference performance wise. It would need maintaining if you think the types are likely to change over time, but that scenario would also require you to update your script to specify them.
No, it’s just a query name, you could choose anything.