Obtaining the Latest Commit Activities of the Current User
Function
This API is used to query the latest N commit activities.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET https://{hostURL}/v4/user/recent-push-events
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | No | String | Definition: You can obtain the unique project identifier, 32-character UUID, by calling the API used to query the project list. Value range: 32 characters |
| size | No | Integer | Definition: Obtained quantity Value range: 1~100 Default value: 10 |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of PersonalPushEventDto objects | Definition: Pushed activities list |
| Parameter | Type | Description |
|---|---|---|
| author | PersonalEventAuthorDto object | Definition: People who triggered this operation Constraints: N/A |
| repository | RepositorySimpleDto object | Definition: Repository information Constraints: N/A |
| push_data | PushEventPayloadDto object | Definition: Creation time Constraints: N/A |
| created_at | String | Definition: Creation time Constraints: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Definition: User ID Constraints: N/A Value range: 1~2147483647 |
| username | String | Definition: Username Constraints: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | Integer | Definition: Repository ID. Value range: 1~2147483647 |
| description | String | Definition: Repository description. |
| name | String | Definition: Repository name. |
| name_with_namespace | String | Definition: Repository full name. |
| path | String | Definition: Repository path. |
| path_with_namespace | String | Definition: Complete repository path. |
| created_at | String | Definition: Creation time. |
| updated_at | String | Definition: Update time. |
| archived | Boolean | Definition: Archived or not. |
| ssh_url_to_repo | String | Definition: Repository SSH address. |
| http_url_to_repo | String | Definition: HTTP address of the repository. |
| project_id | String | Definition: Repository project ID. |
| project_name | String | Definition: Repository project name. |
| develop_mode | String | Definition: Repository development mode. Value range: Enumeration values: |
| moderation_result | Boolean | Definition: Review status. |
| Parameter | Type | Description |
|---|---|---|
| commit_count | Integer | Definition Number of commits. Value range: 1~2147483647 |
| action | String | Definition Operation type. |
| ref_type | String | Definition Ref type. |
| commit_from | String | Definition Source commit. |
| commit_to | String | Definition Target commit. |
| ref | String | Definition Branch. |
| commit_title | String | Definition Commit title. |
Example Requests
GET /v4/user/recent-push-events
[ {
"author" : {
"id" : 9124,
"username" : "c369c68f1ff84679b5a8ed904d8bff1c"
},
"repository" : {
"id" : 2112044670,
"description" : "",
"name" : "123111",
"name_with_namespace" : "75f271c4b55545ba9c65ab37206eb968 / group1 / 123111",
"path" : "123111",
"path_with_namespace" : "75f271c4b55545ba9c65ab37206eb968/123111",
"created_at" : "2025-08-21T16:26:35.000+08:00",
"updated_at" : "2025-08-21T16:26:35.000+08:00",
"archived" : false,
"ssh_url_to_repo" : "git@test.com:75f271c4b55545ba9c65ab37206eb968/123111.git",
"http_url_to_repo" : "https:/test.com/75f271c4b55545ba9c65ab37206eb968/123111.git",
"project_id" : "75f271c4b55545ba9c65ab37206eb968",
"project_name" : "wyj20250314_CR",
"develop_mode" : "CR",
"moderation_result" : true
},
"push_data" : {
"commit_count" : 1,
"action" : "created",
"ref_type" : "branch",
"commit_from" : null,
"commit_to" : "a05a676d75dd58499f2b2e2d2c9f72aa4ba5d715",
"ref" : "master",
"commit_title" : "Initial commit"
},
"created_at" : "2025-08-21T16:26:40.000+08:00"
} ] Example Responses
Status code: 200
Obtain the list of latest activities by the current user.
[ {
"author" : {
"id" : 9124,
"username" : "c369c68f1ff84679b5a8ed904d8bff1c"
},
"repository" : {
"id" : 2112044670,
"description" : "",
"name" : "123111",
"name_with_namespace" : "75f271c4b55545ba9c65ab37206eb968 / group1 / 123111",
"path" : "123111",
"path_with_namespace" : "75f271c4b55545ba9c65ab37206eb968/123111",
"created_at" : "2025-08-21T16:26:35.000+08:00",
"updated_at" : "2025-08-21T16:26:35.000+08:00",
"archived" : false,
"ssh_url_to_repo" : "git@test.com:75f271c4b55545ba9c65ab37206eb968/123111.git",
"http_url_to_repo" : "https:/test.com/75f271c4b55545ba9c65ab37206eb968/123111.git",
"project_id" : "75f271c4b55545ba9c65ab37206eb968",
"project_name" : "test",
"develop_mode" : "CR",
"moderation_result" : true
},
"push_data" : {
"commit_count" : 1,
"action" : "created",
"ref_type" : "branch",
"commit_from" : null,
"commit_to" : "a05a676d75dd58499f2b2e2d2c9f72aa4ba5d715",
"ref" : "master",
"commit_title" : "Initial commit"
},
"created_at" : "2025-08-21T16:26:40.000+08:00"
} ] Status Codes
| Status Code | Description |
|---|---|
| 200 | Obtain the list of latest activities by the current user. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.