Skip to main content

GitLab

Supported versions

Supported Cortex XSOAR versions: 6.0.0 and later.

An Integration with GitLab This integration was integrated and tested with version v4.0 of GitLab API

Configure GitLab Integration on Cortex XSOAR#

  1. Navigate to Settings > Integrations > Servers & Services.
  2. Search for GitLab Integration.
  3. Click Add instance to create and configure a new integration instance.
ParameterDescriptionRequired
urlServer URL (e.g. https://gitlab.com/api/v4)True
api_keyAPI KeyTrue
insecureTrust any certificate (not secure)False
proxyUse system proxy settingsFalse
  1. Click Test to validate the URLs, token, and connection.

Commands#

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully execute a command, a DBot message appears in the War Room with the command details.

gitlab-get-projects#


Get a list of all visible projects across GitLab for the authenticated user. When accessed without authentication, only public projects with “simple” fields are returned.

Base Command#

gitlab-get-projects

Input#

Argument NameDescriptionRequired
repository_storageLimit results to projects stored on repository_storage. Available for admins only.Optional
last_activity_beforeLimit results to projects with last_activity before specified time.Optional
min_access_levelLimit by current user minimal access level.Optional
simpleReturn only limited fields for each project. This is a no-op without authentication as then only simple fields are returned.Optional
sortReturn projects sorted in asc or desc order.Optional
membershipLimit by projects that the current user is a member of.Optional
search_namespacesInclude ancestor namespaces when matching search criteria.Optional
archivedLimit by archived status .Optional
searchReturn list of projects matching the search criteria .Optional
id_beforeLimit results to projects with IDs less than the specified ID .Optional
last_activity_afterLimit results to projects with last_activity after specified timeOptional
starredLimit by projects starred by the current user .Optional
id_afterLimit results to projects with IDs greater than the specified ID.Optional
ownedLimit by projects explicitly owned by the current user.Optional
order_byReturn projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. repository_size, storage_size, or wiki_size fields are only allowed for admins. Default is created_at.Optional
statisticsInclude project statistics .Optional
visibilityLimit by visibility public, internal, or private .Optional
with_custom_attributesInclude custom attributes in response (admins only).Optional
with_issues_enabledLimit by enabled issues feature .Optional
with_merge_requests_enabledLimit by enabled merge requests feature.Optional
with_programming_languageLimit by projects which use the given programming language.Optional

Context Output#

PathTypeDescription
GitLab.Projects.web_urlUnknownProject Web URL
GitLab.Projects.nameUnknownProject Name
GitLab.Projects.pathUnknownProject Path
GitLab.Projects.created_atUnknownProject Created At
GitLab.Projects.visibilityUnknownProject Visiblity
GitLab.Projects.idUnknownProject ID

Command Example#

!gitlab-get-projects owned=true using="Moon-Integration"

Context Example#

{
"GitLab": {
"Projects": [
{
"_links": {
"events": "https://gitlab.com/api/v4/projects/21898188/events",
"issues": "https://gitlab.com/api/v4/projects/21898188/issues",
"labels": "https://gitlab.com/api/v4/projects/21898188/labels",
"members": "https://gitlab.com/api/v4/projects/21898188/members",
"merge_requests": "https://gitlab.com/api/v4/projects/21898188/merge_requests",
"repo_branches": "https://gitlab.com/api/v4/projects/21898188/repository/branches",
"self": "https://gitlab.com/api/v4/projects/21898188"
},
"allow_merge_on_skipped_pipeline": null,
"approvals_before_merge": 0,
"archived": false,
"auto_cancel_pending_pipelines": "enabled",
"auto_devops_deploy_strategy": "continuous",
"auto_devops_enabled": false,
"autoclose_referenced_issues": true,
"avatar_url": null,
"build_coverage_regex": null,
"build_timeout": 3600,
"builds_access_level": "enabled",
"can_create_merge_request_in": true,
"ci_config_path": "",
"ci_default_git_depth": 50,
"ci_forward_deployment_enabled": true,
"compliance_frameworks": [],
"container_expiration_policy": {
"cadence": "1d",
"enabled": true,
"keep_n": 10,
"name_regex": null,
"name_regex_keep": null,
"next_run_at": "2020-10-21T10:49:15.236Z",
"older_than": "90d"
},
"container_registry_enabled": true,
"created_at": "2020-10-20T10:49:15.219Z",
"creator_id": 5773551,
"default_branch": "master",
"description": null,
"emails_disabled": null,
"empty_repo": false,
"external_authorization_classification_label": "",
"forking_access_level": "enabled",
"forks_count": 0,
"http_url_to_repo": "https://gitlab.com/test-user/moon.git",
"id": 21898188,
"import_status": "finished",
"issues_access_level": "enabled",
"issues_enabled": true,
"jobs_enabled": true,
"last_activity_at": "2020-10-25T11:50:47.126Z",
"lfs_enabled": true,
"marked_for_deletion_at": null,
"marked_for_deletion_on": null,
"merge_method": "merge",
"merge_requests_access_level": "enabled",
"merge_requests_enabled": true,
"mirror": false,
"name": "moon",
"name_with_namespace": "test user / moon",
"namespace": {
"avatar_url": "/uploads/-/system/user/avatar/5773551/avatar.png",
"full_path": "test-user",
"id": 7637905,
"kind": "user",
"name": "test user",
"parent_id": null,
"path": "test-user",
"web_url": "https://gitlab.com/test-user"
},
"only_allow_merge_if_all_discussions_are_resolved": false,
"only_allow_merge_if_pipeline_succeeds": false,
"open_issues_count": 16,
"owner": {
"avatar_url": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/5773551/avatar.png",
"id": 5773551,
"name": "test user",
"state": "active",
"username": "test-user",
"web_url": "https://gitlab.com/test-user"
},
"packages_enabled": true,
"pages_access_level": "enabled",
"path": "moon",
"path_with_namespace": "test-user/moon",
"permissions": {
"group_access": null,
"project_access": {
"access_level": 40,
"notification_level": 3
}
},
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.com/test-user/moon/-/blob/master/README.md",
"remove_source_branch_after_merge": true,
"repository_access_level": "enabled",
"request_access_enabled": true,
"resolve_outdated_diff_discussions": false,
"service_desk_address": "incoming+test-user-moon-21898188-issue-@incoming.gitlab.com",
"service_desk_enabled": true,
"shared_runners_enabled": true,
"shared_with_groups": [],
"snippets_access_level": "enabled",
"snippets_enabled": true,
"ssh_url_to_repo": "git@gitlab.com:test-user/moon.git",
"star_count": 0,
"suggestion_commit_message": null,
"tag_list": [],
"visibility": "public",
"web_url": "https://gitlab.com/test-user/moon",
"wiki_access_level": "enabled",
"wiki_enabled": true
},
{
"_links": {
"events": "https://gitlab.com/api/v4/projects/18044686/events",
"issues": "https://gitlab.com/api/v4/projects/18044686/issues",
"labels": "https://gitlab.com/api/v4/projects/18044686/labels",
"members": "https://gitlab.com/api/v4/projects/18044686/members",
"merge_requests": "https://gitlab.com/api/v4/projects/18044686/merge_requests",
"repo_branches": "https://gitlab.com/api/v4/projects/18044686/repository/branches",
"self": "https://gitlab.com/api/v4/projects/18044686"
},
"allow_merge_on_skipped_pipeline": null,
"approvals_before_merge": 0,
"archived": false,
"auto_cancel_pending_pipelines": "enabled",
"auto_devops_deploy_strategy": "continuous",
"auto_devops_enabled": false,
"autoclose_referenced_issues": true,
"avatar_url": null,
"build_coverage_regex": null,
"build_timeout": 3600,
"builds_access_level": "enabled",
"can_create_merge_request_in": true,
"ci_config_path": null,
"ci_default_git_depth": 0,
"ci_forward_deployment_enabled": true,
"compliance_frameworks": [],
"container_expiration_policy": {
"cadence": "7d",
"enabled": true,
"keep_n": null,
"name_regex": null,
"name_regex_keep": null,
"next_run_at": "2020-10-24T01:50:06.530Z",
"older_than": null
},
"container_registry_enabled": true,
"created_at": "2020-04-10T04:25:23.777Z",
"creator_id": 5773551,
"default_branch": "master",
"description": "Python wrapper for OTRS (REST) API",
"emails_disabled": null,
"empty_repo": false,
"external_authorization_classification_label": "",
"forked_from_project": {
"avatar_url": null,
"created_at": "2016-04-25T10:01:22.538Z",
"default_branch": "master",
"description": "Python wrapper for OTRS (REST) API",
"forks_count": 9,
"http_url_to_repo": "https://gitlab.com/rhab/PyOTRS.git",
"id": 1112166,
"last_activity_at": "2020-10-20T18:46:30.547Z",
"name": "PyOTRS",
"name_with_namespace": "Robert Habermann / PyOTRS",
"namespace": {
"avatar_url": "https://secure.gravatar.com/avatar/fd996be0107aa697f0ca5753aa7b5d1f?s=80&d=identicon",
"full_path": "rhab",
"id": 599974,
"kind": "user",
"name": "Robert Habermann",
"parent_id": null,
"path": "rhab",
"web_url": "https://gitlab.com/rhab"
},
"path": "PyOTRS",
"path_with_namespace": "rhab/PyOTRS",
"readme_url": "https://gitlab.com/rhab/PyOTRS/-/blob/master/README.rst",
"ssh_url_to_repo": "git@gitlab.com:rhab/PyOTRS.git",
"star_count": 12,
"tag_list": [],
"web_url": "https://gitlab.com/rhab/PyOTRS"
},
"forking_access_level": "enabled",
"forks_count": 0,
"http_url_to_repo": "https://gitlab.com/test-user/PyOTRS.git",
"id": 18044686,
"import_status": "finished",
"issues_access_level": "enabled",
"issues_enabled": true,
"jobs_enabled": true,
"last_activity_at": "2020-04-10T04:25:23.777Z",
"lfs_enabled": true,
"marked_for_deletion_at": null,
"marked_for_deletion_on": null,
"merge_method": "merge",
"merge_requests_access_level": "enabled",
"merge_requests_enabled": true,
"mirror": false,
"name": "PyOTRS",
"name_with_namespace": "test user / PyOTRS",
"namespace": {
"avatar_url": "/uploads/-/system/user/avatar/5773551/avatar.png",
"full_path": "test-user",
"id": 7637905,
"kind": "user",
"name": "test user",
"parent_id": null,
"path": "test-user",
"web_url": "https://gitlab.com/test-user"
},
"only_allow_merge_if_all_discussions_are_resolved": false,
"only_allow_merge_if_pipeline_succeeds": false,
"open_issues_count": 0,
"owner": {
"avatar_url": "https://assets.gitlab-static.net/uploads/-/system/user/avatar/5773551/avatar.png",
"id": 5773551,
"name": "test user",
"state": "active",
"username": "test-user",
"web_url": "https://gitlab.com/test-user"
},
"packages_enabled": true,
"pages_access_level": "enabled",
"path": "PyOTRS",
"path_with_namespace": "test-user/PyOTRS",
"permissions": {
"group_access": null,
"project_access": {
"access_level": 40,
"notification_level": 3
}
},
"printing_merge_request_link_enabled": true,
"public_jobs": true,
"readme_url": "https://gitlab.com/test-user/PyOTRS/-/blob/master/README.rst",
"remove_source_branch_after_merge": true,
"repository_access_level": "enabled",
"request_access_enabled": true,
"resolve_outdated_diff_discussions": false,
"service_desk_address": "incoming+test-user-pyotrs-18044686-issue-@incoming.gitlab.com",
"service_desk_enabled": true,
"shared_runners_enabled": true,
"shared_with_groups": [],
"snippets_access_level": "enabled",
"snippets_enabled": true,
"ssh_url_to_repo": "git@gitlab.com:test-user/PyOTRS.git",
"star_count": 0,
"suggestion_commit_message": null,
"tag_list": [],
"visibility": "public",
"web_url": "https://gitlab.com/test-user/PyOTRS",
"wiki_access_level": "enabled",
"wiki_enabled": true
}
]
}
}

Human Readable Output#

Results#

_linksallow_merge_on_skipped_pipelineapprovals_before_mergearchivedauto_cancel_pending_pipelinesauto_devops_deploy_strategyauto_devops_enabledautoclose_referenced_issuesavatar_urlbuild_coverage_regexbuild_timeoutbuilds_access_levelcan_create_merge_request_inci_config_pathci_default_git_depthci_forward_deployment_enabledcompliance_frameworkscontainer_expiration_policycontainer_registry_enabledcreated_atcreator_iddefault_branchdescriptionemails_disabledempty_repoexternal_authorization_classification_labelforking_access_levelforks_counthttp_url_to_repoidimport_statusissues_access_levelissues_enabledjobs_enabledlast_activity_atlfs_enabledmarked_for_deletion_atmarked_for_deletion_onmerge_methodmerge_requests_access_levelmerge_requests_enabledmirrornamename_with_namespacenamespaceonly_allow_merge_if_all_discussions_are_resolvedonly_allow_merge_if_pipeline_succeedsopen_issues_countownerpackages_enabledpages_access_levelpathpath_with_namespacepermissionsprinting_merge_request_link_enabledpublic_jobsreadme_urlremove_source_branch_after_mergerepository_access_levelrequest_access_enabledresolve_outdated_diff_discussionsservice_desk_addressservice_desk_enabledshared_runners_enabledshared_with_groupssnippets_access_levelsnippets_enabledssh_url_to_repostar_countsuggestion_commit_messagetag_listvisibilityweb_urlwiki_access_levelwiki_enabled
self: https://gitlab.com/api/v4/projects/21898188
issues: https://gitlab.com/api/v4/projects/21898188/issues
merge_requests: https://gitlab.com/api/v4/projects/21898188/merge_requests
repo_branches: https://gitlab.com/api/v4/projects/21898188/repository/branches
labels: https://gitlab.com/api/v4/projects/21898188/labels
events: https://gitlab.com/api/v4/projects/21898188/events
members: https://gitlab.com/api/v4/projects/21898188/members
0falseenabledcontinuousfalsetrue3600enabledtrue50truecadence: 1d
enabled: true
keep_n: 10
older_than: 90d
name_regex: null
name_regex_keep: null
next_run_at: 2020-10-21T10:49:15.236Z
true2020-10-20T10:49:15.219Z5773551masterfalseenabled0https://gitlab.com/test-user/moon.git21898188finishedenabledtruetrue2020-10-25T11:50:47.126Ztruemergeenabledtruefalsemoontest user / moonid: 7637905
name: test user
path: test-user
kind: user
full_path: test-user
parent_id: null
avatar_url: /uploads/-/system/user/avatar/5773551/avatar.png
web_url: https://gitlab.com/test-user
falsefalse16id: 5773551
name: test user
username: test-user
state: active
avatar_url: https://assets.gitlab-static.net/uploads/-/system/user/avatar/5773551/avatar.png
web_url: https://gitlab.com/test-user
trueenabledmoontest-user/moonproject_access: {"access_level": 40, "notification_level": 3}
group_access: null
truetruehttps://gitlab.com/test-user/moon/-/blob/master/README.mdtrueenabledtruefalseincoming+test-user-moon-21898188-issue-@incoming.gitlab.comtruetrueenabledtruegit@gitlab.com:test-user/moon.git0publichttps://gitlab.com/test-user/moonenabledtrue
self: https://gitlab.com/api/v4/projects/18044686
issues: https://gitlab.com/api/v4/projects/18044686/issues
merge_requests: https://gitlab.com/api/v4/projects/18044686/merge_requests
repo_branches: https://gitlab.com/api/v4/projects/18044686/repository/branches
labels: https://gitlab.com/api/v4/projects/18044686/labels
events: https://gitlab.com/api/v4/projects/18044686/events
members: https://gitlab.com/api/v4/projects/18044686/members
0falseenabledcontinuousfalsetrue3600enabledtrue0truecadence: 7d
enabled: true
keep_n: null
older_than: null
name_regex: null
name_regex_keep: null
next_run_at: 2020-10-24T01:50:06.530Z
true2020-04-10T04:25:23.777Z5773551masterPython wrapper for OTRS (REST) APIfalseenabled0https://gitlab.com/test-user/PyOTRS.git18044686finishedenabledtruetrue2020-04-10T04:25:23.777ZtruemergeenabledtruefalsePyOTRStest user / PyOTRSid: 7637905
name: test user
path: test-user
kind: user
full_path: test-user
parent_id: null
avatar_url: /uploads/-/system/user/avatar/5773551/avatar.png
web_url: https://gitlab.com/test-user
falsefalse0id: 5773551
name: test user
username: test-user
state: active
avatar_url: https://assets.gitlab-static.net/uploads/-/system/user/avatar/5773551/avatar.png
web_url: https://gitlab.com/test-user
trueenabledPyOTRStest-user/PyOTRSproject_access: {"access_level": 40, "notification_level": 3}
group_access: null
truetruehttps://gitlab.com/test-user/PyOTRS/-/blob/master/README.rsttrueenabledtruefalseincoming+test-user-pyotrs-18044686-issue-@incoming.gitlab.comtruetrueenabledtruegit@gitlab.com:test-user/PyOTRS.git0publichttps://gitlab.com/test-user/PyOTRSenabledtrue

gitlab-projects-get-access-requests#


Gets a list of access requests viewable by the authenticated user.

Base Command#

gitlab-projects-get-access-requests

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required

Context Output#

PathTypeDescription
GitLab.AccessRequests.idUnknownAccess Request ID
GitLab.AccessRequests.usernameUnknownAccess Request User
GitLab.AccessRequests.requested_atUnknownAccess Request Create Time
GitLab.AccessRequests.stateUnknownAccess Request State

Command Example#

!gitlab-projects-get-access-requests id=21898188 using="Moon-Integration"

Context Example#

{
"GitLab": {
"AccessRequests": {
"avatar_url": "https://secure.gravatar.com/avatar/bcecfc2b23ff4a3962520685ccf046cc?s=80&d=identicon",
"id": 7475865,
"name": "test user",
"requested_at": "2020-10-25T12:50:05.865Z",
"state": "active",
"username": "testuser",
"web_url": "https://gitlab.com/testuser"
}
}
}

Human Readable Output#

Results#

avatar_urlidnamerequested_atstateusernameweb_url
https://secure.gravatar.com/avatar/bcecfc2b23ff4a3962520685ccf046cc?s=80&d=identicon7475865test user2020-10-25T12:50:05.865Zactivetestuserhttps://gitlab.com/testuser

gitlab-projects-request-access#


Requests access for the authenticated user to a group or project.

Base Command#

gitlab-projects-request-access

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required

Context Output#

PathTypeDescription
GitLab.AccessRequests.idUnknownAccess Request ID
GitLab.AccessRequests.usernameUnknownAccess Request User
GitLab.AccessRequests.requested_atUnknownAccess Request Create Time
GitLab.AccessRequests.stateUnknownAccess Request State

Command Example#

!gitlab-projects-request-access id=21898188 using=Asteroid

Context Example#

{
"GitLab": {
"AccessRequests": {
"avatar_url": "https://secure.gravatar.com/avatar/bcecfc2b23ff4a3962520685ccf046cc?s=80&d=identicon",
"id": 7475865,
"name": "test user",
"requested_at": "2020-10-25T12:50:05.865Z",
"state": "active",
"username": "testuser",
"web_url": "https://gitlab.com/testuser"
}
}
}

Human Readable Output#

Results#

avatar_urlidnamerequested_atstateusernameweb_url
https://secure.gravatar.com/avatar/bcecfc2b23ff4a3962520685ccf046cc?s=80&d=identicon7475865test user2020-10-25T12:50:05.865Zactivetestuserhttps://gitlab.com/testuser

gitlab-projects-approve-access#


Approves an access request for the given user.

Base Command#

gitlab-projects-approve-access

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required
user_idThe user ID of the access requester .Required
access_levelA valid access level (defaults: 30, developer access level)Optional

Context Output#

PathTypeDescription
GitLab.AccessRequests.idUnknownAccess Request ID
GitLab.AccessRequests.usernameUnknownAccess Request User
GitLab.AccessRequests.requested_atUnknownAccess Request Create Time
GitLab.AccessRequests.stateUnknownAccess Request State

Command Example#

Human Readable Output#

gitlab-projects-deny-access#


Denies an access request for the given user.

Base Command#

gitlab-projects-deny-access

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required
user_idThe user ID of the access requester .Required

Context Output#

PathTypeDescription
GitLab.AccessRequests.idUnknownAccess Request ID
GitLab.AccessRequests.stateUnknownAccess Request State

Command Example#

!gitlab-projects-deny-access id=21898188 user_id=7475865 using="Moon-Integration"

Context Example#

{
"GitLab": {
"AccessRequests": {
"id": "7475865",
"state": "denied"
}
}
}

Human Readable Output#

Results#

idstate
7475865denied

gitlab-projects-get-repository-branches#


Get a list of repository branches from a project, sorted by name alphabetically.

Base Command#

gitlab-projects-get-repository-branches

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required
searchReturn list of anches containing the search string. You can use ^term and term$ to find anches that begin and end with term respectively.Optional

Context Output#

PathTypeDescription
GitLab.Branches.nameUnknownBranch Name
GitLab.Branches.web_urlUnknownBranch Web URL
GitLab.Branches.commit.idUnknownBranch Head Commit ID

Command Example#

!gitlab-projects-get-repository-branches id=21898188 using="Moon-Integration"

Context Example#

{
"GitLab": {
"Branches": [
{
"can_push": true,
"commit": {
"author_email": "57979775+test-user@users.noreply.github.com",
"author_name": "test user",
"authored_date": "2020-09-09T05:39:00.000+00:00",
"committed_date": "2020-09-09T05:39:00.000+00:00",
"committer_email": "noreply@github.com",
"committer_name": "GitHub",
"created_at": "2020-09-09T05:39:00.000+00:00",
"id": "3ccb453019594b9a56ae8090663af76dcac4cc0c",
"message": "Create atom.py",
"parent_ids": null,
"short_id": "3ccb4530",
"title": "Create atom.py",
"web_url": "https://gitlab.com/test-user/moon/-/commit/3ccb453019594b9a56ae8090663af76dcac4cc0c"
},
"default": false,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "codeql",
"protected": false,
"web_url": "https://gitlab.com/test-user/moon/-/tree/codeql"
},
{
"can_push": true,
"commit": {
"author_email": "amahmoud@paloaltonetworks.com",
"author_name": "test user",
"authored_date": "2020-09-09T14:53:17.000+00:00",
"committed_date": "2020-09-09T14:53:17.000+00:00",
"committer_email": "amahmoud@paloaltonetworks.com",
"committer_name": "test user",
"created_at": "2020-09-09T14:53:17.000+00:00",
"id": "39eb3dc0c7e86d0b943df1be922b173068010bf5",
"message": "Update ReadME",
"parent_ids": null,
"short_id": "39eb3dc0",
"title": "Update ReadME",
"web_url": "https://gitlab.com/test-user/moon/-/commit/39eb3dc0c7e86d0b943df1be922b173068010bf5"
},
"default": true,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "master",
"protected": true,
"web_url": "https://gitlab.com/test-user/moon/-/tree/master"
},
{
"can_push": true,
"commit": {
"author_email": "57979775+test-user@users.noreply.github.com",
"author_name": "test user",
"authored_date": "2020-09-09T05:40:27.000+00:00",
"committed_date": "2020-09-09T05:40:27.000+00:00",
"committer_email": "noreply@github.com",
"committer_name": "GitHub",
"created_at": "2020-09-09T05:40:27.000+00:00",
"id": "24ddc466d4736222407585a5d947b48b30265fe4",
"message": "Create template.yaml",
"parent_ids": null,
"short_id": "24ddc466",
"title": "Create template.yaml",
"web_url": "https://gitlab.com/test-user/moon/-/commit/24ddc466d4736222407585a5d947b48b30265fe4"
},
"default": false,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "prisma",
"protected": false,
"web_url": "https://gitlab.com/test-user/moon/-/tree/prisma"
},
{
"can_push": true,
"commit": {
"author_email": "57979775+test-user@users.noreply.github.com",
"author_name": "test user",
"authored_date": "2020-09-09T05:49:46.000+00:00",
"committed_date": "2020-09-09T05:49:46.000+00:00",
"committer_email": "noreply@github.com",
"committer_name": "GitHub",
"created_at": "2020-09-09T05:49:46.000+00:00",
"id": "fb3f67b779ead6bff43c8a5002de516a2e8ca99b",
"message": "Create template.yaml",
"parent_ids": null,
"short_id": "fb3f67b7",
"title": "Create template.yaml",
"web_url": "https://gitlab.com/test-user/moon/-/commit/fb3f67b779ead6bff43c8a5002de516a2e8ca99b"
},
"default": false,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "prisma-cloud",
"protected": false,
"web_url": "https://gitlab.com/test-user/moon/-/tree/prisma-cloud"
},
{
"can_push": true,
"commit": {
"author_email": "amahmoud@paloaltonetworks.com",
"author_name": "test user",
"authored_date": "2020-09-09T14:56:09.000+00:00",
"committed_date": "2020-09-09T14:56:09.000+00:00",
"committer_email": "amahmoud@paloaltonetworks.com",
"committer_name": "test user",
"created_at": "2020-09-09T14:56:09.000+00:00",
"id": "405fc6ea44910177f48db9b2eb6839efb4211743",
"message": "Test PR",
"parent_ids": null,
"short_id": "405fc6ea",
"title": "Test PR",
"web_url": "https://gitlab.com/test-user/moon/-/commit/405fc6ea44910177f48db9b2eb6839efb4211743"
},
"default": false,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "vulnerable",
"protected": false,
"web_url": "https://gitlab.com/test-user/moon/-/tree/vulnerable"
}
]
}
}

Human Readable Output#

Results#

can_pushcommitdefaultdevelopers_can_mergedevelopers_can_pushmergednameprotectedweb_url
trueid: 3ccb453019594b9a56ae8090663af76dcac4cc0c
short_id: 3ccb4530
created_at: 2020-09-09T05:39:00.000+00:00
parent_ids: null
title: Create atom.py
message: Create atom.py
author_name: test user
author_email: 57979775+test-user@users.noreply.github.com
authored_date: 2020-09-09T05:39:00.000+00:00
committer_name: GitHub
committer_email: noreply@github.com
committed_date: 2020-09-09T05:39:00.000+00:00
web_url: https://gitlab.com/test-user/moon/-/commit/3ccb453019594b9a56ae8090663af76dcac4cc0c
falsefalsefalsefalsecodeqlfalsehttps://gitlab.com/test-user/moon/-/tree/codeql
trueid: 39eb3dc0c7e86d0b943df1be922b173068010bf5
short_id: 39eb3dc0
created_at: 2020-09-09T14:53:17.000+00:00
parent_ids: null
title: Update ReadME
message: Update ReadME
author_name: test user
author_email: amahmoud@paloaltonetworks.com
authored_date: 2020-09-09T14:53:17.000+00:00
committer_name: test user
committer_email: amahmoud@paloaltonetworks.com
committed_date: 2020-09-09T14:53:17.000+00:00
web_url: https://gitlab.com/test-user/moon/-/commit/39eb3dc0c7e86d0b943df1be922b173068010bf5
truefalsefalsefalsemastertruehttps://gitlab.com/test-user/moon/-/tree/master
trueid: 24ddc466d4736222407585a5d947b48b30265fe4
short_id: 24ddc466
created_at: 2020-09-09T05:40:27.000+00:00
parent_ids: null
title: Create template.yaml
message: Create template.yaml
author_name: test user
author_email: 57979775+test-user@users.noreply.github.com
authored_date: 2020-09-09T05:40:27.000+00:00
committer_name: GitHub
committer_email: noreply@github.com
committed_date: 2020-09-09T05:40:27.000+00:00
web_url: https://gitlab.com/test-user/moon/-/commit/24ddc466d4736222407585a5d947b48b30265fe4
falsefalsefalsefalseprismafalsehttps://gitlab.com/test-user/moon/-/tree/prisma
trueid: fb3f67b779ead6bff43c8a5002de516a2e8ca99b
short_id: fb3f67b7
created_at: 2020-09-09T05:49:46.000+00:00
parent_ids: null
title: Create template.yaml
message: Create template.yaml
author_name: test user
author_email: 57979775+test-user@users.noreply.github.com
authored_date: 2020-09-09T05:49:46.000+00:00
committer_name: GitHub
committer_email: noreply@github.com
committed_date: 2020-09-09T05:49:46.000+00:00
web_url: https://gitlab.com/test-user/moon/-/commit/fb3f67b779ead6bff43c8a5002de516a2e8ca99b
falsefalsefalsefalseprisma-cloudfalsehttps://gitlab.com/test-user/moon/-/tree/prisma-cloud
trueid: 405fc6ea44910177f48db9b2eb6839efb4211743
short_id: 405fc6ea
created_at: 2020-09-09T14:56:09.000+00:00
parent_ids: null
title: Test PR
message: Test PR
author_name: test user
author_email: amahmoud@paloaltonetworks.com
authored_date: 2020-09-09T14:56:09.000+00:00
committer_name: test user
committer_email: amahmoud@paloaltonetworks.com
committed_date: 2020-09-09T14:56:09.000+00:00
web_url: https://gitlab.com/test-user/moon/-/commit/405fc6ea44910177f48db9b2eb6839efb4211743
falsefalsefalsefalsevulnerablefalsehttps://gitlab.com/test-user/moon/-/tree/vulnerable

gitlab-projects-create-repository-branch#


Create a new Branch in the repository.

Base Command#

gitlab-projects-create-repository-branch

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required
branchName of the anch.Required
refBranch name or commit SHA to create anch from.Required

Context Output#

PathTypeDescription
GitLab.Branches.nameUnknownBranch Name
GitLab.Branches.web_urlUnknownBranch Web URL
GitLab.Branches.commit.idUnknownBranch Head Commit ID

Command Example#

!gitlab-projects-create-repository-branch branch=feature1 id=21898188 ref=master using="Moon-Integration"

Context Example#

{
"GitLab": {
"Branches": {
"can_push": true,
"commit": {
"author_email": "amahmoud@paloaltonetworks.com",
"author_name": "test user",
"authored_date": "2020-09-09T18:53:17.000+04:00",
"committed_date": "2020-09-09T18:53:17.000+04:00",
"committer_email": "amahmoud@paloaltonetworks.com",
"committer_name": "test user",
"created_at": "2020-09-09T18:53:17.000+04:00",
"id": "39eb3dc0c7e86d0b943df1be922b173068010bf5",
"message": "Update ReadME\n",
"parent_ids": [
"b736f064314a254c5c847f042938290167598454"
],
"short_id": "39eb3dc0",
"title": "Update ReadME",
"web_url": "https://gitlab.com/test-user/moon/-/commit/39eb3dc0c7e86d0b943df1be922b173068010bf5"
},
"default": false,
"developers_can_merge": false,
"developers_can_push": false,
"merged": false,
"name": "feature1",
"protected": false,
"web_url": "https://gitlab.com/test-user/moon/-/tree/feature1"
}
}
}

Human Readable Output#

Results#

can_pushcommitdefaultdevelopers_can_mergedevelopers_can_pushmergednameprotectedweb_url
trueid: 39eb3dc0c7e86d0b943df1be922b173068010bf5
short_id: 39eb3dc0
created_at: 2020-09-09T18:53:17.000+04:00
parent_ids: b736f064314a254c5c847f042938290167598454
title: Update ReadME
message: Update ReadME

author_name: test user
author_email: amahmoud@paloaltonetworks.com
authored_date: 2020-09-09T18:53:17.000+04:00
committer_name: test user
committer_email: amahmoud@paloaltonetworks.com
committed_date: 2020-09-09T18:53:17.000+04:00
web_url: https://gitlab.com/test-user/moon/-/commit/39eb3dc0c7e86d0b943df1be922b173068010bf5
falsefalsefalsefalsefeature1falsehttps://gitlab.com/test-user/moon/-/tree/feature1

gitlab-projects-delete-repository-branch#


Delete a Branch from the repository.

Base Command#

gitlab-projects-delete-repository-branch

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required
branchName of the anch.Required

Context Output#

There is no context output for this command.

Command Example#

!gitlab-projects-delete-repository-branch branch=feature1 id=21898188 using="Moon-Integration"

Context Example#

{
"GitLab": {
"Branches": {
"message": "Branch 'feature1' is deleted."
}
}
}

Human Readable Output#

Results#

message
Branch 'feature1' is deleted.

gitlab-projects-delete-repository-merged-branches#


Will delete all branches that are merged into the project’s default anch.

Base Command#

gitlab-projects-delete-repository-merged-branches

Input#

Argument NameDescriptionRequired
idThe ID or URL-encoded path of the project owned by the authenticated user.Required

Context Output#

There is no context output for this command.

Command Example#

!gitlab-projects-delete-repository-merged-branches id=21898188 using="Moon-Integration"

Context Example#

{
"GitLab": {
"message": "202 Accepted"
}
}

Human Readable Output#

Results#

message
202 Accepted

gitlab-get-version#


Retrieve version information for this GitLab instance. Responds 200 OK for authenticated users.

Base Command#

gitlab-get-version

Input#

There are no input arguments for this command.

Context Output#

PathTypeDescription
GitLab.versionStringGitLab Verion
GitLab.revisionStringGitLab Revision

Command Example#

!gitlab-get-version using="Moon-Integration"

Context Example#

{
"GitLab": {
"revision": "18e3d7de8d5",
"version": "13.6.0-pre"
}
}

Human Readable Output#

Results#

revisionversion
18e3d7de8d513.6.0-pre