Skip to content

Commit 4eecb41

Browse files
committed
QOL: Issues, Workflows
1 parent 1131881 commit 4eecb41

9 files changed

Lines changed: 342 additions & 61 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ko_fi: vinyzu

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Bug Report
2+
description: Something doesn't work like it should? Tell us!
3+
title: "[Bug]: "
4+
labels: ["bug", "unconfirmed"]
5+
assignees:
6+
- vinyzu
7+
type: bug
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this bug report!
13+
Please first check if the same issue has already been reported and if the Bug Report is valid.
14+
15+
- type: checkboxes
16+
attributes:
17+
label: Checklist before reporting
18+
description: Please make sure you've completed the following steps before submitting a bug report.
19+
options:
20+
- label: I have searched for [similar issues](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues?q=sort%3Arelevance%20is%3Aissue) and didn't find a duplicate.
21+
required: true
22+
- label: I have updated to the latest version of Patchright to verify the issue still exists.
23+
required: true
24+
- label: I have verified that this issue does not occur when using [Playwright](https://github.com/microsoft/playwright/) directly.
25+
required: true
26+
27+
- type: input
28+
id: version
29+
attributes:
30+
label: Patchright Version
31+
description: Which version of Patchright are you using?
32+
placeholder: e.g. 1.57.0
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: operating_system
38+
attributes:
39+
label: Operating System
40+
description: Which operating system is this occurring on? [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]
41+
placeholder: All, macOS 14.2 (Apple Silicon)
42+
validations:
43+
required: false
44+
45+
- type: textarea
46+
id: description
47+
attributes:
48+
label: Bug Description
49+
description: A clear and concise description of what the bug is.
50+
placeholder: When I try to use X feature, patchright fails with error message Y...
51+
validations:
52+
required: true
53+
54+
- type: textarea
55+
id: test_file
56+
attributes:
57+
label: Test file (self-contained)
58+
description: |
59+
A minimal, self-contained code example that demonstrates the issue.
60+
Please provide the code necessary to reproduce the bug, including any relevant setup or configuration.
61+
Please use code blocks with the correct language for better readability.
62+
placeholder: |
63+
```py
64+
from patchright.sync_api import sync_playwright
65+
66+
with sync_playwright() as p:
67+
browser = p.chromium.launch()
68+
page = browser.new_page()
69+
# ...
70+
browser.close()
71+
```
72+
validations:
73+
required: true
74+
75+
- type: textarea
76+
id: expected_behavior
77+
attributes:
78+
label: Expected Behavior
79+
description: A clear and concise description of what you expected to happen.
80+
placeholder: The method should return X or perform Y...
81+
validations:
82+
required: false
83+
84+
- type: textarea
85+
id: actual_behavior
86+
attributes:
87+
label: Actual Behavior
88+
description: What actually happened instead? Include full error messages and stack traces if applicable.
89+
placeholder: The method raised an exception...
90+
validations:
91+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Questions & Discussions
4+
url: https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/discussions
5+
about: Please ask and answer questions here.
6+
- name: Join our Discord Server
7+
url: https://discord.gg/reWzznnBfJ
8+
about: Ask questions and discuss with other community members
9+
- name: Support us on Ko-fi
10+
url: https://ko-fi.com/vinyzu
11+
about: If you like Patchright, consider supporting its development!
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Feature Request
2+
description: Request new features to be added
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
# Patchright Feature Request
10+
11+
Thank you for taking the time to suggest a new feature. This form will guide you through providing the information needed to consider your suggestion effectively.
12+
13+
- type: checkboxes
14+
id: checklist
15+
attributes:
16+
label: Checklist before requesting
17+
description: Please make sure you've completed the following steps before submitting a feature request.
18+
options:
19+
- label: I have searched for [similar issues](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues?q=sort%3Arelevance%20is%3Aissue) and didn't find a duplicate.
20+
required: true
21+
22+
- type: textarea
23+
id: problem
24+
attributes:
25+
label: Problem Statement
26+
description: Is your feature request related to a problem? Please describe what you're trying to accomplish.
27+
placeholder: I'm trying to accomplish X, but I'm unable to because Y...
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: solution
33+
attributes:
34+
label: Proposed Solution
35+
description: Describe the solution you'd like to see implemented. Be as specific as possible.
36+
placeholder: |
37+
I would like to see a new method/class that can...
38+
39+
Example usage might look like:
40+
```python
41+
client.new_feature(param1, param2)
42+
```
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: alternatives
48+
attributes:
49+
label: Alternatives Considered
50+
description: Describe any alternative solutions or features you've considered.
51+
placeholder: I've tried accomplishing this using X and Y approaches, but they don't work well because...
52+
53+
- type: textarea
54+
id: context
55+
attributes:
56+
label: Additional Context
57+
description: Add any other context, code examples, or references that might help explain your feature request.
58+
placeholder: |
59+
Other libraries like X and Y have similar features that work like...
60+
61+
This would help users who need to...
62+
63+
- type: dropdown
64+
id: importance
65+
attributes:
66+
label: Importance
67+
description: How important is this feature to your use case?
68+
options:
69+
- Nice to have
70+
- Important
71+
- Critical (blocking my usage)
72+
validations:
73+
required: true
74+
75+
- type: dropdown
76+
id: contribution
77+
attributes:
78+
label: Contribution
79+
description: Would you be willing to contribute this feature yourself?
80+
options:
81+
- Yes, I'd be willing to implement this feature
82+
- I could help with parts of the implementation
83+
- No, I don't have the capacity to implement this
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Regression Report
2+
description: Functionality that used to work and does not any more
3+
title: "[REGRESSION]: "
4+
labels: ["bug", "unconfirmed"]
5+
assignees:
6+
- vinyzu
7+
type: bug
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to report a regression!
13+
Please keep this report focused on something that **used to work** and **stopped working** after an upgrade.
14+
15+
- type: checkboxes
16+
attributes:
17+
label: Checklist before reporting
18+
description: Please make sure you've completed the following steps before submitting a regression report.
19+
options:
20+
- label: I have searched for [similar issues](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues?q=sort%3Arelevance%20is%3Aissue) and didn't find a duplicate.
21+
required: true
22+
- label: I have updated to the latest version of Patchright to verify the regression still exists.
23+
required: true
24+
- label: I have verified that this regression does not occur when using [Playwright](https://github.com/microsoft/playwright/) directly.
25+
required: true
26+
27+
- type: input
28+
id: good_patchright_version
29+
attributes:
30+
label: GOOD Patchright Version
31+
description: What Patchright version worked nicely?
32+
placeholder: e.g. 1.56.0
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: bad_patchright_version
38+
attributes:
39+
label: BAD Patchright Version
40+
description: What Patchright version introduced the regression?
41+
placeholder: e.g. 1.57.0
42+
validations:
43+
required: true
44+
45+
- type: input
46+
id: operating_system
47+
attributes:
48+
label: Operating System
49+
description: Which operating system is this occurring on? [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]
50+
placeholder: All, macOS 14.2 (Apple Silicon)
51+
validations:
52+
required: false
53+
54+
- type: textarea
55+
id: test_file
56+
attributes:
57+
label: Reproduction (self-contained)
58+
description: |
59+
A minimal, self-contained code example that demonstrates the regression.
60+
Please provide the code necessary to reproduce the bug, including any relevant setup or configuration.
61+
Please use code blocks with the correct language for better readability.
62+
placeholder: |
63+
```py
64+
from patchright.sync_api import sync_playwright
65+
66+
with sync_playwright() as p:
67+
browser = p.chromium.launch()
68+
page = browser.new_page()
69+
# ...
70+
browser.close()
71+
```
72+
validations:
73+
required: true
74+
75+
- type: textarea
76+
id: expected_behavior
77+
attributes:
78+
label: Expected Behavior
79+
description: What did happen in the GOOD version?
80+
placeholder: In 1.56.0, navigation succeeded and returned status 200...
81+
validations:
82+
required: true
83+
84+
- type: textarea
85+
id: actual_behavior
86+
attributes:
87+
label: Actual Behavior
88+
description: What happens in the BAD version? Include full error messages and stack traces if applicable.
89+
placeholder: In 1.57.0, navigation fails with... (stack trace)
90+
validations:
91+
required: true
92+
Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PatchRight-Python Workflow
1+
name: Patchright Release Workflow
22

33
on:
44
# enabling manual trigger
@@ -12,43 +12,29 @@ on:
1212
default: ''
1313
# running every hour
1414
schedule:
15-
- cron: '48 * * * *'
16-
17-
18-
permissions:
19-
actions: none
20-
attestations: none
21-
checks: none
22-
contents: write
23-
deployments: none
24-
id-token: write # For trusted Publishing
25-
issues: none
26-
discussions: none
27-
packages: none
28-
pages: none
29-
pull-requests: none
30-
repository-projects: none
31-
security-events: none
32-
statuses: none
33-
15+
- cron: '0 * * * *'
3416

3517
env:
3618
REPO: ${{ github.repository }}
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3819

3920
jobs:
40-
patchright-workflow:
21+
patchright-release-workflow:
4122
name: "Patchright-Python Workflow: Install, Patch, Build and Publish Patchright Python Package"
42-
runs-on: ubuntu-24.04
23+
runs-on: ubuntu-latest
4324
environment:
4425
name: pypi
4526
url: https://pypi.org/p/patchright
27+
permissions:
28+
contents: write
4629
steps:
47-
- uses: actions/checkout@v4
48-
- name: Set up Python 3.11
49-
uses: actions/setup-python@v5
50-
with:
51-
python-version: '3.11'
30+
- name: Checkout Repository
31+
uses: actions/checkout@v6
32+
33+
- name: Install uv
34+
uses: astral-sh/setup-uv@v7
35+
36+
- name: Set up Python
37+
run: uv python install
5238

5339
- name: Check Release Version
5440
id: version_check
@@ -65,26 +51,24 @@ jobs:
6551
- name: Install Playwright-Python Package
6652
if: steps.version_check.outputs.proceed == 'true'
6753
run: |
54+
uv sync --all-groups
6855
git clone https://github.com/microsoft/playwright-python --branch ${{ env.playwright_version }}
6956
cd playwright-python
70-
python -m pip install --upgrade pip
71-
pip install -r local-requirements.txt
72-
pip install -e .
73-
pip install black toml
57+
uv add -r local-requirements.txt
7458
7559
- name: Patch Playwright-Python Package
7660
if: steps.version_check.outputs.proceed == 'true'
7761
run: |
78-
python patch_python_package.py
79-
python -m black playwright-python
62+
uv run patch_python_package.py
63+
uvx ruff format playwright-python
8064
8165
- name: Build Patchright-Python Package
8266
if: steps.version_check.outputs.proceed == 'true'
8367
run: |
8468
cd playwright-python
85-
pip install -e .
69+
uv pip install -e .
8670
for wheel in $(python setup.py --list-wheels); do
87-
PLAYWRIGHT_TARGET_WHEEL=$wheel python -m build --wheel
71+
PLAYWRIGHT_TARGET_WHEEL=$wheel uv build --wheel
8872
done
8973
9074
- name: Create Empty Versioning Release

0 commit comments

Comments
 (0)