Require Matching Author Name validates against only Stash "Name" field

Description

I am trying to configure the plugin in our git repository to require users to enter their userid and email addresses. The email addresses work as expected however we are experiencing issues when trying to validate the username.

It seems the tool looks to use the "Name" field in Stash. What we were hoping to do was verify this against the "username" field in stash as this is used for verification in our teamcity builds.

Would it be possible to extend the plugin to verify the name of the user using both the "Name" and "Username" fields in stash?

We are running into this because of the way Jenkins works in conjunction with the commit log. The root of the issue is more related to Jenkins I think but I don't see them changing it. Jenkins builds its user database on the fly so when Jenkins comes across a git commit, it tries to look up the Jenkins user associated with the commit by either the user.name and user.email. If the user has never logged into Jenkins and thus does not yet have a user record populated with their user id, display name and email, Jenkins creates a new user record using the user.name as the user id. This then loses the correlation between the logged in user and their possible commits affecting various views. Once the wrong user

Although not git best practice, we are unable to use this plugin if we want to ensure consistency within Jenkins. Having an option in the YACC UI to select validation on stash user id would help us deal with this. Would you be open to a pull request of the same?

Reference Jenkins issue here: https://issues.jenkins-ci.org/browse/JENKINS-9016

Assignee

Unassigned

Reporter

Mohammed Davoodi

Sprint

None

Labels

Priority

Medium
Configure