jirar is a modern R client for the Jira REST
API. It
brings the project-management data in Jira into R as tidy tibbles, so you can
analyse issues, projects and more with the tidyverse, data.table, or base R.
It is a ground-up, httr2-based reimagining of the ideas in
JirAgileR, updated for today's Jira:
/search endpoint; jirar uses the current
/search/jql endpoint with token pagination, while Server / Data Center keep
classic startAt pagination.status_name, assignee_displayname, components_name), datetimes are
parsed to POSIXct, and Atlassian Document Format bodies are converted to
plain text.httr2 with automatic retries, informative
cli errors, and API-token / Personal-Access-Token authentication.You can install the development version of jirar with:
# install.packages("pak")
pak::pak("jirar")
jirar reads three environment variables by default — set them in your
.Renviron (edit with usethis::edit_r_environ()):
JIRA_URL=https://your-domain.atlassian.net
JIRA_USER=you@example.com
JIRA_TOKEN=your-api-token
JIRA_USER and an API token as
JIRA_TOKEN. Create one at
https://id.atlassian.com/manage-profile/security/api-tokens.JIRA_TOKEN and leave JIRA_USER empty (bearer auth), or set both for basic
authentication.library(jirar)
# Connect once; this verifies your credentials and becomes the session default.
jira_connect()
# List the projects you can see
jira_projects()
# Query issues with JQL
jira_issues(
jql = "project = ABC AND statusCategory != Done ORDER BY updated DESC",
fields = c("summary", "status", "assignee", "updated")
)
# How many issues match a query?
jira_count_issues("project = ABC AND created >= -7d")
You can also pass connection details directly, or keep several connections and
pass them explicitly via the connection argument:
conn <- jira_connection(
url = "https://example.atlassian.net",
user = "me@example.com",
token = Sys.getenv("MY_TOKEN")
)
jira_issues("project = ABC", connection = conn)
jirar is inspired by Matthias Brenninkmeijer's
JirAgileR, reimplemented on a modern
stack (httr2, cli, tibble, rlang) with Cloud and Data Center support.