Skip to content

Commit

Permalink
fix pulls filter
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Feb 9, 2024
1 parent 2483504 commit 9f32602
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/plugins/ForwardMerger/forward_merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class ForwardMerger extends OpsBotPlugin {
const { data: pr } = await this.context.octokit.pulls.create({
owner: this.repo.owner.login,
repo: this.repo.name,
title: "Forward-merge " + this.currentBranch + " into " + nextBranch,
title: `Forward-merge ${this.currentBranch} into ${nextBranch} [skip ci]`,
head: this.currentBranch,
base: nextBranch,
maintainer_can_modify: false,
Expand All @@ -70,7 +70,7 @@ export class ForwardMerger extends OpsBotPlugin {
} catch (error) {
await this.issueComment(
pr.number,
"**FAILURE** - Unable to forward-merge due to an error, **manual** merge is necessary. Do not use the `Resolve conflicts` option in this PR, follow these instructions https://docs.rapids.ai/maintainers/forward-merger/ \n **IMPORTANT**: When merging this PR, do not use the [auto-merger](https://docs.rapids.ai/resources/auto-merger/) (i.e. the `/merge` comment). Instead, an admin must manually merge by changing the merging strategy to `Create a Merge Commit`. Otherwise, history will be lost and the branches become incompatible."
"**FAILURE** - Unable to forward-merge due to an error, **manual** merge is necessary. Do not use the `Resolve conflicts` option in this PR, follow these instructions https://docs.rapids.ai/maintainers/forward-merger/ \n\n**IMPORTANT**: When merging this PR, do not use the [auto-merger](https://docs.rapids.ai/resources/auto-merger/) (i.e. the `/merge` comment). Instead, an admin must manually merge by changing the merging strategy to `Create a Merge Commit`. Otherwise, history will be lost and the branches become incompatible."
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/ReleaseDrafter/release_drafter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class ReleaseDrafter extends OpsBotPlugin {
return prs
.filter(
(pr) =>
!pr.title.toLowerCase().startsWith("[gpuci] forward-merge branch-")
!pr.user?.login.toLowerCase().startsWith("rapids-bot")
)
.filter((pr) => pr.merged_at); // merged_at === null for PRs that were closed, but not merged
}
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/responses/list_pulls.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@
},
{
"number": 9134,
"title": "[gpuCI] Forward-merge branch-0.17 to branch-0.18 [skip ci]",
"title": "Forward-merge branch-0.17 to branch-0.18 [skip ci]",
"user": {
"login": "octokit"
"login": "rapids-bot"
},
"labels": [{ "name": "doc" }],
"merged_at": "2021-01-27T13:38:56Z"
Expand Down
2 changes: 1 addition & 1 deletion test/forward_merger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe("Forward Merger", () => {

expect(mockIssueComment).toBeCalledWith(
pr.data.number,
"**FAILURE** - Unable to forward-merge due to an error, **manual** merge is necessary. Do not use the `Resolve conflicts` option in this PR, follow these instructions https://docs.rapids.ai/maintainers/forward-merger/ \n **IMPORTANT**: When merging this PR, do not use the [auto-merger](https://docs.rapids.ai/resources/auto-merger/) (i.e. the `/merge` comment). Instead, an admin must manually merge by changing the merging strategy to `Create a Merge Commit`. Otherwise, history will be lost and the branches become incompatible."
"**FAILURE** - Unable to forward-merge due to an error, **manual** merge is necessary. Do not use the `Resolve conflicts` option in this PR, follow these instructions https://docs.rapids.ai/maintainers/forward-merger/ \n\n**IMPORTANT**: When merging this PR, do not use the [auto-merger](https://docs.rapids.ai/resources/auto-merger/) (i.e. the `/merge` comment). Instead, an admin must manually merge by changing the merging strategy to `Create a Merge Commit`. Otherwise, history will be lost and the branches become incompatible."
);
});

Expand Down

0 comments on commit 9f32602

Please sign in to comment.