Simple script to generate monthly timesheets based on Jira's worklog.
Adapted from jordanjambazov/jira-timesheet-pdf.
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...
docker build -t jira-timesheet-pdf .
# Have a look at the help
docker run --rm jira-timesheet-pdf --help
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