Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change description key #70

Open
DrVanScott opened this issue Sep 26, 2018 · 4 comments
Open

Change description key #70

DrVanScott opened this issue Sep 26, 2018 · 4 comments

Comments

@DrVanScott
Copy link

Just a small issue:

<repository-hook name="External Async Post Receive Hook" i18n-name-key="external-async-post-receive-hook.name" key="external-post-receive-hook" class="com.ngs.stash.externalhooks.hook.ExternalAsyncPostReceiveHook">

Better change

i18n-name-key="external-async-post-receive-hook.name"

to

i18n-name-key="external-post-receive-hook.name"

Accordingly change the in place description from

The External Async Post Receive Hook Plugin

to (external-hooks.properties)

The External Post Receive Hook Plugin

or vice versa?

@seletskiy
Copy link
Member

@DrVanScott: It's named Async just to be clear that hook is not guaranteed to run exactly after push and it can't be used to reject push at all due the way hooks are executed in Atlassian Bitbucket.

@DrVanScott
Copy link
Author

@seletskiy: I understand and that's why i wrote "or vice verse". The main point of my argument is the key name. It does not match the key in external-hooks.properties nor does it match the naming scheme.

Look at line 27:

<repository-hook name="External Pre Receive Hook" i18n-name-key="external-pre-receive-hook.name" key="external-pre-receive-hook" class="com.ngs.stash.externalhooks.hook.ExternalPreReceiveHook">

Attribute "i18n-name-key" and "key" are aligned (Same for the description key in the next line)
This is not the case for the async case.

A minor side effect of this is: The description for the first (and last) hook is taken from the properties file, while the description of async hook is taken from the xml, due to no match in the property file.

Not a big deal, just something against my pedantic mind... ;-)

@seletskiy
Copy link
Member

@DrVanScott: ah, I see what you mean now. I'm not sure however that it can be changed safely, because Bitbucket may store settings for hooks by it's key and this change may not be backward compatible.

@DrVanScott
Copy link
Author

I agree not to change "key", but it should be possible to change "i18n-name-key".

At least make a change in external-hook.properties to make this mechanism also work for the async hook.

Whatever solution you choose, you need to change the content of async's description in the property file.

@seletskiy seletskiy changed the title Using wrong description key? Change description key Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants