Temposaurus computes the running total of overtime from the data pulled from Tempo, the embedded time tracking tool for Jira.
Temposaurus uses two REST APIs:
Thus before starting Temposaurus you'll need to set up the access tokens for those APIs.
Authentication with Jira Cloud API requires setting up basic auth access to your Atlassian account.
Authentication with Tempo API requires setting up a bearer access token to your Tempo data. The required scopes are Periods
and Approvals
. See Using the REST API as an individual user.
Checkout the repo and go build
.
Temposaurus is a CLI application which is controlled via environment variables.
Temposaurus recognises the following environmental variables.
Mandatory | |
---|---|
JIRA_EMAIL |
Email address you use to login to Tempo |
ATLASSIAN_TOKEN |
Jira Cloud API access token |
TEMPO_TOKEN |
Tempo API access token |
DATE_FROM |
Start date |
Optional | |
---|---|
JIRA_DOMAIN |
Your company's subdomain at .atlassian.com . Defaults to the first subdomain of your email address. That is the email address ofrolovs@verifa.io defaults to verifa . |
DATE_TO |
Finish date. The default value is the current date. |
HTTP_TIMEOUT |
REST API client timeout in seconds. The default value is 30 seconds. |
The dates do not have to fall on the accounting period boundary as the correct boundaries will be computed, inclusive of both FROM
and TO
dates. The date format is yyyy-mm-dd
, such as 2020-10-27
.
This is how I query the data for every week since my first week at work:
JIRA_EMAIL=ofrolovs@verifa.io \
TEMPO_TOKEN=$(cat ~/.tempo_secret) \
ATLASSIAN_TOKEN=$(cat ~/.atlassian_secret) \
DATE_FROM=2020-10-01 \
DATE_TO=2021-04-25 \
./temposaurus
Beware that your current (unapproved) timesheet may skew the result greatly, so choose the DATE_TO
value wisely.
The Docker image is available from the Docker Hub: olliefr/temposaurus.
This is how I use it:
docker pull olliefr/temposaurus
sudo docker container run --rm -it -e JIRA_EMAIL=ofrolovs@verifa.io -e ATLASSIAN_TOKEN=$(cat ~/.tokens/atlassian) -e TEMPO_TOKEN=$(cat ~/.tokens/tempo) -e DATE_FROM=2021-04-12 olliefr/temposaurus
- GitHub Releases
- Docker image built via goreleaser or Docker Hub Actions
To avoid frustration the following are the rules of engagement for Temposaurus.
Issues | Please read the It doesn't work essay before submitting an issue. |
PRs | Please raise an issue to discuss first. |
Forks | Yes, please, as much as you'd like. |