The following workflow actions are available for the GitLab Connector integration. Each action corresponds to an endpoint of the GitLab Connector API.
For details on creating workflows, refer to Create workflows in Dynatrace Workflows.
The actions are listed under the following categories:
Creates a new file in a new branch based on the specified base branch.
The action can only act on one file, resulting in the creation of a new branch. The GitLab API doesn't allow the reuse of existing branches. Any attempt to do so results in the GitLab API throwing an error.
Field | Description | Required |
---|---|---|
Start branch | The starting branch to base the new branch on. | required |
Branch | The name of the new branch. | required |
File path | The relative path to the file to be created. | required |
File content | The content of the new file. | required |
Commit message | The commit message for the new file. | required |
Author name | The name of the author of the resulting commit. | optional |
Returns fields as described in the Repository files API - Create new file in repository GitLab documentation.
Gets a file from a repository.
This action should only be used to retrieve the contents of a plain-text file.
Field | Description | Required |
---|---|---|
File path | The relative path of the file. | required |
Ref | The reference from which to retrieve the file. It can be a branch name or a commit hash. | required |
Returns fields as described in the Repository files API - Get file from repository GitLab documentation.
Updates a file in your GitLab repository. This action creates a new branch based on the specified base branch.
The action can only act on one file, resulting in the creation of a new branch. The GitLab API doesn't allow the reuse of existing branches. Any attempt to do so results in the GitLab API throwing an error.
Field | Description | Required |
---|---|---|
Start branch | The starting branch to base the new branch on. | optional |
Branch | The name of the new branch. | required |
File path | The relative path to the file to be updated. | required |
File content | The updated content of the file. | required |
Commit message | The commit message for the edit. | required |
Author name | The name of the author of the resulting commit. | optional |
Returns fields as described in the Repository files API - Update existing file in repository GitLab documentation.
Deletes a file in your GitLab repository. This action creates a new branch based on the specified base branch.
The action can only act on one file, resulting in the creation of a new branch. The GitLab API doesn't allow the reuse of existing branches. Any attempt to do so results in the GitLab API throwing an error.
Field | Description | Required |
---|---|---|
Start branch | The starting branch to base the new branch on. | required |
Branch | The name of the new branch. | required |
File path | The relative path to the file to be deleted. | required |
Commit message | The commit message for the deletion. | required |
Author name | The name of the author of the resulting commit. | optional |
Returns fields as described in the Repository files API - Delete existing file in repository GitLab documentation.
Creates a merge request in your GitLab repository.
Field | Description | Required |
---|---|---|
Source Branch | The name of the source branch. | required |
Target Branch | The name of the target branch. | required |
Title | The title of the new merge request. | required |
Description | The description of this merge request. | optional |
Returns fields as described in the Merge requests API - Create MR GitLab documentation.
Gets a single merge request in GitLab.
Field | Description | Required |
---|---|---|
Internal ID | The GitLab internal identifier of the merge request. | required |
Commits behind the target branch | Toggle the switch on to include the commits behind the target branch. | optional |
Rebase operation in progress | Toggle the switch on to include any rebase operation in progress. | optional |
Returns fields as described in the Merge requests API - Get single MR GitLab documentation.
Gets a list of merge requests in your GitLab repository.
Field | Description | Required |
---|---|---|
Author | The name of the user who authored the merge requests. | optional |
State | The status of merge requests you're interested in. | optional |
Returns fields as described in the Merge requests API - List merge requests GitLab documentation.
Merges a merge request in your GitLab repository.
Field | Description | Required |
---|---|---|
Merge request | The merge request to merge. | required |
SHA | The hash of the presumptive last commit in the merge request. If the actual last commit differs, the action fails. | optional |
Enable squash merge | Toggle the switch on to use the squash merge strategy or off to use the merge commit strategy. | optional |
Returns fields as described in the Merge requests API - Merge a merge request GitLab documentation.
Updates an existing merge request in your GitLab repository.
Field | Description | Required |
---|---|---|
Merge request | The merge request to be updated. | required |
Branch | The name of the target branch. | required |
Title | The new title of the merge request. | optional |
Description | The description of this merge request. | optional |
Returns fields as described in the Merge requests API - Update MR GitLab documentation.
Creates a new note for a single merge request in GitLab.
Field | Description | Required |
---|---|---|
Merge request | The merge request to which the note will be posted. | required |
Content of the note | The content of the note. | required |
SHA | The hash of the presumptive last commit in the merge request. If the actual last commit differs, the action fails. | optional |
Returns fields as described in the Merge requests API - Create MR Note GitLab documentation.
Creates a new issue in your GitLab repository.
Field | Description | Required |
---|---|---|
Title | The title of the new issue. | required |
Labels | A comma-separated list of labels to add to the issue. | optional |
Issue type | The type of the issue. | optional |
Description | The description of the issue. | optional |
Assignees | The user to assign this issue. If not set, the issue will be unassigned. | optional |
Returns fields as described in the Issues API - New issue GitLab documentation.
Edits an issue in your GitLab repository.
Field | Description | Required |
---|---|---|
Title | The new title of the issue. | optional |
Labels | A comma-separated list of labels to apply to the issue. | optional |
Issue type | The type of the issue. | optional |
Description | The description of the issue. | optional |
Close/Reopen | Select to change the issue status. | optional |
Returns fields as described in the Issues API - Edit an issue GitLab documentation.
Gets a list of issues from your GitLab repository.
Field | Description | Required |
---|---|---|
Issue Ids | Show only issues with the specified, comma-separated list of IDs. | optional |
Title or Description | Show only issues that contain the specified text in their title or description. | optional |
Issue type | Show only issues of the specified type. | optional |
Labels | Show only issues with all of the comma-separated labels assigned to them. | optional |
State | Set whether you want to retrieve a list of open or closed issues. | optional |
Returns fields as described in the Issues API - List issues GitLab documentation.
Gets the status of a pipeline running in your GitLab repository.
Field | Description | Required |
---|---|---|
Branch | The name of the branch. | required |
Pipeline | The GitLab internal identifier of the pipeline. | required |
Returns fields as described in the Jobs API - Get a single job GitLab documentation.
Triggers a new run of a pipeline in your GitLab repository.
Field | Description | Required |
---|---|---|
Branch | The name of the branch for which the pipeline should be triggered. | required |
You can also set any number of build parameters.
Returns fields as described in the Jobs API - Run a job GitLab documentation.