Modifications to the web hook bot#244
Conversation
|
🤖 Created branch: z_pr244/tpantelis/web_hook_updates |
WalkthroughAdds GH client methods to approve PRs and enable GraphQL auto-merge, initializes an HTTP client, and updates the pull request handler to detect bot-authored PRs and call approve + enable-auto-merge. Removes Konflux actor and auto-merge steps from the workflow trigger. Changes
Sequence Diagram(s)sequenceDiagram
actor GitHub
participant Handler as Pull Request Handler
participant GHClient as GH Client
participant GitHubAPI as GitHub API
GitHub->>Handler: PR opened (bot-authored)
activate Handler
Handler->>Handler: classify PR (isBotPR / isSubmarinerBotPR)
alt Bot PR detected
Handler->>GHClient: ApprovePR(prNum)
activate GHClient
GHClient->>GitHubAPI: REST POST CreateReview (APPROVE)
GitHubAPI-->>GHClient: review response
deactivate GHClient
Handler->>GHClient: EnableAutoMerge(prNum)
activate GHClient
GHClient->>GitHubAPI: REST GET PR (node_id)
GitHubAPI-->>GHClient: PR node_id
GHClient->>GitHubAPI: GraphQL POST enablePullRequestAutoMerge (REBASE)
GitHubAPI-->>GHClient: mutation response
deactivate GHClient
end
deactivate Handler
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
db51140 to
5a5c221
Compare
This commit modifies the webhook bot to automatically approve and enable auto-merge all PRs created by Depandabot, Konflux and submariner-bot. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Since the webhook bot now handles auto-merge for all bot PRs (Dependabot, Konflux, and submariner-bot), this commit removes the duplicate auto-merge functionality from the CodeRabbit trigger workflow. Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5a5c221 to
c985f54
Compare
|
🤖 Closed branches: [z_pr244/tpantelis/web_hook_updates] |
See commits for details.
Summary by CodeRabbit
New Features
Chores