Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Commit da3c6cd

Browse files
authored
Add disabled config to triage
2 parents 0510227 + b891504 commit da3c6cd

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

functions/src/default.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ Please help to unblock it by resolving these conflicts. Thanks!`,
6969
If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.`
7070
},
7171

72-
triage: {
72+
triage: {
73+
// set to true to disable
74+
disabled: false,
7375
// number of the milestone to apply when the issue has not been triaged yet
7476
needsTriageMilestone: 83,
7577
// number of the milestone to apply when the issue is triaged
@@ -114,6 +116,7 @@ export interface MergeConfig {
114116
}
115117

116118
export interface TriageConfig {
119+
disabled: boolean;
117120
needsTriageMilestone: number;
118121
defaultMilestone: number;
119122
l1TriageLabels: string[][];

functions/src/plugins/triage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export class TriageTask extends Task {
7171
async checkTriage(context: Context): Promise<any> {
7272
const issue: any = context.payload.issue;
7373
const config = await this.getConfig(context);
74+
if (config.disabled) {
75+
return;
76+
}
7477
const {owner, repo} = context.repo();
7578
// getting labels from Github because we might be adding multiple labels at once
7679
const labels = await getGhLabels(context.github, owner, repo, issue.number);

test/fixtures/angular-robot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ merge:
8585

8686
# options for the triage plugin
8787
triage:
88+
# set to true to disable
89+
disabled: false
8890
# number of the milestone to apply when the issue has not been triaged yet
8991
needsTriageMilestone: 83,
9092
# number of the milestone to apply when the issue is triaged

0 commit comments

Comments
 (0)