Webhook Plugin: Unable to retrieve namespace of repository

Dear SCM Community,

We are currently trying to setup a global webhook for a Discord bot with the newest version of the SCM Manager and the webhook plugin. For this it would be great to retrieve the repositories name and namespace with every commit to create a hyperlink that links to the specific commit in scm.

The old documentation of the plugin mentioned that one can use placeholders such as this ${repository.name} to create a dynamic url, which is great and still seems to work with the new version.

The old docs also state that any method starting with “get” within the java class of Repository would also be available with the placeholder pattern. I tried this with several fields and it seems to work except for retrieving anything related to the namespace of a repository. Is this a bug? Is there any other way to retrieve the repository namespace?

Our namespaces are user based:
/scm/repo/<user as namespace>/<repo name>/code/sources/
May this be the reason that the namespace is always empty?

discord bot

Hey @guntrumm,

I admit the documentation for this plugin is pretty poor. After looking in the code it seems like the namespace is currently missing in the repository context.

See here what is currently supported: scm-el-plugin/ImmutableEncodedRepository.java at develop · scm-manager/scm-el-plugin · GitHub

We simply forgot to provide the namespace here… Could you extend this class by the fields you need and create a pull request for the scm-el-plugin? We will provide the new release asap.

Regards, Eduard


thanks for the quick reply, I added a pull request here. I’m not entirely sure if I did everything correctly since I didn’t have the time to read through all the docs.


Hey, thanks for the pr. We merged it and the release is currently deploying. If you upgrade the scm-el-plugin to version 1.1.0 you should be able to find the namespace in the repository context of your webhook.

Regards, Eduard

1 Like

I am closing this topic since there was no activity in the last 30 days.