|
| 1 | +# Playwright Java |
| 2 | + |
| 3 | +The Java client is a port of the JavaScript client in `../playwright/packages/playwright-core/src/client/`. When implementing or changing a method, read the corresponding JS file first and mirror its logic. |
| 4 | + |
| 5 | +Project checkouts (including the upstream `playwright` repo) live in the parent directory (`../`). Use the `gh` cli to interact with GitHub. |
| 6 | + |
| 7 | +## Commit Convention |
| 8 | + |
| 9 | +Semantic commit messages: `label(scope): description` |
| 10 | + |
| 11 | +Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops` |
| 12 | + |
| 13 | +```bash |
| 14 | +git checkout -b fix-39562 |
| 15 | +# ... make changes ... |
| 16 | +git add <changed-files> |
| 17 | +git commit -m "$(cat <<'EOF' |
| 18 | +fix(proxy): handle SOCKS proxy authentication |
| 19 | +
|
| 20 | +Fixes: https://github.com/microsoft/playwright-java/issues/39562 |
| 21 | +EOF |
| 22 | +)" |
| 23 | +# **Never `git push` without an explicit instruction to push.** |
| 24 | +git push origin fix-39562 |
| 25 | +gh pr create --repo microsoft/playwright-java --head <user>:fix-39562 \ |
| 26 | + --title "fix(proxy): handle SOCKS proxy authentication" \ |
| 27 | + --body "$(cat <<'EOF' |
| 28 | +## Summary |
| 29 | +- <describe the change very! briefly> |
| 30 | +
|
| 31 | +Fixes https://github.com/microsoft/playwright-java/issues/39562 |
| 32 | +EOF |
| 33 | +)" |
| 34 | +``` |
| 35 | + |
| 36 | +Never add Co-Authored-By agents in commit message. |
| 37 | +Never add "Generated with" in commit message. |
| 38 | +Never add test plan to PR description. Keep PR description short — a few bullet points at most. |
| 39 | +Branch naming for issue fixes: `fix-<issue-number>`. |
| 40 | + |
| 41 | +**Never amend commits.** Always create a new commit for follow-up changes, even when iterating on an open PR. Amending rewrites history and forces a force-push, losing the incremental review trail. Only amend if the user explicitly says so. |
| 42 | + |
| 43 | +**Never `git push` without an explicit instruction to push.** Applies even when a PR is already open for the branch — additional commits are immediately visible to reviewers. Commit locally, report what was committed, and wait. Only push when the user's message contains "push", "upload", "create PR", "ship it", or equivalent. |
| 44 | + |
| 45 | +## Skills |
| 46 | + |
| 47 | +- **playwright-roll** (`.claude/skills/playwright-roll/SKILL.md`) — roll Playwright Java to a new upstream version: bump the driver, regenerate the API, and port relevant upstream changes. |
| 48 | +- **playwright-java-release** (`.claude/skills/playwright-java-release/SKILL.md`) — prepare a release after the rolling PR merges: cut the release branch, mark the Maven version, and draft the GitHub release. |
0 commit comments