Skip to content

Conversation

@hiroshinishio
Copy link
Collaborator

  • Add MAX_GITAUTO_COMMITS_PER_PR constant (50) to prevent infinite loops
  • Create get_pull_request_commits() to fetch PR commits via GitHub API
  • Check commit count in check_suite_handler before processing
  • Post conversational comment on PR when stopping after too many attempts
  • Add comprehensive tests for get_pull_request_commits()

🤖 Generated with Claude Code

hiroshinishio and others added 2 commits December 25, 2025 00:33
- Add MAX_GITAUTO_COMMITS_PER_PR constant (50) to prevent infinite loops
- Create get_pull_request_commits() to fetch PR commits via GitHub API
- Check commit count in check_suite_handler before processing
- Post conversational comment on PR when stopping after too many attempts
- Add comprehensive tests for get_pull_request_commits()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The tests were hanging because the function uses a while True loop that
fetches pages until an empty response is received. The mocks were
returning the same non-empty response indefinitely, causing an infinite
loop. Fixed by using side_effect to return commits on first call and
empty list on second call to properly break the pagination loop.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@hiroshinishio hiroshinishio merged commit b690cc1 into main Dec 24, 2025
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch December 24, 2025 16:18
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.

2 participants