Skip to content

Matching items ​

A rule runs on the items its where matches, by the fields their source gives.

where ​

Every key must hold; any lists alternatives:

yaml
where:
  type: pr                          # equals
  checks: [failing, pending]        # any of
  review_requested: { not: true }   # not
  unresolved_threads: { gte: 2 }    # on a number field: gt, gte, lt, lte; combine for a range
  updated: { older_than: 3d }       # on a date field: older_than, newer_than; m, h, d or w
  title: { matches: '^\[bug\]' }    # on title, description or a text field: case-insensitive regex
  label: awaywork                # on a list field: contains; GitHub issues must also be assigned to you
  behind: { gt: 0 }                 # GitHub: your PR's base has commits its branch lacks; see sync
  conflicts: false                  # GitHub: it merges cleanly into its base
  "fields.Priority": High           # an Asana custom field
  blocked: false                    # Linear, Jira, Asana: no open blocker
  any:                              # at least one entry holds; each is a where, ANDed with the keys above
    - { label: urgent }
    - { checks: failing }

Strings compare ignoring case (section: In progress matches In Progress); numbers and booleans exactly; fixed values like type are lowercase. The keys are the item's fields.

Details:

  • A missing field equals nothing and is neither older nor newer than anything. Spans count back from when the plan runs.
  • Config errors: an unknown key (the error lists each source's keys), an invalid regex, an empty any entry.
  • plan names the match an item failed, for any each entry's.
  • GitHub reads only issues assigned to you, so a labelled issue nobody assigned to you plans nothing, unless a search reads it; then mine: true keeps a rule to yours.

Fields ​

Every item has:

  • type (pr, issue or task), title and description;
  • approved: the skill of awaywork's newest result on it that you approved or that went ahead; approved: true is an error that says so;
  • state: open, or merged or closed for the finished items a rule asks for; closed is when it finished;
  • planned: it's a task of a plan you approved.

The trackers' fields, shared ones first:

FieldSourcesValue
repoAllowner/name; on a tracker, from repo_map
created, updatedAllISO times; a routine's are the occurrence
projectAsana, Linear, JiraIts name; Jira's key
statusLinear, JiraThe workflow state
labelsLinear, JiraAsana calls them tags, GitHub label
priorityLinear, JiraHigh
blockedAsana, Linear, JiraAn open blocker: an incomplete dependency, a blocking issue, an "is blocked by" link
fields.<custom field>Asana, JiraThe custom field's value
sectionAsanaIts section in the project
dueAsanaDate, or date and time
teamLinearIts key
issuetypeJiraBug
nameRoutinesThe routine's name

GitHub's own:

FieldOnValue
labelPRs, issuesIts labels
authorPRs, issuesThe author's login
trustedPRs, issuesThe author is an owner, member or collaborator
minePRs, issuesA PR you authored, an issue assigned to you
oursPRsawaywork opened it
draftPRsIt's a draft
review_requestedPRsYour review is requested
checksPRsfailing, pending or passing
unresolved_threadsPRsThose shown to the agent
my_unresolved_threadsPRsThose you started
filesPRsThe first 500 paths it touches; test with matches
changed_linesPRsAdditions plus deletions
conflictsPRsIt doesn't merge cleanly into its base; unset while GitHub works it out
behindYour open PRsCommits on its base its branch lacks

A custom source's are the fields its config lists (Custom sources).