Add --project and --branch parameters on the topic-changed hook
It is currently not possible to distinguish which change the hook is called on if the same Change-Id is used on multiple changes on different projects or branches. Add --project and --branch parameters on the hook. Bug: Issue 2243 Change-Id: I71240017a0ca60ba223435ecc4b6a7e875a72fc0
This commit is contained in:
@@ -126,7 +126,7 @@ topic-changed
|
||||
Called whenever a change's topic is changed from the Web UI or via the REST API.
|
||||
|
||||
====
|
||||
topic-changed --change <change id> --changer <changer> --old-topic <old topic> --new-topic <new topic>
|
||||
topic-changed --change <change id> --project <project name> --branch <branch> --changer <changer> --old-topic <old topic> --new-topic <new topic>
|
||||
====
|
||||
|
||||
cla-signed
|
||||
|
@@ -582,6 +582,8 @@ public class ChangeHookRunner implements ChangeHooks, LifecycleListener {
|
||||
|
||||
final List<String> args = new ArrayList<String>();
|
||||
addArg(args, "--change", event.change.id);
|
||||
addArg(args, "--project", event.change.project);
|
||||
addArg(args, "--branch", event.change.branch);
|
||||
addArg(args, "--changer", getDisplayName(account));
|
||||
addArg(args, "--old-topic", oldTopic);
|
||||
addArg(args, "--new-topic", event.change.topic);
|
||||
|
Reference in New Issue
Block a user