Skip to content

Commit

Permalink
feat: Hook should be disabled by default. (#49)
Browse files Browse the repository at this point in the history
It should be manually enabled.
  • Loading branch information
grigoriev authored Jun 20, 2024
1 parent c71877a commit 30409f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Use Administration -> Interceptor -> Settings page to enable/disable or set spec

## Hooks installation
Copy hook jar to hooks folder (`<polarion_home>/polarion/extensions/ch.sbb.polarion.extension.interceptor/eclipse/plugins/hooks`) and enforce hooks reloading from the settings page or restart Polarion.
By default, newly added hooks are disabled and must be enabled manually.

## Upgrade

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public void afterSave(@NotNull HookModel what) {

@Override
public @NotNull HookModel defaultValues() {
return HookModel.builder().enabled(true).hookVersion(hook.getVersion()).properties(hook.getDefaultSettings()).build();
return HookModel.builder()
.enabled(false)
.hookVersion(hook.getVersion())
.properties(hook.getDefaultSettings())
.build();
}
}

0 comments on commit 30409f7

Please sign in to comment.