Craft.io allows you to set up two-way synchronization with GitLab. The following instructions will take you, step by step, through the setup.
Important: In order to connect to GitLab, you will need to have login credentials with Owner permissions to GitLab projects.
Syncing Craft.io to GitLab
Data synchronization from Craft.io to GitLab is by manual push. The first step of the configuration will connect Craft.io to Gitlab.
Connecting Craft.io to Gitlab
Click Integrations from the user menu at the lower left, and choose to connect to GitLab:
You will be asked to enter your GitLab Private Token and Enterprise URL: (https://gitlab.com)
Note: To generate your GitLab Access Token, go to User Settings > Access Tokens and create a Personal Access Token with scope 'api', then copy it to clipboard.
Select the GitLab project to sync with Craft.io, and click Next.
Additional Integration Settings
In this step you are asked to finalize your integration configuration:
Craft.io syncs all Features and Requirements as GitLab issues. Tasks, Bugs, and Improvements will be synced only for the selected team or teams you choose in this step.
You can choose whether or not to sync team workflow statuses (i.e To Do In Progress, Done) between Craft.io and GitLab and select a Craft.io team to sync statuses with. For more information about Ctaft.io Workflow Kanban view, look Here
You can choose if you want to sync GitLab Milestones as Craft.io releases, sprints, or not synced at all.
Closing an item in GitLab will immediately release the item in Craft.io, and vice versa.
Releasing an item in Craft.io will close the item in GitLab on sync, and vice versa.
Mapping Between Craft.io and GitLab
The following items will be synced Through the two-way integration between Craft.io and GitLab. Note: Syncing will never delete any items on both sides.
Congratulations! You are now ready for your first sync!
You can synchronize the systems for the first time or you can do it later. You can also choose to skip this step and sync selected items instead. For more information about syncing a specific item, see ‘Sync a Single Item’ section below.
Note: you can always return to this step by clicking Push button:
First-time sync between Craft.io and GitLab
You can select between the following override options when syncing to GitLab:
Note: On the first sync, the GitLab project is synced to Craft. The import is performed once. To enable automatic updates from GitLab to Craft.io, you will need to set up a webhook in GitLab. See ‘Syncing GitLab back to Craft.io’ below for more.
Select the parts of your product in Craft.io that you want to push to GitLab.
The following options are available:
All Workspace - Syncs the entire Craft.io Workspace to GitLab.
Releases - Allows you to select one or more Craft.io releases to be pushed to GitLab.
Sprint Backlog - Allows you to select one or more Craft.io sprint backlogs to be pushed to GitLab.
Once you have completed your selection, click Sync. Depending on the size of your request, the procedure could take several minutes to complete.
When the sync is completed, you will see messages showing what was synced and/or skipped.
You can also download a more detailed log.
Note: All GitLab issues are created in Craft.io under the GitLab Theme Product. You can move them to different Products across Craft.io using drag and drop in the Editor, or by bulk action in the Search and Filter tool. For more about Search and Filtering, look Here
Syncing GitLab back to Craft.io
From the user menu, select Integrations and click Sync GitLab back to Craft. You will see information on how to create a webhook in GitLab, as well as the webhook listener URL to use in the webhook configuration. This is a unique URL that contains your product ID. Copy the URL to your clipboard and continue to the webhook configuration in GitLab.
In GitLab, go to System > Integrations and paste your webhook URL into the URL field.
Select Issues Events and Confidential Issues Events. Everything else should be unchecked.
Click to add the webhook.
Syncing a Single Item
At times you may want to update or send a single item to GitLab. This can be a new item that you created or one that you updated. You can do this from the GitLab section in the item's right panel:
Click Sync Item to sync the item to GitLab.
Click the GitLab issue ID to open the corresponding issue in GitLab.
Modifying Integration Settings
You can always return and update your configuration from the 3 dots integration menu:
You can also choose to view a detailed log of the last sync and disconnect the GitLab integration.