Environment variables (or something similar) in automatic Mylyn Commit messages - maybe?

My current project asks us to follow a specific format for our commit messages. (The project uses SVN.)

In Mylyn format, it will translate to something like this:

${USER_INITIALS}: ${task.key} [(${connector.task.prefix}) "${task.description}"] -

The variable ${USER_INITIALS} is the "pseudo-code", and the rest are Mylyn commit variables.

It would be a blur if I could use the environment variable and save the template to .settings/org.eclipse.mylyn.team.ui.prefs . Then all project participants could use it.

I tried using the existing pseudocode (as well as the existing PATH and USER environment variables). None of these permissions, apparently, because after commit, they are replaced by an empty string.

Is there a solution?


PS Why not just rely on the SVN username, which is already a property of every SVN binding? Since we integrated SVN with our LDAP server, and it returns our (numeric) EMPLID, which no one can attribute without manual search. Therefore, this is not very useful for brief attribution (which is what is desired).

+4
source share
2 answers

I agree that Mylyn should be able to drag and drop environment variables into a commit message, but I don't think this is possible at the moment.

I looked at Mylyn’s source and documents and couldn’t figure out how to do it directly in Mylyn, I think that you have only one option - create an SVN-hook / trigger that will either expand the environment variables for you or enter them in a specific place in All commit log messages.

For reference, I checked a copy of the code base here: http://wiki.eclipse.org/index.php/Mylyn/Contributor_Reference#Active_branches

+1
source

Could you use $ {task.assignee}? For me, this returns the initials of the corresponding user.

+1
source

All Articles