Skip to content

Conversation

@ImShyMike
Copy link
Member

@ImShyMike ImShyMike commented Dec 7, 2025

also adds hackatime account linking

@ImShyMike ImShyMike linked an issue Dec 7, 2025 that may be closed by this pull request
@ImShyMike ImShyMike self-assigned this Dec 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds Hackatime project linking, unlinking, and refresh functionality to the application. It enables users to associate their Hackatime time-tracking projects with application projects and automatically fetch/calculate time spent. The PR also automatically links Hackatime accounts during user registration.

Key changes:

  • Added Hackatime account linking during user registration with automatic account lookup
  • Implemented endpoints for linking/unlinking Hackatime projects to user projects and recalculating time
  • Extended User model with Hackatime-related fields (hackatime_id, username, hackatime_last_fetched)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
models/user.py Added hackatime_id, username, and hackatime_last_fetched fields to User model; removed obsolete update_hackatime() method from UserProject
lib/hackatime.py Added early return optimization for empty project filters to avoid unnecessary API calls
api/v1/users/main.py Added hackatime fields to UserResponse; implemented /recalculate_time endpoint; added selectinload for projects relation
api/v1/projects/main.py Implemented /hackatime endpoints for linking/unlinking projects; improved error messages with consistent capitalization; added authorization checks
api/v1/auth/main.py Integrated automatic Hackatime account lookup during user registration flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ImShyMike ImShyMike requested a review from Copilot December 7, 2025 12:23
@ImShyMike ImShyMike requested review from Copilot and removed request for Copilot December 7, 2025 12:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ImShyMike and others added 2 commits December 7, 2025 14:50
Co-authored-by: Copilot <[email protected]>
@ImShyMike ImShyMike requested review from jleuth, tailhaver and thesleepyniko and removed request for jleuth and thesleepyniko December 7, 2025 14:55
@jleuth
Copy link
Collaborator

jleuth commented Dec 7, 2025

lgtm!

@ImShyMike ImShyMike merged commit 32cf476 into main Dec 7, 2025
1 check passed
@ImShyMike ImShyMike deleted the 19-have-hackatime-hour-data-actually-update branch December 7, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have hackatime hour data actually update

3 participants