Merge branch 'stable-2.14' into stable-2.15
* stable-2.14: Provide mvn command output when VERBOSE set ReviewerRecommender: Prevent NPE when changeNotes is null ReviewerSuggestion: More Javadoc improvements Change-Id: I363d2be3dae32f9b082dc46ae89fd26f55ddc923
This commit is contained in:
@@ -136,7 +136,7 @@ public class ReviewerRecommender {
|
|||||||
.get()
|
.get()
|
||||||
.suggestReviewers(
|
.suggestReviewers(
|
||||||
projectState.getNameKey(),
|
projectState.getNameKey(),
|
||||||
changeNotes.getChangeId(),
|
changeNotes != null ? changeNotes.getChangeId() : null,
|
||||||
query,
|
query,
|
||||||
reviewerScores.keySet()));
|
reviewerScores.keySet()));
|
||||||
String key = plugin.getPluginName() + "-" + plugin.getExportName();
|
String key = plugin.getPluginName() + "-" + plugin.getExportName();
|
||||||
|
@@ -29,14 +29,15 @@ import java.util.Set;
|
|||||||
@ExtensionPoint
|
@ExtensionPoint
|
||||||
public interface ReviewerSuggestion {
|
public interface ReviewerSuggestion {
|
||||||
/**
|
/**
|
||||||
* Reviewer suggestion.
|
* Suggest reviewers to add to a change.
|
||||||
*
|
*
|
||||||
* @param project The name key of the project the suggestion is for.
|
* @param project The name key of the project the suggestion is for.
|
||||||
* @param changeId The changeId that the suggestion is for. Can be an {@code null}.
|
* @param changeId The changeId that the suggestion is for. Can be {@code null}.
|
||||||
* @param query The query as typed by the user. Can be an {@code null}.
|
* @param query The query as typed by the user. Can be {@code null}.
|
||||||
* @param candidates A set of candidates for the ranking. Can be empty.
|
* @param candidates A set of candidates for the ranking. Can be empty.
|
||||||
* @return Set of suggested reviewers as a tuple of account id and score. The account ids listed
|
* @return Set of {@link SuggestedReviewer}s. The {@link
|
||||||
* here don't have to be a part of candidates.
|
* com.google.gerrit.reviewdb.client.Account.Id}s listed here don't have to be included in
|
||||||
|
* {@code candidates}.
|
||||||
*/
|
*/
|
||||||
Set<SuggestedReviewer> suggestReviewers(
|
Set<SuggestedReviewer> suggestReviewers(
|
||||||
Project.NameKey project,
|
Project.NameKey project,
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from os import path, environ
|
from os import path, environ
|
||||||
from subprocess import check_output
|
from subprocess import check_output, CalledProcessError
|
||||||
from sys import stderr
|
from sys import stderr
|
||||||
|
|
||||||
opts = OptionParser()
|
opts = OptionParser()
|
||||||
@@ -67,6 +67,8 @@ for spec in args.s:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('%s command failed: %s\n%s' % (args.a, ' '.join(exe), e),
|
print('%s command failed: %s\n%s' % (args.a, ' '.join(exe), e),
|
||||||
file=stderr)
|
file=stderr)
|
||||||
|
if environ.get('VERBOSE') and isinstance(e, CalledProcessError):
|
||||||
|
print('Command output\n%s' % e.output, file=stderr)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user