Skip to content

Conversation

@hiroshinishio
Copy link
Collaborator

The auto-merge feature was incorrectly merging ALL PRs (including human-created ones) when tests passed. This was a critical bug that could auto-merge human PRs without approval.

Changes:

  • Add check to verify PR author is GitAuto before auto-merging
  • Use GITHUB_APP_USER_NAME constant from config instead of hardcoding
  • Add test to verify human PRs are skipped for auto-merge
  • Update all auto-merge tests to mock GITHUB_APP_USER_NAME
  • Update test payloads to include required user field

The auto-merge feature was incorrectly merging ALL PRs (including
human-created ones) when tests passed. This was a critical bug that
could auto-merge human PRs without approval.

Changes:
- Add check to verify PR author is GitAuto before auto-merging
- Use GITHUB_APP_USER_NAME constant from config instead of hardcoding
- Add test to verify human PRs are skipped for auto-merge
- Update all auto-merge tests to mock GITHUB_APP_USER_NAME
- Update test payloads to include required user field
@hiroshinishio hiroshinishio merged commit 33f07c1 into main Dec 25, 2025
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch December 25, 2025 05:55
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