From bb2265883c9c3e88e880c6d54dd61be0d44f10d9 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Tue, 23 Apr 2024 10:24:47 +0200 Subject: [PATCH] chore(maintenance): update labels in automation --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .../documentation_improvements.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/ISSUE_TEMPLATE/maintenance.yml | 2 +- .github/ISSUE_TEMPLATE/rfc.yml | 2 +- .github/boring-cyborg.yml | 53 ++++---- .github/release-drafter.yml | 18 +-- .github/scripts/constants.js | 4 +- .github/scripts/label_pr_based_on_title.js | 10 +- .github/scripts/label_related_issue.js | 19 ++- .github/workflows/stale-issues.yml | 6 +- docs/maintainers.md | 117 +++++++++--------- 12 files changed, 123 insertions(+), 114 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 06af982ec3..10b58bde2c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/documentation_improvements.yml b/.github/ISSUE_TEMPLATE/documentation_improvements.yml index 656a9f2e5a..a8da1cfd40 100644 --- a/.github/ISSUE_TEMPLATE/documentation_improvements.yml +++ b/.github/ISSUE_TEMPLATE/documentation_improvements.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 5695c3fab6..b85c74e4ee 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/maintenance.yml b/.github/ISSUE_TEMPLATE/maintenance.yml index 0d90071b7f..70434fb5af 100644 --- a/.github/ISSUE_TEMPLATE/maintenance.yml +++ b/.github/ISSUE_TEMPLATE/maintenance.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/rfc.yml b/.github/ISSUE_TEMPLATE/rfc.yml index a9111ee938..cd4a084ef2 100644 --- a/.github/ISSUE_TEMPLATE/rfc.yml +++ b/.github/ISSUE_TEMPLATE/rfc.yml @@ -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 diff --git a/.github/boring-cyborg.yml b/.github/boring-cyborg.yml index bdf30f990e..9dd0338d90 100644 --- a/.github/boring-cyborg.yml +++ b/.github/boring-cyborg.yml @@ -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/* @@ -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/* @@ -96,7 +95,7 @@ labelPRBasedOnFilePath: - LICENSE-THIRD-PARTY - lerna.json - .nvmrc - - .eslintrc.js + - .eslintrc.cjs - .eslintignore - .npmignore - .gitpod.yml @@ -124,7 +123,7 @@ labelPRBasedOnFilePath: - layers/README.md - examples/app/tsconfig*.json - type/dependencies: + dependencies: - package.json - package-lock.json - packages/tracer/package.json diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a0ae73b1d8..4e97b0eb79 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -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' diff --git a/.github/scripts/constants.js b/.github/scripts/constants.js index ed26f41cca..1a3d2c0d14 100644 --- a/.github/scripts/constants.js +++ b/.github/scripts/constants.js @@ -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", diff --git a/.github/scripts/label_pr_based_on_title.js b/.github/scripts/label_pr_based_on_title.js index 859ec7e0c7..f3188c9532 100644 --- a/.github/scripts/label_pr_based_on_title.js +++ b/.github/scripts/label_pr_based_on_title.js @@ -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)(\((.+)\))?(:.+)/; @@ -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 diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js index 57c938d8af..e353e923fe 100644 --- a/.github/scripts/label_related_issue.js +++ b/.github/scripts/label_related_issue.js @@ -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 @@ -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 { diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index d21eda7853..0ac6baa12d 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -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 diff --git a/docs/maintainers.md b/docs/maintainers.md index 672e93a92b..6570c5a6de 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -33,59 +33,60 @@ Previous active maintainers who contributed to this project. These are the most common labels used by maintainers to triage issues, pull requests (PR), and for project management: -| Label | Usage | Notes | -| -------------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| triage | New issues that require maintainers review | Issue template | -| area/documentation | Improvements or additions to documentation | Examples/Readme files; Doc additions, fixes, etc.; | -| area/logger | Items related to the Logger Utility | PR automation | -| area/metrics | Items related to the Metrics Utility | PR automation | -| area/tracer | Items related to the Tracer Utility | PR automation | -| area/idempotency | Items related to the Idempotency Utility | PR automation | -| area/parameters | Items related to the Parameters Utility | PR automation | -| area/commons | Items related to the Commons Utility | PR automation | -| area/jmespath | Items related to the JMESPath Utility | PR automation | -| area/validation | Items related to the Validation Utility | PR automation | -| area/batch | Items related to the Batch Processing Utility | PR automation | -| area/parser | Items related to the Parser Utility | PR automation | -| area/automation | Items related to automation like GitHub workflows or CI/CD | PR automation | -| area/layers | Items related to the Lambda Layers pipeline | PR automation | -| size/XS | PRs between 0-9 LOC | PR automation | -| size/S | PRs between 10-29 LOC | PR automation | -| size/M | PRs between 30-99 LOC | PR automation | -| size/L | PRs between 100-499 LOC | PR automation | -| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | -| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | -| customer-reference | Authorization to use company name in our documentation | Public Relations | -| community-content | Suggested content to feature in our documentation | Public Relations | -| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | -| type/bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | -| type/bug-upstream | Bug caused by upstream dependency | | -| type/not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | -| type/deprecation | This item contains code deprecation | | -| type/duplicate | This issue is a duplicate of an existing one | Analytics | -| type/feature-request | Issue requesting new or enhancements to existing features | Issue template | -| type/feature | PRs that introduce new features | PR automation | -| type/enhancement | PRs that introduce minor changes, usually to existing features | PR automation | -| type/RFC | Technical design documents related to a feature request | | -| type/internal | PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation | -| type/tests | PRs that add or change tests | PR automation | -| type/dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | Issues/PR automation | -| type/breaking-change | Changes that will cause customer impact and need careful triage | | -| status/blocked | Items which progress is blocked by external dependency or reason | | -| status/confirmed | Items with clear scope and that are ready for implementation | | -| status/discussing | Items that need to be discussed, elaborated, or refined | | -| status/on-hold | Items that are on hold and will be revisited in the future | | -| status/pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | -| status/completed | Items that are complete and have been merged and/or shipped | | -| status/rejected | This is something we will not be working on. At least, not in the measurable future | | -| status/pending-close-response-required | This issue will be closed soon unless the discussion moves forward | Stale Automation | -| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often related to `need-customer-feedback`, prioritization, etc. | -| good-first-issue | Something that is suitable for those who want to start contributing | | -| help-wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | -| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | -| need-more-information | Missing information before making any calls | Signal that investigation or answers are needed | -| need-response | Requires a response from a customer and might be automatically closed if none is received | Marked as stale after 2 weeks, and closed after 3 | -| need-issue | PR is missing a related issue for tracking change | | +| Label | Usage | Notes | +| ------------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | +| triage | New issues that require maintainers review | Issue template | +| documentation | Improvements or additions to documentation | Examples/Readme files; Doc additions, fixes, etc.; | +| logger | Items related to the Logger Utility | PR automation | +| metrics | Items related to the Metrics Utility | PR automation | +| tracer | Items related to the Tracer Utility | PR automation | +| idempotency | Items related to the Idempotency Utility | PR automation | +| parameters | Items related to the Parameters Utility | PR automation | +| commons | Items related to the Commons Utility | PR automation | +| jmespath | Items related to the JMESPath Utility | PR automation | +| validation | Items related to the Validation Utility | PR automation | +| batch | Items related to the Batch Processing Utility | PR automation | +| parser | Items related to the Parser Utility | PR automation | +| event-handler | Items related to the Event Handler Utility | PR automation | +| automation | Items related to automation like GitHub workflows or CI/CD | PR automation | +| layers | Items related to the Lambda Layers pipeline | PR automation | +| size/XS | PRs between 0-9 LOC | PR automation | +| size/S | PRs between 10-29 LOC | PR automation | +| size/M | PRs between 30-99 LOC | PR automation | +| size/L | PRs between 100-499 LOC | PR automation | +| size/XL | PRs between 500-999 LOC, often PRs that grown with feedback | PR automation | +| size/XXL | PRs with 1K+ LOC, largely documentation related | PR automation | +| customer-reference | Authorization to use company name in our documentation | Public Relations | +| community-content | Suggested content to feature in our documentation | Public Relations | +| do-not-merge | PRs that are blocked for varying reasons | Timeline is uncertain | +| bug | Unexpected, reproducible and unintended software behavior | PR/Release automation; Doc snippets are excluded; | +| bug-upstream | Bug caused by upstream dependency | | +| not-a-bug | New and existing bug reports incorrectly submitted as bug | Analytics | +| deprecation | This item contains code deprecation | | +| duplicate | This issue is a duplicate of an existing one | Analytics | +| feature-request | Issue requesting new or enhancements to existing features | Issue template | +| feature | PRs that introduce new features | PR automation | +| enhancement | PRs that introduce minor changes, usually to existing features | PR automation | +| RFC | Technical design documents related to a feature request | | +| internal | PRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.) | PR automation | +| tests | PRs that add or change tests | PR automation | +| dependencies | Changes that touch dependencies, e.g. Dependabot, etc. | Issues/PR automation | +| breaking-change | Changes that will cause customer impact and need careful triage | | +| blocked | Items which progress is blocked by external dependency or reason | | +| confirmed | Items with clear scope and that are ready for implementation | | +| discussing | Items that need to be discussed, elaborated, or refined | | +| on-hold | Items that are on hold and will be revisited in the future | | +| pending-release | Merged changes that will be available soon | Release automation auto-closes/notifies it | +| completed | Items that are complete and have been merged and/or shipped | | +| rejected | This is something we will not be working on. At least, not in the measurable future | | +| pending-close-response-required | This issue will be closed soon unless the discussion moves forward | Stale Automation | +| revisit-in-3-months | Blocked issues/PRs that need to be revisited | Often related to `need-customer-feedback`, prioritization, etc. | +| good-first-issue | Something that is suitable for those who want to start contributing | | +| help-wanted | Tasks you want help from anyone to move forward | Bandwidth, complex topics, etc. | +| need-customer-feedback | Tasks that need more feedback before proceeding | 80/20% rule, uncertain, etc. | +| need-more-information | Missing information before making any calls | Signal that investigation or answers are needed | +| need-response | Requires a response from a customer and might be automatically closed if none is received | Marked as stale after 2 weeks, and closed after 3 | +| need-issue | PR is missing a related issue for tracking change | | ## Maintainer Responsibilities @@ -113,7 +114,7 @@ PRs are [labeled](#labels) based on file changes and semantic title. Pay attenti Use and enforce [semantic versioning](https://semver.org/) pull request titles, as these will be used for [CHANGELOG](./changelog.md) and [Release notes](https://github.com/aws-powertools/powertools-lambda-typescript/releases) - make sure they communicate their intent at the human level. -For issues linked to a PR, make sure `status/pending-release` label is applied to them when merging. [Upon release](#releasing-a-new-version), these issues will be notified which release version contains their change. +For issues linked to a PR, make sure `pending-release` label is applied to them when merging. [Upon release](#releasing-a-new-version), these issues will be notified which release version contains their change. See [Common scenarios](#common-scenarios) section for additional guidance. @@ -133,7 +134,7 @@ See [Common scenarios](#common-scenarios) section for additional guidance. Be familiar with [our definition of bug](#is-that-a-bug). If it's not a bug, you can close it or adjust its title and labels - always communicate the reason accordingly. -For bugs caused by upstream dependencies, replace `type/bug` with `type/bug-upstream` label. Ask the author whether they'd like to raise the issue upstream or if they prefer us to do so. +For bugs caused by upstream dependencies, replace `bug` with `bug-upstream` label. Ask the author whether they'd like to raise the issue upstream or if they prefer us to do so. Assess the impact and make the call on whether we need an emergency release. Contact other [maintainers](#current-maintainers) when in doubt. @@ -240,7 +241,7 @@ Visit the [Releases page](https://github.com/aws-powertools/powertools-lambda-ty Make sure the `tag` field reflects the new version you're releasing, the target branch field is set to `main`, and `release title` matches your tag e.g., `v1.14.1`. -You'll notice we group all changes based on their [labels](#labels) like `type/feature`, `type/bug`, `area/documentation`, etc. +You'll notice we group all changes based on their [labels](#labels) like `feature`, `bug`, `documentation`, etc. **I spotted a typo or incorrect grouping - how do I fix it?** @@ -263,7 +264,7 @@ These are some questions to keep in mind when drafting your first or future rele Once you're happy, hit `Publish release` πŸŽ‰πŸŽ‰πŸŽ‰. -This will kick off the [Post Release workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/post-release.yml) and within a few minutes you should see all issues labeled as `status/pending-release` notified of the new release and labeled as `status/completed`. +This will kick off the [Post Release workflow](https://github.com/aws-powertools/powertools-lambda-typescript/actions/workflows/post-release.yml) and within a few minutes you should see all issues labeled as `pending-release` notified of the new release and labeled as `completed`. ### Run end to end tests @@ -352,4 +353,4 @@ Make use of `help-wanted` and `good-first-issue` to signal additional contributi Try offering a 1:1 call in the attempt to get to a mutual understanding and clarify areas that maintainers could help. -In the rare cases where both parties don't have the bandwidth or expertise to continue, it's best to use the `status/on-hold` or `revisit-in-3-months` labels. After some time has passed, see if it's possible to break the PR or issue in smaller chunks, and eventually close if there is no progress. \ No newline at end of file +In the rare cases where both parties don't have the bandwidth or expertise to continue, it's best to use the `on-hold` or `revisit-in-3-months` labels. After some time has passed, see if it's possible to break the PR or issue in smaller chunks, and eventually close if there is no progress. \ No newline at end of file