List of usage examples for org.eclipse.jgit.revwalk FooterKey SIGNED_OFF_BY
FooterKey SIGNED_OFF_BY
To view the source code for org.eclipse.jgit.revwalk FooterKey SIGNED_OFF_BY.
Click Source Link
From source file:com.google.gerrit.server.git.MergeUtil.java
License:Apache License
private static boolean isSignedOffBy(List<FooterLine> footers, String email) { for (final FooterLine line : footers) { if (line.matches(FooterKey.SIGNED_OFF_BY) && email.equals(line.getEmailAddress())) { return true; }/* w w w .j a v a2s . c o m*/ } return false; }
From source file:com.google.gerrit.server.mail.MailUtil.java
License:Apache License
private static boolean isReviewer(final FooterLine candidateFooterLine) { return candidateFooterLine.matches(FooterKey.SIGNED_OFF_BY) || candidateFooterLine.matches(FooterKey.ACKED_BY) || candidateFooterLine.matches(FooterConstants.REVIEWED_BY) || candidateFooterLine.matches(FooterConstants.TESTED_BY); }
From source file:org.eclipse.foundation.gerrit.validation.EclipseCommitValidationListener.java
License:Open Source License
/** * Answer <code>true</code> if the identified user has signed off on the commit, * or <code>false</code> otherwise. The user may use any of their identities to * sign off on the commit (i.e. they can use any email address that is registered * with Gerrit./*from w w w .j a v a2 s . com*/ * * @param author The Gerrit identity of the author of the commit. * @param commit The commit. * @return <code>true</code> if the author has signed off; <code>false</code> otherwise. */ private boolean hasSignedOff(IdentifiedUser author, RevCommit commit) { for (final FooterLine footer : commit.getFooterLines()) { if (footer.matches(FooterKey.SIGNED_OFF_BY)) { final String email = footer.getEmailAddress(); if (author.getEmailAddresses().contains(email)) return true; } } return false; }