.______ __ ___ __ __ .______
| _ \ | |/ / | | | | | _ \
| |_) | | ' / | | | | | |_) |__ _ ___ _ __
| ___/ | < | | | | | ___// _' |/ _ \ '_ \
| | | . \ | '--' | | | | (_| | __/ | | |
| _| |__|\__\ \______/ | _| \__, |\___|_| |_|
|___/
Simple and easy-to-use tool to generate PKUP (Podwyższone Koszty Uzyskania Przychodu - Polish law thing) report (.docx) and artifacts (.diff).
The pkup-gen collects all users' commits pushed between the 18th (23:59:59) of the actual month and the 19th (00:00:00) of the past one. To qualify a commit, the user should be an author or co-author of it.
Visit the releases page to download one of the pre-built binaries for your platform.
-
Install the
pkup-genusing the Homebrew:brew install pPrecel/tap/pkup-gen
or
brew tap pPrecel/tap brew install pkup-gen
Example usage:
For more go to the examples dir.
By default, the pkup-gen generates the report.txt files with all the info needed to fill a true report.
The .docx report template can be specified using the --template flag. The pkup-gen will replace any repeat of the following keywords with the true data:
pkupGenPeriodFrom- date of the first day for the actual periodpkupGenPeriodTill- date of the last day for the actual periodpkupGenApprovalDate- date of the last day of the period plus one daypkupGenResults- list of all PullRequests if format <PR_TITLE>( DIFF_FILE_NAME )
The pkup-gen allows adding a new formula to replace the output .docx file. It can be achieved by adding a flag --report-field like in the following example:
--report-field "pkupGenEmployeesName=John Wick"The pkup-gen needs credentials to connect with the GitHub API. There are two possible ways to pass such credentials:
-
By default, the
pkup-genwill reach the pkup-gen app using the GitHub device API. The generated token will be saved on the local machine so next time, until the token expires, the user will be logged in. This flow is not working with the--enterprise-urlflag. -
The
--tokenflag allows to pass a PAT. For public projects, the generated token does not need to have any permissions.
The pkup-gen application supports more complex use cases to generate a report based on several different GitHub instances ( for example opensource and enterprise ) and for many usernames. The app allows one to compose many reports for the same orgs/repos for many people and send emails to them with zipped reports.
For more read this article.
