Skip to content

Commit c985f54

Browse files
committed
Remove auto-merge from CodeRabbit workflow
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>
1 parent 1b9c3ea commit c985f54

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

.github/workflows/coderabbit-trigger.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
trigger-coderabbit:
1212
runs-on: ubuntu-latest
13-
if: github.actor == 'dependabot[bot]' || github.actor == 'submariner-bot' || github.actor == 'red-hat-konflux-kflux-prd-rh02[bot]'
13+
if: github.actor == 'dependabot[bot]' || github.actor == 'submariner-bot'
1414
permissions:
1515
contents: write
1616
pull-requests: write
@@ -30,31 +30,3 @@ jobs:
3030
body: triggerComment
3131
});
3232
console.log('CodeRabbit review comment posted.');
33-
34-
// Enable auto-merge
35-
const pr = await github.rest.pulls.get({
36-
owner,
37-
repo,
38-
pull_number: issue_number
39-
});
40-
41-
try {
42-
await github.graphql(`
43-
mutation($pullRequestId: ID!) {
44-
enablePullRequestAutoMerge(input: {
45-
pullRequestId: $pullRequestId,
46-
mergeMethod: REBASE
47-
}) {
48-
pullRequest {
49-
id
50-
}
51-
}
52-
}
53-
`, {
54-
pullRequestId: pr.data.node_id
55-
});
56-
console.log('Auto-merge enabled with rebase method.');
57-
} catch (error) {
58-
console.error('Failed to enable auto-merge:', error.message);
59-
throw error;
60-
}

0 commit comments

Comments
 (0)