Skip to content

chore: Change repo URL to the new location #2347

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

Closed
wants to merge 71 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b322ecf
chore: Change repo URL to the new location
sthulb May 31, 2023
1d0ade3
Merge branch 'develop' into url-rename
sthulb May 31, 2023
083bb70
change docs URL
sthulb Jun 12, 2023
e5adb73
Merge branches 'url-rename' and 'url-rename' of github.com:awslabs/aw…
sthulb Jun 12, 2023
1bb93f5
chore(deps): bump aws-actions/configure-aws-credentials from 2.0.0 to…
dependabot[bot] May 31, 2023
8cfe778
feat(user-agent): add custom header User-Agent to AWS SDK requests (#…
roger-zhangg Jun 1, 2023
31e5de3
fix(event_source): change the import location of boto3 in CodePipelin…
darnley Jun 1, 2023
4dc312c
refactor(logger): remove subclassing and move unnecessary APIs (#2334)
heitorlessa Jun 1, 2023
677fffd
chore(deps-dev): bump cfn-lint from 0.77.5 to 0.77.6 (#2360)
dependabot[bot] Jun 1, 2023
53f2201
chore(ci): bump version to 2.16.0 (#2363)
github-actions[bot] Jun 2, 2023
67915cf
chore(ci): changelog rebuild (#2364)
github-actions[bot] Jun 2, 2023
c7616af
fix(shared): skip user agent on much older botocore versions (#2366)
rubenfonseca Jun 2, 2023
75f1b52
chore(ci): bump version to 2.16.1 (#2369)
github-actions[bot] Jun 2, 2023
66729dc
chore(ci): layer docs update (#2371)
github-actions[bot] Jun 2, 2023
43582a3
chore(deps-dev): bump aws-cdk from 2.81.0 to 2.82.0 (#2373)
dependabot[bot] Jun 2, 2023
993697c
chore(deps-dev): bump sentry-sdk from 1.24.0 to 1.25.0 (#2374)
dependabot[bot] Jun 2, 2023
7c59502
fix(parameters): AppConfigProvider when retrieving multiple unique co…
leandrodamascena Jun 5, 2023
c85d415
chore(deps-dev): bump mypy-boto3-lambda from 1.26.122 to 1.26.147 (#2…
dependabot[bot] Jun 5, 2023
7c850ba
chore(deps-dev): bump mypy-boto3-cloudformation from 1.26.108 to 1.26…
dependabot[bot] Jun 5, 2023
392c568
fix(shared): move to static version bumping to prevent issues with cu…
heitorlessa Jun 6, 2023
a5ebf4e
chore(typing): add setLevel and addHandler to Logger for mypy/pyright…
heitorlessa Jun 6, 2023
23d883d
chore(ci): bump version to 2.16.2 (#2390)
github-actions[bot] Jun 6, 2023
1245a3f
chore(ci): layer docs update (#2391)
github-actions[bot] Jun 6, 2023
7c5090d
chore(ci): document all github action workflows and enforce least-pri…
heitorlessa Jun 7, 2023
47edc50
chore(ci): fix PR labeling permission scope (#2396)
heitorlessa Jun 7, 2023
0ea11a8
docs(maintainers): visual representation of release process (#2399)
heitorlessa Jun 7, 2023
5a0fb06
chore(deps): bump docker/setup-buildx-action from 2.5.0 to 2.6.0 (#2403)
dependabot[bot] Jun 7, 2023
ff5a4c6
chore(deps): bump docker/setup-qemu-action from 2.1.0 to 2.2.0 (#2404)
dependabot[bot] Jun 7, 2023
1410633
chore(deps-dev): bump mypy-boto3-logs from 1.26.53 to 1.26.149 (#2409)
dependabot[bot] Jun 7, 2023
fbc9b96
chore(deps-dev): bump aws-cdk from 2.82.0 to 2.83.0 (#2406)
dependabot[bot] Jun 7, 2023
c6ae489
chore(deps-dev): bump mypy-boto3-cloudformation from 1.26.147 to 1.26…
dependabot[bot] Jun 7, 2023
c877c6e
chore(deps-dev): bump sentry-sdk from 1.25.0 to 1.25.1 (#2408)
dependabot[bot] Jun 7, 2023
9d67bb2
chore(deps): bump pydantic from 1.10.8 to 1.10.9 (#2405)
dependabot[bot] Jun 7, 2023
99dac99
chore(deps-dev): bump cfn-lint from 0.77.6 to 0.77.7 (#2414)
dependabot[bot] Jun 7, 2023
065ecc5
docs(navigation): standardize link targets to enhance customer experi…
leandrodamascena Jun 8, 2023
e416e1e
feat(event_sources): add support for VPC Lattice events (#2358)
stephenbawks Jun 8, 2023
9739332
docs(we-made-this): new article about idempotency design (#2425)
heitorlessa Jun 9, 2023
67bc0b5
docs(event_handler): improve compress example using Response class (#…
heitorlessa Jun 9, 2023
9109962
feat(parser): support for CloudFormation Custom Resources (#2335)
ran-isenberg Jun 9, 2023
c3e71ac
chore(deps-dev): bump aws-cdk from 2.83.0 to 2.83.1 (#2432)
dependabot[bot] Jun 12, 2023
e28fb08
chore(deps): bump actions/checkout from 3.5.2 to 3.5.3 (#2431)
dependabot[bot] Jun 12, 2023
7ff5c04
chore(deps-dev): bump mypy-boto3-dynamodb from 1.26.115 to 1.26.152 (…
dependabot[bot] Jun 13, 2023
d20037f
chore(deps-dev): bump ijson from 3.2.0.post0 to 3.2.1 (#2441)
dependabot[bot] Jun 13, 2023
6f40e59
chore(deps-dev): bump filelock from 3.12.0 to 3.12.2 (#2446)
dependabot[bot] Jun 13, 2023
1118ac8
chore(deps-dev): bump pytest from 7.3.1 to 7.3.2 (#2443)
dependabot[bot] Jun 13, 2023
745db5c
feat(logger): type log record in LambdaPowertoolsFormatter with Typed…
erikayao93 Jun 14, 2023
c6d5a71
chore(deps): bump docker/setup-buildx-action from 2.6.0 to 2.7.0 (#2450)
dependabot[bot] Jun 14, 2023
cb8971e
chore(deps-dev): bump cfn-lint from 0.77.7 to 0.77.8 (#2451)
dependabot[bot] Jun 14, 2023
9f7e7c9
chore(deps-dev): bump mypy-boto3-s3 from 1.26.127 to 1.26.153 (#2452)
dependabot[bot] Jun 14, 2023
709050d
chore(ci): changelog rebuild (#2456)
github-actions[bot] Jun 14, 2023
4c6770c
fix(event_handler): prioritize static over dynamic route to prevent o…
rubenfonseca Jun 14, 2023
801935f
chore(deps-dev): bump aws-cdk from 2.83.1 to 2.84.0 (#2460)
dependabot[bot] Jun 14, 2023
bf58ae1
docs(idempotency): add CDK example (#2434)
ran-isenberg Jun 15, 2023
e9a184c
feat(event_sources): add AWS Config Rule event data class (#2175)
leandrodamascena Jun 15, 2023
24f7e22
chore(deps): bump aws-actions/configure-aws-credentials from 2.1.0 to…
dependabot[bot] Jun 15, 2023
41ab9d3
chore(deps-dev): bump cfn-lint from 0.77.8 to 0.77.9 (#2472)
dependabot[bot] Jun 15, 2023
59f19bb
chore(deps-dev): bump flake8-comprehensions from 3.12.0 to 3.13.0 (#2…
dependabot[bot] Jun 15, 2023
d12b738
chore(deps-dev): bump mkdocs-material from 9.1.15 to 9.1.16 (#2470)
dependabot[bot] Jun 15, 2023
847e2fc
docs(event_sources): fix DynamoDB stream event docstring (#2468)
abbasyadollahi Jun 16, 2023
8298fc2
fix(idempotency): treat missing idempotency key as non-idempotent tra…
leandrodamascena Jun 16, 2023
a210c97
docs(idempotency): new sequence flow when idempotency key is optional…
heitorlessa Jun 16, 2023
802ee6e
chore(ci): bump version to 2.17.0 (#2482)
github-actions[bot] Jun 16, 2023
962c64e
chore(ci): changelog rebuild (#2481)
github-actions[bot] Jun 16, 2023
04a5680
chore(ci): layer docs update (#2486)
github-actions[bot] Jun 16, 2023
4e65240
chore(deps-dev): bump pytest-mock from 3.10.0 to 3.11.1 (#2485)
dependabot[bot] Jun 16, 2023
363fffb
feat(feature_flags): add modulo range condition for segmented experim…
ajwad-shaikh Jun 16, 2023
92b8c59
chore: Change repo URL to the new location
sthulb May 31, 2023
d32856d
change docs URL
sthulb Jun 12, 2023
5fd85a9
fix references
sthulb Jun 19, 2023
6d4a23d
fix reference
sthulb Jun 19, 2023
ea7efbd
fix codeowners team name
sthulb Jun 19, 2023
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 .chglog/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/awslabs/aws-lambda-powertools-python
repository_url: https://github.com/aws-powertools/powertools-lambda-python
options:
commits:
filters:
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @awslabs/aws-lambda-powertools-python
* @aws-powertools/lambda-python
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
value: |
Thank you for submitting a bug report. Please add as much information as possible to help us reproduce, and remove any potential sensitive data.

Please become familiar with [our definition of bug](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/MAINTAINERS.md#is-that-a-bug).
Please become familiar with [our definition of bug](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/MAINTAINERS.md#is-that-a-bug).
- type: textarea
id: expected_behaviour
attributes:
Expand Down Expand Up @@ -79,7 +79,7 @@ body:
id: logs
attributes:
label: Debugging logs
description: If available, please share [debugging logs](https://awslabs.github.io/aws-lambda-powertools-python/#debug-mode)
description: If available, please share [debugging logs](https://docs.powertools.aws.dev/lambda-python/#debug-mode)
render: python
validations:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/awslabs/aws-lambda-powertools-python/discussions/new
url: https://github.com/aws-powertools/powertools-lambda-python/discussions/new
about: Ask a general question about Lambda Powertools
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ body:
attributes:
label: Acknowledgment
options:
- label: This feature request meets [Powertools for AWS Lambda (Python) Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets)
- label: This feature request meets [Powertools for AWS Lambda (Python) Tenets](https://docs.powertools.aws.dev/lambda-python/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/awslabs/aws-lambda-powertools-java/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/), and [.NET](https://github.com/awslabs/aws-lambda-powertools-dotnet/)
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/aws-powertools/powertools-lambda-java/), [TypeScript](https://github.com/aws-powertools/powertools-lambda-typescript/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ body:
attributes:
label: Acknowledgment
options:
- label: This request meets [Powertools for AWS Lambda (Python) Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets)
- label: This request meets [Powertools for AWS Lambda (Python) Tenets](https://docs.powertools.aws.dev/lambda-python/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/awslabs/aws-lambda-powertools-java/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/), and [.NET](https://github.com/awslabs/aws-lambda-powertools-dotnet/)
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/aws-powertools/powertools-lambda-java/), [TypeScript](https://github.com/aws-powertools/powertools-lambda-typescript/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/rfc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ body:
attributes:
label: Acknowledgment
options:
- label: This feature request meets [Powertools for AWS Lambda (Python) Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets)
- label: This feature request meets [Powertools for AWS Lambda (Python) Tenets](https://docs.powertools.aws.dev/lambda-python/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/awslabs/aws-lambda-powertools-java/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/), and [.NET](https://github.com/awslabs/aws-lambda-powertools-dotnet/)
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/aws-powertools/powertools-lambda-java/), [TypeScript](https://github.com/aws-powertools/powertools-lambda-typescript/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/static_typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
value: |
Thank you for submitting a static typing report. Please add as much information as possible to help us reproduce.

Our preferred static type checker is [Mypy](https://mypy.readthedocs.io/en/stable/) using the following [configuration](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/mypy.ini).
Our preferred static type checker is [Mypy](https://mypy.readthedocs.io/en/stable/) using the following [configuration](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/mypy.ini).
- type: dropdown
id: tool
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/tech_debt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ body:
attributes:
label: Acknowledgment
options:
- label: This request meets [Powertools for AWS Lambda (Python) Tenets](https://awslabs.github.io/aws-lambda-powertools-python/latest/#tenets)
- label: This request meets [Powertools for AWS Lambda (Python) Tenets](https://docs.powertools.aws.dev/lambda-python/latest/#tenets)
required: true
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/awslabs/aws-lambda-powertools-java/), [TypeScript](https://github.com/awslabs/aws-lambda-powertools-typescript/), and [.NET](https://github.com/awslabs/aws-lambda-powertools-dotnet/)
- label: Should this be considered in other Powertools for AWS Lambda languages? i.e. [Java](https://github.com/aws-powertools/powertools-lambda-java/), [TypeScript](https://github.com/aws-powertools/powertools-lambda-typescript/), and [.NET](https://github.com/aws-powertools/powertools-lambda-dotnet/)
required: false
- type: markdown
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

If your change doesn't seem to apply, please leave them unchecked.

* [ ] [Meet tenets criteria](https://awslabs.github.io/aws-lambda-powertools-python/#tenets)
* [ ] [Meet tenets criteria](https://docs.powertools.aws.dev/lambda-python/#tenets)
* [ ] I have performed a self-review of this change
* [ ] Changes have been tested
* [ ] Changes are documented
* [ ] PR title follows [conventional commit semantics](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/.github/semantic.yml)
* [ ] PR title follows [conventional commit semantics](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/.github/semantic.yml)

<details>
<summary>Is this a breaking change?</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function create_temporary_branch_with_changes() {
function create_pr() {
start_span "Creating PR against ${TEMP_BRANCH} branch"
# TODO: create label
NEW_PR_URL=$(gh pr create --title "${PR_TITLE}" --body "${PR_BODY}: ${WORKFLOW_URL}" --base "${BASE_BRANCH}" --label "${SKIP_LABEL}" || error "Failed to create PR") # e.g, https://github.com/awslabs/aws-lambda-powertools/pull/13
NEW_PR_URL=$(gh pr create --title "${PR_TITLE}" --body "${PR_BODY}: ${WORKFLOW_URL}" --base "${BASE_BRANCH}" --label "${SKIP_LABEL}" || error "Failed to create PR") # e.g, https://github.com/aws-powertools/powertools-lambda-python/pull/13

# greedy remove any string until the last URL path, including the last '/'. https://opensource.com/article/17/6/bash-parameter-expansion
debug "Extracing PR Number from PR URL: "${NEW_PR_URL}""
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = Object.freeze({
"LABEL_PENDING_RELEASE": "pending-release",

/** @type {string} */
"HANDLE_MAINTAINERS_TEAM": "@awslabs/aws-lambda-powertools-python",
"HANDLE_MAINTAINERS_TEAM": "@aws-powertools/powertools-lambda-python",

/** @type {string[]} */
"IGNORE_AUTHORS": ["dependabot[bot]", "markdownify[bot]"],
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/label_missing_acknowledgement_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = async ({github, context, core}) => {
if (isMatch == null) {
core.info(`No acknowledgement section found, maybe the author didn't use the template but there is one.`)

let msg = "No acknowledgement section found. Please make sure you used the template to open a PR and didn't remove the acknowledgment section. Check the template here: https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/.github/PULL_REQUEST_TEMPLATE.md#acknowledgment";
let msg = "No acknowledgement section found. Please make sure you used the template to open a PR and didn't remove the acknowledgment section. Check the template here: https://github.com/aws-powertools/powertools-lambda-python/blob/develop/.github/PULL_REQUEST_TEMPLATE.md#acknowledgment";
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build_changelog.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Standalone workflow to update changelog if necessary
name: Build changelog

# PROCESS
#
# 1. Fetch latest changes compared to the latest tag
# 2. Rebuild CHANGELOG.md using Keep A Changelog format
# 3. Create a PR with the latest changelog (close and reference any it supersedes)

# USAGE
#
# Always triggered on PR merge or manually from GitHub UI if we must.

on:
workflow_dispatch:
push:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: "CodeQL"

# PROCESS
#
# 1. Static code analysis with CodeQL

# USAGE
#
# NOTE: This is our slowest workflow hence it only runs on code merged.
#
# Always triggered on PR merge when source code changes.

on:
push:
paths:
Expand All @@ -11,6 +21,9 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read

strategy:
fail-fast: false
Expand All @@ -23,7 +36,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/dispatch_analytics.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: Dispatch analytics

# PROCESS
#
# 1. Trade GitHub JWT token with AWS credentials for the analytics account
# 2. Invoke a Lambda function dispatcher synchronously with the read-only scoped JWT token
# 3. The dispatcher function will call GitHub APIs to read data from the last hour and aggregate for operational analytics

# USAGE
#
# NOTE: meant to use as a scheduled task only (or manually for debugging purposes).

on:
workflow_dispatch:

Expand All @@ -23,14 +33,14 @@ permissions:

jobs:
dispatch_token:
if: github.repository == 'awslabs/aws-lambda-powertools-python'
if: github.repository == 'aws-powertools/powertools-lambda-python'
concurrency:
group: analytics
runs-on: ubuntu-latest
environment: analytics
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef # v2.0.0
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
aws-region: eu-central-1
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/label_pr_on_title.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
name: Label PR based on title

# PROCESS
#
# 1. Fetch PR details previously saved from untrusted location
# 2. Parse details for safety
# 3. Label PR based on semantic title (e.g., area, change type)

# USAGE
#
# NOTE: meant to be used with ./.github/workflows/record_pr.yml
#
# Security Note:
#
# This workflow depends on "Record PR" workflow that runs in an untrusted location (forks) instead of `pull_request_target`.
# This enforces zero trust where "Record PR" workflow always runs on fork with zero permissions on GH_TOKEN.
# When "Record PR" completes, this workflow runs in our repository with the appropriate permissions and sanitize inputs.
#
# Coupled with "Approve GitHub Action to run on forks", we have confidence no privilege can be escalated,
# since any malicious change would need to be approved, and upon social engineering, it'll have zero permissions.


on:
workflow_run:
workflows: ["Record PR details"]
Expand All @@ -8,6 +28,8 @@ on:

jobs:
get_pr_details:
permissions:
actions: read # download PR artifact
# Guardrails to only ever run if PR recording workflow was indeed
# run in a PR event and ran successfully
if: ${{ github.event.workflow_run.conclusion == 'success' }}
Expand All @@ -20,9 +42,11 @@ jobs:
label_pr:
needs: get_pr_details
runs-on: ubuntu-latest
permissions:
pull-requests: write # label respective PR
steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: "Label PR based on title"
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
env:
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/on_closed_issues.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
name: Closed Issue Message

# PROCESS
#
# 1. Comment on recently closed issues to warn future responses may not be looked after

# USAGE
#
# Always triggered upon issue closure
#

on:
issues:
types: [closed]
issues:
types: [closed]
jobs:
auto_comment:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/closed-issue-message@8b6324312193476beecf11f8e8539d73a3553bf4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
### ⚠️COMMENT VISIBILITY WARNING⚠️
This issue is now closed. Please be mindful that future comments are hard for our team to see.
auto_comment:
runs-on: ubuntu-latest
permissions:
issues: write # comment on issues
steps:
- uses: aws-actions/closed-issue-message@8b6324312193476beecf11f8e8539d73a3553bf4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
### ⚠️COMMENT VISIBILITY WARNING⚠️
This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a [team member](https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/MAINTAINERS.md#current-maintainers) or open a new issue that references this one.
If you need more assistance, please either tag a [team member](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/MAINTAINERS.md#current-maintainers) or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
28 changes: 24 additions & 4 deletions .github/workflows/on_label_added.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
name: On Label added

# PROCESS
#
# 1. Fetch PR details previously saved from untrusted location
# 2. Parse details for safety
# 3. Comment on PR labels `size/XXL` and suggest splitting into smaller PRs if possible

# USAGE
#
# NOTE: meant to be used with ./.github/workflows/record_pr.yml
#
# Security Note:
#
# This workflow depends on "Record PR" workflow that runs in an untrusted location (forks) instead of `pull_request_target`.
# This enforces zero trust where "Record PR" workflow always runs on fork with zero permissions on GH_TOKEN.
# When "Record PR" completes, this workflow runs in our repository with the appropriate permissions and sanitize inputs.
#
# Coupled with "Approve GitHub Action to run on forks", we have confidence no privilege can be escalated,
# since any malicious change would need to be approved, and upon social engineering, it'll have zero permissions.

on:
workflow_run:
workflows: ["Record PR details"]
Expand All @@ -8,6 +27,8 @@ on:

jobs:
get_pr_details:
permissions:
actions: read # download PR artifact
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/reusable_export_pr_details.yml
with:
Expand All @@ -16,14 +37,13 @@ jobs:
secrets:
token: ${{ secrets.GITHUB_TOKEN }}

split-large-pr:
split_large_pr:
needs: get_pr_details
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
pull-requests: write # comment on PR
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
# Maintenance: Persist state per PR as an artifact to avoid spam on label add
- name: "Suggest split large Pull Request"
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
Expand Down
Loading