Skip to content

Webhooks

To configure a webhook, use the instructions.

You can specify a webhook secret. The secret is sent in the Gitflic-Webhook-Secret header.

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 created
ISSUE_UPDATE Issue updated
NEW_ISSUE_NOTE New comment on issue
MERGE_REQUEST_CREATE Merge request created
MERGE_REQUEST_UPDATE Merge request updated
MERGE_REQUEST_ACCEPT Merge request approved
MERGE_REQUEST_CLOSE Merge request closed
MERGE_REQUEST_CANCEL Merge request canceled
MERGE Merge
DISCUSSION_CREATE New discussion comment
TAG_CREATE Tag created
TAG_DELETE Tag deleted
BRANCH_CREATE Branch created
BRANCH_DELETE Branch deleted
BRANCH_UPDATE Branch updated
COLLABORATOR_ADD Collaborator added
COLLABORATOR_UPDATE Collaborator role updated
COLLABORATOR_DELETE Collaborator removed
PIPELINE_NEW New pipeline
PIPELINE_SUCCESS Pipeline succeeded
PIPELINE_WARNING Pipeline warning
PIPELINE_FAIL Pipeline failed

project object contents:

Field Type Description
project_id String Project ID
title String Project name
alias String Project alias
owner_alias String Project owner's 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

A test request that can be sent to check webhook functionality.

Example response
    
{
  "action": "TEST_WEBHOOK",
  "project_id": "a34c945a-aaaa-aaaa-aaaa-78e5ae992ef4"
}
    
  

Issue created

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 values: OPEN, IN_PROGRESS, CLOSED, COMPLETED
labels Set (String) Array of 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 updated

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 values: OPEN, IN_PROGRESS, CLOSED, COMPLETED
labels Set (String) Array of 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 comment on issue

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 created

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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

Description of the merge_requirements object fields:

Field Type Description
LAST_PIPELINE_SUCCESS Boolean Last pipeline succeeded (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 a protected branch
HAS_ALL_APPROVERS Boolean Merge request has (true) or does not have (false) all required approvals
HAS_ALL_CODEOWNERS Boolean Merge request has (true) or does not have (false) all required code owner approvals
MERGE_RESULTS_PIPELINE_SUCCESS Boolean Merge result pipeline succeeded (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 updated

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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

Description of the merge_requirements object fields:

Field Type Description
LAST_PIPELINE_SUCCESS Boolean Last pipeline succeeded (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 a protected branch
HAS_ALL_APPROVERS Boolean Merge request has (true) or does not have (false) all required approvals
HAS_ALL_CODEOWNERS Boolean Merge request has (true) or does not have (false) all required code owner approvals
MERGE_RESULTS_PIPELINE_SUCCESS Boolean Merge result pipeline succeeded (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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

Description of the merge_requirements object fields:

Field Type Description
LAST_PIPELINE_SUCCESS Boolean Last pipeline succeeded (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 a protected branch
HAS_ALL_APPROVERS Boolean Merge request has (true) or does not have (false) all required approvals
HAS_ALL_CODEOWNERS Boolean Merge request has (true) or does not have (false) all required code owner approvals
MERGE_RESULTS_PIPELINE_SUCCESS Boolean Merge result pipeline succeeded (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 Close

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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

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 Cancel

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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

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": "Canceled"
    "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 values: 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 Whether the merge request can be merged (true) or not (false)
author_username String Username of the merge request author.

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": "Merged",
    "can_merge": false,
    "author_username": "adminuser"
  },
    "merge_requirements": {},
  "initiator": {
    "id": "6736240a-aaaa-aaaa-aaaa-cab026562172",
    "name": "adminuser"
  }
}
    
  

Tag Creation

Description of the push object fields:

Field Type Description
before String Hash of the previous commit. (For new tags, this is a 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)
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 push object fields:

Field Type Description
before String Hash of the previous commit. (The deleted tag was created on this commit)
after String Hash of the current commit. (Zero commit for a deleted tag)
ref String Reference to the git object.
commits Array Array of commits. (A tag does not contain commits, only a reference)
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 push object fields:

Field Type Description
before String Hash of the previous commit.
after String Hash of the current commit. (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, it is empty)
total_commits_count String Number of commits.
author_id String ID of the tag author.

Description of the objects in the commits array:

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 deleted branch)
ref String Reference to the git object.
commits Array Array of commits. (Empty for 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 push object fields:

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 displayed commits: 20)
total_commits_count String Number of commits.
author_id String ID of the tag author.

Description of the objects in the commits array:

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"
  }
}
    
  

Collaborator Added

This webhook is triggered when a user accepts an invitation to the project.

Description of the collaborator object fields:

Field Type Description
userid String ID of the added user.
user_alias String Alias of the added user.
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": "Reporter",
    "base_role": "REPORTER"
  }
}
    
  

Collaborator Role Update

This webhook is triggered when a user's role is changed.

Description of the collaborator object fields:

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 Name of the new role in the project.
base_role String New base role 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": "Reporter",
    "base_role": "REPORTER"
  }
}
    
  

Collaborator Removed

Description of the collaborator object fields:

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 Name of the role the user had in the project before removal.
base_role String Base role the user had in the project before removal. 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": "Reporter",
    "base_role": "REPORTER"
  }
}
    
  

Automated translation!

This page was translated using automatic translation tools. The text may contain inaccuracies.