gitlab-plugin
gitlab-plugin copied to clipboard
gitlabMergeRequestAssignee is null
Before submitting an issue I have first:
- [X] read the documentation on the homepage
- [X] searched for similar already existing issue
- [X] confirmed that my GitLab webhook is using the http://JENKINS_URL/project endpoint and not the http://JENKINS_URL/job endpoint
(if you have performed all the above, remove the paragraph and continue describing the issue with template below)
Issue
Context
- Gitlab plugin version: 1.5.13
- Gitlab version: latest (gitlab.com)
- Jenkins version: 2.169
- Job type: Pipeline
Problem description
I'm trying to get the variable gitlabMergeRequestAssignee in my pipeline but it is equal to null. Right now, other variables are accessible but not this one. Is it deprecated? Thanks
I am also having this issue, and getting an error saying the variable is not available
- GitLab Plugin: 1.5.13
- Jenkins: 2.222.1
- GitVersion (local): 2.24.1.windows.2
- GitLab local Server: 12.9.2 (ac5568eb5d8)
I have attempted to echo out the ${gitlabMergeRequestAssignee} and i get the following failure output in Jenkins:
All other parts being used are working:
- gitlabSourceBranch
- gitlabUserName
- gitlabSourceBranch
- gitlabTargetBranch
- gitlabMergeRequestIid
I run into the same issue here. I can get any other vars but not the gitlabMergeRequestAssignee.
I also encountered same issue, I roughly read the codes of gitlab plugin and I guess it is because latest gitlab support multiple assignees so the hook request data field is assignees
and it is a list, but seems this plugin still process the assignee as a User model. Should same as inner field assignee_ids
.
Hello, I also have the same issue, is there a fix in progress ?
Hello everyone, I also have the same issue, is there a solution ?
Hello, I also have the same issue, is there a fix in progress ?
+1
Hello everyone, I also have the same issue, is there a solution ?
No, a fix is not in progress as far as I can tell. Pull requests are welcomed.
FYI, the problem (at least now) is that the webhook format for Assignees has changed to match the multiple-assignees functionality that was added to GitLab.
As the GitLab documentation states at the end of the "Merge Request event" section, the assignee_id
field is deprecated. MRs no longer have a single Assignee, they have a list of Assignees. There webhok now has an array field, assignee_ids
, that needs to be parsed instead.
While they list in the latest on-prem 16.0 documentation that it's still set to the first assignee_ids
, it sounds like the GitLab.com version (which is ahead of on-prem) has removed it entirely.
Hi @mtalexan We are currently planning to modernise this GitLab plugin so will be using API version 4 instead of the current version 3 (See https://docs.gitlab.com/ee/api/rest/) plus migrating from RESTEasy to gitlab4j-api as a part of the Jenkins Google Summer of Code (GSoC) 2023 program. Maybe we could also look into this issue this summer.
c.c. @MarkEWaite @harsh-ps-2003
Hi @mtalexan https://github.com/mtalexan We are currently planning to modernise this GitLab plugin so will be using API version 4 instead of the current version 3 (See https://docs.gitlab.com/ee/api/rest/) plus migrating from RESTEasy https://resteasy.dev/ to gitlab4j-api https://github.com/gitlab4j/gitlab4j-api as a part of the Jenkins Google Summer of Code (GSoC) 2023 program. Maybe we could also look into this issue this summer.
Sounds excellent. I was merely pointing out the source of the issue. Maybe it would be worth creating Milestone that curated Issues can be added to for the GSoC?
There are a handful of other nice-to-have issues that would probably be excellent for GSoC.
Hi @mtalexan Yup, creating some milestones with curated issues would be a good idea for GSoC given if we will have time to handle these as well. Do you have any suggested nice-to-have issues that would be nice to use for GSoC 2023?
Hi @mtalexan Yup, creating some milestones with curated issues would be a good idea for GSoC given if we will have time to handle these as well. Do you have any suggested nice-to-have issues that would be nice to use for GSoC 2023?
I hadn't created Issues for them yet, but I can.