{"id":22357037,"url":"https://github.com/gordonmurray/teamwork_log_time_on_commits","last_synced_at":"2026-05-02T13:34:46.656Z","repository":{"id":210452130,"uuid":"725335866","full_name":"gordonmurray/teamwork_log_time_on_commits","owner":"gordonmurray","description":"A Python script to import my Github projects to Teamwork and log time for each commit","archived":false,"fork":false,"pushed_at":"2023-12-02T20:35:41.000Z","size":313,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T10:35:12.360Z","etag":null,"topics":["github","python","teamwork"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gordonmurray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-29T23:37:22.000Z","updated_at":"2023-12-02T20:31:54.000Z","dependencies_parsed_at":"2023-12-02T21:38:06.556Z","dependency_job_id":null,"html_url":"https://github.com/gordonmurray/teamwork_log_time_on_commits","commit_stats":null,"previous_names":["gordonmurray/teamwork_log_time_on_commits"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gordonmurray/teamwork_log_time_on_commits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonmurray%2Fteamwork_log_time_on_commits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonmurray%2Fteamwork_log_time_on_commits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonmurray%2Fteamwork_log_time_on_commits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonmurray%2Fteamwork_log_time_on_commits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gordonmurray","download_url":"https://codeload.github.com/gordonmurray/teamwork_log_time_on_commits/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gordonmurray%2Fteamwork_log_time_on_commits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32536579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","python","teamwork"],"created_at":"2024-12-04T14:12:57.030Z","updated_at":"2026-05-02T13:34:46.626Z","avatar_url":"https://github.com/gordonmurray.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log time on Commits in Teamwork\n\nA Python script to import your Github projects in to Teamwork as Task Lists and then log time for each of the commits in the project. This allows you to see how long you spent on open source projects.\n\n![Some logged time in Teamwork](https://raw.githubusercontent.com/gordonmurray/teamwork_log_time_on_commits/main/images/logged_time.png)\n\n![GitHub Projects in Teamwork](https://raw.githubusercontent.com/gordonmurray/teamwork_log_time_on_commits/main/images/screenshot.png)\n\n\nSet up\n\nFirst create a config file with your Githib and Teamwork defaults:\n\n```python\n# config.py\n\nteamwork_url = \"https://xxxxx.teamwork.com\"\nteamwork_api_key = \"twp_xxxxxx\"\ngithub_username = \"gordonmurray\"\ngithub_personal_access_token = \"ghp_xxxxxx\"\nteamwork_user_id = xxxxxx\nteamwork_project_id = \"xxxxxx\"\ndefault_minutes = 15\napi_rate_limit_sleep = 3\n```\n\nThen install Python requirements and run the file:\n\n\n```bash\nsudo apt install python3.11-venv -y\n\npython3 -m venv commits\n\nsource commits/bin/activate\n\npip install -r requirements.txt\n\npython3 commits.py\n```\n\n\nThis uses the following Teamwork API calls:\n\nCreate a Task list in a project\n\n```bash\ncurl -X POST 'https://[YOUR_ACCOUNT].teamwork.com/projects/10000/tasklists.json' \\\n-H 'Authorization: Basic YOUR_TOKEN' \\\n-H 'Content-Type: application/json' \\\n-d '{\"todo-list\":{\"name\":\"A task list\",\"description\":\"Boo!\"}}'\n```\n\nCreate a task in a list:\n\n\n```bash\ncurl -X POST 'https://[YOUR_ACCOUNT].teamwork.com/tasklists/10000/tasks.json' \\\n-H 'Authorization: Basic YOUR_TOKEN' \\\n-H 'Content-Type: application/json' \\\n-d '{\"todo-item\":{\"content\":\"A new task \",\"tasklistId\":10000,\"description\":\"\"}}'\n```\n\nLog time on a task:\n\n```bash\ncurl -X POST 'https://[YOUR_ACCOUNT].teamwork.com/projects/api/v3/tasks/10000/time.json' \\\n-H 'Authorization: Basic YOUR_TOKEN' \\\n-H 'Content-Type: application/json' \\\n-d '{\"timelog\":{\"hours\":0,\"minutes\":30,\"date\":\"2023-11-29\",\"time\":\"20:40:00\",\"description\":\"Some Description\",\"isBillable\":false,\"taskId\":10000,\"userId\":10000}}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordonmurray%2Fteamwork_log_time_on_commits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgordonmurray%2Fteamwork_log_time_on_commits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgordonmurray%2Fteamwork_log_time_on_commits/lists"}