diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml new file mode 100644 index 0000000..3e939e6 --- /dev/null +++ b/.github/workflows/changelog-check.yml @@ -0,0 +1,23 @@ +name: Changelog nav check + +on: + pull_request: + paths: + - 'changelog/**' + - 'docs.json' + - 'merge-queue/changelog.mdx' + - 'flaky-tests/changelog.mdx' + - 'scripts/sync-changelog.py' + +jobs: + check-sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Check changelog nav is in sync + run: python3 scripts/sync-changelog.py --check diff --git a/.github/workflows/changelog-sync.yml b/.github/workflows/changelog-sync.yml new file mode 100644 index 0000000..c6d926e --- /dev/null +++ b/.github/workflows/changelog-sync.yml @@ -0,0 +1,37 @@ +name: Changelog nav sync + +on: + push: + branches: [main] + paths: + - 'changelog/**' + +permissions: + contents: write + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Run changelog sync + run: python3 scripts/sync-changelog.py + + - name: Check for changes + id: diff + run: | + git diff --quiet && echo "changed=false" >> "$GITHUB_OUTPUT" || echo "changed=true" >> "$GITHUB_OUTPUT" + + - name: Commit and push + if: steps.diff.outputs.changed == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add docs.json changelog/index.mdx merge-queue/changelog.mdx flaky-tests/changelog.mdx + git commit -m "chore(changelog): sync nav from changelog entries" + git push diff --git a/.gitignore b/.gitignore index 8e5bbf0..cdc2ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.py \ No newline at end of file +*.py +!scripts/*.py diff --git a/README.md b/README.md index 84a219e..7b962af 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,23 @@ Sticky labels that mark how a PR was sourced or where it needs extra eyes. Addit GitHub's default labels (`bug`, `documentation`, `enhancement`, etc.) are also present but not used in our automated workflows. +## Changelog automation + +Changelog entries live in `changelog/*.mdx`. Each entry's frontmatter (`title`, `description`, `date`, `category`, `type`) is the single source of truth — the nav sidebar, master index, and product-page indexes are all generated from it. + +### Adding a changelog entry + +1. Create `changelog/YYYY-MM-DD-.mdx` with the required frontmatter. +2. Run `python3 scripts/sync-changelog.py` to regenerate the four nav files. +3. Commit both the new entry and the updated nav files. + +### CI enforcement + +Two GitHub Actions workflows keep things in sync: + +- **`changelog-check.yml`** runs on PRs that touch changelog-related files. It calls `sync-changelog.py --check`, which exits non-zero if the nav files don't match what the entries would generate. If this check fails, run the sync script locally and push the result. +- **`changelog-sync.yml`** runs on pushes to `main`. If a changelog entry landed without the nav files being regenerated, the action auto-commits the fix. This is a safety net — the PR check should catch drift before merge. + ## Need help? ### Troubleshooting diff --git a/changelog/index.mdx b/changelog/index.mdx index 0b368a7..be480ef 100644 --- a/changelog/index.mdx +++ b/changelog/index.mdx @@ -4,7 +4,6 @@ description: "Recent updates to Trunk." rss: true --- - ## 2026 ### May 2026 @@ -15,12 +14,6 @@ rss: true Automatic bot comment hiding, a skip-batching toggle, and Celebration Mode come to the Trunk for GitHub Chrome Extension. - - **[Flaky Tests: Organization-Scoped Test Labels](/changelog/2026-05-18-flaky-tests-test-labels)** - - Tag, organize, and filter your test suite with org-wide labels. - - **[Flaky Tests: Failure Count Monitor](/changelog/2026-05-18-flaky-tests-failure-count-monitor)** @@ -33,6 +26,12 @@ rss: true Monitors can now apply labels to tests instead of classifying them as flaky or broken. + + **[Flaky Tests: Organization-Scoped Test Labels](/changelog/2026-05-18-flaky-tests-test-labels)** + + Tag, organize, and filter your test suite with org-wide labels. + + ### April 2026 @@ -98,15 +97,15 @@ rss: true - **[Merge Queue: Prometheus-Compatible Metrics Endpoint](/changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint)** + **[Merge Queue: Isolate PRs from Batching with noBatch](/changelog/2026-03-13-merge-queue-isolate-prs-from-batching-with-nobatch)** - Merge Queue now exposes a Prometheus-compatible metrics endpoint for integration with your existing monitoring stack. + PRs can now opt out of batching to test in isolation. When a high-risk PR is in the queue, batching it with other PRs means a failure forces the entire batch to restart. - **[Merge Queue: Isolate PRs from Batching with noBatch](/changelog/2026-03-13-merge-queue-isolate-prs-from-batching-with-nobatch)** + **[Merge Queue: Prometheus-Compatible Metrics Endpoint](/changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint)** - PRs can now opt out of batching to test in isolation. When a high-risk PR is in the queue, batching it with other PRs means a failure forces the entire batch to restart. + Merge Queue now exposes a Prometheus-compatible metrics endpoint for integration with your existing monitoring stack. @@ -201,15 +200,15 @@ rss: true ### September 2025 - **[Flaky Tests: Auto quarantine no longer applied to broken tests](/changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests)** + **[Flaky Test: Corrected CLI test failure reporting flag](/changelog/2025-09-09-flaky-test-corrected-cli-test-failure-reporting-flag)** - Auto-quarantining test cases have been updated to target only 'flaky' tests specifically. Previously, both 'flaky' and 'broken' tests were subject to automatic quarantine. + Resolved an issue where test failures were not being reported or displayed when using the --disable-quarantining flag. - **[Flaky Test: Corrected CLI test failure reporting flag](/changelog/2025-09-09-flaky-test-corrected-cli-test-failure-reporting-flag)** + **[Flaky Tests: Auto quarantine no longer applied to broken tests](/changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests)** - Resolved an issue where test failures were not being reported or displayed when using the --disable-quarantining flag. + Auto-quarantining test cases have been updated to target only 'flaky' tests specifically. Previously, both 'flaky' and 'broken' tests were subject to automatic quarantine. @@ -220,18 +219,18 @@ rss: true ### August 2025 - - **[Flaky Tests: New endpoint and XCode 26 support](/changelog/2025-08-25-flaky-tests-new-endpoint-and-xcode-26-support)** - - A new endpoint is available from the trunk api at /flaky-tests/list-unhealthy-tests for your CI/CD integrations. - - **[CI Autopilot: Stacked PRs, CI Triggers and MCP support](/changelog/2025-08-25-ci-autopilot-stacked-prs-ci-triggers-and-mcp-support)** Onboarding UX improvements; Stacked PR User experience improvements to generate less noise in your repo/feeds. + + **[Flaky Tests: New endpoint and XCode 26 support](/changelog/2025-08-25-flaky-tests-new-endpoint-and-xcode-26-support)** + + A new endpoint is available from the trunk api at /flaky-tests/list-unhealthy-tests for your CI/CD integrations. + + **[CI Autopilot: Private beta initial release](/changelog/2025-08-15-ci-autopilot-private-beta-initial-release)** @@ -280,12 +279,6 @@ rss: true ### May 2025 - - **[Plugins 1.7.0](/changelog/2025-05-28-plugins-1-7-0)** - - ✨ Improvements - - **[CLI 1.24.0](/changelog/2025-05-28-cli-1-24-0)** @@ -298,6 +291,12 @@ rss: true We’ve updated the Merge Queue Failure tab so that only PRs that failed and have not been resubmitted to the queue are displayed. + + **[Plugins 1.7.0](/changelog/2025-05-28-plugins-1-7-0)** + + ✨ Improvements + + **[Flaky Tests: Improved test failure details](/changelog/2025-05-21-improved-test-failure-details)** @@ -324,22 +323,16 @@ rss: true ### April 2025 - - **[Flaky Tests: Link Ticket to Test Case API](/changelog/2025-04-25-link-ticket-to-test-case-api)** - - Today, we’re introducing a new Link Ticket to Test Case API that allows you to link your existing Linear or Jira tickets to tests in the Flaky Tests dashboard. - - **[Flaky Tests: Linear integration](/changelog/2025-04-25-linear-integration)** We now have a built-in Linear integration that creates tickets with relevant test and failure information from your flaky tests. - - **[Flaky Tests: Track environment-specific flakes with variants](/changelog/2025-04-17-track-environment-specific-flakes-with-variants)** + + **[Flaky Tests: Link Ticket to Test Case API](/changelog/2025-04-25-link-ticket-to-test-case-api)** - Starting today, the --variant option should be used to upload test results when the same tests are run on different environments, also known as matrix builds. + Today, we’re introducing a new Link Ticket to Test Case API that allows you to link your existing Linear or Jira tickets to tests in the Flaky Tests dashboard. @@ -348,6 +341,12 @@ rss: true We’ve added a new updateQueue API to Trunk Merge Queue that enables you to update a Merge Queue’s state. + + **[Flaky Tests: Track environment-specific flakes with variants](/changelog/2025-04-17-track-environment-specific-flakes-with-variants)** + + Starting today, the --variant option should be used to upload test results when the same tests are run on different environments, also known as matrix builds. + + **[Plugins 1.6.8](/changelog/2025-04-11-plugins-1-6-8)** @@ -396,18 +395,18 @@ rss: true ### January 2025 - - **[Plugins 1.6.7](/changelog/2025-01-29-plugins-1-6-7)** - - New security linter: snyk. Thanks @fsargent for the contribution!; New action: terraform-docs. Thanks @Gowiem for the contribution!. - - **[Flaky Tests: Webhook Integration for Slack, Microsoft Teams, GitHub Issues, and Linear](/changelog/2025-01-29-flaky-tests-webhook-integration-for-slack-microsoft-teams-github-issues-and-linea)** We're excited to introduce webhook integrations for Slack, Microsoft Teams, GitHub Issues, and Linear. + + **[Plugins 1.6.7](/changelog/2025-01-29-plugins-1-6-7)** + + New security linter: snyk. Thanks @fsargent for the contribution!; New action: terraform-docs. Thanks @Gowiem for the contribution!. + + **[Merge: Webhook notifications for Microsoft Teams and Slack](/changelog/2025-01-28-merge-webhook-notifications-for-microsoft-teams-and-slack)** @@ -481,18 +480,18 @@ rss: true We’re continually refining our UX with the help of our beta users’ feedback and we’ve made some changes to how Flaky Tests displays key information on the dashboards. - - **[Flaky Tests: Data uploads view](/changelog/2024-11-04-flaky-tests-data-uploads-view)** - - A common pain point during onboarding is the lack of transparency after the Trunk CLI uploads test results. - - **[CLI 1.22.8](/changelog/2024-11-04-cli-1-22-8)** Fix a daemon connection error that could occur on Windows; Fix a daemon connection error that could happen on some machines with restricted TCP permissions. + + **[Flaky Tests: Data uploads view](/changelog/2024-11-04-flaky-tests-data-uploads-view)** + + A common pain point during onboarding is the lack of transparency after the Trunk CLI uploads test results. + + ### October 2024 @@ -522,15 +521,15 @@ rss: true ### September 2024 - **[Plugins 1.6.3](/changelog/2024-09-30-plugins-1-6-3)** + **[CLI 1.22.6](/changelog/2024-09-30-cli-1-22-6)** - 🎁 New + Fix a rare deadlock that could cause a linter execution to hang indefinitely. - **[CLI 1.22.6](/changelog/2024-09-30-cli-1-22-6)** + **[Plugins 1.6.3](/changelog/2024-09-30-plugins-1-6-3)** - Fix a rare deadlock that could cause a linter execution to hang indefinitely. + 🎁 New @@ -600,15 +599,15 @@ rss: true - **[Plugins 1.6.0](/changelog/2024-06-11-plugins-1-6-0)** + **[CLI 1.22.2](/changelog/2024-06-11-cli-1-22-2)** - New linter Vale. Thanks @gewenyu99 for the contribution!; New formatter php-cs-fixer. Thanks @matthewbaggett for the contribution!. + Add an option to skip files that are missing compile commands. - **[CLI 1.22.2](/changelog/2024-06-11-cli-1-22-2)** + **[Plugins 1.6.0](/changelog/2024-06-11-plugins-1-6-0)** - Add an option to skip files that are missing compile commands. + New linter Vale. Thanks @gewenyu99 for the contribution!; New formatter php-cs-fixer. Thanks @matthewbaggett for the contribution!. ### May 2024 @@ -821,15 +820,15 @@ rss: true - **[VSCode 3.9.0](/changelog/2023-11-20-vscode-3-9-0)** + **[Plugins 1.3.0](/changelog/2023-11-20-plugins-1-3-0)** - The install flow is streamlined to guide users to a welcome page, or to open their trunk config, depending on their workbench state. + New tools: gulp, tailwindcss, tsc, webpack.; New formatter: dotnet-format (MacOS support coming soon). - **[Plugins 1.3.0](/changelog/2023-11-20-plugins-1-3-0)** + **[VSCode 3.9.0](/changelog/2023-11-20-vscode-3-9-0)** - New tools: gulp, tailwindcss, tsc, webpack.; New formatter: dotnet-format (MacOS support coming soon). + The install flow is streamlined to guide users to a welcome page, or to open their trunk config, depending on their workbench state. @@ -859,15 +858,15 @@ rss: true - **[Plugins 1.2.6](/changelog/2023-10-17-plugins-1-2-6)** + **[CLI 1.17.1](/changelog/2023-10-17-1-17-1)** - New formatter: pre-commit-hooks (more coming soon); New linter: markdown-link-check. + Fix bug where trunk init --single-player-mode would fail if you do not have a .git/info directory; Proper handling of percent encoding in SARIF output. - **[CLI 1.17.1](/changelog/2023-10-17-1-17-1)** + **[Plugins 1.2.6](/changelog/2023-10-17-plugins-1-2-6)** - Fix bug where trunk init --single-player-mode would fail if you do not have a .git/info directory; Proper handling of percent encoding in SARIF output. + New formatter: pre-commit-hooks (more coming soon); New linter: markdown-link-check. @@ -885,15 +884,15 @@ rss: true ### September 2023 - **[VSCode 3.4.6](/changelog/2023-09-29-vscode-3-4-6)** + **[Plugins 1.2.5](/changelog/2023-09-29-plugins-1-2-5)** - Fixed a bug where commands were registered before the extension had properly initialized; Fixed telemetry. + Update svgo to use new fixverb / fixprompt support. - **[Plugins 1.2.5](/changelog/2023-09-29-plugins-1-2-5)** + **[VSCode 3.4.6](/changelog/2023-09-29-vscode-3-4-6)** - Update svgo to use new fixverb / fixprompt support. + Fixed a bug where commands were registered before the extension had properly initialized; Fixed telemetry. @@ -909,15 +908,15 @@ rss: true - **[VSCode 3.4.9](/changelog/2023-09-26-vscode-3-4-9)** + **[Plugins 1.2.4](/changelog/2023-09-26-plugins-1-2-4)** - Added a new setting for controlling whether to add Trunk Tools to PATH. + New tool: clangd. - **[Plugins 1.2.4](/changelog/2023-09-26-plugins-1-2-4)** + **[VSCode 3.4.9](/changelog/2023-09-26-vscode-3-4-9)** - New tool: clangd. + Added a new setting for controlling whether to add Trunk Tools to PATH. @@ -977,9 +976,9 @@ rss: true - **[Plugins 1.2.1](/changelog/2023-08-18-plugins-1-2-1)** + **[CLI 1.14.0](/changelog/2023-08-18-1-14-0)** - Downgrade default ruby version to 3.1.4. + Introducing Trunk Tools: Hermetic runtime and CLI manager; Linux arm64 support added. @@ -989,9 +988,9 @@ rss: true - **[CLI 1.14.0](/changelog/2023-08-18-1-14-0)** + **[Plugins 1.2.1](/changelog/2023-08-18-plugins-1-2-1)** - Introducing Trunk Tools: Hermetic runtime and CLI manager; Linux arm64 support added. + Downgrade default ruby version to 3.1.4. diff --git a/docs.json b/docs.json index 179c148..5288c14 100644 --- a/docs.json +++ b/docs.json @@ -603,21 +603,21 @@ "group": "2026", "pages": [ "changelog/2026-05-19-merge-queue-chrome-extension-updates", - "changelog/2026-05-18-flaky-tests-test-labels", - "changelog/2026-05-18-flaky-tests-monitor-label-actions", "changelog/2026-05-18-flaky-tests-failure-count-monitor", + "changelog/2026-05-18-flaky-tests-monitor-label-actions", + "changelog/2026-05-18-flaky-tests-test-labels", "changelog/2026-04-30-merge-queue-chrome-extension", "changelog/2026-04-21-merge-queue-drill-down-into-merge-metrics", "changelog/2026-04-13-merge-queue-terraform-provider", "changelog/2026-03-27-flaky-tests-automatically-create-jira-issues-from-webhooks", "changelog/2026-03-26-merge-queue-testing-details-api-now-includes-impacted-target-information", - "changelog/2026-03-25-merge-queue-slack-app-home-tab", "changelog/2026-03-25-merge-queue-multiple-queues-per-repo-with-grouped-selector", + "changelog/2026-03-25-merge-queue-slack-app-home-tab", "changelog/2026-03-24-flaky-tests-configurable-threshold-monitors-with-live-preview", - "changelog/2026-03-19-merge-queue-route-slack-notifications-to-multiple-channels", "changelog/2026-03-19-merge-queue-list-pull-requests-public-api-endpoint", - "changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint", + "changelog/2026-03-19-merge-queue-route-slack-notifications-to-multiple-channels", "changelog/2026-03-13-merge-queue-isolate-prs-from-batching-with-nobatch", + "changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint", "changelog/2026-03-09-merge-queue-impacted-targets-visible-on-the-merge-graph", "changelog/2026-03-05-merge-queue-custom-merge-commit-titles", "changelog/2026-02-06-merge-queue-public-api-for-queue-management", @@ -636,11 +636,11 @@ "changelog/2025-11-18-flaky-tests-new-api-endpoints", "changelog/2025-11-12-plugins-1-7-4", "changelog/2025-10-09-plugins-1-7-3", - "changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests", "changelog/2025-09-09-flaky-test-corrected-cli-test-failure-reporting-flag", + "changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests", "changelog/2025-09-01-ui-refresh-enhanced-dashboard-experience", - "changelog/2025-08-25-flaky-tests-new-endpoint-and-xcode-26-support", "changelog/2025-08-25-ci-autopilot-stacked-prs-ci-triggers-and-mcp-support", + "changelog/2025-08-25-flaky-tests-new-endpoint-and-xcode-26-support", "changelog/2025-08-15-ci-autopilot-private-beta-initial-release", "changelog/2025-08-12-code-quality-plugins-1-7-2-and-cli-1-25-0", "changelog/2025-07-02-flaky-tests-commit-details-in-timeline", @@ -648,17 +648,17 @@ "changelog/2025-06-24-plugins-1-7-1", "changelog/2025-06-18-test-suite-and-class-available-on-test-details-page", "changelog/2025-06-11-flaky-tests-test-case-quarantining-setting-changed-webhook", - "changelog/2025-05-28-plugins-1-7-0", - "changelog/2025-05-28-merge-queue-failure-tab-only-displays-current-failures", "changelog/2025-05-28-cli-1-24-0", + "changelog/2025-05-28-merge-queue-failure-tab-only-displays-current-failures", + "changelog/2025-05-28-plugins-1-7-0", "changelog/2025-05-21-improved-test-failure-details", "changelog/2025-05-15-rspec-plugin-for-ruby-repos", "changelog/2025-05-09-sunsetting-ci-analytics-and-code-quality-web-issue-browser", "changelog/2025-05-08-merge-queue-webhooks-on-batched-pr-merges", - "changelog/2025-04-25-link-ticket-to-test-case-api", "changelog/2025-04-25-linear-integration", - "changelog/2025-04-17-track-environment-specific-flakes-with-variants", + "changelog/2025-04-25-link-ticket-to-test-case-api", "changelog/2025-04-17-merge-queue-updatequeue-api", + "changelog/2025-04-17-track-environment-specific-flakes-with-variants", "changelog/2025-04-11-plugins-1-6-8", "changelog/2025-04-09-flaky-tests-test-detail-dashboard-ui-improvements", "changelog/2025-03-26-flaky-tests-quarantined-tests-api", @@ -666,8 +666,8 @@ "changelog/2025-02-26-flaky-tests-detailed-jira-integration-status-updates", "changelog/2025-02-14-flaky-tests-set-a-custom-stable-branch", "changelog/2025-02-10-flaky-tests-weekly-reports", - "changelog/2025-01-29-plugins-1-6-7", "changelog/2025-01-29-flaky-tests-webhook-integration-for-slack-microsoft-teams-github-issues-and-linea", + "changelog/2025-01-29-plugins-1-6-7", "changelog/2025-01-28-merge-webhook-notifications-for-microsoft-teams-and-slack", "changelog/2025-01-21-web-app-sign-in-with-microsoft", "changelog/2025-01-16-flaky-tests-codeowners-support", @@ -684,14 +684,14 @@ "changelog/2024-11-12-flaky-tests-new-onboarding-flow", "changelog/2024-11-11-flaky-tests-added-flaky-test-commands-to-trunk-cli", "changelog/2024-11-08-flaky-tests-dashboard-improvements", - "changelog/2024-11-04-flaky-tests-data-uploads-view", "changelog/2024-11-04-cli-1-22-8", + "changelog/2024-11-04-flaky-tests-data-uploads-view", "changelog/2024-10-28-flaky-tests-improved-support-for-ios-and-swift-developers", "changelog/2024-10-17-flaky-tests-pr-test-summaries", "changelog/2024-10-15-plugins-1-6-4", "changelog/2024-10-14-flaky-tests-quarantining", - "changelog/2024-09-30-plugins-1-6-3", "changelog/2024-09-30-cli-1-22-6", + "changelog/2024-09-30-plugins-1-6-3", "changelog/2024-09-04-cli-1-22-5", "changelog/2024-08-27-flaky-tests-jira-integration", "changelog/2024-08-20-plugins-1-6-2", @@ -702,18 +702,18 @@ "changelog/2024-07-15-test-analytics-beta-issue-handling-mvp-copy-issue-details", "changelog/2024-07-10-trunk-merge-queue-public-api-updated", "changelog/2024-06-28-test-analytics-beta-ux-improvements-dashboard-test-details", - "changelog/2024-06-11-plugins-1-6-0", "changelog/2024-06-11-cli-1-22-2", + "changelog/2024-06-11-plugins-1-6-0", "changelog/2024-05-26-testing-using-draft-prs", "changelog/2024-05-17-first-class-support-for-trunk-merge-queue-nx", "changelog/2024-05-07-cli-1-22-1", "changelog/2024-05-02-vscode-3-18-0", "changelog/2024-04-29-vscode-3-17-0", "changelog/2024-04-24-plugins-1-5-0", - "changelog/2024-04-23-vscode-3-16-0", "changelog/2024-04-23-cli-1-22-0", - "changelog/2024-04-05-merge-web-hook-support", + "changelog/2024-04-23-vscode-3-16-0", "changelog/2024-04-05-merge-batching-support", + "changelog/2024-04-05-merge-web-hook-support", "changelog/2024-03-29-optimistic-merging-and-pending-failure-depth", "changelog/2024-03-18-plugins-1-4-5", "changelog/2024-03-15-trunk-merge-pr-prioritization", @@ -721,8 +721,8 @@ "changelog/2024-03-06-vscode-3-15-0", "changelog/2024-03-01-plugins-1-4-4", "changelog/2024-02-26-vscode-3-14-0", - "changelog/2024-02-20-merge-support-for-forked-and-open-source-repos", "changelog/2024-02-20-cli-1-20-1", + "changelog/2024-02-20-merge-support-for-forked-and-open-source-repos", "changelog/2024-02-16-plugins-1-4-3", "changelog/2024-02-15-cli-1-20-0", "changelog/2024-01-12-merge-automatic-status-checks", @@ -741,22 +741,22 @@ "changelog/2023-12-05-cli-1-18-0", "changelog/2023-12-01-vscode-3-11-0", "changelog/2023-11-21-trunk-merge-parallel-queues", - "changelog/2023-11-20-vscode-3-9-0", "changelog/2023-11-20-plugins-1-3-0", + "changelog/2023-11-20-vscode-3-9-0", "changelog/2023-11-13-vscode-3-8-0", "changelog/2023-11-09-1-17-2", "changelog/2023-11-01-vscode-3-7-0", "changelog/2023-10-26-vscode-3-6-0", - "changelog/2023-10-17-plugins-1-2-6", "changelog/2023-10-17-1-17-1", + "changelog/2023-10-17-plugins-1-2-6", "changelog/2023-10-13-1-17-0", "changelog/2023-10-12-vscode-3-5-0", - "changelog/2023-09-29-vscode-3-4-6", "changelog/2023-09-29-plugins-1-2-5", + "changelog/2023-09-29-vscode-3-4-6", "changelog/2023-09-27-1-16-2", - "changelog/2023-09-26-vscode-3-4-9", - "changelog/2023-09-26-plugins-1-2-4", "changelog/2023-09-26-1-16-1", + "changelog/2023-09-26-plugins-1-2-4", + "changelog/2023-09-26-vscode-3-4-9", "changelog/2023-09-20-vscode-3-4-8", "changelog/2023-09-18-1-16-0", "changelog/2023-09-13-vscode-3-4-7", @@ -766,9 +766,9 @@ "changelog/2023-08-23-plugins-1-2-2", "changelog/2023-08-22-vscode-3-4-5", "changelog/2023-08-21-1-14-1", - "changelog/2023-08-18-plugins-1-2-1", - "changelog/2023-08-18-plugins-1-2-0", "changelog/2023-08-18-1-14-0", + "changelog/2023-08-18-plugins-1-2-0", + "changelog/2023-08-18-plugins-1-2-1", "changelog/2023-08-10-plugins-1-1-1", "changelog/2023-08-01-plugins-1-1-0" ] diff --git a/flaky-tests/changelog.mdx b/flaky-tests/changelog.mdx index 93a4f0d..b0ff374 100644 --- a/flaky-tests/changelog.mdx +++ b/flaky-tests/changelog.mdx @@ -4,17 +4,10 @@ description: "Recent updates to Trunk Flaky Tests." rss: true --- - ## 2026 ### May 2026 - - **[Flaky Tests: Organization-Scoped Test Labels](/changelog/2026-05-18-flaky-tests-test-labels)** - - Tag, organize, and filter your test suite with org-wide labels. - - **[Flaky Tests: Failure Count Monitor](/changelog/2026-05-18-flaky-tests-failure-count-monitor)** @@ -27,6 +20,12 @@ rss: true Monitors can now apply labels to tests instead of classifying them as flaky or broken. + + **[Flaky Tests: Organization-Scoped Test Labels](/changelog/2026-05-18-flaky-tests-test-labels)** + + Tag, organize, and filter your test suite with org-wide labels. + + ### March 2026 @@ -63,15 +62,15 @@ rss: true ### September 2025 - **[Flaky Tests: Auto quarantine no longer applied to broken tests](/changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests)** + **[Flaky Test: Corrected CLI test failure reporting flag](/changelog/2025-09-09-flaky-test-corrected-cli-test-failure-reporting-flag)** - Auto-quarantining test cases have been updated to target only 'flaky' tests specifically. Previously, both 'flaky' and 'broken' tests were subject to automatic quarantine. + Resolved an issue where test failures were not being reported or displayed when using the --disable-quarantining flag. - **[Flaky Test: Corrected CLI test failure reporting flag](/changelog/2025-09-09-flaky-test-corrected-cli-test-failure-reporting-flag)** + **[Flaky Tests: Auto quarantine no longer applied to broken tests](/changelog/2025-09-09-flaky-tests-auto-quarantine-no-longer-applied-to-broken-tests)** - Resolved an issue where test failures were not being reported or displayed when using the --disable-quarantining flag. + Auto-quarantining test cases have been updated to target only 'flaky' tests specifically. Previously, both 'flaky' and 'broken' tests were subject to automatic quarantine. ### August 2025 @@ -127,15 +126,15 @@ rss: true ### April 2025 - **[Flaky Tests: Link Ticket to Test Case API](/changelog/2025-04-25-link-ticket-to-test-case-api)** + **[Flaky Tests: Linear integration](/changelog/2025-04-25-linear-integration)** - Today, we’re introducing a new Link Ticket to Test Case API that allows you to link your existing Linear or Jira tickets to tests in the Flaky Tests dashboard. + We now have a built-in Linear integration that creates tickets with relevant test and failure information from your flaky tests. - **[Flaky Tests: Linear integration](/changelog/2025-04-25-linear-integration)** + **[Flaky Tests: Link Ticket to Test Case API](/changelog/2025-04-25-link-ticket-to-test-case-api)** - We now have a built-in Linear integration that creates tickets with relevant test and failure information from your flaky tests. + Today, we’re introducing a new Link Ticket to Test Case API that allows you to link your existing Linear or Jira tickets to tests in the Flaky Tests dashboard. diff --git a/merge-queue/changelog.mdx b/merge-queue/changelog.mdx index ef47fe8..e27b9bb 100644 --- a/merge-queue/changelog.mdx +++ b/merge-queue/changelog.mdx @@ -4,7 +4,6 @@ description: "Recent updates to Trunk Merge Queue." rss: true --- - ## 2026 ### May 2026 @@ -68,15 +67,15 @@ rss: true - **[Merge Queue: Prometheus-Compatible Metrics Endpoint](/changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint)** + **[Merge Queue: Isolate PRs from Batching with noBatch](/changelog/2026-03-13-merge-queue-isolate-prs-from-batching-with-nobatch)** - Merge Queue now exposes a Prometheus-compatible metrics endpoint for integration with your existing monitoring stack. + PRs can now opt out of batching to test in isolation. When a high-risk PR is in the queue, batching it with other PRs means a failure forces the entire batch to restart. - **[Merge Queue: Isolate PRs from Batching with noBatch](/changelog/2026-03-13-merge-queue-isolate-prs-from-batching-with-nobatch)** + **[Merge Queue: Prometheus-Compatible Metrics Endpoint](/changelog/2026-03-13-merge-queue-prometheus-compatible-metrics-endpoint)** - PRs can now opt out of batching to test in isolation. When a high-risk PR is in the queue, batching it with other PRs means a failure forces the entire batch to restart. + Merge Queue now exposes a Prometheus-compatible metrics endpoint for integration with your existing monitoring stack. diff --git a/scripts/sync-changelog.py b/scripts/sync-changelog.py new file mode 100755 index 0000000..9979b72 --- /dev/null +++ b/scripts/sync-changelog.py @@ -0,0 +1,258 @@ +#!/usr/bin/env python3 +"""Sync the changelog navigation across the four sites it lives on. + +The single source of truth is the frontmatter of each `changelog/*.mdx` entry: + + title: Quoted, "Product: Title" format + description: Quoted, one-sentence summary used in the body + date: Unquoted ISO date (YYYY-MM-DD) + category: Unquoted product name — Merge Queue / Flaky Tests / Code Quality + / CI Autopilot / Web App + type: Optional. "new-feature" or "update". Not used in nav rendering. + +This script rewrites four files from those entries: + + 1. docs.json + Surgically replaces the `Changelog` tab's year-group `pages` arrays. + Newest entries first. + + 2. changelog/index.mdx + Master index page with the tag-filter UI. One block per entry, + grouped by `## YYYY` and `### Month YYYY`. Newest first. + + 3. merge-queue/changelog.mdx + Product-page index. Same shape as the master, but filtered to + `category: Merge Queue`. + + 4. flaky-tests/changelog.mdx + Same as above, filtered to `category: Flaky Tests`. + +Categories without a product-page index (Code Quality, CI Autopilot, Web App) +still appear in docs.json and the master index but get no product-page entry. + +Usage: + python3 scripts/sync-changelog.py apply changes in place + python3 scripts/sync-changelog.py --check exit 1 if any file would change +""" + +from __future__ import annotations + +import json +import re +import sys +from datetime import date +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parent.parent +CHANGELOG_DIR = REPO_ROOT / "changelog" +DOCS_JSON = REPO_ROOT / "docs.json" +MASTER_INDEX = CHANGELOG_DIR / "index.mdx" +PRODUCT_PAGES = { + "Merge Queue": REPO_ROOT / "merge-queue" / "changelog.mdx", + "Flaky Tests": REPO_ROOT / "flaky-tests" / "changelog.mdx", +} + +MONTHS = [ + "January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December", +] + + +def parse_frontmatter(path: Path) -> dict | None: + """Read YAML frontmatter from an MDX file. Returns None for files that + don't open with a `---` frontmatter delimiter (e.g., the index file).""" + text = path.read_text(encoding="utf-8") + if not text.startswith("---\n"): + return None + end = text.find("\n---\n", 4) + if end == -1: + return None + block = text[4:end] + out: dict[str, str] = {} + for line in block.splitlines(): + if ":" not in line: + continue + key, _, value = line.partition(":") + key = key.strip() + value = value.strip() + if value.startswith('"') and value.endswith('"'): + value = value[1:-1] + out[key] = value + return out + + +def load_entries() -> list[dict]: + """Read every entry under changelog/, drop the index, return sorted (newest first).""" + entries = [] + for mdx in sorted(CHANGELOG_DIR.glob("*.mdx")): + if mdx.name == "index.mdx": + continue + fm = parse_frontmatter(mdx) + if not fm: + raise SystemExit(f"FATAL: {mdx} has no readable frontmatter") + required = ("title", "description", "date", "category") + missing = [k for k in required if k not in fm] + if missing: + raise SystemExit(f"FATAL: {mdx} missing required frontmatter: {missing}") + try: + dt = date.fromisoformat(fm["date"]) + except ValueError: + raise SystemExit(f"FATAL: {mdx} has unparseable date: {fm['date']!r}") + entries.append({ + "slug": mdx.stem, + "title": fm["title"], + "description": fm["description"], + "date": dt, + "category": fm["category"], + "path": f"changelog/{mdx.stem}", + }) + # Newest first. Stable order within a day: filename (slug) alphabetical. + entries.sort(key=lambda e: (-e["date"].toordinal(), e["slug"])) + return entries + + +def label_for(dt: date) -> str: + """Render the date as `Month D, YYYY` for the attribute.""" + return f"{MONTHS[dt.month - 1]} {dt.day}, {dt.year}" + + +def render_update_block(entry: dict) -> str: + """Render a single block. Indentation matches existing files (2 spaces).""" + return ( + f'\n' + f' **[{entry["title"]}](/{entry["path"]})**\n' + f"\n" + f" {entry['description']}\n" + f"\n" + ) + + +def render_mdx_body(entries: list[dict]) -> str: + """Render the year/month-grouped body of an index .mdx file. + Caller is responsible for the frontmatter.""" + lines: list[str] = [] + + # Group by year, then by month within each year. + by_year: dict[int, list[dict]] = {} + for e in entries: + by_year.setdefault(e["date"].year, []).append(e) + + years_sorted = sorted(by_year.keys(), reverse=True) + for i, year in enumerate(years_sorted): + if i > 0: + lines.append("") + lines.append("") + lines.append(f"## {year}") + lines.append("") + + by_month: dict[int, list[dict]] = {} + for e in by_year[year]: + by_month.setdefault(e["date"].month, []).append(e) + months_sorted = sorted(by_month.keys(), reverse=True) + for j, month in enumerate(months_sorted): + if j > 0: + lines.append("") + lines.append(f"### {MONTHS[month - 1]} {year}") + lines.append("") + month_entries = by_month[month] + for k, e in enumerate(month_entries): + lines.append(render_update_block(e).rstrip()) + if k < len(month_entries) - 1: + lines.append("") + lines.append("") + return "\n".join(lines) + + +def render_mdx_file(entries: list[dict], frontmatter: str) -> str: + """Compose the full .mdx file: frontmatter + autogen body.""" + return frontmatter + render_mdx_body(entries) + + +def extract_existing_frontmatter(path: Path) -> str: + """Return the literal `---\\n...\\n---\\n` frontmatter from an existing file, + so the script preserves it byte-for-byte (title, description, rss flag, etc.).""" + text = path.read_text(encoding="utf-8") + if not text.startswith("---\n"): + raise SystemExit(f"FATAL: {path} missing frontmatter") + end = text.find("\n---\n", 4) + if end == -1: + raise SystemExit(f"FATAL: {path} frontmatter not closed") + return text[: end + len("\n---\n")] + + +def render_docs_json(entries: list[dict]) -> str: + """Surgically rewrite the Changelog tab's year-group pages. + Round-trips through json with indent=2 and a trailing newline.""" + doc = json.loads(DOCS_JSON.read_text(encoding="utf-8")) + tabs = doc.get("navigation", {}).get("tabs", []) + changelog_tab = next((t for t in tabs if isinstance(t, dict) and t.get("tab") == "Changelog"), None) + if changelog_tab is None: + raise SystemExit("FATAL: docs.json has no Changelog tab") + + # Bucket entries by year for the year-group pages arrays. + by_year: dict[int, list[dict]] = {} + for e in entries: + by_year.setdefault(e["date"].year, []).append(e) + + # Preserve the leading "changelog/index" entry and rebuild the year groups. + new_pages: list = ["changelog/index"] + for year in sorted(by_year.keys(), reverse=True): + new_pages.append({ + "group": str(year), + "pages": [e["path"] for e in by_year[year]], + }) + changelog_tab["pages"] = new_pages + + return json.dumps(doc, indent=2, ensure_ascii=False) + "\n" + + +def maybe_write(path: Path, new_text: str, check_only: bool) -> bool: + """Compare desired content against current. Return True if a change is/would-be made.""" + current = path.read_text(encoding="utf-8") if path.exists() else "" + if current == new_text: + return False + if check_only: + print(f"DRIFT: {path.relative_to(REPO_ROOT)}") + return True + path.write_text(new_text, encoding="utf-8") + print(f"wrote: {path.relative_to(REPO_ROOT)}") + return True + + +def main() -> int: + check_only = "--check" in sys.argv[1:] + + entries = load_entries() + + drift = False + + # 1. docs.json + drift |= maybe_write(DOCS_JSON, render_docs_json(entries), check_only) + + # 2. changelog/index.mdx (all entries) + fm = extract_existing_frontmatter(MASTER_INDEX) + drift |= maybe_write(MASTER_INDEX, render_mdx_file(entries, fm), check_only) + + # 3 & 4. product-page indexes (filtered) + for category, path in PRODUCT_PAGES.items(): + filtered = [e for e in entries if e["category"] == category] + fm = extract_existing_frontmatter(path) + drift |= maybe_write(path, render_mdx_file(filtered, fm), check_only) + + counts = {} + for e in entries: + counts[e["category"]] = counts.get(e["category"], 0) + 1 + print() + print(f"Total entries: {len(entries)}") + for cat in sorted(counts): + in_product = " (rendered to product page)" if cat in PRODUCT_PAGES else "" + print(f" {cat}: {counts[cat]}{in_product}") + + if check_only and drift: + print("\nERROR: changelog nav is out of sync. Run `python3 scripts/sync-changelog.py`.") + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(main())