Skip to content

Commit

Permalink
Merge pull request #382 from gitautoai/issue_178_healy
Browse files Browse the repository at this point in the history
Update usage record when GitAuto asks back to users and finishes there
  • Loading branch information
hiroshinishio authored Nov 18, 2024
2 parents dd5868c + 869f206 commit 7533e33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/gitauto_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,14 @@ async def handle_gitauto(payload: GitHubLabeledPayload, trigger_type: str) -> No
messages=messages, base_args=base_args, mode="comment"
)
if is_commented:
end_time = time.time()
supabase_manager.complete_and_update_usage_record(
usage_record_id=usage_record_id,
is_completed=True, # False is only for GitAuto's failure
token_input=token_input,
token_output=token_output,
total_seconds=int(end_time - current_time),
)
return

# Create a remote branch
Expand Down

0 comments on commit 7533e33

Please sign in to comment.