Program for parsing out git issues from harvest time keeping notes
Find a file
2024-10-25 09:56:47 -07:00
.env.example Add example env 2023-10-03 15:22:37 -07:00
.gitignore Add pycache .env and *.csv to .gitignore 2023-10-03 15:15:28 -07:00
generate_issues.py Update function name 2024-10-25 09:55:17 -07:00
harvest_report_test.csv Clean up code 2023-10-03 15:16:45 -07:00
README.md Add warnings to readme 2024-10-25 09:56:47 -07:00
tests.py Update tests to use issues that still exist 2024-10-25 09:55:44 -07:00

README

This script extracts issue numbers from time logs, putting them in several additional columns added to the original CSV spreadsheet.

(It needs several columns, as people may have tagged multiple issues in one time period.)

If the issues are in Forgejo the script can also get the issue titles and URLs.

We do not yet do summing of time per issue, but could with a fair amount of work, probably with Pandas, splitting multiple times equally.

In the meantime this can be done with a spreadsheet:

Usage

For use with Forgejo Include your API token in .env as FORGEJO_API_TOKEN={token} - Token can be generated here if you do not have one: https://git.agaric.com/user/settings/applications

Download a spreadsheet from Harvest (or, one hopes someday, a better time tracking service).

Modify the lines starting with 'owner = ' and 'repo =' to use your target project. You may have to add your project details to the 'projects' dictionary

Run the program with:

python generate_issues.py FILE

The program outputs to 'modified_report.csv'

⚠️ Warnings! ⚠️

This only parses three issues out of the harvest comment, if you have more issues in the comment it ignores them

Until some fundamental issues are resolved regarding error handling when failing to connect to Forgejo or if a fetched issue returns 404 this whole thing will quit on you in an unhelpful and frustrating manner.