Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sweep: Handle this sentry error: 409 {"message": "Git Repository is empty.", "documentation_url": "https://docs.github.com/rest/commits/commits#list-commits"} #3903

Closed

Conversation

sweep-nightly[bot]
Copy link
Contributor

@sweep-nightly sweep-nightly bot commented May 27, 2024

Description

This pull request updates the create_pr.py script to enhance the way repository activity is determined by using the date of the latest commit rather than the total commit count. This change aims to provide a more accurate measure of recent activity in repositories.

Summary

  • File Modified: sweepai/handlers/create_pr.py
  • Adjusted the method of fetching recent commits to use the date of the latest commit instead of the total count of commits. This change is intended to handle errors related to empty repositories more gracefully.
  • Removed unnecessary whitespace.
  • Added a line to store the date of the latest commit in repo_activity dictionary, ensuring that the most recent activity date is accurately recorded and utilized.

Fixes #3902.


💡 To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

This is an automated message generated by Sweep AI.

@sweep-nightly sweep-nightly bot added the sweep Assigns Sweep to an issue or pull request. label May 27, 2024
Copy link

vercel bot commented May 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sweep-chat 🔄 Building (Inspect) Visit Preview 💬 Add feedback May 27, 2024 5:56pm
sweep-chat-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2024 5:56pm
sweep-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2024 5:56pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
2 participants