Skip to content

Release 3.56 #5427

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

Draft
wants to merge 192 commits into
base: release-3.50
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
75ebe79
Merge main into feature/dev-execution
aws-toolkit-automation Oct 21, 2024
f180714
Merge main into feature/dev-execution
aws-toolkit-automation Oct 21, 2024
a1ab506
Merge main into feature/dev-execution
aws-toolkit-automation Oct 21, 2024
ab23fa8
Merge main into feature/dev-execution
aws-toolkit-automation Oct 21, 2024
a06b479
Merge main into feature/dev-execution
aws-toolkit-automation Oct 22, 2024
19fa0d0
Merge main into feature/dev-execution
aws-toolkit-automation Oct 22, 2024
b1bc96d
Merge main into feature/dev-execution
aws-toolkit-automation Oct 22, 2024
b8fb9d6
Merge main into feature/dev-execution
aws-toolkit-automation Oct 23, 2024
5bb8ec7
Merge main into feature/dev-execution
aws-toolkit-automation Oct 23, 2024
779acc8
Merge main into feature/dev-execution
aws-toolkit-automation Oct 23, 2024
c979d1d
Merge main into feature/dev-execution
aws-toolkit-automation Oct 24, 2024
6e8cfac
Merge main into feature/dev-execution
aws-toolkit-automation Oct 24, 2024
3f53053
Merge main into feature/dev-execution
aws-toolkit-automation Oct 28, 2024
020fc22
Merge main into feature/dev-execution
aws-toolkit-automation Oct 28, 2024
d2c8712
Merge main into feature/dev-execution
aws-toolkit-automation Oct 28, 2024
b9ca048
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
9b80339
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
1190383
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
1213a55
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
9f54b91
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
7b11a9b
Merge main into feature/dev-execution
aws-toolkit-automation Oct 29, 2024
c6a0f28
Merge main into feature/dev-execution
aws-toolkit-automation Oct 30, 2024
fa75b82
Merge main into feature/dev-execution
aws-toolkit-automation Oct 30, 2024
492fd1b
Merge main into feature/dev-execution
aws-toolkit-automation Oct 30, 2024
52dc60b
Merge main into feature/dev-execution
aws-toolkit-automation Oct 31, 2024
2783f6b
Merge main into feature/dev-execution
aws-toolkit-automation Oct 31, 2024
a576cc2
Merge main into feature/dev-execution
aws-toolkit-automation Oct 31, 2024
ece7b3a
Merge main into feature/dev-execution
aws-toolkit-automation Oct 31, 2024
4528b93
Merge main into feature/dev-execution
aws-toolkit-automation Oct 31, 2024
144d085
Merge main into feature/dev-execution
aws-toolkit-automation Nov 1, 2024
52f2646
Merge main into feature/dev-execution
aws-toolkit-automation Nov 1, 2024
67b82bd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 4, 2024
11b4074
Merge main into feature/dev-execution
aws-toolkit-automation Nov 5, 2024
a737df7
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
bfd1d9c
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
5ef4624
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
1e3b4bd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
63da24a
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
c5f0a6d
Merge main into feature/dev-execution
aws-toolkit-automation Nov 6, 2024
e83be09
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
3e8f2cd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
f521ab4
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
8a54e4f
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
39e5ddd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
3a6c9e8
Merge main into feature/dev-execution
aws-toolkit-automation Nov 7, 2024
5a2cd7e
Merge main into feature/dev-execution
aws-toolkit-automation Nov 8, 2024
c92c65f
Merge main into feature/dev-execution
aws-toolkit-automation Nov 8, 2024
59c26dd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 11, 2024
b811842
Merge main into feature/dev-execution
aws-toolkit-automation Nov 11, 2024
cf6f8af
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
cb37e54
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
8c894cd
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
41b4b51
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
b25b6c0
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
1513a47
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
dfb6a83
Merge main into feature/dev-execution
aws-toolkit-automation Nov 12, 2024
2a971e4
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
8452348
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
59b5717
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
ba4a55d
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
267afee
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
c847af9
Merge main into feature/dev-execution
aws-toolkit-automation Nov 13, 2024
8b9f0cb
Merge main into feature/dev-execution
aws-toolkit-automation Nov 14, 2024
2d9574f
Merge main into feature/dev-execution
aws-toolkit-automation Nov 14, 2024
fae7999
Merge main into feature/dev-execution
aws-toolkit-automation Nov 14, 2024
52bc481
Merge main into feature/dev-execution
aws-toolkit-automation Nov 14, 2024
6825653
Merge main into feature/dev-execution
aws-toolkit-automation Nov 15, 2024
d7b04db
Merge main into feature/dev-execution
aws-toolkit-automation Nov 15, 2024
966e680
Merge main into feature/dev-execution
aws-toolkit-automation Nov 16, 2024
efd9ebf
Merge main into feature/dev-execution
aws-toolkit-automation Nov 18, 2024
eb22f09
feat(feature dev): Add setting to allow Q to run code and test comman…
willyyhuang Nov 18, 2024
e179af8
Merge main into feature/dev-execution
aws-toolkit-automation Nov 18, 2024
a19a532
Merge main into feature/dev-execution
aws-toolkit-automation Nov 18, 2024
350a68b
Merge main into feature/dev-execution
aws-toolkit-automation Nov 19, 2024
c40de28
Merge main into feature/dev-execution
aws-toolkit-automation Nov 19, 2024
80da639
Merge main into feature/dev-execution
aws-toolkit-automation Nov 19, 2024
c408a22
Merge main into feature/dev-execution
aws-toolkit-automation Nov 19, 2024
0cd9271
Merge main into feature/dev-execution
aws-toolkit-automation Nov 19, 2024
d9b614f
Merge main into feature/dev-execution
aws-toolkit-automation Nov 20, 2024
f5baa9e
Merge main into feature/dev-execution
aws-toolkit-automation Nov 20, 2024
cd78308
Merge main into feature/dev-execution
aws-toolkit-automation Nov 20, 2024
13bf7e0
Merge main into feature/dev-execution
aws-toolkit-automation Nov 20, 2024
9a7b650
Merge main into feature/dev-execution
aws-toolkit-automation Nov 20, 2024
fb9c5d1
Merge main into feature/dev-execution
aws-toolkit-automation Nov 21, 2024
e5fdda3
Merge main into feature/dev-execution
aws-toolkit-automation Nov 21, 2024
101ed85
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
3efa7d1
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
98ebe97
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
99fd902
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
d134e34
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
84e0ee7
Merge main into feature/dev-execution
aws-toolkit-automation Nov 22, 2024
f87e47a
Merge main into feature/dev-execution
aws-toolkit-automation Nov 25, 2024
b7acdf9
Merge main into feature/dev-execution
aws-toolkit-automation Nov 26, 2024
3d4a38e
Merge main into feature/dev-execution
aws-toolkit-automation Nov 26, 2024
a0ed5fe
Merge remote-tracking branch 'origin/main' into HEAD
neilk-aws Jan 23, 2025
7d8aa84
Merge pull request #5135 from aws/autoMerge/feature/dev-execution
rli Jan 23, 2025
48b7b4e
Updating SNAPSHOT version to 3.51-SNAPSHOT
Jan 23, 2025
d714fa7
Merge main into feature/dev-execution
aws-toolkit-automation Jan 23, 2025
325d1d7
Fix: add disposable to messageBus.connect() usage (#5294)
samgst-amazon Jan 24, 2025
406d0ea
Merge main into feature/dev-execution
aws-toolkit-automation Jan 24, 2025
232a273
Update file generation logic and file upload functionality for dev-ex…
karanA-aws Jan 24, 2025
65fc1a2
fix(chat/inline workspace context): fix updating workspace index bloc…
Will-ShaoHua Jan 27, 2025
e3f7adb
Merge main into feature/dev-execution
aws-toolkit-automation Jan 27, 2025
ec81010
feat: Allow including binary files when auto build is enabled (#5299)
osdemah Jan 27, 2025
a7f2fe4
Add configurable key shortcuts for inline and make JB and Q suggestio…
andrewyuq Jan 28, 2025
f1adf98
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
b66f1d5
telemetry(amazonq): add fields for code fix events (#5300)
ctlai95 Jan 28, 2025
da0ce18
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
86e993e
docs(amazonq): Update autobuild setting strings (#5301)
neilk-aws Jan 28, 2025
8a1d250
fix(amazonq): fix for /test project payload collection filter (#5305)
ashishrp-aws Jan 28, 2025
dc893f5
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
f9547e8
fix(amazonq): For security reasons, disabled auto linkify for pure te…
dogusata Jan 28, 2025
8c4e77d
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
7363959
fix(amazonq): open diff in a new tab when another modal is open (#5289)
xiaox-chen Jan 28, 2025
41ce1e3
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
ac60b47
build: Fix improper condition disabling UI tests (#5298)
rli Jan 28, 2025
c2d4417
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
aa98252
config(chat): try opt in implicit @workspace context once if users ar…
Will-ShaoHua Jan 28, 2025
9b1deb1
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
7c7afc4
chore: fix lint errors
rli Jan 28, 2025
445dd9e
Fix for gitignore filter for project payload. (#5309)
ashishrp-aws Jan 28, 2025
5adb242
Merge main into feature/dev-execution
aws-toolkit-automation Jan 28, 2025
0cd4bca
Merge pull request #5307 from aws/feature/dev-execution
rli Jan 28, 2025
989a470
fix: revert test changes from /dev commit breaking code scan tests
rli Jan 29, 2025
fe69ffb
Updating version to 3.51
Jan 29, 2025
00be1cc
Updating SNAPSHOT version to 3.52-SNAPSHOT
Jan 30, 2025
a545699
Adds event listener for notifying UI that AB feature configurations h…
spfink Jan 31, 2025
02ec702
fix(amazonq): add boundary check to UserModificationTracker to preven…
evanliu048 Feb 3, 2025
5470418
fix(amazonq): for /test adding backoff and retry for payload upload A…
ashishrp-aws Feb 3, 2025
5fa889b
feat(amazonq): grouping options for code issues (#5314)
ctlai95 Feb 4, 2025
0ab6d04
fix(amazonq): /test align placeholder text across IDEs (#5321)
chungjac Feb 4, 2025
76f7518
fix(amazonq): for /test internal users project payload limit increase…
ashishrp-aws Feb 4, 2025
f94910f
bug fix(amazonq): fix an issue where user action is accept but teleme…
andrewyuq Feb 4, 2025
cf48b0c
fix(amazonq): broken citation links (#5317)
dogusata Feb 4, 2025
805cb39
feat(amazonq): Prefetch next inline recommendation (#5290)
evanliu048 Feb 4, 2025
6d4e34f
feat(amazonq): allow Amazon Q endpoint to be configured through the r…
rli Feb 4, 2025
8318155
Add 251 EAP 1 profile (#5284)
rli Feb 4, 2025
ac43387
fix(amazonq): Adding backoff and retry for export result archive stre…
ashishrp-aws Feb 5, 2025
d1006f6
Revert "fix(amazonq): for /test internal users project payload limit …
ashishrp-aws Feb 5, 2025
970fee0
telemetry(amazonq): Adding requestId to telemetry if UTG fails at Sta…
laileni-aws Feb 5, 2025
17dcd44
fix(amazonq): Adding payload manifest for payload limit errors. (#5324)
ashishrp-aws Feb 5, 2025
c164d4b
Updating version to 3.52
Feb 6, 2025
d148b66
Updating SNAPSHOT version to 3.53-SNAPSHOT
Feb 6, 2025
5416099
feat(amazonq): support Java 21 (#5226)
dhasani23 Feb 7, 2025
e3cfc8c
Fix semaphore not updated in pair could make Q unusable (#5341)
andrewyuq Feb 7, 2025
21f6dec
Revert "feat(amazonq): support Java 21 (#5226)" (#5343)
dhasani23 Feb 7, 2025
489bb4a
added change log for fix #5341 (#5344)
andrewyuq Feb 7, 2025
669c4c9
Updating version to 3.53
Feb 7, 2025
8686962
Updating SNAPSHOT version to 3.54-SNAPSHOT
Feb 7, 2025
db2e39f
Revert "Revert "feat(amazonq): support Java 21 (#5226)" (#5343)" (#5346)
dhasani23 Feb 8, 2025
fd95bc1
fix(amazonq): show correct error message (#5335)
dhasani23 Feb 8, 2025
9e3760e
fix infinite service call of sendUserModification on failure (#5350)
Will-ShaoHua Feb 10, 2025
1872cf7
fix(inline): empty string customization arn (no customization selecte…
Will-ShaoHua Feb 10, 2025
9a60e50
revert(amazonq): hide java 21 option (#5354)
dhasani23 Feb 11, 2025
a766f62
revert the behavior of making IntelliSense and Q suggestions co-exist…
andrewyuq Feb 11, 2025
6d26aaf
Updating version to 3.54
Feb 11, 2025
21f820f
Updating SNAPSHOT version to 3.55-SNAPSHOT
Feb 11, 2025
97bd375
fix(amazonq): filter out frequent client error from codegeneration te…
linyuxi-0511 Feb 11, 2025
18590f8
fix(amazonq): enable syntax highlighting when viewing diff for genera…
chungjac Feb 11, 2025
0c88e67
fix(amazonq): Truncating user prompt for unit test generation. (#5359)
laileni-aws Feb 11, 2025
eb19cbc
telemetry(amazonq): refactor doc telemetry to v2 version (#5316)
KevinDing1 Feb 11, 2025
991abe2
fix(amazonq): Q infers source file from active test file for UTG. (#5…
laileni-aws Feb 11, 2025
8c69af2
Updated AuthTelemetry.addConnection telemetry event to Telemetry.auth…
LokeshDogga13 Feb 11, 2025
0761f14
Revert "revert(amazonq): hide java 21 option (#5354)" (#5358)
dhasani23 Feb 11, 2025
f401e08
build: fix 251 build failure from resolving ui-tests-starter dependen…
rli Feb 11, 2025
82cbd6c
build: include 2025.1 in prerelease automation (#5330)
rli Feb 11, 2025
7087f28
Adding gitignore usecase for Test Generation to add more extensions a…
ashishrp-aws Feb 12, 2025
951d519
config(amazonq): customization override should respect users' select…
evanliu048 Feb 12, 2025
b440147
fix(amazonq): fix for /test authentication check (#5355)
ashishrp-aws Feb 12, 2025
c8e4ee4
fix(amazonq): code review navigation not focusing selected issues (#5…
zuoyaofu Feb 12, 2025
68a179a
Revert "feat(amazonq): Prefetch next inline recommendation (#5290)" (…
evanliu048 Feb 13, 2025
39eacec
ci: use single matrix for all prerelease artifacts (#5362)
rli Feb 13, 2025
19931e5
ci: steal commit message linter from VSC toolkit (#5351)
rli Feb 13, 2025
3b6cdc3
Updating version to 3.55
Feb 13, 2025
0972fcc
Updating SNAPSHOT version to 3.56-SNAPSHOT
Feb 13, 2025
3621194
refactor(amazonq): improve error handling of workspace index (#5373)
leigaol Feb 14, 2025
4971993
refactor(Q tech debt): make cwsprClientAdapr stateless and obtain sdk…
Will-ShaoHua Feb 14, 2025
3d9586d
fix(amazonq): only search for sql strings in java files (#5376)
dhasani23 Feb 14, 2025
0625472
fix(telemetry): fix region warning when initializing telemetry with n…
rli Feb 15, 2025
9426764
fix: Fix idea.log path referenced in plugin run configurations (#5369)
rli Feb 15, 2025
fd7eb31
revert(amazonq): pr #5331 broke tests by throwing NotAMock (#5383)
Will-ShaoHua Feb 18, 2025
b72f78b
telemetry(amazonq) add feedback functionality with thumbs up/down (#5…
Randall-Jiang Feb 18, 2025
3ef26d8
build(243): fix build failures from rider failing to resolve test fra…
rli Feb 18, 2025
2eca5a7
telemetry(amazonq): Aligning telemetry strings in VSC and JB. (#5382)
laileni-aws Feb 18, 2025
666798a
fix(amazonq): update logic for converting gitignore pattern to regex …
gandhi-21 Feb 18, 2025
f5460c7
log(amazonq): update log string when workspace process is not spinned…
Will-ShaoHua Feb 18, 2025
e9c40fa
fix(amazonq): fix tab acceptAction not working in JB remote (#5379)
andrewyuq Feb 18, 2025
93b3b5a
fix(amazonq): /doc add suppoort for uploading architecture diagrams (…
vikshe Feb 18, 2025
f0911c4
Adding more extensions and no extension files to test generation usec…
ashishrp-aws Feb 19, 2025
beabdf1
config(amazonq): update polling config for codefix (#5390)
ctlai95 Feb 19, 2025
1f11ba3
fix(amazonq): skip empty plan tables (#5395)
dhasani23 Feb 20, 2025
0d01981
Updating version to 3.56
Feb 20, 2025
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
29 changes: 29 additions & 0 deletions .changes/3.51.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"date" : "2025-01-29",
"version" : "3.51",
"entries" : [ {
"type" : "feature",
"description" : "Amazon Q: Now the Amazon Q suggestions can co-exist with Jetbrains suggestions, with tab behavior configurable in the settings."
}, {
"type" : "feature",
"description" : "Amazon Q: Amazon Q inline now has configurable shortcuts for various actions including accept and browsing through suggestions."
}, {
"type" : "feature",
"description" : "Add setting to allow Q /dev to run code and test commands"
}, {
"type" : "feature",
"description" : "Amazon Q: The suggestion popup will hide by default and will be displayed when the suggestion is being hovered over."
}, {
"type" : "bugfix",
"description" : "Amazon Q /doc: fix open diff in a tab when another modal is open"
}, {
"type" : "bugfix",
"description" : "Amazon Q /test: Fixed an issue which incorrectly caused payload size exceeded exception when collecting project payload files"
}, {
"type" : "bugfix",
"description" : "fix(amazonq): For security reasons, disabled auto linkify for link texts coming in markdown other than [TEXT](URL) format"
}, {
"type" : "bugfix",
"description" : "Fix UI freeze caused by updating workspace index on non background context"
} ]
}
23 changes: 23 additions & 0 deletions .changes/3.52.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"date" : "2025-02-06",
"version" : "3.52",
"entries" : [ {
"type" : "feature",
"description" : "Adds event listener for notifying UI that AB feature configurations have been resolved"
}, {
"type" : "feature",
"description" : "Amazon Q /review: Code issues can now be grouped by severity or file location."
}, {
"type" : "feature",
"description" : "Inline suggestions: Pre-fetch recommendations to reduce suggestion latency."
}, {
"type" : "bugfix",
"description" : "fix(amazonq): Citation links are not clickable as numbers, but appear as non-clickable texts"
}, {
"type" : "bugfix",
"description" : "Amazon Q: Prevent IndexOutOfBoundsException by adding boundary checks for invalid range markers (#5187)"
}, {
"type" : "bugfix",
"description" : "/test placeholder text aligned across IDEs"
} ]
}
8 changes: 8 additions & 0 deletions .changes/3.53.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"date" : "2025-02-07",
"version" : "3.53",
"entries" : [ {
"type" : "bugfix",
"description" : "Amazon Q: Fixed an issue where in a specific scenario when receiving multiple suggestions with JetBrains suggestions visible, users are not able to accept the suggestion."
} ]
}
8 changes: 8 additions & 0 deletions .changes/3.54.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"date" : "2025-02-11",
"version" : "3.54",
"entries" : [ {
"type" : "bugfix",
"description" : "Amazon Q: Reverting the behavior of making JetBrains suggestions(IntelliSense) and Q suggestions co-exist"
} ]
}
23 changes: 23 additions & 0 deletions .changes/3.55.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"date" : "2025-02-13",
"version" : "3.55",
"entries" : [ {
"type" : "feature",
"description" : "/transform: support transformations to Java 21"
}, {
"type" : "bugfix",
"description" : "Enable syntax highlighting when viewing diff for /test"
}, {
"type" : "bugfix",
"description" : "Amazon Q /test: Truncating user input to 4096 characters for unit test generation."
}, {
"type" : "bugfix",
"description" : "Amazon Q /review: Unable to navigate to code location when selecting issues"
}, {
"type" : "bugfix",
"description" : "Amazon Q /test: Q identify active test file and infer source file for test generation."
}, {
"type" : "removal",
"description" : "Amazon Q: Revert prefetch logic to enable more stable inline completion."
} ]
}
8 changes: 8 additions & 0 deletions .changes/3.56.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"date" : "2025-02-20",
"version" : "3.56",
"entries" : [ {
"type" : "feature",
"description" : "Amazon Q /doc: support making changes to architecture diagrams"
} ]
}
28 changes: 28 additions & 0 deletions .github/workflows/lint-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches: [main]
pull_request:
# By default, CI will trigger on opened/synchronize/reopened event types.
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request
# Note: To re-run `lint-commits` after fixing the PR title, close-and-reopen the PR.
branches: [main, feature/*]

# Cancel old jobs when a pull request is updated.
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint-commits:
# Note: To re-run `lint-commits` after fixing the PR title, close-and-reopen the PR.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check PR title
run: |
node "$GITHUB_WORKSPACE/.github/workflows/lintcommit.js"
213 changes: 213 additions & 0 deletions .github/workflows/lintcommit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Checks that a PR title conforms to our custom flavor of "conventional commits"
// (https://www.conventionalcommits.org/).
//
// To run self-tests, simply run this script:
//
// node lintcommit.js test
//
// TODO: "PR must describe Problem in a concise way, and Solution".
// TODO: this script intentionally avoids github APIs so that it is locally-debuggable, but if those
// are needed, use actions/github-script as described in: https://github.com/actions/github-script?tab=readme-ov-file#run-a-separate-file
//

const fs = require('fs')
// This script intentionally avoids github APIs so that:
// 1. it is locally-debuggable
// 2. the CI job is fast ("npm install" is slow)
// But if we still want to use github API, we can keep it fast by using `actions/github-script` as
// described in: https://github.com/actions/github-script?tab=readme-ov-file#run-a-separate-file
//
// const core = require('@actions/core')
// const github = require('@actions/github')

const types = new Set([
'build',
// Don't allow "chore" because it's over-used.
// Instead, add a new type if absolutely needed (if the existing ones can't possibly apply).
// 'chore',
'ci',
'config',
'deps',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'telemetry',
'test',
'types',
])

// TODO: Validate against this once we are satisfied with this list.
const scopes = new Set([
'amazonq',
'core',
'explorer',
'lambda',
'logs',
'redshift',
'q-chat',
'q-featuredev',
'q-inlinechat',
'q-transform',
'sam',
's3',
'telemetry',
'toolkit',
'ui',
])
void scopes

/**
* Checks that a pull request title, or commit message subject, follows the expected format:
*
* type(scope): message
*
* Returns undefined if `title` is valid, else an error message.
*/
function validateTitle(title) {
const parts = title.split(':')
const subject = parts.slice(1).join(':').trim()

if (title.startsWith('Merge')) {
return undefined
}

if (parts.length < 2) {
return 'missing colon (:) char'
}

const typeScope = parts[0]

const [type, scope] = typeScope.split(/\(([^)]+)\)$/)

if (/\s+/.test(type)) {
return `type contains whitespace: "${type}"`
} else if (type === 'chore') {
return 'Do not use "chore" as a type. If the existing valid types are insufficent, add a new type to the `lintcommit.js` script.'
} else if (!types.has(type)) {
return `invalid type "${type}"`
} else if (!scope && typeScope.includes('(')) {
return `must be formatted like type(scope):`
} else if (!scope && ['feat', 'fix'].includes(type)) {
return `"${type}" type must include a scope (example: "${type}(amazonq)")`
} else if (scope && scope.length > 30) {
return 'invalid scope (must be <=30 chars)'
} else if (scope && /[^- a-z0-9]+/.test(scope)) {
return `invalid scope (must be lowercase, ascii only): "${scope}"`
} else if (subject.length === 0) {
return 'empty subject'
} else if (subject.length > 100) {
return 'invalid subject (must be <=100 chars)'
}

return undefined
}

function run() {
const eventData = JSON.parse(fs.readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
const pullRequest = eventData.pull_request

// console.log(eventData)

if (!pullRequest) {
console.info('No pull request found in the context')
return
}

const title = pullRequest.title

const failReason = validateTitle(title)
const msg = failReason
? `
Invalid pull request title: \`${title}\`

* Problem: ${failReason}
* Expected format: \`type(scope): subject...\`
* type: one of (${Array.from(types).join(', ')})
* scope: lowercase, <30 chars
* subject: must be <100 chars
* documentation: https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title
* Hint: *close and re-open the PR* to re-trigger CI (after fixing the PR title).
`
: `Pull request title matches the [expected format](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#pull-request-title).`

if (process.env.GITHUB_STEP_SUMMARY) {
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, msg)
}

if (failReason) {
console.error(msg)
process.exit(1)
} else {
console.info(msg)
}
}

function _test() {
const tests = {
' foo(scope): bar': 'type contains whitespace: " foo"',
'build: update build process': undefined,
'chore: update dependencies':
'Do not use "chore" as a type. If the existing valid types are insufficent, add a new type to the `lintcommit.js` script.',
'ci: configure CI/CD': undefined,
'config: update configuration files': undefined,
'deps: bump the aws-sdk group across 1 directory with 5 updates': undefined,
'docs: update documentation': undefined,
'feat(foo): add new feature': undefined,
'feat(foo):': 'empty subject',
'feat foo):': 'type contains whitespace: "feat foo)"',
'feat(foo)): sujet': 'invalid type "feat(foo))"',
'feat(foo: sujet': 'invalid type "feat(foo"',
'feat(Q Foo Bar): bar': 'invalid scope (must be lowercase, ascii only): "Q Foo Bar"',
'feat(scope):': 'empty subject',
'feat(q foo bar): bar': undefined,
'feat(foo): x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ':
'invalid subject (must be <=100 chars)',
'feat: foo': '"feat" type must include a scope (example: "feat(amazonq)")',
'fix: foo': '"fix" type must include a scope (example: "fix(amazonq)")',
'fix(a-b-c): resolve issue': undefined,
'foo (scope): bar': 'type contains whitespace: "foo "',
'invalid title': 'missing colon (:) char',
'perf: optimize performance': undefined,
'refactor: improve code structure': undefined,
'revert: feat: add new feature': undefined,
'style: format code': undefined,
'test: add new tests': undefined,
'types: add type definitions': undefined,
'Merge staging into feature/lambda-get-started': undefined,
}

let passed = 0
let failed = 0

for (const [title, expected] of Object.entries(tests)) {
const result = validateTitle(title)
if (result === expected) {
console.log(`✅ Test passed for "${title}"`)
passed++
} else {
console.log(`❌ Test failed for "${title}" (expected "${expected}", got "${result}")`)
failed++
}
}

console.log(`\n${passed} tests passed, ${failed} tests failed`)
}

function main() {
const mode = process.argv[2]

if (mode === 'test') {
_test()
} else {
run()
}
}

main()
Loading
Loading