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

ci: update user-defined priority #6609

Merged
merged 2 commits into from
Mar 17, 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
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ body:
description: Please provide the last working version if the issue is a regression.
validations:
required: false
- type: dropdown
id: priority-impact
validations:
required: true
attributes:
label: Priority impact
multiple: false
description: What is the impact to you, your team, or organization? Use discretion and only select "need" or "emergency" priorities for high user impact and quality issues. For instance, would someone notice, in a bad way, if this issue were present in the release?
options:
- p4 - not time sensitive
- p3 - want for upcoming milestone
- p2 - want for current milestone
- p1 - need for current milestone
- p0 - emergency
- type: dropdown
id: esri-team
validations:
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ body:
multiple: false
description: What is the impact to you, your team, or organization? Use discretion and only select "need" or "emergency" priorities for high user impact and quality issues. For instance, would someone notice, in a bad way, if this issue were present in the release?
options:
- p3 - not time sensitive
- p4 - not time sensitive
- p3 - want for upcoming milestone
- p2 - want for current milestone
- p1 - need for current milestone
- p0 - emergency
Expand Down
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ body:
description: Code snippet, link to a similar product, etc.
validations:
required: false
- type: dropdown
id: priority-impact
validations:
required: true
attributes:
label: Priority impact
multiple: false
description: What is the impact of the enhancement to you, your team, or organization? Use discretion and only select the "need" priority for high user impact and quality issues in the component(s).
options:
- p4 - not time sensitive
- p3 - want for upcoming milestone
- p2 - want for current milestone
- p1 - need for current milestone
- type: dropdown
id: esri-team
validations:
Expand Down
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/new-component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ body:
description: Code snippet, link to a similar product, suggestions, etc.
validations:
required: false
- type: dropdown
id: priority-impact
validations:
required: true
attributes:
label: Priority impact
multiple: false
description: How important is the new component request to you, your team, or organization? Use discretion and only select the "need" priority for high user impact.
options:
- p4 - not time sensitive
- p3 - want for upcoming milestone
- p2 - want for current milestone
- p1 - need for current milestone
- type: dropdown
id: esri-team
validations:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Add Bug Priority Label
name: Add Priority Label
on:
issues:
types: [opened, edited]
Expand All @@ -22,7 +22,7 @@ jobs:
return;
}

const bugPriorityRegex = new RegExp(
const addPriorityRegex = new RegExp(
action === "edited"
? // the way GitHub parses the issue body into plaintext
// requires this exact format for edits
Expand All @@ -32,35 +32,35 @@ jobs:
"m"
);

const bugPriorityRegexMatch = body.match(bugPriorityRegex);
const addPriorityRegexMatch = body.match(addPriorityRegex);

const bugPriority = (
bugPriorityRegexMatch && bugPriorityRegexMatch[0] ? bugPriorityRegexMatch[0] : ""
const addPriorityLabel = (
addPriorityRegexMatch && addPriorityRegexMatch[0] ? addPriorityRegexMatch[0] : ""
).trim();

if (bugPriority && bugPriority !== "N/A") {
if (addPriorityLabel && addPriorityLabel !== "N/A") {
/** Creates a label if it does not exist */
try {
await github.rest.issues.getLabel({
owner,
repo,
name: bugPriority,
name: addPriorityLabel,
});
} catch (error) {
await github.rest.issues.createLabel({
owner,
repo,
name: bugPriority,
name: addPriorityLabel,
color: "bb7fe0",
description: `User set priority status of ${bugPriority}`,
description: `User set priority status of ${addPriorityLabel}`,
});
}

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