Skip to content

Make related issue number and username available for GitLab integration #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
orhun opened this issue Mar 23, 2025 · 2 comments
Open

Make related issue number and username available for GitLab integration #1105

orhun opened this issue Mar 23, 2025 · 2 comments
Assignees
Labels
feature/request New feature or request

Comments

@orhun
Copy link
Owner

orhun commented Mar 23, 2025

Discussed in #1103

Originally posted by lfvjimisola March 20, 2025
Read up on: https://git-cliff.org/docs/integration/gitlab

Looking at the JSON output I'm wondering if it would be possible to add:


Here are some example responses from the GitLab API:

Commit:

[
   {
      "id":"70db916eb98ce4777c7ca57de1bc88685ee6bc26",
      "short_id":"70db916e",
      "created_at":"2025-03-13T17:27:12.000+00:00",
      "parent_ids":[
         "f33acbfa8e6cae4ceec2e8965c31830ce16ffee0",
         "673f283726e6892595ec3d0510a15f7ef97fb300"
      ],
      "title":"Merge pull request #1 from dark0dave/feature/nixosUpdates",
      "message":"Merge pull request #1 from dark0dave/feature/nixosUpdates\n\nfeat(nixos): Updates from nixos",
      "author_name":"dark0dave",
      "author_email":"dark0dave@mykolab.com",
      "authored_date":"2025-03-13T17:27:12.000+00:00",
      "committer_name":"GitHub",
      "committer_email":"noreply@github.com",
      "committed_date":"2025-03-13T17:27:12.000+00:00",
      "trailers":{
         
      },
      "extended_trailers":{
         
      },
      "web_url":"https://gitlab.com/dark0dave/dotfiles/-/commit/70db916eb98ce4777c7ca57de1bc88685ee6bc26"
   },
]

Merge request:

[
   {
      "id":214177566,
      "iid":20,
      "project_id":7283906,
      "title":"feat(rtx): One version manager to bring them all, and in the darkness bind them",
      "description":"Signed-off-by: dark0dave \u003cdark0dave@mykolab.com\u003e",
      "state":"merged",
      "created_at":"2023-03-29T01:54:05.056Z",
      "updated_at":"2023-03-29T02:09:52.269Z",
      "merged_by":{
         "id":2520934,
         "username":"dark0dave",
         "name":"dark0dave",
         "state":"active",
         "locked":false,
         "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
         "web_url":"https://gitlab.com/dark0dave"
      },
      "merge_user":{
         "id":2520934,
         "username":"dark0dave",
         "name":"dark0dave",
         "state":"active",
         "locked":false,
         "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
         "web_url":"https://gitlab.com/dark0dave"
      },
      "merged_at":"2023-03-29T02:09:51.824Z",
      "closed_by":null,
      "closed_at":null,
      "target_branch":"master",
      "source_branch":"feature/rtx",
      "user_notes_count":0,
      "upvotes":0,
      "downvotes":0,
      "author":{
         "id":2520934,
         "username":"dark0dave",
         "name":"dark0dave",
         "state":"active",
         "locked":false,
         "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
         "web_url":"https://gitlab.com/dark0dave"
      },
      "assignees":[
         {
            "id":2520934,
            "username":"dark0dave",
            "name":"dark0dave",
            "state":"active",
            "locked":false,
            "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
            "web_url":"https://gitlab.com/dark0dave"
         }
      ],
      "assignee":{
         "id":2520934,
         "username":"dark0dave",
         "name":"dark0dave",
         "state":"active",
         "locked":false,
         "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
         "web_url":"https://gitlab.com/dark0dave"
      },
      "reviewers":[
         {
            "id":2520934,
            "username":"dark0dave",
            "name":"dark0dave",
            "state":"active",
            "locked":false,
            "avatar_url":"https://gitlab.com/uploads/-/system/user/avatar/2520934/avatar.png",
            "web_url":"https://gitlab.com/dark0dave"
         }
      ],
      "source_project_id":7283906,
      "target_project_id":7283906,
      "labels":[
         
      ],
      "draft":false,
      "imported":false,
      "imported_from":"none",
      "work_in_progress":false,
      "milestone":null,
      "merge_when_pipeline_succeeds":false,
      "merge_status":"can_be_merged",
      "detailed_merge_status":"not_open",
      "merge_after":null,
      "sha":"cb8c0542a92ff6a51abdfcbab91de4fdf5695e96",
      "merge_commit_sha":"4c55cd75b764cf32f3519420cfe0565f5a76bea2",
      "squash_commit_sha":null,
      "discussion_locked":null,
      "should_remove_source_branch":true,
      "force_remove_source_branch":true,
      "prepared_at":"2023-03-29T01:54:07.084Z",
      "reference":"!20",
      "references":{
         "short":"!20",
         "relative":"!20",
         "full":"dark0dave/dotfiles!20"
      },
      "web_url":"https://gitlab.com/dark0dave/dotfiles/-/merge_requests/20",
      "time_stats":{
         "time_estimate":0,
         "total_time_spent":0,
         "human_time_estimate":null,
         "human_total_time_spent":null
      },
      "squash":false,
      "squash_on_merge":false,
      "task_completion_status":{
         "count":0,
         "completed_count":0
      },
      "has_conflicts":false,
      "blocking_discussions_resolved":true,
      "approvals_before_merge":null
   },
]

a potentially related issue_number

We can probably use the references field for that.

userid

Probably we want e.g. "id":2520934

@orhun orhun added the feature/request New feature or request label Mar 23, 2025
@Elizabetht1
Copy link

Hi @orhun ! can I be assigned to this issue?

@orhun
Copy link
Owner Author

orhun commented Apr 15, 2025

Sure! @Elizabetht1 Let me know if you need any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants