From 1b7e5c1b97d8b6fe53c4cb12642944b636224cd6 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 22 Jul 2022 16:27:21 +0000 Subject: [PATCH 1/6] chore: make lerna list explicit --- lerna.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index 6e1f1ecd6c..98347b1bb9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,8 @@ { "packages": [ - "packages/*", + "packages/tracer", + "packages/logger", + "packages/metrics", "examples/cdk", "examples/sam" ], From 4908e255694d9d639edf8d0803ffca7cef29c95b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 22 Jul 2022 16:28:26 +0000 Subject: [PATCH 2/6] chore: update codeowners to team --- .github/CODEOWNERS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3525933871..2087c69d94 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,3 @@ -# These owners will be the default owners for everything in -# the repo. -# TODO: revisit this list -* @saragerion, @alan-churley, @heitorlessa \ No newline at end of file +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners + +* @awslabs/aws-lambda-powertools-typescript \ No newline at end of file From b3deae738f5e0a8c32927cfbec1883f9e1c2b98d Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Fri, 22 Jul 2022 17:41:13 +0000 Subject: [PATCH 3/6] chore: updated CI scripts/workflow for merge events --- .github/scripts/constants.js | 42 +++++++++ .github/scripts/download_pr_artifact.js | 26 ++++++ .../scripts/label_missing_related_issue.js | 40 ++++++++ .github/scripts/label_pr_based_on_title.js | 60 ++++++++++++ .github/scripts/label_related_issue.js | 63 +++++++++++++ .github/scripts/save_pr_details.js | 13 +++ .github/workflows/label_pr_on_title.yml | 93 ++++--------------- .github/workflows/on-merge-to-main.yml | 38 +++++++- .github/workflows/on_opened_pr.yml | 36 +++++++ .github/workflows/record_pr.yml | 19 ++-- .../workflows/reusable_export_pr_details.yml | 86 +++++++++++++++++ 11 files changed, 429 insertions(+), 87 deletions(-) create mode 100644 .github/scripts/constants.js create mode 100644 .github/scripts/download_pr_artifact.js create mode 100644 .github/scripts/label_missing_related_issue.js create mode 100644 .github/scripts/label_pr_based_on_title.js create mode 100644 .github/scripts/label_related_issue.js create mode 100644 .github/scripts/save_pr_details.js create mode 100644 .github/workflows/on_opened_pr.yml create mode 100644 .github/workflows/reusable_export_pr_details.yml diff --git a/.github/scripts/constants.js b/.github/scripts/constants.js new file mode 100644 index 0000000000..e7dd21d8ca --- /dev/null +++ b/.github/scripts/constants.js @@ -0,0 +1,42 @@ +module.exports = Object.freeze({ + /** @type {string} */ + // Values: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request + "PR_ACTION": process.env.PR_ACTION?.replace(/"/g, '') || "", + + /** @type {string} */ + "PR_AUTHOR": process.env.PR_AUTHOR?.replace(/"/g, '') || "", + + /** @type {string} */ + "PR_BODY": process.env.PR_BODY || "", + + /** @type {string} */ + "PR_TITLE": process.env.PR_TITLE || "", + + /** @type {number} */ + "PR_NUMBER": process.env.PR_NUMBER || 0, + + /** @type {string} */ + "PR_IS_MERGED": process.env.PR_IS_MERGED || "false", + + /** @type {string} */ + "LABEL_BLOCK": "do-not-merge", + + /** @type {string} */ + "LABEL_BLOCK_REASON": "need-issue", + + /** @type {string} */ + "LABEL_PENDING_RELEASE": "pending-release", + + /** @type {string} */ + "HANDLE_MAINTAINERS_TEAM": "@awslabs/aws-lambda-powertools-typescript", + + /** @type {string[]} */ + "IGNORE_AUTHORS": ["dependabot[bot]"], + + /** @type {string[]} */ + "AREAS": [ + "tracer", + "metrics", + "logger", + ], +}); \ No newline at end of file diff --git a/.github/scripts/download_pr_artifact.js b/.github/scripts/download_pr_artifact.js new file mode 100644 index 0000000000..de089a00d2 --- /dev/null +++ b/.github/scripts/download_pr_artifact.js @@ -0,0 +1,26 @@ +module.exports = async ({github, context, core}) => { + const fs = require('fs'); + + const workflowRunId = process.env.WORKFLOW_ID; + core.info(`Listing artifacts for workflow run ${workflowRunId}`); + + const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: workflowRunId, + }); + + const matchArtifact = artifacts.data.artifacts.filter(artifact => artifact.name == "pr")[0]; + + core.info(`Downloading artifacts for workflow run ${workflowRunId}`); + const artifact = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifact.id, + archive_format: 'zip', + }); + + core.info("Saving artifact found", artifact); + + fs.writeFileSync('pr.zip', Buffer.from(artifact.data)); +} \ No newline at end of file diff --git a/.github/scripts/label_missing_related_issue.js b/.github/scripts/label_missing_related_issue.js new file mode 100644 index 0000000000..53400935f2 --- /dev/null +++ b/.github/scripts/label_missing_related_issue.js @@ -0,0 +1,40 @@ +const { + PR_ACTION, + PR_AUTHOR, + PR_BODY, + PR_NUMBER, + IGNORE_AUTHORS, + LABEL_BLOCK, + LABEL_BLOCK_REASON +} = require("./constants"); + +module.exports = async ({github, context, core}) => { + if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { + return core.notice("Author in IGNORE_AUTHORS list; skipping..."); + } + + if (PR_ACTION != "opened") { + return core.notice("Only newly open PRs are labelled to avoid spam; skipping"); + } + + const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; + const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); + if (isMatch == null) { + core.info(`No related issue found, maybe the author didn't use the template but there is one.`); + + let msg = "No related issues found. Please ensure there is an open issue related to this change to avoid significant delays or closure."; + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + body: msg, + issue_number: PR_NUMBER, + }); + + return await github.rest.issues.addLabels({ + issue_number: PR_NUMBER, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [LABEL_BLOCK, LABEL_BLOCK_REASON] + }); + } +} \ No newline at end of file diff --git a/.github/scripts/label_pr_based_on_title.js b/.github/scripts/label_pr_based_on_title.js new file mode 100644 index 0000000000..3f118af489 --- /dev/null +++ b/.github/scripts/label_pr_based_on_title.js @@ -0,0 +1,60 @@ +const { PR_NUMBER, PR_TITLE, AREAS } = require("./constants"); + +module.exports = async ({github, context, core}) => { + const FEAT_REGEX = /feat(\((.+)\))?(:.+)/ + const BUG_REGEX = /(fix|bug)(\((.+)\))?(:.+)/ + const DOCS_REGEX = /(docs|doc)(\((.+)\))?(:.+)/ + const CHORE_REGEX = /(chore)(\((.+)\))?(:.+)/ + const DEPRECATED_REGEX = /(deprecated)(\((.+)\))?(:.+)/ + const REFACTOR_REGEX = /(refactor)(\((.+)\))?(:.+)/ + + const labels = { + "feature": FEAT_REGEX, + "bug": BUG_REGEX, + "documentation": DOCS_REGEX, + "internal": CHORE_REGEX, + "enhancement": REFACTOR_REGEX, + "deprecated": DEPRECATED_REGEX, + }; + + // Maintenance: We should keep track of modified PRs in case their titles change + let miss = 0; + try { + for (const label in labels) { + const matcher = new RegExp(labels[label]); + const matches = matcher.exec(PR_TITLE); + if (matches != null) { + core.info(`Auto-labeling PR ${PR_NUMBER} with ${label}`); + + await github.rest.issues.addLabels({ + issue_number: PR_NUMBER, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [label] + }); + + const area = matches[2]; // second capture group contains the area + if (AREAS.indexOf(area) > -1) { + core.info(`Auto-labeling PR ${PR_NUMBER} with area ${area}`); + await github.rest.issues.addLabels({ + issue_number: PR_NUMBER, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [`area/${area}`], + }); + } else { + core.debug(`'${PR_TITLE}' didn't match any known area.`); + } + + return; + } else { + core.debug(`'${PR_TITLE}' didn't match '${label}' semantic.`); + miss += 1; + } + } + } finally { + if (miss == Object.keys(labels).length) { + core.notice(`PR ${PR_NUMBER} title '${PR_TITLE}' doesn't follow semantic titles; skipping...`); + } + } +} \ No newline at end of file diff --git a/.github/scripts/label_related_issue.js b/.github/scripts/label_related_issue.js new file mode 100644 index 0000000000..06f7643696 --- /dev/null +++ b/.github/scripts/label_related_issue.js @@ -0,0 +1,63 @@ +const { + PR_AUTHOR, + PR_BODY, + PR_NUMBER, + IGNORE_AUTHORS, + LABEL_PENDING_RELEASE, + HANDLE_MAINTAINERS_TEAM, + PR_IS_MERGED, +} = require("./constants") + +module.exports = async ({github, context, core}) => { + if (IGNORE_AUTHORS.includes(PR_AUTHOR)) { + return core.notice("Author in IGNORE_AUTHORS list; skipping..."); + } + + if (PR_IS_MERGED == "false") { + return core.notice("Only merged PRs to avoid spam; skipping"); + } + + const RELATED_ISSUE_REGEX = /Issue number:[^\d\r\n]+(?\d+)/; + + const isMatch = RELATED_ISSUE_REGEX.exec(PR_BODY); + + try { + if (!isMatch) { + core.setFailed(`Unable to find related issue for PR number ${PR_NUMBER}.\n\n Body details: ${PR_BODY}`); + return await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + body: `${HANDLE_MAINTAINERS_TEAM} No related issues found. Please ensure '${LABEL_PENDING_RELEASE}' label is applied before releasing.`, + issue_number: PR_NUMBER, + }); + } + } catch (error) { + core.setFailed(`Unable to create comment on PR number ${PR_NUMBER}.\n\n Error details: ${error}`); + throw new Error(error); + } + + const { groups: {issue} } = isMatch; + + try { + core.info(`Auto-labeling related issue ${issue} for release`) + await github.rest.issues.addLabels({ + issue_number: issue, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [LABEL_PENDING_RELEASE] + }); + } catch (error) { + core.setFailed(`Is this issue number (${issue}) valid? Perhaps a discussion?`); + throw new Error(error); + } + + const { groups: {relatedIssueNumber} } = isMatch; + + core.info(`Auto-labeling related issue ${relatedIssueNumber} for release`); + return await github.rest.issues.addLabels({ + issue_number: relatedIssueNumber, + owner: context.repo.owner, + repo: context.repo.repo, + labels: [relatedIssueNumber] + }); +} \ No newline at end of file diff --git a/.github/scripts/save_pr_details.js b/.github/scripts/save_pr_details.js new file mode 100644 index 0000000000..c8954fa474 --- /dev/null +++ b/.github/scripts/save_pr_details.js @@ -0,0 +1,13 @@ +module.exports = async ({context, core}) => { + const fs = require('fs'); + const filename = "pr.txt"; + + try { + fs.writeFileSync(`./${filename}`, JSON.stringify(context.payload)); + + return `PR successfully saved ${filename}`; + } catch (err) { + core.setFailed("Failed to save PR details"); + console.error(err); + } +} \ No newline at end of file diff --git a/.github/workflows/label_pr_on_title.yml b/.github/workflows/label_pr_on_title.yml index 6486a3198a..8037329015 100644 --- a/.github/workflows/label_pr_on_title.yml +++ b/.github/workflows/label_pr_on_title.yml @@ -1,91 +1,38 @@ name: Label PR based on title -# pull_request_target event sends an admin GH token to forks -# this however depends on another workflow so it all runs within the base repo safely -# "Record PR number" workflow safely captures PR title and number -# This workflow uses this information to label the PR based on its semantic title on: workflow_run: - workflows: ["Record PR number"] + workflows: ["Record PR details"] types: - completed jobs: - label_pr: - runs-on: ubuntu-latest + get_pr_details: # Guardrails to only ever run if PR recording workflow was indeed # run in a PR event and ran successfully - if: > - ${{ github.event.workflow_run.event == 'pull_request' && - github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: ./.github/workflows/reusable_export_pr_details.yml + with: + record_pr_workflow_id: ${{ github.event.workflow_run.id }} + workflow_origin: ${{ github.event.repository.full_name }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} + label_pr: + needs: get_pr_details + runs-on: ubuntu-latest steps: - - name: 'Download artifact' - uses: actions/github-script@v6 - # For security, we only download artifacts tied to the successful PR recording workflow - with: - script: | - const fs = require('fs'); - - const artifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - - const matchArtifact = artifacts.data.artifacts.filter(artifact => artifact.name == "pr")[0]; - - const artifact = await github.rest.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - - fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(artifact.data)); - # NodeJS standard library doesn't provide ZIP capabilities; use system `unzip` command instead - - run: unzip pr.zip - - - name: 'Label PR based on title' + - name: Checkout repository + uses: actions/checkout@v3 + - name: "Label PR based on title" uses: actions/github-script@v6 + env: + PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }} + PR_TITLE: ${{ needs.get_pr_details.outputs.prTitle }} with: github-token: ${{ secrets.GITHUB_TOKEN }} # This safely runs in our base repo, not on fork # thus allowing us to provide a write access token to label based on PR title # and label PR based on semantic title accordingly script: | - const fs = require('fs'); - const pr_number = Number(fs.readFileSync('./number')); - const pr_title = fs.readFileSync('./title', 'utf-8').trim(); - - const FEAT_REGEX = /feat(\((\w+)\))?(\:.+)/ - const BUG_REGEX = /(fix|bug)(\((\w+)\))?(\:.+)/ - const DOCS_REGEX = /(docs|doc)(\((\w+)\))?(\:.+)/ - const CHORE_REGEX = /(chore)(\((\w+)\))?(\:.+)/ - const DEPRECATED_REGEX = /(deprecated)(\((\w+)\))?(\:.+)/ - const REFACTOR_REGEX = /(refactor)(\((\w+)\))?(\:.+)/ - - const labels = { - "feature": FEAT_REGEX, - "bug": BUG_REGEX, - "documentation": DOCS_REGEX, - "internal": CHORE_REGEX, - "enhancement": REFACTOR_REGEX, - "deprecated": DEPRECATED_REGEX, - } - - for (const label in labels) { - const matcher = new RegExp(labels[label]) - const isMatch = matcher.exec(pr_title) - if (isMatch != null) { - console.info(`Auto-labeling PR ${pr_number} with ${label}`) - - await github.rest.issues.addLabels({ - issue_number: pr_number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: [label] - }) - - break - } - } + const script = require('.github/scripts/label_pr_based_on_title.js') + await script({github, context, core}) \ No newline at end of file diff --git a/.github/workflows/on-merge-to-main.yml b/.github/workflows/on-merge-to-main.yml index f3c527886d..0a5d633803 100644 --- a/.github/workflows/on-merge-to-main.yml +++ b/.github/workflows/on-merge-to-main.yml @@ -1,10 +1,38 @@ -name: on-merge-to-main +name: On PR merge + on: - push: - branches: - - main - workflow_dispatch: {} + workflow_run: + workflows: ["Record PR details"] + types: + - completed + jobs: + get_pr_details: + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' + uses: ./.github/workflows/reusable_export_pr_details.yml + with: + record_pr_workflow_id: ${{ github.event.workflow_run.id }} + workflow_origin: ${{ github.event.repository.full_name }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} + release_label_on_merge: + needs: get_pr_details + runs-on: ubuntu-latest + if: needs.get_pr_details.outputs.prIsMerged == 'true' + steps: + - uses: actions/checkout@v3 + - name: "Label PR related issue for release" + uses: actions/github-script@v6 + env: + PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }} + PR_BODY: ${{ needs.get_pr_details.outputs.prBody }} + PR_IS_MERGED: ${{ needs.get_pr_details.outputs.prIsMerged }} + PR_AUTHOR: ${{ needs.get_pr_details.outputs.prAuthor }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const script = require('.github/scripts/label_related_issue.js') + await script({github, context, core}) publish: ######################### # Force Github action to run only a single job at a time (based on the group name) diff --git a/.github/workflows/on_opened_pr.yml b/.github/workflows/on_opened_pr.yml new file mode 100644 index 0000000000..ff0b2bea6a --- /dev/null +++ b/.github/workflows/on_opened_pr.yml @@ -0,0 +1,36 @@ +name: On new PR + +on: + workflow_run: + workflows: ["Record PR details"] + types: + - completed + +jobs: + get_pr_details: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: ./.github/workflows/reusable_export_pr_details.yml + with: + record_pr_workflow_id: ${{ github.event.workflow_run.id }} + workflow_origin: ${{ github.event.repository.full_name }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} + check_related_issue: + needs: get_pr_details + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: "Debug workflow_run event" + run: echo "${{ github }}" + - name: "Ensure related issue is present" + uses: actions/github-script@v6 + env: + PR_BODY: ${{ needs.get_pr_details.outputs.prBody }} + PR_NUMBER: ${{ needs.get_pr_details.outputs.prNumber }} + PR_ACTION: ${{ needs.get_pr_details.outputs.prAction }} + PR_AUTHOR: ${{ needs.get_pr_details.outputs.prAuthor }} + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const script = require('.github/scripts/label_missing_related_issue.js') + await script({github, context, core}) \ No newline at end of file diff --git a/.github/workflows/record_pr.yml b/.github/workflows/record_pr.yml index 1bb7352dfd..39b9ec4361 100644 --- a/.github/workflows/record_pr.yml +++ b/.github/workflows/record_pr.yml @@ -1,21 +1,22 @@ -name: Record PR number +name: Record PR details on: pull_request: - types: [opened, edited] + types: [opened, edited, closed] jobs: - record: + record_pr: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Save PR number - run: | - mkdir -p ./pr - echo ${{ github.event.number }} > ./pr/number - echo "${{ github.event.pull_request.title }}" > ./pr/title + - name: "Extract PR details" + uses: actions/github-script@v6 + with: + script: | + const script = require('.github/scripts/save_pr_details.js') + await script({github, context, core}) - uses: actions/upload-artifact@v3 with: name: pr - path: pr/ + path: pr.txt \ No newline at end of file diff --git a/.github/workflows/reusable_export_pr_details.yml b/.github/workflows/reusable_export_pr_details.yml new file mode 100644 index 0000000000..fc7e091658 --- /dev/null +++ b/.github/workflows/reusable_export_pr_details.yml @@ -0,0 +1,86 @@ +name: Export previously recorded PR + +on: + workflow_call: + inputs: + record_pr_workflow_id: + required: true + type: number + workflow_origin: # see https://github.com/awslabs/aws-lambda-powertools-python/issues/1349 + required: true + type: string + secrets: + token: + required: true + # Map the workflow outputs to job outputs + outputs: + prNumber: + description: "PR Number" + value: ${{ jobs.export_pr_details.outputs.prNumber }} + prTitle: + description: "PR Title" + value: ${{ jobs.export_pr_details.outputs.prTitle }} + prBody: + description: "PR Body as string" + value: ${{ jobs.export_pr_details.outputs.prBody }} + prAuthor: + description: "PR author username" + value: ${{ jobs.export_pr_details.outputs.prAuthor }} + prAction: + description: "PR event action" + value: ${{ jobs.export_pr_details.outputs.prAction }} + prIsMerged: + description: "Whether PR is merged" + value: ${{ jobs.export_pr_details.outputs.prIsMerged }} + +jobs: + export_pr_details: + # see https://github.com/awslabs/aws-lambda-powertools-python/issues/1349 + if: inputs.workflow_origin == 'awslabs/aws-lambda-powertools-python' + runs-on: ubuntu-latest + env: + FILENAME: pr.txt + # Map the job outputs to step outputs + outputs: + prNumber: ${{ steps.prNumber.outputs.prNumber }} + prTitle: ${{ steps.prTitle.outputs.prTitle }} + prBody: ${{ steps.prBody.outputs.prBody }} + prAuthor: ${{ steps.prAuthor.outputs.prAuthor }} + prAction: ${{ steps.prAction.outputs.prAction }} + prIsMerged: ${{ steps.prIsMerged.outputs.prIsMerged }} + steps: + - name: Checkout repository # in case caller workflow doesn't checkout thus failing with file not found + uses: actions/checkout@v3 + - name: "Download previously saved PR" + uses: actions/github-script@v6 + env: + WORKFLOW_ID: ${{ inputs.record_pr_workflow_id }} + # For security, we only download artifacts tied to the successful PR recording workflow + with: + github-token: ${{ secrets.token }} + script: | + const script = require('.github/scripts/download_pr_artifact.js') + await script({github, context, core}) + # NodeJS standard library doesn't provide ZIP capabilities; use system `unzip` command instead + - name: "Unzip PR artifact" + run: unzip pr.zip + # NOTE: We need separate steps for each mapped output and respective IDs + # otherwise the parent caller won't see them regardless on how outputs are set. + - name: "Export Pull Request Number" + id: prNumber + run: echo ::set-output name=prNumber::$(jq -c '.number' ${FILENAME}) + - name: "Export Pull Request Title" + id: prTitle + run: echo ::set-output name=prTitle::$(jq -c '.pull_request.title' ${FILENAME}) + - name: "Export Pull Request Body" + id: prBody + run: echo ::set-output name=prBody::$(jq -c '.pull_request.body' ${FILENAME}) + - name: "Export Pull Request Author" + id: prAuthor + run: echo ::set-output name=prAuthor::$(jq -c '.pull_request.user.login' ${FILENAME}) + - name: "Export Pull Request Action" + id: prAction + run: echo ::set-output name=prAction::$(jq -c '.action' ${FILENAME}) + - name: "Export Pull Request Merged status" + id: prIsMerged + run: echo ::set-output name=prIsMerged::$(jq -c '.pull_request.merged' ${FILENAME}) \ No newline at end of file From 99ef0721e7dde51bcea146e1cc53d4f400828df6 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 25 Jul 2022 11:38:14 +0000 Subject: [PATCH 4/6] fix: re-added commons --- lerna.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lerna.json b/lerna.json index 98347b1bb9..23b4688936 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,6 @@ { "packages": [ + "packages/commons", "packages/tracer", "packages/logger", "packages/metrics", From 66e76c6db4b843aae89355faa890fecca5ad44bd Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 25 Jul 2022 11:42:57 +0000 Subject: [PATCH 5/6] chore: update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 33123f8285..c3733c946b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,9 +21,9 @@ ### Related issues, RFCs - -[#XXXXX](https://github.com/awslabs/aws-lambda-powertools-typescript/issues/XXXXX) -[#ZZZZZ](https://github.com/awslabs/aws-lambda-powertools-typescript/issues/ZZZZZ) + + +**Issue number:** ### PR status From 621adc4db8acec5d7da9aad87c3e24a3571e26f6 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Thu, 28 Jul 2022 16:30:06 +0000 Subject: [PATCH 6/6] fix: repo name --- .github/workflows/reusable_export_pr_details.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable_export_pr_details.yml b/.github/workflows/reusable_export_pr_details.yml index fc7e091658..af4a7e6af6 100644 --- a/.github/workflows/reusable_export_pr_details.yml +++ b/.github/workflows/reusable_export_pr_details.yml @@ -36,7 +36,7 @@ on: jobs: export_pr_details: # see https://github.com/awslabs/aws-lambda-powertools-python/issues/1349 - if: inputs.workflow_origin == 'awslabs/aws-lambda-powertools-python' + if: inputs.workflow_origin == 'awslabs/aws-lambda-powertools-typescript' runs-on: ubuntu-latest env: FILENAME: pr.txt