Class ChangePredicates


  • public class ChangePredicates
    extends Object
    Predicates that match against ChangeData.
    • Method Detail

      • unreviewed

        public static Predicate<ChangeData> unreviewed()
        Returns a predicate that matches changes that were not yet reviewed.
      • ref

        public static Predicate<ChangeData> ref​(String refName)
        Returns a predicate that matches changes targeted at the provided refName.
      • exactTopic

        public static Predicate<ChangeData> exactTopic​(String topic)
        Returns a predicate that matches changes in the provided topic.
      • fuzzyTopic

        public static Predicate<ChangeData> fuzzyTopic​(String topic)
        Returns a predicate that matches changes in the provided topic.
      • submissionId

        public static Predicate<ChangeData> submissionId​(String changeSet)
        Returns a predicate that matches changes submitted in the provided changeSet.
      • path

        public static Predicate<ChangeData> path​(String path)
        Returns a predicate that matches changes that modified the provided path.
      • hashtag

        public static Predicate<ChangeData> hashtag​(String hashtag)
        Returns a predicate that matches changes tagged with the provided hashtag.
      • fuzzyHashtag

        public static Predicate<ChangeData> fuzzyHashtag​(String hashtag)
        Returns a predicate that matches changes tagged with the provided hashtag.
      • footer

        public static Predicate<ChangeData> footer​(String footer)
        Returns a predicate that matches changes with the provided footer in their commit message.
      • directory

        public static Predicate<ChangeData> directory​(String directory)
        Returns a predicate that matches changes that modified files in the provided directory.
      • trackingId

        public static Predicate<ChangeData> trackingId​(String trackingId)
        Returns a predicate that matches changes with the provided trackingId.
      • exactAuthor

        public static Predicate<ChangeData> exactAuthor​(String exactAuthor)
        Returns a predicate that matches changes authored by the provided exactAuthor.
      • author

        public static Predicate<ChangeData> author​(String author)
        Returns a predicate that matches changes authored by the provided author.
      • exactCommitter

        public static Predicate<ChangeData> exactCommitter​(String exactCommitter)
        Returns a predicate that matches changes where the patch set was committed by exactCommitter.
      • committer

        public static Predicate<ChangeData> committer​(String comitter)
        Returns a predicate that matches changes where the patch set was committed by committer.
      • idPrefix

        public static Predicate<ChangeData> idPrefix​(String id)
        Returns a predicate that matches changes whose ID starts with the provided id.
      • projectPrefix

        public static Predicate<ChangeData> projectPrefix​(String prefix)
        Returns a predicate that matches changes in a project that has the provided prefix in its name.
      • commitPrefix

        public static Predicate<ChangeData> commitPrefix​(String commitId)
        Returns a predicate that matches changes where a patch set has the provided commitId either as prefix or as full ObjectId.
      • message

        public static Predicate<ChangeData> message​(String message)
        Returns a predicate that matches changes where the provided message appears in the commit message. Uses full-text search semantics.
      • comment

        public static Predicate<ChangeData> comment​(String comment)
        Returns a predicate that matches changes where the provided comment appears in any comment on any patch set of the change. Uses full-text search semantics.
      • submitRuleStatus

        public static Predicate<ChangeData> submitRuleStatus​(String value)
        Returns a predicate that matches with changes having a specific submit rule evaluating to a certain result. Value should be in the form of "$ruleName=$status" with $ruleName equals to '$plugin_name~$rule_name' and $rule_name equals to the name of the class that implements the SubmitRule. For gerrit core rules, $ruleName should be in the form of 'gerrit~$rule_name'.