feat: Enable set PRs with auto merge for branches#698
Conversation
In the config file under the desire repository set:
```
set-auto-merge-prs:
- my-branch
```
To set auto merge for ech PR under this branch
|
Report bugs in Issues The following are automatically added:
Available user actions:
Supported /retest check runs
Supported labels
|
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces a new configuration entry named Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
webhook_server_container/config/schema.yaml (1)
189-190: Enhance "conventional-title" Definition for Schema Consistency
The current definition ofconventional-titleis given using a shorthand (conventional-title: string), which differs from the explicit object notation used for other properties. For consistency with the rest of the schema, it is recommended to define it as follows:- conventional-title: string + conventional-title: + type: stringThis change ensures consistency in JSON schema styling and readability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
example.config.yaml(1 hunks)webhook_server_container/config/schema.yaml(1 hunks)webhook_server_container/libs/github_api.py(2 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
webhook_server_container/libs/github_api.py (1)
webhook_server_container/libs/config.py (1)
get_value(27-36)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: tox
- GitHub Check: python-module-install
- GitHub Check: pre-commit
- GitHub Check: build-container
🔇 Additional comments (7)
example.config.yaml (1)
112-115: New Configuration Option:set-auto-merge-prsThis new entry adds a list of branches (in this case, just
"main") for which pull requests should be auto-merged. Please verify that its placement and indentation match the intended structure of your repository configuration. If the key was meant to be nested inside an object (such as within a branch protection configuration) per your overall design, confirm that the current layout aligns with the schema.webhook_server_container/libs/github_api.py (3)
388-388: Implementation of new configuration for branch-based auto-merge looks goodAdding a new attribute to retrieve branch names for auto-merge from the configuration follows the established pattern in this codebase.
2021-2025: Flexible auto-merge decision with branch inclusion logicThe modified logic appropriately combines both branch-based and user-based criteria for determining when to enable auto-merge.
2030-2030: Improved logging message clarityThe log message has been updated to reflect that auto-merge decisions can now be based on multiple rules rather than just the parent committer.
webhook_server_container/config/schema.yaml (3)
175-180: Define New Auto-Merge Property Clearly
The new propertyset-auto-merge-prsis correctly defined as an array of strings with an appropriate description to indicate its purpose for automatically merging pull requests for specified branches. This aligns well with the PR objectives.
181-185: Verify "can-be-merged-required-labels" Schema Consistency
The schema forcan-be-merged-required-labelsis defined as an array of strings, which is consistent with the expected type. Its placement under thebranch_protectionobject appears intentional.
186-188: Confirm "jira-tracking" Property Definition
The propertyjira-trackingis correctly defined as a boolean with a default value oftrue. This is in line with the intended configuration and maintains consistency with other boolean properties in the schema.
…auto-merge-by-branch
In the config file under the desire repository set:
To set auto merge for ech PR under this branch
Summary by CodeRabbit