Webhooks
To configure a webhook, use the instruction.
You can specify a webhook secret. The secret is sent in the header Gitflic-Webhook-Secret
Common webhook fields:
Field | Type | Description |
---|---|---|
action |
String | Name of the event |
project_id |
String | Project ID |
project |
Object | Object describing the project |
List of webhook events:
Event | Description |
---|---|
TEST_WEBHOOK |
Webhook test |
ISSUE_CREATE |
Issue creation |
ISSUE_UPDATE |
Issue update |
NEW_ISSUE_NOTE |
Issue comment creation |
MERGE_REQUEST_CREATE |
Merge request creation |
MERGE_REQUEST_UPDATE |
Merge request update |
MERGE_REQUEST_ACCEPT |
Merge request approval |
MERGE_REQUEST_CLOSE |
Merge request closure |
MERGE_REQUEST_CANCEL |
Merge request cancellation |
MERGE |
Merge |
DISCUSSION_CREATE |
Discussion comment creation |
TAG_CREATE |
Tag creation |
TAG_DELETE |
Tag deletion |
BRANCH_CREATE |
Branch creation |
BRANCH_DELETE |
Branch deletion |
BRANCH_UPDATE |
Branch update |
COLLABORATOR_ADD |
Collaborator addition |
COLLABORATOR_UPDATE |
Collaborator role update |
COLLABORATOR_DELETE |
Collaborator removal |
PIPELINE_NEW |
New pipeline |
PIPELINE_SUCCESS |
Successful pipeline |
PIPELINE_FAIL |
Pipeline failure |
Contents of the project
object:
Field | Type | Description |
---|---|---|
project_id |
String | Project ID |
title |
String | Project name |
alias |
String | Project alias |
owner_alias |
String | Project owner alias |
owner_type |
String | Project owner type. Possible values: USER , TEAM , COMPANY |
http_transport_url |
String | HTTPS clone URL |
ssh_transport_url |
String | SSH clone URL |
language |
String | Programming language |
private |
Boolean | Private project true or public false |
Webhook test
Test request that can be sent to check webhook functionality.
Example response
{
"action": "TEST_WEBHOOK",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4"
}
Issue creation
Description of the issue
object fields:
Field | Type | Description |
---|---|---|
id |
String | Issue ID. |
user_id |
String | ID of the user who created the issue. |
user_alias |
String | Alias of the user who created the issue. |
title |
String | Issue title. |
description |
String | Issue description. |
status |
String | Issue status. Possible statuses: OPEN , IN_PROGRESS , CLOSED , COMPLETED |
labels |
Set (String) | Array containing issue labels |
Example response
{
"action": "ISSUE_CREATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"issue": {
"id": "a54541ce-aaaa-aaaa-aaaa-c057ecd86610",
"user_id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"user_alias": "adminuser",
"title": "test title",
"description": "test description",
"status": "OPEN",
"labels": []
},
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
}
}
Issue update
Description of the issue
object fields:
Field | Type | Description |
---|---|---|
id |
String | Issue ID. |
user_id |
String | ID of the user who updated the issue. |
user_alias |
String | Alias of the user who updated the issue. |
title |
String | Issue title. |
description |
String | Issue description. |
status |
String | Issue status. Possible statuses: OPEN , IN_PROGRESS , CLOSED , COMPLETED |
labels |
Set (String) | Array containing issue labels |
Example response
{
"action": "ISSUE_UPDATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"issue": {
"id": "d929d155-aaaa-aaaa-aaaa-05352809923d",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"user_alias": "adminuser",
"title": "test title",
"description": "test description",
"status": "OPEN",
"labels": []
},
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
}
}
New issue comment
Description of the issue_note
object fields:
Field | Type | Description |
---|---|---|
id |
String | Issue comment ID. |
user_id |
String | ID of the user who wrote the comment. |
issue_id |
String | Issue ID. |
message |
String | Message. |
issue_local_id |
String | Local issue ID. |
Example response
{
"action": "NEW_ISSUE_NOTE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"issue_note": {
"id": "89bb7628-aaaa-aaaa-aaaa-f9a1864b56f4",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"issue_id": "245612b6-aaaa-aaaa-aaaa-8b71c1cd1fe0",
"message": "test message",
"issue_local_id": 10
}
}
Merge request creation
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED ,CLOSED ,CANCELED ,FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged ,Closed ,Canceled ,Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the merge_requirements
object fields:
Field | Type | Description |
---|---|---|
LAST_PIPELINE_SUCCESS |
Boolean | Last pipeline finished successfully true or not false |
WORK_NOT_IN_PROGRESS |
Boolean | Merge request is not blocked true or blocked false |
RIGHTS_TO_MERGE |
Boolean | User has true or does not have false rights to merge |
NO_CONFLICTS |
Boolean | Merge request has no true or has false conflicts |
BRANCH_NOT_PROTECTED_FOR_USER |
Boolean | User has true or does not have false rights to merge into protected branch |
HAS_ALL_APPROVERS |
Boolean | Merge request received true or did not receive false required approvals from approvers |
HAS_ALL_CODEOWNERS |
Boolean | Merge request received true or did not receive false required approvals from code owners |
MERGE_RESULTS_PIPELINE_SUCCESS |
Boolean | Merge result pipeline finished successfully true or not false |
Example response
{
"action": "MERGE_REQUEST_CREATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "2a774081-aaaa-aaaa-aaaa-78d342ab3d26",
"user_id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"title": "test title",
"description": "test description",
"status": "OPENED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "omega",
"source_commit": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1",
"status_title": "Open",
"can_merge": false,
"author_username": "adminuser"
},
"merge_requirements": {
"LAST_PIPELINE_SUCCESS": false,
"WORK_NOT_IN_PROGRESS": true,
"RIGHTS_TO_MERGE": true,
"NO_CONFLICTS": false,
"BRANCH_NOT_PROTECTED_FOR_USER": false,
"HAS_ALL_APPROVERS": false,
"HAS_ALL_CODEOWNERS": true,
"MERGE_RESULTS_PIPELINE_SUCCESS": false
}
}
Merge request update
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED ,CLOSED ,CANCELED ,FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged ,Closed ,Canceled ,Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the merge_requirements
object fields:
Field | Type | Description |
---|---|---|
LAST_PIPELINE_SUCCESS |
Boolean | Last pipeline finished successfully true or not false |
WORK_NOT_IN_PROGRESS |
Boolean | Merge request is not blocked true or blocked false |
RIGHTS_TO_MERGE |
Boolean | User has true or does not have false rights to merge |
NO_CONFLICTS |
Boolean | Merge request has no true or has false conflicts |
BRANCH_NOT_PROTECTED_FOR_USER |
Boolean | User has true or does not have false rights to merge into protected branch |
HAS_ALL_APPROVERS |
Boolean | Merge request received true or did not receive false required approvals from approvers |
HAS_ALL_CODEOWNERS |
Boolean | Merge request received true or did not receive false required approvals from code owners |
MERGE_RESULTS_PIPELINE_SUCCESS |
Boolean | Merge result pipeline finished successfully true or not false |
Description of the initiator
object fields:
Field | Type | Description |
---|---|---|
id |
String | UUID of the user who updated the merge request |
name |
String | Alias of the user who updated the merge request |
Example response
{
"action": "MERGE_REQUEST_UPDATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "2a774081-aaaa-aaaa-aaaa-78d342ab3d26",
"user_id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"title": "test title",
"description": "test description",
"status": "OPENED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "omega",
"source_commit": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1"
"status_title": "Open",
"can_merge": false,
"author_username": "adminuser"
},
"merge_requirements": {
"LAST_PIPELINE_SUCCESS": false,
"WORK_NOT_IN_PROGRESS": true,
"RIGHTS_TO_MERGE": true,
"NO_CONFLICTS": false,
"BRANCH_NOT_PROTECTED_FOR_USER": false,
"HAS_ALL_APPROVERS": false,
"HAS_ALL_CODEOWNERS": true,
"MERGE_RESULTS_PIPELINE_SUCCESS": false
},
"initiator": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"name": "adminuser"
}
}
Merge request approval
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED ,CLOSED ,CANCELED ,FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged ,Closed ,Canceled ,Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the merge_requirements
object fields:
Field | Type | Description |
---|---|---|
LAST_PIPELINE_SUCCESS |
Boolean | Last pipeline finished successfully true or not false |
WORK_NOT_IN_PROGRESS |
Boolean | Merge request is not blocked true or blocked false |
RIGHTS_TO_MERGE |
Boolean | User has true or does not have false rights to merge |
NO_CONFLICTS |
Boolean | Merge request has no true or has false conflicts |
BRANCH_NOT_PROTECTED_FOR_USER |
Boolean | User has true or does not have false rights to merge into protected branch |
HAS_ALL_APPROVERS |
Boolean | Merge request received true or did not receive false required approvals from approvers |
HAS_ALL_CODEOWNERS |
Boolean | Merge request received true or did not receive false required approvals from code owners |
MERGE_RESULTS_PIPELINE_SUCCESS |
Boolean | Merge result pipeline finished successfully true or not false |
Description of the initiator
object fields:
Field | Type | Description |
---|---|---|
id |
String | UUID of the user who approved the merge request |
name |
String | Alias of the user who approved the merge request |
Example response
{
"action": "MERGE_REQUEST_ACCEPT",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "79ea9af0-aaaa-aaaa-aaaa-3dfdb0c84d9f",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"description": "test",
"status": "OPENED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "omega",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1"
"status_title": "Open",
"can_merge": false,
"author_username": "adminuser"
},
"merge_requirements": {
"LAST_PIPELINE_SUCCESS": false,
"WORK_NOT_IN_PROGRESS": true,
"RIGHTS_TO_MERGE": true,
"NO_CONFLICTS": false,
"BRANCH_NOT_PROTECTED_FOR_USER": false,
"HAS_ALL_APPROVERS": false,
"HAS_ALL_CODEOWNERS": true,
"MERGE_RESULTS_PIPELINE_SUCCESS": false
},
"initiator": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"name": "adminuser"
}
}
Merge request closure
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED ,CLOSED ,CANCELED ,FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged ,Closed ,Canceled ,Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the initiator
object fields:
Field | Type | Description |
---|---|---|
id |
String | UUID of the user who closed the merge request |
name |
String | Alias of the user who closed the merge request |
This webhook always returns an empty
merge_requirements
object.
Example response
{
"action": "MERGE_REQUEST_CLOSE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "2a774081-aaaa-aaaa-aaaa-78d342ab3d26",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"title": "test title",
"description": "test description",
"status": "CLOSED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "omega",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1",
"status_title": "Closed",
"can_merge": false,
"author_username": "adminuser"
},
"merge_requirements": {},
"initiator": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"name": "adminuser"
}
}
Merge Request Cancellation
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED , CLOSED , CANCELED , FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged , Closed , Canceled , Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the initiator
object fields:
Field | Type | Description |
---|---|---|
id |
String | UUID of the user who canceled the merge request |
name |
String | Alias of the user who canceled the merge request |
This webhook always returns an empty
merge_requirements
object.
Example response
{
"action": "MERGE_REQUEST_CANCEL",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "df34cb11-aaaa-aaaa-aaaa-7a2397bed8ab",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"title": "test",
"description": "test",
"status": "CANCELED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "omega",
"source_commit": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1",
"status_title": "Отменен"
"can_merge": false,,
"author_username": "adminuser"
},
"merge_requirements": {},
"initiator": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"name": "adminuser"
}
}
Merge
Description of the merge_request
object fields:
Field | Type | Description |
---|---|---|
id |
String | Merge request ID. |
user_id |
String | ID of the user who created the merge request. |
title |
String | Merge request title. |
description |
String | Merge request description. |
status |
String | Merge request status. Possible statuses: OPENED , MERGED , CLOSED , CANCELED , FAILED |
source_project_id |
String | Source project ID. |
source_commit |
String | Source commit hash. |
source_branch |
String | Source branch of the merge request. |
target_project_id |
String | Target project ID for the merge. |
target_branch |
String | Target branch of the merge request. |
local_id |
String | Local merge request ID. |
url |
String | Merge request URL. |
status_title |
String | Merge request status name: Open , Merged , Closed , Canceled , Failed |
can_merge |
Boolean | Merge request can be merged true or not false |
author_username |
String | Username of the user who created the merge request. |
Description of the initiator
object fields:
Field | Type | Description |
---|---|---|
id |
String | UUID of the user who performed the merge |
name |
String | Alias of the user who performed the merge |
This webhook always returns an empty
merge_requirements
object.
Example response
{
"action": "MERGE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"merge_request": {
"id": "c4f3fb62-aaaa-aaaa-aaaa-f5b4ccdf6c96",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"title": "test",
"description": "test",
"status": "MERGED",
"source_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"source_branch": "main",
"source_commit": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"target_project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"target_branch": "master",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/merge-request/1",
"status_title": "Слит",
"can_merge": false,
"author_username": "adminuser"
},
"merge_requirements": {},
"initiator": {
"id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"name": "adminuser"
}
}
Discussion Creation
Description of the discussion
object fields:
Field | Type | Description |
---|---|---|
id |
String | Discussion ID. |
message |
String | Message. |
type |
String | Discussion type. Possible values: DISCUSSION_CREATED , DISCUSSION_REPLY_CREATE |
merge_request_id |
String | Merge request ID. |
discussion_id |
String | Discussion ID. |
file_path |
String | Path to the file for which the discussion was created. |
line |
String | Line number in the file for which the discussion was created. |
author_username |
String | Alias of the discussion author. |
merge_request_status |
String | Merge request status. Possible statuses: OPENED , CLOSED , MERGED , FAILED , CONFLICT , CANCELED . |
merge_request_local_id |
String | Local merge request ID in which the discussion was created. |
merge_request_url |
String | Merge request URL in which the discussion was created. |
Example response
{
"action": "DISCUSSION_CREATE",
"project_id": "c94aedd2-aaaa-aaaa-aaaa-67fbf1112a82",
"discussion": {
"id": "6c665aa6-aaaa-aaaa-aaaa-427fa11e1481",
"message": "test message",
"type": "DISCUSSION_REPLY_CREATE",
"merge_request_id": "055c532c-aaaa-aaaa-aaaa-70591043ef50",
"discussion_id": "a4177765-aaaa-aaaa-aaaa-e64b54a38659",
"file_path": "README.md",
"line": "1",
"author_username": "username",
"merge_request_status": "OPENED",
"merge_request_local_id": 1,
"merge_request_url": "https://gitflic.ru/project/adminuser/example/merge-request/1"
},
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "example",
"alias": "example",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
}
}
New Pipeline
Description of the pipeline
object fields:
Field | Type | Description |
---|---|---|
id |
String | Pipeline ID. |
user_id |
String | ID of the user who started the pipeline. |
user_alias |
String | Alias of the user who created the pipeline. |
commit_id |
String | Hash of the last commit in the pipeline. |
commit |
Object | Object containing information about the commit where the pipeline was created |
ref |
String | Reference to the git object where the pipeline was created |
local_id |
String | Local pipeline ID. |
url |
String | Pipeline URL. |
Description of the commit
object fields:
Field | Type | Description |
---|---|---|
id |
String | Commit hash. |
message |
String | Commit message. |
author_name |
String | Commit author name |
author_email |
String | Commit author email |
timestamp |
String | Commit time in UTC format. |
Example response
{
"action": "PIPELINE_NEW",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"pipeline": {
"id": "d1ac15f4-aaaa-aaaa-aaaa-49fcfa5e8af4",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"user_alias": "adminuser",
"commit_id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"commit": {
"id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"message": "develop branch",
"author_name": "Ivan Ivanov",
"author_email": "ivanIvanov@mail.com",
"timestamp": "2022-04-13T14:12:51"
}
"ref": "refs/heads/develop",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/ci-cd/pipeline/1"
}
}
Successful Pipeline
Description of the pipeline
object fields:
Field | Type | Description |
---|---|---|
id |
String | Pipeline ID. |
user_id |
String | ID of the user who started the pipeline. |
commit_id |
String | Hash of the last commit in the pipeline. |
commit |
Object | Object containing information about the commit where the pipeline was created |
ref |
String | Reference to the git object where the pipeline was created |
local_id |
String | Local pipeline ID. |
url |
String | Pipeline URL. |
Description of the commit
object fields:
Field | Type | Description |
---|---|---|
id |
String | Commit hash. |
message |
String | Commit message. |
author_name |
String | Commit author name |
author_email |
String | Commit author email |
timestamp |
String | Commit time in UTC format. |
Example response
{
"action": "PIPELINE_SUCCESS",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"pipeline": {
"id": "d1ac15f4-aaaa-aaaa-aaaa-49fcfa5e8af4",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"commit_id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"commit": {
"id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"message": "develop branch",
"author_name": "Ivan Ivanov",
"author_email": "ivanIvanov@mail.com",
"timestamp": "2022-04-13T14:12:51"
}
"ref": "refs/heads/develop",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/ci-cd/pipeline/1"
}
}
Pipeline Failure
Description of the pipeline
object fields:
Field | Type | Description |
---|---|---|
id |
String | Pipeline ID. |
user_id |
String | ID of the user who started the pipeline. |
commit_id |
String | Hash of the last commit in the pipeline. |
commit |
Object | Object containing information about the commit where the pipeline was created |
ref |
String | Reference to the git object where the pipeline was created |
local_id |
String | Local pipeline ID. |
url |
String | Pipeline URL. |
Description of the commit
object fields:
Field | Type | Description |
---|---|---|
id |
String | Commit hash. |
message |
String | Commit message. |
author_name |
String | Commit author name |
author_email |
String | Commit author email |
timestamp |
String | Commit time in UTC format. |
Example response
{
"action": "PIPELINE_FAIL",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"pipeline": {
"id": "d1ac15f4-aaaa-aaaa-aaaa-49fcfa5e8af4",
"user_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51",
"commit_id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"commit": {
"id": "de9585ea7aaaaaaaaaaaa0843d1335640052b46d",
"message": "develop branch",
"author_name": "Ivan Ivanov",
"author_email": "ivanIvanov@mail.com",
"timestamp": "2022-04-13T14:12:51"
}
"ref": "refs/heads/develop",
"local_id": 1,
"url": "https://gitflic.ru/project/adminuser/example/ci-cd/pipeline/1"
}
}
Tag creation
Description of the fields of the push
object:
Field | Type | Description |
---|---|---|
before |
String | Hash of the previous commit. (For new tags – zero commit) |
after |
String | Hash of the current commit. (The tag was created on this commit) |
ref |
String | Reference to the git object. |
commits |
Array | Array of commits. (A tag does not contain commits, only a reference to one) |
total_commits_count |
String | Number of commits. |
author_id |
String | ID of the tag author. |
Example response
{
"action": "TAG_CREATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"push": {
"before": "0000000000000000000000000000000000000000",
"after": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"ref": "refs/tags/1.2.3",
"commits": [],
"total_commits_count": 0,
"author_id": "6736240a-aaaa-aaaa-aaaa-cab026562172"
}
}
Tag deletion
Description of the fields of the push
object:
Field | Type | Description |
---|---|---|
before |
String | Hash of the previous commit. (The commit where the deleted tag was created) |
after |
String | Hash of the current commit. (Zero commit for the deleted tag) |
ref |
String | Reference to the git object. |
commits |
Array | Array of commits. (A tag does not contain commits, only a reference to one) |
total_commits_count |
String | Number of commits. |
author_id |
String | ID of the tag author. |
Example response
{
"action": "TAG_DELETE"",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"push": {
"before": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"after": "0000000000000000000000000000000000000000",
"ref": "refs/tags/1.2.3",
"commits": [],
"total_commits_count": 0,
"author_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
}
}
Branch creation
Description of the fields of the push
object:
Field | Type | Description |
---|---|---|
before |
String | Hash of the previous commit. |
after |
String | Hash of the current commit. (The last commit on the created branch) |
ref |
String | Reference to the git object. |
commits |
Array | Array of commits. (If the branch is pushed without new commits, the array will be empty) |
total_commits_count |
String | Number of commits. |
author_id |
String | ID of the tag author. |
Description of the fields of objects inside commits
:
Field | Type | Description |
---|---|---|
id |
String | Commit ID. |
message |
String | Commit message. |
author_name |
String | Commit author’s name. |
author_email |
String | Commit author’s email. |
timestamp |
String | Commit time in UTC format. |
Example response
{
"action": "BRANCH_CREATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"push": {
"before": "0000000000000000000000000000000000000000",
"after": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"ref": "refs/heads/develop",
"commits": [
{
"id": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"message": "develop branch",
"author_name": "Ivan Ivanov",
"author_email": "ivanIvanov@mail.com",
"timestamp": "2022-04-13T14:12:51"
}
],
"total_commits_count": 1
"author_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
}
}
Branch deletion
Field | Type | Description |
---|---|---|
before |
String | Hash of the previous commit. |
after |
String | Hash of the current commit. (Zero commit for a deleted branch) |
ref |
String | Reference to the git object. |
commits |
Array | Array of commits. (Empty for a deleted branch) |
total_commits_count |
String | Number of commits. |
author_id |
String | ID of the tag author. |
Example response
{
"action": "BRANCH_DELETE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"push": {
"before": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"after": "0000000000000000000000000000000000000000",
"ref": "refs/heads/develop",
"commits": [],
"total_commits_count": 0,
"author_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
}
}
Branch update
Description of the fields of the push
object:
Field | Type | Description |
---|---|---|
before |
String | Hash of the previous commit. |
after |
String | Hash of the current commit. |
ref |
String | Reference to the git object. |
commits |
Array | Array of commits. (Maximum number of displayed commits is 20) |
total_commits_count |
String | Number of commits. |
author_id |
String | ID of the tag author. |
Description of the fields of objects inside commits
:
Field | Type | Description |
---|---|---|
id |
String | Commit ID. |
message |
String | Commit message. |
author_name |
String | Commit author’s name. |
author_email |
String | Commit author’s email. |
timestamp |
String | Commit time in UTC format. |
Example response
{
"action": "BRANCH_UPDATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"push": {
"before": "ad49abb508911caaaaaaaaaaaad93f4df4c926e2",
"after": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"ref": "refs/heads/master",
"commits": [
{
"id": "6747c9b8114558aaaaaaaaaaaaf0e9c264ec1380",
"message": "developer",
"author_name": "GitFlic",
"author_email": "support@gitflic.ru",
"timestamp": "2022-04-13T14:17:32"
},
],
"total_commits_count": 2,
"author_id": "8473a25a-aaaa-aaaa-aaaa-3e5c9e0a4b51"
}
}
Adding a collaborator
This webhook is triggered when a user accepts an invitation to the project.
Description of the fields of the collaborator
object:
Field | Type | Description |
---|---|---|
userid |
String | ID of the user being added. |
user_alias |
String | Alias of the user being added. |
role |
String | Name of the user’s role in the project. |
base_role |
String | User’s base role in the project. Possible roles: OWNER , ADMIN , DEVELOPER , REPORTER , GUEST |
Example response
{
"action": "COLLABORATOR_ADD",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"collaborator": {
"userid": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"user_alias": "test-user",
"role": "Докладчик",
"base_role": "REPORTER"
}
}
Updating collaborator permissions
This webhook is triggered when a user’s role has been changed.
Description of the fields of the collaborator
object:
Field | Type | Description |
---|---|---|
userid |
String | ID of the user whose role was changed. |
user_alias |
String | Alias of the user whose role was changed. |
role |
String | The new role name of the user in the project. |
base_role |
String | The new base role of the user in the project. Possible roles: OWNER , ADMIN , DEVELOPER , REPORTER , GUEST |
Example response
{
"action": "COLLABORATOR_UPDATE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"collaborator": {
"userid": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"user_alias": "test-user",
"role": "Докладчик",
"base_role": "REPORTER"
}
}
Deleting a collaborator
Description of the fields of the collaborator
object:
Field | Type | Description |
---|---|---|
userid |
String | ID of the user who was removed from the project. |
user_alias |
String | Alias of the user who was removed from the project. |
role |
String | The role name the user had in the project before deletion. |
base_role |
String | Base role the user had in the project before deletion. Possible roles: OWNER , ADMIN , DEVELOPER , REPORTER , GUEST |
Example response
{
"action": "COLLABORATOR_DELETE",
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"project": {
"project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4",
"title": "test",
"alias": "test",
"owner_alias": "adminuser",
"owner_type": "USER",
"http_transport_url": "https://gitflic.ru/project/adminuser/example.git",
"ssh_transport_url": "git@gitflic.ru:adminuser/example.git",
"language": "Markdown",
"private": false
},
"collaborator": {
"userid": "6736240a-aaaa-aaaa-aaaa-cab026562172",
"user_alias": "test-user",
"role": "Докладчик",
"base_role": "REPORTER"
}
}
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.