Skip to content

Commit db5c7aa

Browse files
authored
Merge branch 'main' into fix/deepmerge-shared-references
2 parents 8e2a18f + b8ac9ac commit db5c7aa

8 files changed

Lines changed: 28 additions & 113 deletions

File tree

.github/scripts/constants.js

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

.github/scripts/post_release.js

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const { LABEL_PENDING_RELEASE, LABEL_RELEASED } = require('./constants');
1+
const LABEL_PENDING_RELEASE = 'pending-release';
2+
const LABEL_RELEASED = 'completed';
23

34
/**
45
* Fetch issues using GitHub REST API
@@ -37,26 +38,17 @@ const fetchIssues = async ({
3738
};
3839

3940
/**
40-
* Notify new release and close staged GitHub issue
41+
* Update labels on closed issues that are pending release
42+
*
43+
* Swaps the 'pending-release' label to 'completed' on each closed issue.
44+
* GitHub natively links releases to issues, so no comment is needed.
4145
*
4246
* @param {object} gh_client - Pre-authenticated REST client (Octokit)
4347
* @param {string} owner - GitHub Organization
4448
* @param {string} repository - GitHub repository
45-
* @param {string} release_version - GitHub Release version
4649
* @see {@link https://octokit.github.io/rest.js/v18#usage|Octokit client}
4750
*/
48-
const notifyRelease = async ({
49-
gh_client,
50-
core,
51-
owner,
52-
repository,
53-
release_version,
54-
}) => {
55-
const release_url = `https://github.com/${owner}/${repository}/releases/tag/v${release_version.replace(
56-
/v/g,
57-
''
58-
)}`;
59-
51+
const updateLabels = async ({ gh_client, core, owner, repository }) => {
6052
const issues = await fetchIssues({
6153
gh_client: gh_client,
6254
org: owner,
@@ -65,22 +57,7 @@ const notifyRelease = async ({
6557
});
6658

6759
issues.forEach(async (issue) => {
68-
core.info(`Updating issue number ${issue.number}`);
69-
70-
const comment = `This is now released under [${release_version}](${release_url}) version!`;
71-
try {
72-
await gh_client.rest.issues.createComment({
73-
owner: owner,
74-
repo: repository,
75-
body: comment,
76-
issue_number: issue.number,
77-
});
78-
} catch (error) {
79-
core.setFailed(error);
80-
throw new Error(
81-
`Failed to update issue ${issue.number} about ${release_version} release`
82-
);
83-
}
60+
core.info(`Updating labels for issue number ${issue.number}`);
8461

8562
// Remove staged label; keep existing ones
8663
const labels = issue.labels
@@ -106,14 +83,12 @@ const notifyRelease = async ({
10683

10784
// context: https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts
10885
module.exports = async ({ github, context, core }) => {
109-
const { RELEASE_VERSION } = process.env;
110-
core.info(`Running post-release script for ${RELEASE_VERSION} version`);
86+
core.info('Running post-release label update');
11187

112-
await notifyRelease({
88+
await updateLabels({
11389
gh_client: github,
11490
core,
11591
owner: context.repo.owner,
11692
repository: context.repo.repo,
117-
release_version: RELEASE_VERSION,
11893
});
11994
};

.github/workflows/ossf_scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444

4545
# Upload the results to GitHub's code scanning dashboard.
4646
- name: "Upload to code-scanning"
47-
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
47+
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
4848
with:
4949
sarif_file: results.sarif

.github/workflows/post-release.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ name: Post Release
22

33
on:
44
# Triggered manually
5-
workflow_dispatch:
6-
inputs:
7-
versionNumber:
8-
required: true
9-
type: string
10-
description: "If running this manually please insert a version number that corresponds to the latest published in the GitHub releases (i.e. v1.1.1)"
5+
workflow_dispatch: {}
116
# Or triggered as result of a release
127
release:
138
types: [released]
@@ -20,26 +15,13 @@ jobs:
2015
permissions:
2116
contents: read
2217
issues: write
23-
discussions: write
24-
pull-requests: write
2518
runs-on: ubuntu-latest
26-
env:
27-
RELEASE_VERSION: ${{ inputs.versionNumber }}
2819
steps:
2920
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
30-
- name: Get release version
31-
run: |
32-
# The code below does the following:
33-
# 1. If the workflow was triggered manually, it will use the version number provided by the user
34-
# 2. If the workflow was triggered by a release, it will use the version number of the release
35-
if [ -z "$RELEASE_VERSION" ]; then
36-
export RELEASE_VERSION=$(git describe --tags --abbrev=0)
37-
fi
38-
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
39-
- name: Update issues related to release
21+
- name: Update labels on issues related to release
4022
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
4123
with:
4224
github-token: ${{ secrets.GITHUB_TOKEN }}
4325
script: |
4426
const post_release = require('.github/scripts/post_release.js')
45-
await post_release({github, context, core})
27+
await post_release({github, context, core})

examples/app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"aws-cdk-lib": "^2.244.0",
3535
"constructs": "^10.6.0",
3636
"source-map-support": "^0.5.21",
37-
"typescript": "^6.0.2",
37+
"typescript": "^6.0.3",
3838
"vitest": "^4.0.10"
3939
},
4040
"dependencies": {
@@ -52,6 +52,6 @@
5252
"aws-cdk": "^2.1113.0",
5353
"constructs": "^10.6.0",
5454
"esbuild": "^0.28.0",
55-
"typescript": "^6.0.2"
55+
"typescript": "^6.0.3"
5656
}
5757
}

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"middy7": "npm:@middy/core@^7.0.2",
6464
"typedoc": "^0.28.19",
6565
"typedoc-plugin-missing-exports": "^4.1.3",
66-
"typescript": "^6.0.2",
66+
"typescript": "^6.0.3",
6767
"vitest": "^4.1.2"
6868
},
6969
"lint-staged": {

packages/idempotency/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
"@aws-sdk/client-dynamodb": "^3.1014.0",
156156
"@aws-sdk/lib-dynamodb": "^3.1014.0",
157157
"@aws-sdk/util-dynamodb": "^3.996.2",
158-
"@aws/durable-execution-sdk-js": "^1.1.0",
158+
"@aws/durable-execution-sdk-js": "^1.1.1",
159159
"aws-sdk-client-mock": "^4.1.0"
160160
}
161161
}

0 commit comments

Comments
 (0)