Add --is-draft
argument on patchset-created hook
The `--is-draft` argument will be passed with either `true` if the patchset is a draft, or `false` otherwise. This can be used by hooks that need to behave differently if the change is a draft. Change-Id: Idd00efe799bb05b0fd00e917faaccd5c772b1e1f
This commit is contained in:
parent
a80e3f9037
commit
eb081dcfbf
@ -27,7 +27,7 @@ This is called whenever a patchset is created (this includes new
|
||||
changes and drafts).
|
||||
|
||||
====
|
||||
patchset-created --change <change id> --change-url <change url> --project <project name> --branch <branch> --topic <topic> --uploader <uploader> --commit <sha1> --patchset <patchset id>
|
||||
patchset-created --change <change id> --is-draft <boolean> --change-url <change url> --project <project name> --branch <branch> --topic <topic> --uploader <uploader> --commit <sha1> --patchset <patchset id>
|
||||
====
|
||||
|
||||
draft-published
|
||||
|
@ -232,6 +232,7 @@ public class ChangeHookRunner implements ChangeHooks {
|
||||
|
||||
final List<String> args = new ArrayList<String>();
|
||||
addArg(args, "--change", event.change.id);
|
||||
addArg(args, "--is-draft", patchSet.isDraft() ? "true" : "false");
|
||||
addArg(args, "--change-url", event.change.url);
|
||||
addArg(args, "--project", event.change.project);
|
||||
addArg(args, "--branch", event.change.branch);
|
||||
|
Loading…
Reference in New Issue
Block a user