Context reference

The following variables are available at the root level when writing conditions and templates. For variables that are custom objects, see their properties further down the page.

Property Type Note
additions int
all function

Return True if bool(x) is True for all values x in the iterable.

If the iterable is empty, return True.

any function

Return True if bool(x) is True for any x in the iterable.

If the iterable is empty, return False.

assignee User
assignees Users
author User
author_association str
base Branch
body str
changed_files int
closed_at datetime
comments int
comments_url str
commits Commits
commits_url str
contains_any_fnmatches function

contains_any_fnmatches(files, ['api/*', 'tests/*'])

contains_any_globs function

contains_any_globs(files, ['api/**', 'tests/*.py'])

contains_fnmatch function

contains_fnmatch(title, 'WIP*')

contains_glob function

contains_glob(file.filename, 'app/**/*.py')

contains_regex function

contains_regex(title, 'WIP.*')

count function

Return the number of items in a container.

created_at datetime
date function

Parses a date from a string using dateparser.

date('3 days ago')

date('8/10/1995')

deletions int
diff_url str
files Files
glob function

glob('*.py')

groups Groups
head Branch
html_url str
id int
issue_url str
labels Labels
len function

Return the number of items in a container.

length function

Return the number of items in a container.

locked bool
maintainer_can_modify bool
merge_commit_sha str
mergeable bool
mergeable_state str
merged bool
merged_at datetime
merged_by User
milestone Milestone
node_id str
number int
patch_url str
rebaseable bool
regex function

regex('WIP: .*')

requested_reviewers Users
requested_teams Teams
review_comment_url str
review_comments int
review_comments_url str
state str
statuses Statuses
statuses_url str
text_list function

Returns a readable, comma-separated list of items for printing in templates.

text_list(['a', 'b', 'c', 'd']) == 'a, b, c or d'

text_list(['a', 'b', 'c'], 'and') == 'a, b and c'

text_list(['a', 'b'], 'and') == 'a and b'

text_list(['a']) == 'a'

text_list([]) == ''

title str
updated_at datetime
url str
user User

Branch

Properties
Property Type Note
label str
ref str
repo Repo
sha str
user User

Commit

Properties
Property Type Note
author dict
comments_url str
commit dict
committer dict
html_url str
is_signed_off bool
message str
node_id str
parents list of dict
sha str
url str

Commits

Properties
Property Type Note
are_signed_off bool
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

shas list of str

File

Properties
Property Type Note
additions int
blob_url str
changes int
contents_url str
deletions int
filename str
patch str
raw_url str
sha str
status str

Files

See the GitHub documentation for more information.

Properties
Property Type Note
added Files
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

filenames list of str
include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

modified Files
patches list of str
removed Files

Group

A PullApprove review group

Properties
Property Type Note
author_value int
conditions list
is_active bool
is_passing bool
labels dict
name str
request int
request_order str
required int
score int
state str
teams list
users list of str
users_approved list
users_available list
users_pending list
users_rejected list
users_requested list
users_unavailable list
users_unrequested list

Groups

Groups is a list of Group objects with a few handy shortcuts.

Properties
Property Type Note
active Groups
approved Groups
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

inactive Groups
include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

names list of str
passing Groups
pending Groups
rejected Groups

Label

Properties
Property Type Note
color str
default bool
description str
id int
name str
node_id str
url str

Labels

Properties
Property Type Note
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

names list of str

Milestone

Properties
Property Type Note
closed_at datetime
closed_issues int
created_at datetime
creator User
description str
due_on datetime
html_url str
id int
labels_url str
node_id str
number int
open_issues int
state str
title str
updated_at datetime
url str

Repo

Properties
Property Type Note
archive_url str
archived bool
assignees_url str
blobs_url str
branches_url str
clone_url str
collaborators_url str
comments_url str
commits_url str
compare_url str
contents_url str
contributors_url str
created_at datetime
default_branch str
deployments_url str
description str
disabled bool
downloads_url str
events_url str
fork bool
forks int
forks_count int
forks_url str
full_name str
git_commits_url str
git_refs_url str
git_tags_url str
git_url str
has_downloads bool
has_issues bool
has_pages bool
has_projects bool
has_wiki bool
homepage str
hooks_url str
html_url str
id int
issue_comment_url str
issue_events_url str
issues_url str
keys_url str
labels_url str
language str
languages_url str
license str
merges_url str
milestones_url str
mirror_url str
name str
node_id str
notifications_url str
open_issues int
open_issues_count int
owner User
private bool
pulls_url str
pushed_at datetime
releases_url str
size int
ssh_url str
stargazers_count int
stargazers_url str
statuses_url str
subscribers_url str
subscription_url str
svn_url str
tags_url str
teams_url str
trees_url str
updated_at datetime
url str
watchers int
watchers_count int

Status

Properties
Property Type Note
avatar_url str
context str
created_at datetime
description str
id int
node_id str
state str
target_url str
updated_at datetime
url str

Statuses

Statuses are pulled from the most recent commit on the pull request. See the GitHub documentation for more information.

Properties
Property Type Note
contexts list of str
errored Statuses
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

failed Statuses
include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

pending Statuses
succeeded Statuses
successful Statuses

Team

Properties
Property Type Note
description str
html_url str
id int
members_url str
name str
node_id str
parent str
permission str
privacy str
repositories_url str
slug str
url str

Teams

Properties
Property Type Note
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

ids list of int
include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

names list of str

User

Properties
Property Type Note
avatar_url str
events_url str
followers_url str
following_url str
gists_url str
gravatar_id str
html_url str
id int
login str
mention str
node_id str
organizations_url str
received_events_url str
repos_url str
site_admin bool
starred_url str
subscriptions_url str
type str
url str
username str

Users

Properties
Property Type Note
exclude method

Filter down the list of objects using not contains behavior. Chainable with include.

files.excludes("*.md")

files.include("src/*").exclude("*.md")

include method

Filter down the list of objects using contains behavior. Chainable with exclude.

files.include("src/*")

files.include("src/*").exclude("*.md")

mentions list of str
usernames list of str

Docs

Features

Config

Context

Resources

© 2020 Dropseed, LLC