Skip to content

Commit ccd5275

Browse files
authored
Merge branch 'main' into dependabot/github_actions/dot-github/workflows/actions/setup-java-6.0.0
2 parents dc5bc53 + a0c7312 commit ccd5275

19 files changed

Lines changed: 3387 additions & 1843 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
applyTo: "CHANGELOG.md,src/defaults.json,lib/defaults.json,src/api-compatibility.json"
3+
---
4+
5+
# Merging release, mergeback, and backport PRs
6+
7+
The release process creates a cascade of PRs (`main``releases/vN`, then
8+
`releases/vN``main` mergeback, then `releases/vN``releases/v(N-1)`
9+
backport). These PRs reliably touch `CHANGELOG.md`, `src/defaults.json` /
10+
`lib/defaults.json` (bundle/CLI version bump), and `src/api-compatibility.json`.
11+
12+
Such PRs **must be merged with a merge commit**. Never squash or rebase, as
13+
that breaks the branch linkage the release automation relies on.
14+
15+
When arming auto-merge on these PRs, use `--merge` (e.g. `gh pr merge --merge`),
16+
not `--squash` or `--rebase`.

.github/workflows/pr-checks.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,33 @@ jobs:
7272
sarif_file: eslint.sarif
7373
category: eslint
7474

75+
changetool-tests:
76+
name: changetool unit tests
77+
permissions:
78+
contents: read
79+
runs-on: ubuntu-slim
80+
timeout-minutes: 10
81+
82+
concurrency:
83+
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
84+
group: pr-checks-changetool-tests-${{ github.ref }}-${{ github.event_name }}
85+
86+
steps:
87+
- name: Checkout repository
88+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
89+
90+
- name: Set up Node.js
91+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
92+
with:
93+
node-version: 24
94+
cache: 'npm'
95+
96+
- name: Install dependencies
97+
run: npm ci
98+
99+
- name: Run changetool unit tests
100+
run: npm --workspace changetool test
101+
75102
# These checks do not need to be run as part of the same matrix that we use for the `unit-tests`
76103
# job.
77104
other-checks:

CONTRIBUTING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,13 @@ Here are a few things you can do that will increase the likelihood of your pull
6060
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `releases/v3` release branch.
6161

6262
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
63-
1. The workflow run will open a pull request titled "Merge main into releases/v3". Follow the steps on the checklist in the pull request. Once you've checked off all but the last two of these, approve the PR and automerge it.
63+
1. The workflow run will open a pull request titled "Merge main into releases/v3". Follow the steps on the checklist in the pull request. Once you've checked off all but the last two of these, approve the PR and automerge it **with a merge commit** (`gh pr merge --merge`).
6464
1. When the "Merge main into releases/v3" pull request is merged into the `releases/v3` branch, a mergeback pull request to `main` will be automatically created. This mergeback pull request incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v3" pull request, and bumps the patch version of the CodeQL Action.
6565
1. If a backport to an older major version is required, a pull request targeting that version's branch will also be automatically created.
66-
1. Approve the mergeback and backport pull request (if applicable) and automerge them.
66+
1. Approve the mergeback and backport pull request (if applicable) and automerge them **with a merge commit** (`gh pr merge --merge`).
67+
68+
> [!NOTE]
69+
> The release, mergeback, and backport pull requests must always be merged with a merge commit — **never squash or rebase**. The mergeback tags the release using the merge commit of the "Merge main into releases/v3" pull request, so squashing or rebasing breaks tagging and the branch linkage the release automation relies on.
6770
6871
Once the mergeback and backport pull request have been merged, the release is complete.
6972

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,18 @@ export default [
209209
],
210210
},
211211
},
212+
{
213+
files: ["scripts/changetool/**/*.ts"],
214+
215+
languageOptions: {
216+
parserOptions: {
217+
project: "./scripts/changetool/tsconfig.json",
218+
},
219+
},
220+
221+
rules: {
222+
"no-console": "off",
223+
"import/extensions": "off",
224+
},
225+
},
212226
];

0 commit comments

Comments
 (0)