Skip to content

Commit 1a44655

Browse files
authored
Merge branch 'main' into location-api-key
2 parents 2a328a7 + ecbe1bf commit 1a44655

File tree

2,238 files changed

+454744
-293547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,238 files changed

+454744
-293547
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ What AWS use cases does this change enable? To enable the use cases, which AWS s
1616

1717
### Describe any new or updated permissions being added
1818

19-
<! What new or updated IAM permissions are needed to support the changes being introduced ? -->
19+
<!-- What new or updated IAM permissions are needed to support the changes being introduced ? -->
2020

2121

2222
### Description of how you validated changes

.github/workflows/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ When approved this pushes the PR to the testing pipeline,
5555
thus starting the cli integ test build.
5656
Owner: Core CDK team
5757

58+
### Initial Priority Assignment
59+
60+
[project-prioritization-assignment.yml](project-prioritization-assignment.yml): GitHub action for automatically adding PR's with priorities to the project priority board based on their labels.
61+
Owner: CDK Support team
62+
5863
## Issue Triggered
5964

6065
### Closed Issue Message
@@ -103,3 +108,13 @@ Owner: Core CDK team
103108

104109
[update-contributors.yml](update-contributors.yml): GitHub action that runs monthly to create a pull request for updating a CONTRIBUTORS file with the top contributors.
105110
Owner: Core CDK team
111+
112+
### R2 Priority Assignment
113+
114+
[project-prioritization-r2-assignment.yml](project-prioritization-r2-assignment.yml): GitHub action that runs every 6 hours to add PR's to the priority project board that satisfies R2 Priority.
115+
Owner: CDK Support team
116+
117+
### R5 Priority Assignment
118+
119+
[project-prioritization-r5-assignment.yml](project-prioritization-r5-assignment.yml): GitHub action that runs every day to add PR's to the priority project board that satisfies R5 Priority.
120+
Owner: CDK Support team

.github/workflows/github-merit-badger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
1818
thresholds: '[0,3,6,13,25,50]'
1919
badge-type: 'achievement'
20-
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,mrgrain,pahud,kellertk,ashishdhingra,HBobertz,sumupitchayan,colifran,khushail,moelasmar,paulhcsun,GavinZZ,aaythapa,xazhao,gracelu0,jfuss,shikha372,kirtishrinkhala,godwingrs22,bergjaak,IanKonlog,Leo10Gama,samson-keung,scorbiere,michelle-wangg,jiayiwang7,1kaileychen,saiyush,5d,aws-cdk-automation,dependabot[bot],mergify[bot]]'
20+
ignore-usernames: '[rix0rrr,iliapolo,otaviomacedo,kaizencc,comcalvi,TheRealAmazonKendra,mrgrain,pahud,kellertk,ashishdhingra,HBobertz,colifran,khushail,moelasmar,paulhcsun,GavinZZ,aaythapa,xazhao,gracelu0,jfuss,shikha372,kirtishrinkhala,godwingrs22,bergjaak,IanKonlog,Leo10Gama,samson-keung,scorbiere,michelle-wangg,jiayiwang7,1kaileychen,saiyush,5d,iankhou,aws-cdk-automation,dependabot[bot],mergify[bot]]'

.github/workflows/issue-label-assign.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ env:
173173
{"area":"@aws-cdk/aws-inspector","keywords":["aws-inspector","inspector"],"labels":["@aws-cdk/aws-inspector"]},
174174
{"area":"@aws-cdk/aws-iot","keywords":["internet-of-things","aws-iot","iot"],"labels":["@aws-cdk/aws-iot"],"affixes":{"suffixes":["-alpha"]}},
175175
{"area":"@aws-cdk/aws-iot-actions","keywords":["aws-iot-actions","iot-actions"],"labels":["@aws-cdk/aws-iot-actions"],"affixes":{"suffixes":["-alpha"]}},
176-
{"area":"@aws-cdk/aws-iot1click","keywords":["aws-iot1click","iot1click"],"labels":["@aws-cdk/aws-iot1click"]},
177176
{"area":"@aws-cdk/aws-iotanalytics","keywords":["aws-iotanalytics","iotanalytics"],"labels":["@aws-cdk/aws-iotanalytics"]},
178177
{"area":"@aws-cdk/aws-iotevents","keywords":["aws-iotevents","iotevents"],"labels":["@aws-cdk/aws-iotevents"],"affixes":{"suffixes":["-alpha"]}},
179178
{"area":"@aws-cdk/aws-iotevents-actions","keywords":["aws-iotevents","iotevents-actions"],"labels":["@aws-cdk/aws-iotevents-actions"],"affixes":{"suffixes":["-alpha"]}},

.github/workflows/lambda-runtime-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
update-lambda-tests:
99
if: github.repository == 'aws/aws-cdk'
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
steps:
1214
- uses: actions/checkout@v4
1315
with:
@@ -44,4 +46,6 @@ jobs:
4446
git config --global user.email '[email protected]'
4547
git add .
4648
git commit -m "chore: update lambda runtime integration tests"
47-
git push origin ${{ github.event.pull_request.head.ref }}
49+
git push origin ${{ github.event.pull_request.head.ref }}
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Re-evaluate the PR linter after reviews. This is used to upgrade the label
2+
# of a PR to `needs-maintainer-review` after a trusted community members leaves
3+
# an approving review.
4+
#
5+
# Unprivileged workflow that runs in the context of the PR, when a review is changed.
6+
#
7+
# Save the PR number, and download it again in the PR Linter workflow which
8+
# needs to run in privileged `workflow_run` context (but then must restore the
9+
# PR context).
10+
name: PR Linter Trigger
11+
12+
on:
13+
pull_request_review:
14+
types: [submitted, edited, dismissed]
15+
16+
jobs:
17+
upload:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Save PR number
22+
env:
23+
PR_NUMBER: ${{ github.event.pull_request.number }}
24+
PR_SHA: ${{ github.event.pull_request.head.sha }}
25+
run: |
26+
mkdir -p ./pr
27+
echo $PR_NUMBER > ./pr/pr_number
28+
echo $PR_SHA > ./pr/pr_sha
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: pr_info
32+
path: pr/

.github/workflows/pr-linter-trigger.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/pr-linter.yml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,19 @@ on:
1111
- opened
1212
- synchronize
1313
- reopened
14+
15+
# Triggered from a separate job when a review is added
1416
workflow_run:
1517
workflows: [PR Linter Trigger]
1618
types:
1719
- completed
18-
status:
20+
21+
# Trigger when a status is updated (CodeBuild leads to statuses)
22+
status: {}
23+
24+
# Trigger when a check suite is completed (GitHub actions and CodeCov create checks)
25+
check_suite:
26+
types: [completed]
1927

2028
jobs:
2129
download-if-workflow-run:
@@ -26,39 +34,29 @@ jobs:
2634
# if conditions on all individual steps because subsequent jobs depend on this job
2735
# and we cannot skip it entirely
2836
steps:
29-
- name: 'Download artifact'
37+
- name: 'Download workflow_run artifact'
3038
if: github.event_name == 'workflow_run'
31-
uses: actions/github-script@v7
39+
uses: dawidd6/action-download-artifact@v7
3240
with:
33-
script: |
34-
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
35-
owner: context.repo.owner,
36-
repo: context.repo.repo,
37-
run_id: context.payload.workflow_run.id,
38-
});
39-
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
40-
return artifact.name == "pr_info"
41-
})[0];
42-
let download = await github.rest.actions.downloadArtifact({
43-
owner: context.repo.owner,
44-
repo: context.repo.repo,
45-
artifact_id: matchArtifact.id,
46-
archive_format: 'zip',
47-
});
48-
let fs = require('fs');
49-
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/pr_info.zip`, Buffer.from(download.data));
50-
- name: 'Unzip artifact'
51-
if: github.event_name == 'workflow_run'
52-
run: unzip pr_info.zip
41+
run_id: ${{ github.event.workflow_run.id }}
42+
name: pr_info
43+
path: pr/
44+
search_artifacts: true
5345

54-
- name: 'Make GitHub output'
46+
- name: 'Determine PR info'
47+
# PR info comes from the artifact if downloaded, or GitHub context if not.
5548
if: github.event_name == 'workflow_run'
5649
id: 'pr_output'
5750
run: |
58-
echo "cat pr_number"
59-
echo "pr_number=$(cat pr_number)" >> "$GITHUB_OUTPUT"
60-
echo "cat pr_sha"
61-
echo "pr_sha=$(cat pr_sha)" >> "$GITHUB_OUTPUT"
51+
if [[ ! -f pr/pr_number ]]; then
52+
echo "${{ github.event.pull_request.number }}" > pr/pr_number
53+
fi
54+
if [[ ! -f pr/pr_sha ]]; then
55+
echo "${{ github.event.pull_request.head.sha }}" > pr/pr_sha
56+
fi
57+
cat pr/*
58+
echo "pr_number=$(cat pr/pr_number)" >> "$GITHUB_OUTPUT"
59+
echo "pr_sha=$(cat pr/pr_sha)" >> "$GITHUB_OUTPUT"
6260
6361
validate-pr:
6462
# Necessary to have sufficient permissions to write to the PR
@@ -67,6 +65,7 @@ jobs:
6765
pull-requests: write
6866
statuses: read
6967
issues: read
68+
checks: read
7069
runs-on: ubuntu-latest
7170
needs: download-if-workflow-run
7271
steps:
@@ -80,7 +79,7 @@ jobs:
8079
uses: ./tools/@aws-cdk/prlint
8180
env:
8281
GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }}
83-
# PR_NUMBER and PR_SHA is empty if triggered by pull_request_target, since we already have that info
8482
PR_NUMBER: ${{ needs.download-if-workflow-run.outputs.pr_number }}
8583
PR_SHA: ${{ needs.download-if-workflow-run.outputs.pr_sha }}
84+
LINTER_LOGIN: ${{ vars.LINTER_LOGIN }}
8685
REPO_ROOT: ${{ github.workspace }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Prioritization
2+
on:
3+
pull_request_target:
4+
types:
5+
- labeled
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
11+
jobs:
12+
prioritize:
13+
if: github.repository == 'aws/aws-cdk'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Add PR to Project & Set Priority
18+
uses: actions/github-script@v7
19+
with:
20+
github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
21+
script: |
22+
const script = require('./scripts/prioritization/assign-priority.js')
23+
await script({github, context})
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR Prioritization R2 Check
2+
on:
3+
schedule:
4+
- cron: '0 */6 * * 1-5' # Runs every 6 hours during weekdays
5+
workflow_dispatch: # Manual trigger
6+
7+
jobs:
8+
update_project_status:
9+
if: github.repository == 'aws/aws-cdk'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Check and assign R2 Priority to PRs
15+
uses: actions/github-script@v7
16+
with:
17+
github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }}
18+
script: |
19+
const script = require('./scripts/prioritization/assign-r2-priority.js')
20+
await script({github})

0 commit comments

Comments
 (0)