Skip to content

Commit d0aaf3c

Browse files
authored
docs(skills): rely on upstream release notes in the release skill (#3278)
1 parent 9eb7307 commit d0aaf3c

1 file changed

Lines changed: 40 additions & 56 deletions

File tree

  • .claude/skills/playwright-release

‎.claude/skills/playwright-release/SKILL.md‎

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: playwright-release
3-
description: Prepare a Playwright Python release. Checks open bugs, writes the Python release notes in microsoft/playwright, opens the release PR, cuts the release branch, and saves a draft GitHub release. Never publishes the release.
3+
description: Prepare a Playwright Python release. Checks open bugs, adds Python-specific changes to the Python release notes in microsoft/playwright, opens the release PR, cuts the release branch, and saves a draft GitHub release. Never publishes the release.
44
---
55

66
# Preparing a Playwright Python release
@@ -13,8 +13,8 @@ Remotes: find the remote for `microsoft/playwright-python` with `git remote -v`.
1313
The commands below call it `upstream`.
1414

1515
What you may push:
16-
- The user's request to prepare the release is the instruction to open the two PRs
17-
in steps 2 and 3.
16+
- The user's request to prepare the release is the instruction to open the PRs
17+
in steps 2 and 3. Step 2 has a PR only when it adds Python changes.
1818
- Cut the release branch (step 4) only when the user tells you to.
1919
- Never publish the release.
2020

@@ -39,45 +39,40 @@ API roll for 1.xx is already on `main`, that PR only moves `DRIVER_VERSION`.
3939

4040
## 2. Release notes (microsoft/playwright)
4141

42-
Write the notes in the roll checkout, on a branch from `origin/main`:
42+
The Python notes in `docs/src/release-notes-python.md` are written in
43+
`microsoft/playwright` together with the Node.js notes. The
44+
`playwright-release-notes` skill there
45+
(`$PW_SRC_DIR/.claude/skills/playwright-release-notes/SKILL.md`) covers that,
46+
including the Python code style. Check that the `## Version 1.xx` section is on the
47+
release branch:
48+
49+
```sh
50+
git -C "$PW_SRC_DIR" fetch origin release-1.xx
51+
git -C "$PW_SRC_DIR" show FETCH_HEAD:docs/src/release-notes-python.md | grep -n '^## Version 1.xx$'
52+
```
53+
54+
If it is missing, tell the user: it should have landed with the Node.js notes.
55+
56+
Then lean towards Python. List the playwright-python commits since the previous
57+
release branch:
58+
59+
```sh
60+
gh api repos/microsoft/playwright-python/compare/release-1.<xx-1>...main \
61+
--jq '.commits[].commit.message | split("\n")[0]'
62+
```
63+
64+
Pick only significant changes that only the Python port has, for example a
65+
different exception type. Leave out minor bug fixes, internal changes, and anything
66+
the notes already cover. If nothing is significant, go to step 3. Otherwise list
67+
the changes for the user and ask whether to add them to the notes.
68+
69+
To add them, write them in the roll checkout, on a branch from `origin/main`:
4370

4471
```sh
4572
git -C "$PW_SRC_DIR" fetch origin main
4673
git -C "$PW_SRC_DIR" checkout -b release-notes-1.xx-python origin/main
4774
```
4875

49-
In `docs/src/release-notes-python.md`, add a `## Version 1.xx` section above the
50-
previous version. Translate it from the `## Version 1.xx` section of
51-
`docs/src/release-notes-js.md`. Compare the `Version 1.63` sections of the two
52-
files to see what a past translation dropped and changed.
53-
54-
- Keep the structure: highlights with emoji headings, `### New APIs` with
55-
`####` groups, `### Announcements`, `### Browser Versions`.
56-
- Remove what Python does not have: the test runner (`@playwright/test`,
57-
`test.*`, config, fixtures, projects, reporters), UI mode, the HTML report,
58-
component testing, the VS Code extension, and `npx playwright test` options.
59-
Remove every API whose `langs` excludes Python. To check an API, look for it in
60-
`playwright/async_api/_generated.py`, or check `langs` in `api.json` (see
61-
"Verifying classifications" in the `playwright-roll` skill).
62-
- Rewrite code samples in Python, with the sync API:
63-
`page.get_by_role("button").click()`. Use snake_case names and Python values
64-
(`True`, `None`).
65-
- Keep API links as docs link macros: `` [`method: Page.frameLocator`] ``,
66-
`` [`option: Tracing.start.ariaSnapshots`] ``,
67-
`` [`event: Page.dialogClosed`] ``. The docs site shows them with Python names.
68-
In plain text, use Python names.
69-
- Commands: write `playwright install`, not `npx playwright install`.
70-
- Lean towards Python. List the playwright-python commits since the previous
71-
release branch:
72-
73-
```sh
74-
gh api repos/microsoft/playwright-python/compare/release-1.<xx-1>...main \
75-
--jq '.commits[].commit.message | split("\n")[0]'
76-
```
77-
78-
If some of them change what users see (for example, a different exception
79-
type), list them for the user and ask whether to add them to the notes.
80-
8176
Commit, push to the user's fork of `microsoft/playwright`, and open the PR. If
8277
the checkout has no remote for the fork, add one. `gh api user --jq .login`
8378
gives the user's login.
@@ -87,9 +82,12 @@ git -C "$PW_SRC_DIR" commit -am "docs: release notes for v1.xx Python"
8782
git -C "$PW_SRC_DIR" push <fork-remote> release-notes-1.xx-python
8883
gh pr create --repo microsoft/playwright --head <login>:release-notes-1.xx-python \
8984
--title "docs: release notes for v1.xx Python" \
90-
--body "- Add \`Version 1.xx\` to the Python release notes, translated from the Node.js notes"
85+
--body "- Update the \`Version 1.xx\` Python release notes with upstream and Python-specific changes"
9186
```
9287

88+
After the PR merges, it needs a cherry-pick to `release-1.xx` (the
89+
`playwright-cherry-pick` skill in `microsoft/playwright`).
90+
9391
Then put the roll checkout back on the release branch. `./scripts/update_api.sh`
9492
reads the docs from it. Run the checkout checks from step 2 of the
9593
`playwright-roll` skill.
@@ -104,28 +102,14 @@ Open a PR from the branch with the roll commit:
104102

105103
- Title: `chore: roll Playwright to v1.xx.y`, where `v1.xx.y` is the Python
106104
release version, even when `DRIVER_VERSION` is a beta build.
107-
- Description: the release notes from step 2, in GitHub markdown (see below).
105+
- Description: the Python release notes, in GitHub markdown (see below).
108106
The user copies this description into the GitHub release, so for this PR it
109107
replaces the "keep PR descriptions short" rule in `AGENTS.md`.
110108

111-
Convert the notes to GitHub markdown yourself:
112-
113-
- Leave out the `## Version 1.xx` heading. Move every other heading up one level
114-
(`###` becomes `##`, `####` becomes `###`).
115-
- Replace each link macro with a full playwright.dev link. Use the Python name as
116-
the link text:
117-
118-
| Macro | GitHub markdown |
119-
|---|---|
120-
| `` [`method: Page.frameLocator`] `` | `[page.frame_locator()](https://playwright.dev/python/docs/api/class-page#page-frame-locator)` |
121-
| `` [`method: Locator.visible`] `` (a property in Python) | `[locator.visible](https://playwright.dev/python/docs/api/class-locator#locator-visible)` |
122-
| `` [`option: Browser.newContext.httpCredentials`] `` | ``[`http_credentials`](https://playwright.dev/python/docs/api/class-browser#browser-new-context-option-http-credentials)`` |
123-
| `` [`event: BrowserContext.dialogClosed`] `` | `[browser_context.on("dialogclosed")](https://playwright.dev/python/docs/api/class-browsercontext#browser-context-event-dialog-closed)` |
124-
125-
The page is `class-` and the class name in lower case. The anchor is the class
126-
and member names in kebab-case. Options add `-option-<name>`, and events add
127-
`-event-<name>`. A member is a property in Python if `_generated.py` declares
128-
it with `@property`.
109+
Convert the `## Version 1.xx` section of `release-notes-python.md` on
110+
`release-1.xx` to GitHub markdown with Python link text. Follow step 3 of the
111+
`playwright-release-notes` skill in `microsoft/playwright`, including its link
112+
check and the Python scan.
129113

130114
Wait for the user to review and merge the PR. Do not merge it yourself.
131115

0 commit comments

Comments
 (0)