Where to implement GitLab Branch Source MR Naming change

108 views
Skip to first unread message

cob...@gmail.com

unread,
May 25, 2021, 1:41:40 PM5/25/21
to Jenkins Developers
I'm looking to implement the changes necessary to provide a display name for MR jobs created by the GitLab Branch Source Plugin.

I believe the change may be useful for other Branch Sources as well, and the creation of the actual Jenkins Job seems to be outside the plugin anyway.

Our idea is to have the display name of MR builds like: "${jobName} - ${mrTitle}" aka "MR-1234 - implement fancy new feature X" while the job name would stay the same "MR-1234"

The title of the MR is currently shown on hover of the link to the job in the MR list, with a lot of open MRs one cannot search for the right MR in jenkins and thus find the correct build =(

Do you recommend to implement this in the GitLab Branch Source Plugin somehow: the current plan is to set the Job display name after branch indexing and webhook processing.

Or do you recommend to implement this feature in the scm-api plugin?

This is the Issue I want to implement:

Any pointers appreciated!

BR,
Christoph

Jesse Glick

unread,
May 25, 2021, 3:32:36 PM5/25/21
to Jenkins Dev
On Tue, May 25, 2021 at 1:41 PM cob...@gmail.com <cob...@gmail.com> wrote:
Or do you recommend to implement this feature in the scm-api plugin?

The API is already defined, and might already be implemented in `gitlab-branch-source` (no idea offhand): https://javadoc.jenkins.io/plugin/scm-api/jenkins/scm/api/metadata/ObjectMetadataAction.html#getObjectDisplayName-- 

As to how it is used, that is another question, outside the control of `gitlab-branch-source`. The `Job.displayName` could be set by the `branch-api` plugin, though it is probably better to set a `Job.description` (for display in the project index page) and maybe add a new list view column to the `change-requests` view.

Christoph Obexer

unread,
Jun 1, 2021, 10:53:19 AM6/1/21
to Jenkins Developers
Thanks for the pointer!

I came up with theese changes to implement the `Job.displayName` variant: https://github.com/jenkinsci/branch-api-plugin/pull/254 The tests are really unhappy about my call to `getAction` =(

However I only consider this a POC at this point and would like to get feedback from the maintainers on the change in general before spending the required time to implement this properly.

GitHub didn't assign reviewers automatically... how do I request proper review for this broad change?
Reply all
Reply to author
Forward
0 new messages