Skip to content

Conversation

@hiroshinishio
Copy link
Collaborator

  • Create repository_features table with auto_merge settings
  • Add get_repository_features function to fetch auto-merge config
  • Add merge_pull_request function using GitHub API
  • Implement auto-merge logic in successful_check_suite_handler:
    • Check if auto-merge enabled in repository_features
    • Validate only test files changed if restriction enabled
    • Check mergeable_state for conflicts and blockers
    • Merge PR with configured method (merge/squash/rebase)
    • Comment on PR when auto-merge blocked with reason
  • Update CLAUDE.md with coding standards clarifications
  • Update all test payloads with required PR fields

🤖 Generated with Claude Code

hiroshinishio and others added 8 commits December 21, 2025 15:36
- Create repository_features table with auto_merge settings
- Add get_repository_features function to fetch auto-merge config
- Add merge_pull_request function using GitHub API
- Implement auto-merge logic in successful_check_suite_handler:
  - Check if auto-merge enabled in repository_features
  - Validate only test files changed if restriction enabled
  - Check mergeable_state for conflicts and blockers
  - Merge PR with configured method (merge/squash/rebase)
  - Comment on PR when auto-merge blocked with reason
- Update CLAUDE.md with coding standards clarifications
- Update all test payloads with required PR fields

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

Co-Authored-By: Claude <[email protected]>
…sert_check_suite

The test was failing because the deduplication logic exits early when
insert_check_suite returns False (duplicate check_suite_id). Added mock
for insert_check_suite to return True so the handler continues processing.

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

Co-Authored-By: Claude <[email protected]>
…rt_check_suite

Same fix as previous commit - mock insert_check_suite to return True
so deduplication logic doesn't exit early.

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

Co-Authored-By: Claude <[email protected]>
…rt_check_suite

Third test that needs the same fix - mock insert_check_suite to return True
so deduplication logic doesn't exit early.

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

Co-Authored-By: Claude <[email protected]>
Previously all tests used hardcoded check_suite_id=12345, causing CI
failures when insert_check_suite() rejected duplicates. Each test now
generates a unique random ID to prevent deduplication conflicts.

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

Co-Authored-By: Claude <[email protected]>
- Add unique random delivery IDs to mock_github_request fixture to prevent duplicate webhook detection
- Update test assertions to handle delivery_id in lambda_info
- Fix pyright error by using getattr() instead of direct attribute access on route.path
- Grant sequence permissions in dev database to match production

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

Co-Authored-By: Claude <[email protected]>
- Add unique delivery IDs to all mock request fixtures
- Update test assertions to check for delivery_id instead of exact lambda_info match
- Mock insert_webhook_delivery for test that patches json.loads globally
- Fix pyright error with route.path access

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

Co-Authored-By: Claude <[email protected]>
- Add unique delivery IDs to all inline mock requests that were missing them
- Update test assertions to check for delivery_id in lambda_info instead of exact matches
- Mock insert_webhook_delivery in json parsing test to prevent early exit
@hiroshinishio hiroshinishio merged commit 0926253 into main Dec 21, 2025
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch December 21, 2025 12:56
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