Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.42 KB

README.md

File metadata and controls

59 lines (44 loc) · 1.42 KB

Jira Timesheet PDF

Simple script to generate monthly timesheets based on Jira's worklog.

Example timesheet

Adapted from jordanjambazov/jira-timesheet-pdf.

Usage

First things first, you'll need an API token to fetch worklogs from Jira. Hence, browse to https://id.atlassian.com/manage-profile/security/api-tokens, create one and paste it to a .env (copied from .env.example):

AUTH_TOKEN=...

That's it... Just run it...

Build image

docker build -t jira-timesheet-pdf .

# Have a look at the help
docker run --rm jira-timesheet-pdf --help

Just run it

You'll need a bit of docker volumes kung-fu, otherwise the PDF will be lost with the container:

docker run --rm --env-file=.env -v "$(pwd):/app" -w /app -u $(id -u):$(id -g) jira-timesheet-pdf \
    --server=example.atlassian.net \
    [email protected] \
    --user='John Doe' \
    --yyyy-mm 2024-01

If you don't like docker volumes kung-fu, consider stdout kung-fu:

docker run --rm --env-file=.env jira-timesheet-pdf \
    --output=/dev/stdout \
    --server=example.atlassian.net \
    [email protected] \
    --user='John Doe' \
    --yyyy-mm 2024-01 \
    > timesheet.pdf