Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: issue template context for issue check and package #7190

Merged
merged 11 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/ISSUE_TEMPLATE/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Accessibility
description: Report an accessibility issue in a component
labels: ["a11y", "bug", "0 - new", "p - high", "needs triage"]
body:
- type: markdown
- type: checkboxes
id: existing-issues
attributes:
value: |
- Please [check for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one.
- For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/)
label: Check existing issues
description: If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one. For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
options:
- label: I have [checked for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates
validations:
required: true
- type: textarea
id: summary
attributes:
Expand Down Expand Up @@ -92,6 +96,16 @@ body:
- p2 - want for current milestone
- p1 - need for current milestone
- p0 - emergency
- type: checkboxes
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-components/tree/master/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-react"
validations:
required: false
- type: dropdown
id: esri-team
validations:
Expand Down
22 changes: 18 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Bug
description: Report a bug in a component
labels: ["bug", "0 - new", "needs triage"]
body:
- type: markdown
- type: checkboxes
id: existing-issues
attributes:
value: |
- Please [check for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one.
- For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
label: Check existing issues
description: If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one. For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
options:
- label: I have [checked for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates
validations:
required: true
- type: textarea
id: actual
attributes:
Expand Down Expand Up @@ -86,6 +90,16 @@ body:
description: How does the issue effect your team, or your work? Can range from minor to blocking or prohibiting workflows. Helps Calcite Design System team members with prioritization.
validations:
required: false
- type: checkboxes
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-components/tree/master/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-react"
validations:
required: false
- type: dropdown
id: esri-team
validations:
Expand Down
22 changes: 18 additions & 4 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: Enhancement
description: Request for a feature to be added to an existing component
labels: ["enhancement", "0 - new", "needs triage"]
body:
- type: markdown
- type: checkboxes
id: existing-issues
attributes:
value: |
- Please [check for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates. If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one.
- For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
label: Check existing issues
description: If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one. For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
options:
- label: I have [checked for existing issues](https://github.com/Esri/calcite-components/issues) to avoid duplicates
validations:
required: true
- type: textarea
id: description
attributes:
Expand Down Expand Up @@ -54,6 +58,16 @@ body:
- p3 - want for upcoming milestone
- p2 - want for current milestone
- p1 - need for current milestone
- type: checkboxes
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-components/tree/master/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-react"
validations:
required: false
- type: dropdown
id: esri-team
validations:
Expand Down
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ body:
description: Dependencies, blockers, helpful details, etc.
validations:
required: false
- type: checkboxes
id: packages
attributes:
label: Calcite package
description: Select the relevant [package(s)](https://github.com/Esri/calcite-components/tree/master/packages) related to the request.
options:
- label: "@esri/calcite-components"
- label: "@esri/calcite-components-react"
validations:
required: false
54 changes: 54 additions & 0 deletions .github/workflows/add-package-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Add Package Label
on:
issues:
types: [opened, edited]
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const {
repo: { owner, repo },
payload: {
action,
issue: { body, labels: currentLabels, number: issue_number },
},
} = context;

if (!body) {
console.log("could not determine the issue body");
return;
}

// NOTE: assumes all packages will be in the @esri NPM scope
const packageRegex = /(?<=\[X\]\s@esri\/)[\w-]*$/gm;
const packages = body.match(packageRegex) || [];

for (const package of packages) {
/** Creates a label if it does not exist */
try {
await github.rest.issues.getLabel({
owner,
repo,
name: package,
});
} catch (e) {
await github.rest.issues.createLabel({
owner,
repo,
name: package,
color: "BFBEAF",
description: `Issues specific to the @esri/${package} package.`,
});
}

/** add new package label */
await github.rest.issues.addLabels({
issue_number,
owner,
repo,
labels: [package],
});
}