Filtering issues with some constraint on the labels, the title and the body.

filter_issues(x, ...)

# S3 method for class 'IssuesTB'
filter_issues(x, ...)

# Default S3 method
filter_issues(x, ...)

Arguments

x

a IssuesTB object.

...

Other options used to control filtering behaviour with different fields and values. Passed on to contains as:

  • values: a vector string. Patterns to look for in the outcome.

  • fields: a vector string. The different fields of the issue in which to search for the pattern (among "title", "body", "labels" and "milestone")

  • fields_logic_gate: the logic operator which will aggregate the different assertion related to fields: "OR" (by default) or "AND".

  • values_logic_gate: the logic operator which will aggregate the different assertion related to values: "OR" or "AND" (by default).

  • negate: a boolean indicate the negation of the assertion.

Value

a IssuesTB object filtered

Details

This function relies on the function contains. More informations on the filtering in the documentation of the function contains.

Examples


# \donttest{
all_issues <- get_issues(source = "online", verbose = FALSE)
# Condition: issues containing "README" in its body OR title
filtered_issues <- filter_issues(
    x = all_issues,
    fields = c("body", "title"),
    values = "README",
    fields_logic_gate = "OR"
)

# Condition: issues containing neither "unknown" nor "medium" in their label
filtered_issues <- filter_issues(
    x = all_issues,
    fields = "labels",
    values = c("unknown", "medium"),
    values_logic_gate = "OR",
    negate = TRUE,
    fields_logic_gate = "AND"
)
# }