From 546f65c6db38615d780a2b3fb0cf063e41122022 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Thu, 16 May 2024 17:11:12 -0700 Subject: [PATCH] Add missing openapi3 label and fix policies (#3380) --- .github/policies/issues.triage.generated.yml | 8 ++++- .github/policies/prs.triage.generated.yml | 35 ++++++++++-------- CONTRIBUTING.md | 37 ++++++++++---------- eng/common/config/areas.ts | 27 +++++++------- eng/common/config/labels.ts | 4 +++ eng/common/scripts/labels/automation.ts | 2 +- 6 files changed, 66 insertions(+), 47 deletions(-) diff --git a/.github/policies/issues.triage.generated.yml b/.github/policies/issues.triage.generated.yml index 4e8d35914..bbeedff54 100644 --- a/.github/policies/issues.triage.generated.yml +++ b/.github/policies/issues.triage.generated.yml @@ -51,6 +51,8 @@ configuration: label: emitter:json-schema - labelAdded: label: emitter:protobuf + - labelAdded: + label: emitter:openapi3 - labelAdded: label: emitter:service:csharp - labelAdded: @@ -94,6 +96,8 @@ configuration: label: emitter:json-schema - labelRemoved: label: emitter:protobuf + - labelRemoved: + label: emitter:openapi3 - labelRemoved: label: emitter:service:csharp - labelRemoved: @@ -128,6 +132,8 @@ configuration: label: emitter:json-schema - hasLabel: label: emitter:protobuf + - hasLabel: + label: emitter:openapi3 - hasLabel: label: emitter:service:csharp - hasLabel: @@ -135,5 +141,5 @@ configuration: - hasLabel: label: eng then: - - removeLabel: + - addLabel: label: needs-area diff --git a/.github/policies/prs.triage.generated.yml b/.github/policies/prs.triage.generated.yml index bb218f0fe..7917c0926 100644 --- a/.github/policies/prs.triage.generated.yml +++ b/.github/policies/prs.triage.generated.yml @@ -15,7 +15,7 @@ configuration: - if: - includesModifiedFiles: files: - - packages/compiler + - packages/compiler/ then: - addLabel: label: compiler:core @@ -29,80 +29,87 @@ configuration: - includesModifiedFiles: files: - packages/typespec-vscode - - packages/typespec-vs + - packages/typespec-vs/ then: - addLabel: label: ide - if: - includesModifiedFiles: files: - - packages/http + - packages/http/ then: - addLabel: label: lib:http - if: - includesModifiedFiles: files: - - packages/openapi + - packages/openapi/ then: - addLabel: label: lib:openapi - if: - includesModifiedFiles: files: - - packages/rest + - packages/rest/ then: - addLabel: label: lib:rest - if: - includesModifiedFiles: files: - - packages/versioning + - packages/versioning/ then: - addLabel: label: lib:versioning - if: - includesModifiedFiles: files: - - blog + - blog/ then: - addLabel: label: meta:blog - if: - includesModifiedFiles: files: - - website + - website/ then: - addLabel: label: meta:website - if: - includesModifiedFiles: files: - - packages/tspd + - packages/tspd/ then: - addLabel: label: tspd - if: - includesModifiedFiles: files: - - packages/http-client-csharp + - packages/http-client-csharp/ then: - addLabel: label: emitter:client:csharp - if: - includesModifiedFiles: files: - - packages/json-schema + - packages/json-schema/ then: - addLabel: label: emitter:json-schema - if: - includesModifiedFiles: files: - - packages/protobuf + - packages/protobuf/ then: - addLabel: label: emitter:protobuf + - if: + - includesModifiedFiles: + files: + - packages/openapi3/ + then: + - addLabel: + label: emitter:openapi3 - if: - includesModifiedFiles: files: [] @@ -118,8 +125,8 @@ configuration: - if: - includesModifiedFiles: files: - - eng - - .github + - eng/ + - .github/ then: - addLabel: label: eng diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0326ae617..9282c1ca6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -312,24 +312,25 @@ Issue kinds Area of the codebase -| Name | Color | Description | -| ---------------------------- | ------- | ----------------------------------- | -| `compiler:core` | #453261 | Issues for @typespec/compiler | -| `compiler:emitter-framework` | #453261 | Issues for the emitter framework | -| `ide` | #846da1 | Issues for VS, VSCode, Monaco, etc. | -| `lib:http` | #c7aee6 | | -| `lib:openapi` | #c7aee6 | | -| `lib:rest` | #c7aee6 | | -| `lib:versioning` | #c7aee6 | | -| `meta:blog` | #007dc8 | Blog updates | -| `meta:website` | #007dc8 | TypeSpec.io updates | -| `tspd` | #004185 | Issues for the tspd tool | -| `emitter:client:csharp` | #e1b300 | | -| `emitter:json-schema` | #957300 | | -| `emitter:protobuf` | #957300 | The protobuf emitter | -| `emitter:service:csharp` | #967200 | | -| `emitter:service:js` | #967200 | | -| `eng` | #65bfff | | +| Name | Color | Description | +| ---------------------------- | ------- | ------------------------------------- | +| `compiler:core` | #453261 | Issues for @typespec/compiler | +| `compiler:emitter-framework` | #453261 | Issues for the emitter framework | +| `ide` | #846da1 | Issues for VS, VSCode, Monaco, etc. | +| `lib:http` | #c7aee6 | | +| `lib:openapi` | #c7aee6 | | +| `lib:rest` | #c7aee6 | | +| `lib:versioning` | #c7aee6 | | +| `meta:blog` | #007dc8 | Blog updates | +| `meta:website` | #007dc8 | TypeSpec.io updates | +| `tspd` | #004185 | Issues for the tspd tool | +| `emitter:client:csharp` | #e1b300 | | +| `emitter:json-schema` | #957300 | | +| `emitter:protobuf` | #957300 | The protobuf emitter | +| `emitter:openapi3` | #957300 | Issues for @typespec/openapi3 emitter | +| `emitter:service:csharp` | #967200 | | +| `emitter:service:js` | #967200 | | +| `eng` | #65bfff | | #### breaking-change diff --git a/eng/common/config/areas.ts b/eng/common/config/areas.ts index 2f43526b4..4cde7cf17 100644 --- a/eng/common/config/areas.ts +++ b/eng/common/config/areas.ts @@ -4,20 +4,21 @@ import { type AreaLabels } from "./labels.js"; * Set the paths that each area applies to. */ export const AreaPaths: Record = { - "compiler:core": ["packages/compiler"], + "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"], + 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:openapi3": ["packages/openapi3/"], "emitter:service:csharp": [], "emitter:service:js": [], - eng: ["eng", ".github"], + eng: ["eng/", ".github/"], }; diff --git a/eng/common/config/labels.ts b/eng/common/config/labels.ts index 60ffa3b2e..ec498beba 100644 --- a/eng/common/config/labels.ts +++ b/eng/common/config/labels.ts @@ -56,6 +56,10 @@ export const AreaLabels = defineLabels({ color: "957300", description: "The protobuf emitter", }, + "emitter:openapi3": { + color: "957300", + description: "Issues for @typespec/openapi3 emitter", + }, "emitter:service:csharp": { color: "967200", description: "", diff --git a/eng/common/scripts/labels/automation.ts b/eng/common/scripts/labels/automation.ts index 131506318..0b3add32a 100644 --- a/eng/common/scripts/labels/automation.ts +++ b/eng/common/scripts/labels/automation.ts @@ -80,7 +80,7 @@ const issueTriageConfig: PolicyServiceConfig = { ], then: [ { - removeLabel: { + addLabel: { label: "needs-area", }, },