Class ChangeNotesParseApprovalUtil
- java.lang.Object
-
- com.google.gerrit.server.notedb.ChangeNotesParseApprovalUtil
-
public class ChangeNotesParseApprovalUtil extends Object
Util to extractPatchSetApproval
fromChangeNoteFooters.FOOTER_LABEL
orChangeNoteFooters.FOOTER_COPIED_LABEL
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval
-
Constructor Summary
Constructors Constructor Description ChangeNotesParseApprovalUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChangeNotesParseApprovalUtil.ParsedPatchSetApproval
parseApproval(String footerLine)
static ChangeNotesParseApprovalUtil.ParsedPatchSetApproval
parseCopiedApproval(String labelLine)
Parses copiedChangeNotesParseApprovalUtil.ParsedPatchSetApproval
fromChangeNoteFooters.FOOTER_COPIED_LABEL
line.
-
-
-
Method Detail
-
parseApproval
public static ChangeNotesParseApprovalUtil.ParsedPatchSetApproval parseApproval(String footerLine) throws org.eclipse.jgit.errors.ConfigInvalidException
ParsesChangeNotesParseApprovalUtil.ParsedPatchSetApproval
fromChangeNoteFooters.FOOTER_LABEL
line.Valid added approval footer examples:
- Label:
Valid removed approval footer examples:
- -
- -
- -
is optional, since the approval might have been granted before PatchSetApproval.UUID
was introduced.is only persisted in cases, when the account, that granted the vote does not match the account, that issued ChangeUpdate
(created this NoteDB commit).- Throws:
org.eclipse.jgit.errors.ConfigInvalidException
-
parseCopiedApproval
public static ChangeNotesParseApprovalUtil.ParsedPatchSetApproval parseCopiedApproval(String labelLine) throws org.eclipse.jgit.errors.ConfigInvalidException
Parses copiedChangeNotesParseApprovalUtil.ParsedPatchSetApproval
fromChangeNoteFooters.FOOTER_COPIED_LABEL
line.Footer example: Copied-Label:
=VOTE, , :" " - ":<"TAG>"" is optional.
is also optional, if it was not set. is optional, since the approval might have been granted before PatchSetApproval.UUID
was introduced.- The label, vote, and the Gerrit account are mandatory (unlike FOOTER_LABEL where Gerrit Account is also optional since by default it's the committer).
Footer example for removal: Copied-Label: -
, is also optional, if it was not set.
- Throws:
org.eclipse.jgit.errors.ConfigInvalidException
-
-