Only pass in CLA name to the CLA hook

Previously we were passing in the entire CLA, only to get the
name.  While for most objects it might be better to pass in
more info, for the CLA, this data is currently unused.
Simplifying this makes it easier to eventually define a new
CLA Event in the extension points, and then to port the hooks
to use this new extension point listener.  If this data is
needed at some later point, a new ClaInfo could be defined.

Change-Id: Ib8e8428acb2d3366e573d162a282516646609201
This commit is contained in:
Martin Fick
2015-11-11 19:26:30 -07:00
committed by David Pursehouse
parent 76803cac36
commit 462c63a51c
4 changed files with 5 additions and 5 deletions

View File

@@ -715,12 +715,12 @@ public class ChangeHookRunner implements ChangeHooks, EventDispatcher,
}
@Override
public void doClaSignupHook(Account account, ContributorAgreement cla) {
public void doClaSignupHook(Account account, String claName) {
if (account != null) {
List<String> args = new ArrayList<>();
addArg(args, "--submitter", getDisplayName(account));
addArg(args, "--user-id", account.getId().toString());
addArg(args, "--cla-name", cla.getName());
addArg(args, "--cla-name", claName);
runHook(claSignedHook, args);
}

View File

@@ -154,7 +154,7 @@ public interface ChangeHooks {
public void doTopicChangedHook(Change change, Account account,
String oldTopic, ReviewDb db) throws OrmException;
public void doClaSignupHook(Account account, ContributorAgreement cla);
public void doClaSignupHook(Account account, String claName);
/**
* Fire the Ref update Hook

View File

@@ -59,7 +59,7 @@ public final class DisabledChangeHooks implements ChangeHooks, EventDispatcher,
}
@Override
public void doClaSignupHook(Account account, ContributorAgreement cla) {
public void doClaSignupHook(Account account, String claName) {
}
@Override