-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generated policy to remove needs-triage
- Loading branch information
1 parent
69d6cb7
commit fedee16
Showing
13 changed files
with
463 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,60 @@ | ||
id: issues.triage | ||
name: New Issue Assign labels | ||
description: Assign labels to new issues | ||
owner: | ||
resource: repository | ||
disabled: false | ||
where: | ||
configuration: | ||
resourceManagementConfiguration: | ||
scheduledSearches: [] | ||
eventResponderTasks: | ||
- description: Adds `needs-triage` label for new unassigned issues | ||
if: | ||
- payloadType: Issues | ||
- isAction: | ||
action: Opened | ||
- and: | ||
- not: | ||
and: | ||
- isAssignedToSomeone | ||
- not: | ||
and: | ||
- isAssignedToSomeone | ||
then: | ||
- addLabel: | ||
label: needs-triage | ||
|
||
onFailure: | ||
onSuccess: | ||
- description: Remove `needs-triage` label when an area label is added | ||
if: | ||
- payloadType: Issues | ||
- hasLabel: | ||
label: needs-triage | ||
- or: | ||
- labelAdded: | ||
label: compiler:core | ||
- labelAdded: | ||
label: compiler:emitter-framework | ||
- labelAdded: | ||
label: ide | ||
- labelAdded: | ||
label: lib:http | ||
- labelAdded: | ||
label: lib:openapi | ||
- labelAdded: | ||
label: lib:rest | ||
- labelAdded: | ||
label: lib:versioning | ||
- labelAdded: | ||
label: meta:blog | ||
- labelAdded: | ||
label: meta:website | ||
- labelAdded: | ||
label: tspd | ||
- labelAdded: | ||
label: emitter:client:csharp | ||
- labelAdded: | ||
label: emitter:json-schema | ||
- labelAdded: | ||
label: emitter:protobuf | ||
- labelAdded: | ||
label: emitter:service:csharp | ||
- labelAdded: | ||
label: emitter:service:js | ||
- labelAdded: | ||
label: eng | ||
then: | ||
- removeLabel: | ||
label: needs-triage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { type AreaLabels } from "./labels.js"; | ||
|
||
/** | ||
* Set the paths that each area applies to. | ||
*/ | ||
export const AreaPaths: Record<keyof typeof AreaLabels, string[]> = { | ||
"compiler:core": ["packages/compiler"], | ||
"compiler:emitter-framework": [], | ||
ide: ["packages/typespec-vscode", "packages/typespec-vs"], | ||
"lib:http": ["packages/http"], | ||
"lib:openapi": ["packages/openapi"], | ||
"lib:rest": ["packages/rest"], | ||
"lib:versioning": ["packages/versioning"], | ||
"meta:blog": ["blog"], | ||
"meta:website": ["website"], | ||
tspd: ["packages/tspd"], | ||
"emitter:client:csharp": ["packages/http-client-csharp"], | ||
"emitter:json-schema": ["packages/json-schema"], | ||
"emitter:protobuf": ["packages/protobuf"], | ||
"emitter:service:csharp": [], | ||
"emitter:service:js": [], | ||
eng: ["eng", ".github"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
// cspell:ignore bfff | ||
|
||
/** | ||
* Labels that are used to categorize issue for which area they belong to. | ||
*/ | ||
export const AreaLabels = defineLabels({ | ||
"compiler:core": { | ||
color: "453261", | ||
description: "Issues for @typespec/compiler", | ||
}, | ||
"compiler:emitter-framework": { | ||
color: "453261", | ||
description: "Issues for the emitter framework", | ||
}, | ||
ide: { | ||
color: "846da1", | ||
description: "Issues for VS, VSCode, Monaco, etc.", | ||
}, | ||
"lib:http": { | ||
color: "c7aee6", | ||
description: "", | ||
}, | ||
"lib:openapi": { | ||
color: "c7aee6", | ||
description: "", | ||
}, | ||
"lib:rest": { | ||
color: "c7aee6", | ||
description: "", | ||
}, | ||
"lib:versioning": { | ||
color: "c7aee6", | ||
description: "", | ||
}, | ||
"meta:blog": { | ||
color: "007dc8", | ||
description: "Blog updates", | ||
}, | ||
"meta:website": { | ||
color: "007dc8", | ||
description: "TypeSpec.io updates", | ||
}, | ||
tspd: { | ||
color: "004185", | ||
description: "Issues for the tspd tool", | ||
}, | ||
"emitter:client:csharp": { | ||
color: "e1b300", | ||
description: "", | ||
}, | ||
"emitter:json-schema": { | ||
color: "957300", | ||
description: "", | ||
}, | ||
"emitter:protobuf": { | ||
color: "957300", | ||
description: "The protobuf emitter", | ||
}, | ||
"emitter:service:csharp": { | ||
color: "967200", | ||
description: "", | ||
}, | ||
"emitter:service:js": { | ||
color: "967200", | ||
description: "", | ||
}, | ||
eng: { | ||
color: "65bfff", | ||
description: "", | ||
}, | ||
}); | ||
|
||
export default { | ||
issue_kinds: { | ||
description: "Issue kinds", | ||
labels: { | ||
bug: { | ||
color: "d93f0b", | ||
description: "Something isn't working", | ||
}, | ||
feature: { | ||
color: "cccccc", | ||
description: "New feature or request", | ||
}, | ||
docs: { | ||
color: "cccccc", | ||
description: "Improvements or additions to documentation", | ||
}, | ||
epic: { | ||
color: "cccccc", | ||
description: "", | ||
}, | ||
}, | ||
}, | ||
area: { | ||
description: "Area of the codebase", | ||
labels: AreaLabels, | ||
}, | ||
"breaking-change": { | ||
description: | ||
"Labels around annotating issues and PR if they contain breaking change or deprecation", | ||
labels: { | ||
"breaking-change": { | ||
color: "B60205", | ||
description: "A change that might cause specs or code to break", | ||
}, | ||
deprecation: { | ||
color: "760205", | ||
description: | ||
"A previously supported feature will now report a warning and eventually be removed", | ||
}, | ||
}, | ||
}, | ||
"design-issues": { | ||
description: "Design issue management", | ||
labels: { | ||
"design:accepted": { | ||
color: "1a4421", | ||
description: "Proposal for design has been discussed and accepted.", | ||
}, | ||
"design:needed": { | ||
color: "96c499", | ||
description: "A design request has been raised that needs a proposal", | ||
}, | ||
"design:proposed": { | ||
color: "56815a", | ||
description: "Proposal has been added and ready for discussion", | ||
}, | ||
}, | ||
}, | ||
process: { | ||
description: "Process labels", | ||
labels: { | ||
"needs-triage": { | ||
color: "ffffff", | ||
description: "", | ||
}, | ||
"needs-info": { | ||
color: "ffffff", | ||
description: | ||
"Mark an issue that needs reply from the author or it will be closed automatically", | ||
}, | ||
"triaged:core": { | ||
color: "5319e7", | ||
description: "", | ||
}, | ||
}, | ||
}, | ||
misc: { | ||
description: "Misc labels", | ||
labels: { | ||
"Client Emitter Migration": { | ||
color: "FD92F0", | ||
description: "", | ||
}, | ||
"good first issue": { | ||
color: "7057ff", | ||
description: "Good for newcomers", | ||
}, | ||
}, | ||
}, | ||
} as const; | ||
|
||
function defineLabels<const T extends string>( | ||
labels: Record<T, { color: string; description: string }> | ||
) { | ||
return labels; | ||
} |
Oops, something went wrong.