Skip to content

chore(maintenance): update labels in automation #2419

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

Merged
merged 1 commit into from
Apr 23, 2024
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Bug report
description: Report a reproducible bug to help us improve
title: "Bug: TITLE"
labels: ["type/bug", "triage"]
labels: ["bug", "triage"]
projects: ["aws-powertools/7"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation_improvements.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Documentation improvements
description: Suggest a documentation update to improve everyone's experience
title: "Docs: TITLE"
labels: ["area/documentation", "triage"]
labels: ["documentation", "triage"]
projects: ["aws-powertools/7"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature request
description: Suggest an idea for Lambda Powertools
title: "Feature request: TITLE"
labels: ["type/feature-request", "triage"]
labels: ["feature-request", "triage"]
projects: ["aws-powertools/7"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Maintenance
description: Suggest an activity to help address tech debt, governance, and anything internal
title: "Maintenance: TITLE"
labels: ["type/internal", "triage"]
labels: ["internal", "triage"]
projects: ["aws-powertools/7"]
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rfc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Request for Comments (RFC)
description: Feature design and detailed proposals
title: "RFC: TITLE"
labels: ["type/RFC", "triage"]
labels: ["RFC", "triage"]
projects: ["aws-powertools/7"]
body:
- type: markdown
Expand Down
53 changes: 26 additions & 27 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,78 @@
##### Labeler ##########################################################################################################
labelPRBasedOnFilePath:
area/logger:
logger:
- packages/logger/src/*
- packages/logger/src/**/*
area/tracer:
tracer:
- packages/tracer/src/*
- packages/tracer/src/**/*
area/metrics:
metrics:
- packages/metrics/src/*
- packages/metrics/src/**/*
area/idempotency:
idempotency:
- packages/idempotency/src/*
- packages/idempotency/src/**/*
area/parameters:
parameters:
- packages/parameters/src/*
- packages/parameters/src/**/*
area/parser:
parser:
- packages/parser/src/*
- packages/parser/src/**/*
area/validator:
validator:
- packages/validator/src/*
- packages/validator/src/**/*
area/batch:
batch:
- packages/batch/src/*
- packages/batch/src/**/*
area/commons:
commons:
- packages/commons/src/*
- packages/commons/src/**/*

area/layers:
layers:
- layers/src/*
- layers/src/**/*
- layers/bin/*
- layers/cdk.json

type/tests:
tests:
- packages/logger/tests/*
- packages/logger/tests/**/*
- packages/logger/jest.config.js
- packages/logger/jest.config.cjs
- packages/tracer/tests/*
- packages/tracer/tests/**/*
- packages/tracer/jest.config.js
- packages/tracer/jest.config.cjs
- packages/metrics/tests/*
- packages/metrics/tests/**/*
- packages/metrics/jest.config.js
- packages/metrics/jest.config.cjs
- packages/idempotency/tests/*
- packages/idempotency/tests/**/*
- packages/idempotency/jest.config.js
- packages/idempotency/jest.config.cjs
- packages/parameters/tests/*
- packages/parameters/tests/**/*
- packages/parameters/jest.config.js
- packages/parameters/jest.config.cjs
- packages/parser/tests/*
- packages/parser/tests/**/*
- packages/parser/jest.config.js
- packages/parser/jest.config.cjs
- packages/validator/tests/*
- packages/validator/tests/**/*
- packages/validator/jest.config.js
- packages/validator/jest.config.cjs
- packages/batch/tests/*
- packages/batch/tests/**/*
- packages/batch/jest.config.js
- packages/batch/jest.config.cjs
- packages/commons/tests/*
- packages/commons/tests/**/*
- packages/commons/jest.config.js
- layers/jest.config.js
- packages/commons/jest.config.cjs
- layers/jest.config.cjs
- layers/tests/*
- layers/tests/**/*

area/documentation:
documentation:
- docs/*
- docs/**/*
- mkdocs.yml
- typedoc.js
- examples/app/*

area/automation:
automation:
- .github/scripts/*
- .github/scripts/**/*
- .github/workflows/*
Expand All @@ -84,7 +83,7 @@ labelPRBasedOnFilePath:
- .github/boring-cyborg.yml
- .github/semantic.yml

type/internal:
internal:
- .github/CODEOWNERS
- .github/PULL_REQUEST_TEMPLATE.md
- .github/ISSUE_TEMPLATE/*
Expand All @@ -96,7 +95,7 @@ labelPRBasedOnFilePath:
- LICENSE-THIRD-PARTY
- lerna.json
- .nvmrc
- .eslintrc.js
- .eslintrc.cjs
- .eslintignore
- .npmignore
- .gitpod.yml
Expand Down Expand Up @@ -124,7 +123,7 @@ labelPRBasedOnFilePath:
- layers/README.md
- examples/app/tsconfig*.json

type/dependencies:
dependencies:
- package.json
- package-lock.json
- packages/tracer/package.json
Expand Down
18 changes: 9 additions & 9 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@ change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
categories:
- title: '⚡ Breaking Changes'
labels:
- 'type/breaking-change'
- 'breaking-change'
- title: '🌟New features and non-breaking changes'
labels:
- 'type/feature'
- 'feature'
- title: '🌟 Minor Changes'
labels:
- 'type/enhancement'
- 'enhancement'
- title: '📜 Documentation updates'
labels:
- 'area/documentation'
- 'documentation'
- title: '🐛 Bug and hot fixes'
labels:
- 'type/bug'
- 'type/fix'
- 'bug'
- 'fix'
- title: '🚒 Deprecations'
labels:
- 'type/deprecation'
- 'deprecation'
- title: '🔧 Maintenance'
labels:
- 'type/internal'
- 'type/dependencies'
- 'internal'
- 'dependencies'
exclude-labels:
- 'skip-changelog'
tag-template: 'v$NEXT_PATCH_VERSION'
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ module.exports = Object.freeze({
"LABEL_BLOCK_REASON": "need-issue",

/** @type {string} */
"LABEL_PENDING_RELEASE": "status/pending-release",
"LABEL_PENDING_RELEASE": "pending-release",

/** @type {string} */
"LABEL_RELEASED": "status/completed",
"LABEL_RELEASED": "completed",

/** @type {string} */
"HANDLE_MAINTAINERS_TEAM": "@aws-powertools/lambda-typescript",
Expand Down
10 changes: 5 additions & 5 deletions .github/scripts/label_pr_based_on_title.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { PR_NUMBER, PR_TITLE } = require("./constants");
const { PR_NUMBER, PR_TITLE } = require('./constants');

module.exports = async ({ github, context, core }) => {
const BUG_REGEX = /(fix|bug)(\((.+)\))?(:.+)/;
Expand All @@ -7,10 +7,10 @@ module.exports = async ({ github, context, core }) => {
const DEPRECATED_REGEX = /(deprecated)(\((.+)\))?(:.+)/;

const labels = {
"type/feature": FEAT_REFACTOR_REGEX,
"type/bug": BUG_REGEX,
"type/deprecation": DEPRECATED_REGEX,
"type/enhancement": ENHANCEMENT_REGEX,
feature: FEAT_REFACTOR_REGEX,
bug: BUG_REGEX,
deprecation: DEPRECATED_REGEX,
enhancement: ENHANCEMENT_REGEX,
};

// Maintenance: We should keep track of modified PRs in case their titles change
Expand Down
19 changes: 14 additions & 5 deletions .github/scripts/label_related_issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ module.exports = async ({ github, context, core }) => {
}

/**
* Keep all labels except those that start with 'status/' or 'need-' or equal to 'help-wanted'
* Keep all labels except any of the `status` ones, or 'need-' or equal to 'help-wanted'
* as those are contextual to issues still in progress.
*
* If the issue was already marked with the 'status/completed' label, then we'll keep that, otherwise
* we'll add the 'status/pending-release' label.
* If the issue was already marked with the 'completed' label, then we'll keep that, otherwise
* we'll add the 'pending-release' label.
*/
let hasCompletedLabel = false;
const newLabels = currentLabels.data
Expand All @@ -72,13 +72,22 @@ module.exports = async ({ github, context, core }) => {
hasCompletedLabel = true;
}
return (
!label.name.startsWith('status/') &&
![
'blocked',
'confirmed',
'discussing',
'on-hold',
'completed',
'rejected',
'pending-release',
'pending-close-response-required',
].includes(label.name) &&
!label.name.startsWith('need-') &&
label.name !== 'help-wanted'
);
})
.map((label) => label.name);
// Add the status/pending-release or status/completed label
// Add the pending-release or completed label
newLabels.push(hasCompletedLabel ? LABEL_RELEASED : LABEL_PENDING_RELEASE);

try {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
stale-issue-message: "This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing."
close-issue-message: "Greetings! We are closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or reopen the issue."
# Label applied or removed when an issue becomes stale
stale-issue-label: status/pending-close-response-required
stale-issue-label: pending-close-response-required
remove-stale-when-updated: true
# Label and close type when a stale issue is finally closed
close-issue-label: status/rejected
close-issue-label: rejected
close-issue-reason: not_planned
# Exempt any issue that hasn't been triaged yet, or that is clearly labeled
exempt-issue-labels: triage,status/confirmed,status/blocked,status/on-hold,status/completed
exempt-issue-labels: triage,confirmed,blocked,on-hold,completed
# Include only issues that were labeled as `need-response` (aka only issues that need a response from the customer)
only-issue-labels: need-response
# Settings specific to issues
Expand Down
Loading