Skip to content

Commit 744fad7

Browse files
authored
chore(maintenance): update labels in automation (#2419)
1 parent 7e09cd9 commit 744fad7

12 files changed

+123
-114
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Bug report
22
description: Report a reproducible bug to help us improve
33
title: "Bug: TITLE"
4-
labels: ["type/bug", "triage"]
4+
labels: ["bug", "triage"]
55
projects: ["aws-powertools/7"]
66
body:
77
- type: markdown

.github/ISSUE_TEMPLATE/documentation_improvements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Documentation improvements
22
description: Suggest a documentation update to improve everyone's experience
33
title: "Docs: TITLE"
4-
labels: ["area/documentation", "triage"]
4+
labels: ["documentation", "triage"]
55
projects: ["aws-powertools/7"]
66
body:
77
- type: markdown

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Feature request
22
description: Suggest an idea for Lambda Powertools
33
title: "Feature request: TITLE"
4-
labels: ["type/feature-request", "triage"]
4+
labels: ["feature-request", "triage"]
55
projects: ["aws-powertools/7"]
66
body:
77
- type: markdown

.github/ISSUE_TEMPLATE/maintenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Maintenance
22
description: Suggest an activity to help address tech debt, governance, and anything internal
33
title: "Maintenance: TITLE"
4-
labels: ["type/internal", "triage"]
4+
labels: ["internal", "triage"]
55
projects: ["aws-powertools/7"]
66
body:
77
- type: markdown

.github/ISSUE_TEMPLATE/rfc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Request for Comments (RFC)
22
description: Feature design and detailed proposals
33
title: "RFC: TITLE"
4-
labels: ["type/RFC", "triage"]
4+
labels: ["RFC", "triage"]
55
projects: ["aws-powertools/7"]
66
body:
77
- type: markdown

.github/boring-cyborg.yml

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,78 @@
11
##### Labeler ##########################################################################################################
22
labelPRBasedOnFilePath:
3-
area/logger:
3+
logger:
44
- packages/logger/src/*
55
- packages/logger/src/**/*
6-
area/tracer:
6+
tracer:
77
- packages/tracer/src/*
88
- packages/tracer/src/**/*
9-
area/metrics:
9+
metrics:
1010
- packages/metrics/src/*
1111
- packages/metrics/src/**/*
12-
area/idempotency:
12+
idempotency:
1313
- packages/idempotency/src/*
1414
- packages/idempotency/src/**/*
15-
area/parameters:
15+
parameters:
1616
- packages/parameters/src/*
1717
- packages/parameters/src/**/*
18-
area/parser:
18+
parser:
1919
- packages/parser/src/*
2020
- packages/parser/src/**/*
21-
area/validator:
21+
validator:
2222
- packages/validator/src/*
2323
- packages/validator/src/**/*
24-
area/batch:
24+
batch:
2525
- packages/batch/src/*
2626
- packages/batch/src/**/*
27-
area/commons:
27+
commons:
2828
- packages/commons/src/*
2929
- packages/commons/src/**/*
3030

31-
area/layers:
31+
layers:
3232
- layers/src/*
3333
- layers/src/**/*
3434
- layers/bin/*
3535
- layers/cdk.json
3636

37-
type/tests:
37+
tests:
3838
- packages/logger/tests/*
3939
- packages/logger/tests/**/*
40-
- packages/logger/jest.config.js
40+
- packages/logger/jest.config.cjs
4141
- packages/tracer/tests/*
4242
- packages/tracer/tests/**/*
43-
- packages/tracer/jest.config.js
43+
- packages/tracer/jest.config.cjs
4444
- packages/metrics/tests/*
4545
- packages/metrics/tests/**/*
46-
- packages/metrics/jest.config.js
46+
- packages/metrics/jest.config.cjs
4747
- packages/idempotency/tests/*
4848
- packages/idempotency/tests/**/*
49-
- packages/idempotency/jest.config.js
49+
- packages/idempotency/jest.config.cjs
5050
- packages/parameters/tests/*
5151
- packages/parameters/tests/**/*
52-
- packages/parameters/jest.config.js
52+
- packages/parameters/jest.config.cjs
5353
- packages/parser/tests/*
5454
- packages/parser/tests/**/*
55-
- packages/parser/jest.config.js
55+
- packages/parser/jest.config.cjs
5656
- packages/validator/tests/*
5757
- packages/validator/tests/**/*
58-
- packages/validator/jest.config.js
58+
- packages/validator/jest.config.cjs
5959
- packages/batch/tests/*
6060
- packages/batch/tests/**/*
61-
- packages/batch/jest.config.js
61+
- packages/batch/jest.config.cjs
6262
- packages/commons/tests/*
6363
- packages/commons/tests/**/*
64-
- packages/commons/jest.config.js
65-
- layers/jest.config.js
64+
- packages/commons/jest.config.cjs
65+
- layers/jest.config.cjs
6666
- layers/tests/*
6767
- layers/tests/**/*
6868

69-
area/documentation:
69+
documentation:
7070
- docs/*
7171
- docs/**/*
7272
- mkdocs.yml
73-
- typedoc.js
7473
- examples/app/*
7574

76-
area/automation:
75+
automation:
7776
- .github/scripts/*
7877
- .github/scripts/**/*
7978
- .github/workflows/*
@@ -84,7 +83,7 @@ labelPRBasedOnFilePath:
8483
- .github/boring-cyborg.yml
8584
- .github/semantic.yml
8685

87-
type/internal:
86+
internal:
8887
- .github/CODEOWNERS
8988
- .github/PULL_REQUEST_TEMPLATE.md
9089
- .github/ISSUE_TEMPLATE/*
@@ -96,7 +95,7 @@ labelPRBasedOnFilePath:
9695
- LICENSE-THIRD-PARTY
9796
- lerna.json
9897
- .nvmrc
99-
- .eslintrc.js
98+
- .eslintrc.cjs
10099
- .eslintignore
101100
- .npmignore
102101
- .gitpod.yml
@@ -124,7 +123,7 @@ labelPRBasedOnFilePath:
124123
- layers/README.md
125124
- examples/app/tsconfig*.json
126125

127-
type/dependencies:
126+
dependencies:
128127
- package.json
129128
- package-lock.json
130129
- packages/tracer/package.json

.github/release-drafter.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
22
categories:
33
- title: '⚡ Breaking Changes'
44
labels:
5-
- 'type/breaking-change'
5+
- 'breaking-change'
66
- title: '🌟New features and non-breaking changes'
77
labels:
8-
- 'type/feature'
8+
- 'feature'
99
- title: '🌟 Minor Changes'
1010
labels:
11-
- 'type/enhancement'
11+
- 'enhancement'
1212
- title: '📜 Documentation updates'
1313
labels:
14-
- 'area/documentation'
14+
- 'documentation'
1515
- title: '🐛 Bug and hot fixes'
1616
labels:
17-
- 'type/bug'
18-
- 'type/fix'
17+
- 'bug'
18+
- 'fix'
1919
- title: '🚒 Deprecations'
2020
labels:
21-
- 'type/deprecation'
21+
- 'deprecation'
2222
- title: '🔧 Maintenance'
2323
labels:
24-
- 'type/internal'
25-
- 'type/dependencies'
24+
- 'internal'
25+
- 'dependencies'
2626
exclude-labels:
2727
- 'skip-changelog'
2828
tag-template: 'v$NEXT_PATCH_VERSION'

.github/scripts/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ module.exports = Object.freeze({
2525
"LABEL_BLOCK_REASON": "need-issue",
2626

2727
/** @type {string} */
28-
"LABEL_PENDING_RELEASE": "status/pending-release",
28+
"LABEL_PENDING_RELEASE": "pending-release",
2929

3030
/** @type {string} */
31-
"LABEL_RELEASED": "status/completed",
31+
"LABEL_RELEASED": "completed",
3232

3333
/** @type {string} */
3434
"HANDLE_MAINTAINERS_TEAM": "@aws-powertools/lambda-typescript",

.github/scripts/label_pr_based_on_title.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { PR_NUMBER, PR_TITLE } = require("./constants");
1+
const { PR_NUMBER, PR_TITLE } = require('./constants');
22

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

99
const labels = {
10-
"type/feature": FEAT_REFACTOR_REGEX,
11-
"type/bug": BUG_REGEX,
12-
"type/deprecation": DEPRECATED_REGEX,
13-
"type/enhancement": ENHANCEMENT_REGEX,
10+
feature: FEAT_REFACTOR_REGEX,
11+
bug: BUG_REGEX,
12+
deprecation: DEPRECATED_REGEX,
13+
enhancement: ENHANCEMENT_REGEX,
1414
};
1515

1616
// Maintenance: We should keep track of modified PRs in case their titles change

.github/scripts/label_related_issue.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ module.exports = async ({ github, context, core }) => {
5959
}
6060

6161
/**
62-
* Keep all labels except those that start with 'status/' or 'need-' or equal to 'help-wanted'
62+
* Keep all labels except any of the `status` ones, or 'need-' or equal to 'help-wanted'
6363
* as those are contextual to issues still in progress.
6464
*
65-
* If the issue was already marked with the 'status/completed' label, then we'll keep that, otherwise
66-
* we'll add the 'status/pending-release' label.
65+
* If the issue was already marked with the 'completed' label, then we'll keep that, otherwise
66+
* we'll add the 'pending-release' label.
6767
*/
6868
let hasCompletedLabel = false;
6969
const newLabels = currentLabels.data
@@ -72,13 +72,22 @@ module.exports = async ({ github, context, core }) => {
7272
hasCompletedLabel = true;
7373
}
7474
return (
75-
!label.name.startsWith('status/') &&
75+
![
76+
'blocked',
77+
'confirmed',
78+
'discussing',
79+
'on-hold',
80+
'completed',
81+
'rejected',
82+
'pending-release',
83+
'pending-close-response-required',
84+
].includes(label.name) &&
7685
!label.name.startsWith('need-') &&
7786
label.name !== 'help-wanted'
7887
);
7988
})
8089
.map((label) => label.name);
81-
// Add the status/pending-release or status/completed label
90+
// Add the pending-release or completed label
8291
newLabels.push(hasCompletedLabel ? LABEL_RELEASED : LABEL_PENDING_RELEASE);
8392

8493
try {

0 commit comments

Comments
 (0)