reviewpack 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reviewpack-0.4.0/.github/ISSUE_TEMPLATE/bug_report.md +46 -0
- reviewpack-0.4.0/.github/ISSUE_TEMPLATE/feature_request.md +49 -0
- reviewpack-0.4.0/.github/pull_request_template.md +54 -0
- reviewpack-0.4.0/.github/workflows/ci.yml +43 -0
- reviewpack-0.4.0/.github/workflows/package.yml +89 -0
- reviewpack-0.4.0/.github/workflows/publish.yml +151 -0
- reviewpack-0.4.0/.github/workflows/testpypi-install.yml +95 -0
- reviewpack-0.4.0/.gitignore +45 -0
- reviewpack-0.4.0/.reviewpack.example.yml +37 -0
- reviewpack-0.4.0/CHANGELOG.md +155 -0
- reviewpack-0.4.0/CONTRIBUTING.md +130 -0
- reviewpack-0.4.0/LICENSE +21 -0
- reviewpack-0.4.0/PKG-INFO +152 -0
- reviewpack-0.4.0/README.md +120 -0
- reviewpack-0.4.0/README.zh-CN.md +233 -0
- reviewpack-0.4.0/SECURITY.md +74 -0
- reviewpack-0.4.0/action.yml +111 -0
- reviewpack-0.4.0/docs/ai-preview.md +80 -0
- reviewpack-0.4.0/docs/design.md +126 -0
- reviewpack-0.4.0/docs/github-action.md +217 -0
- reviewpack-0.4.0/docs/github.md +105 -0
- reviewpack-0.4.0/docs/installation.md +138 -0
- reviewpack-0.4.0/docs/integrations.md +76 -0
- reviewpack-0.4.0/docs/local-git.md +81 -0
- reviewpack-0.4.0/docs/privacy.md +94 -0
- reviewpack-0.4.0/docs/pypi-publishing.md +224 -0
- reviewpack-0.4.0/docs/pypi-release-checklist.md +143 -0
- reviewpack-0.4.0/docs/release-checklist.md +93 -0
- reviewpack-0.4.0/docs/release-note-hints.md +93 -0
- reviewpack-0.4.0/docs/release-notes-v0.1.0-draft.md +179 -0
- reviewpack-0.4.0/docs/release-notes-v0.2.0-draft.md +161 -0
- reviewpack-0.4.0/docs/release-notes-v0.3.0-draft.md +151 -0
- reviewpack-0.4.0/docs/release-notes-v0.4.0-draft.md +168 -0
- reviewpack-0.4.0/docs/reviewer-checklist.md +99 -0
- reviewpack-0.4.0/docs/roadmap.md +121 -0
- reviewpack-0.4.0/docs/testpypi-runbook.md +226 -0
- reviewpack-0.4.0/docs/testpypi.md +177 -0
- reviewpack-0.4.0/docs/trusted-publishing.md +158 -0
- reviewpack-0.4.0/docs/usage.md +185 -0
- reviewpack-0.4.0/examples/README.md +53 -0
- reviewpack-0.4.0/examples/fixtures/simple-pr.json +35 -0
- reviewpack-0.4.0/examples/github-action.yml +28 -0
- reviewpack-0.4.0/examples/output/pr-summary.example.md +53 -0
- reviewpack-0.4.0/pyproject.toml +69 -0
- reviewpack-0.4.0/reviewpack/__init__.py +6 -0
- reviewpack-0.4.0/reviewpack/ai_preview.py +130 -0
- reviewpack-0.4.0/reviewpack/analyzer.py +147 -0
- reviewpack-0.4.0/reviewpack/cli.py +228 -0
- reviewpack-0.4.0/reviewpack/config.py +91 -0
- reviewpack-0.4.0/reviewpack/git.py +94 -0
- reviewpack-0.4.0/reviewpack/github.py +70 -0
- reviewpack-0.4.0/reviewpack/github_client.py +168 -0
- reviewpack-0.4.0/reviewpack/models.py +105 -0
- reviewpack-0.4.0/reviewpack/redaction.py +55 -0
- reviewpack-0.4.0/reviewpack/release_notes.py +149 -0
- reviewpack-0.4.0/reviewpack/renderers.py +203 -0
- reviewpack-0.4.0/reviewpack/reviewer_checklist.py +195 -0
- reviewpack-0.4.0/reviewpack/rules.py +261 -0
- reviewpack-0.4.0/tests/test_action_metadata.py +62 -0
- reviewpack-0.4.0/tests/test_ai_preview.py +60 -0
- reviewpack-0.4.0/tests/test_analyzer.py +28 -0
- reviewpack-0.4.0/tests/test_config.py +70 -0
- reviewpack-0.4.0/tests/test_git.py +40 -0
- reviewpack-0.4.0/tests/test_github.py +64 -0
- reviewpack-0.4.0/tests/test_github_client.py +96 -0
- reviewpack-0.4.0/tests/test_package_metadata.py +42 -0
- reviewpack-0.4.0/tests/test_publish_workflow_metadata.py +70 -0
- reviewpack-0.4.0/tests/test_redaction.py +31 -0
- reviewpack-0.4.0/tests/test_release_notes.py +75 -0
- reviewpack-0.4.0/tests/test_renderers.py +68 -0
- reviewpack-0.4.0/tests/test_reviewer_checklist.py +82 -0
- reviewpack-0.4.0/tests/test_rules.py +54 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Bug Report
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Describe the bug clearly and briefly.
|
|
6
|
+
|
|
7
|
+
## Steps to reproduce
|
|
8
|
+
|
|
9
|
+
1.
|
|
10
|
+
2.
|
|
11
|
+
3.
|
|
12
|
+
|
|
13
|
+
## Expected behavior
|
|
14
|
+
|
|
15
|
+
What did you expect to happen?
|
|
16
|
+
|
|
17
|
+
## Actual behavior
|
|
18
|
+
|
|
19
|
+
What actually happened?
|
|
20
|
+
|
|
21
|
+
## Environment
|
|
22
|
+
|
|
23
|
+
- OS:
|
|
24
|
+
- Python version:
|
|
25
|
+
- Reviewpack version or commit:
|
|
26
|
+
- Installation method:
|
|
27
|
+
|
|
28
|
+
## Command used
|
|
29
|
+
|
|
30
|
+
reviewpack ...
|
|
31
|
+
|
|
32
|
+
## Error output
|
|
33
|
+
|
|
34
|
+
Paste relevant error output here.
|
|
35
|
+
|
|
36
|
+
Please remove tokens, secrets, private repository names, customer names, or sensitive paths before posting.
|
|
37
|
+
|
|
38
|
+
## Privacy impact
|
|
39
|
+
|
|
40
|
+
Did the issue involve unexpected collection, display, or output of sensitive information?
|
|
41
|
+
|
|
42
|
+
- Yes
|
|
43
|
+
- No
|
|
44
|
+
- Not sure
|
|
45
|
+
|
|
46
|
+
If yes, please describe carefully and avoid including secrets.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Feature Request
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Describe the feature you would like to see.
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
What problem would this solve for maintainers or reviewers?
|
|
10
|
+
|
|
11
|
+
## Proposed solution
|
|
12
|
+
|
|
13
|
+
Describe your preferred solution.
|
|
14
|
+
|
|
15
|
+
## Alternatives considered
|
|
16
|
+
|
|
17
|
+
Describe any alternatives you considered.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
Which workflow does this affect?
|
|
22
|
+
|
|
23
|
+
- Fixture input
|
|
24
|
+
- Local git diff
|
|
25
|
+
- GitHub PR metadata
|
|
26
|
+
- AI input preview
|
|
27
|
+
- GitHub Actions
|
|
28
|
+
- Optional AI provider integration
|
|
29
|
+
- Documentation
|
|
30
|
+
- Other
|
|
31
|
+
|
|
32
|
+
## Privacy considerations
|
|
33
|
+
|
|
34
|
+
Could this feature collect, display, or send sensitive information?
|
|
35
|
+
|
|
36
|
+
Please consider:
|
|
37
|
+
|
|
38
|
+
- Source code
|
|
39
|
+
- Raw diffs
|
|
40
|
+
- Branch names
|
|
41
|
+
- Commit messages
|
|
42
|
+
- Environment variables
|
|
43
|
+
- Git remote URLs
|
|
44
|
+
- API tokens
|
|
45
|
+
- Repository secrets
|
|
46
|
+
|
|
47
|
+
## Additional context
|
|
48
|
+
|
|
49
|
+
Add any other context, examples, or screenshots.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Pull Request
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
Describe what this pull request changes.
|
|
6
|
+
|
|
7
|
+
## Motivation
|
|
8
|
+
|
|
9
|
+
Why is this change needed?
|
|
10
|
+
|
|
11
|
+
## Changes
|
|
12
|
+
|
|
13
|
+
-
|
|
14
|
+
-
|
|
15
|
+
-
|
|
16
|
+
|
|
17
|
+
## Tests
|
|
18
|
+
|
|
19
|
+
Describe how this was tested.
|
|
20
|
+
|
|
21
|
+
pytest
|
|
22
|
+
ruff check .
|
|
23
|
+
|
|
24
|
+
## Documentation
|
|
25
|
+
|
|
26
|
+
Does this PR update user-facing documentation?
|
|
27
|
+
|
|
28
|
+
- Yes
|
|
29
|
+
- No
|
|
30
|
+
- Not needed
|
|
31
|
+
|
|
32
|
+
## Privacy impact
|
|
33
|
+
|
|
34
|
+
Does this PR change what Reviewpack collects, stores, displays, sends, or logs?
|
|
35
|
+
|
|
36
|
+
- Yes
|
|
37
|
+
- No
|
|
38
|
+
- Not sure
|
|
39
|
+
|
|
40
|
+
If yes, explain:
|
|
41
|
+
|
|
42
|
+
- What data is involved?
|
|
43
|
+
- Is the behavior opt-in?
|
|
44
|
+
- Is the output inspectable?
|
|
45
|
+
- Are tokens or secrets protected?
|
|
46
|
+
- Does this preserve local-first behavior where possible?
|
|
47
|
+
|
|
48
|
+
## Checklist
|
|
49
|
+
|
|
50
|
+
- [ ] Tests added or updated
|
|
51
|
+
- [ ] Documentation added or updated if needed
|
|
52
|
+
- [ ] No tokens, secrets, or private data included
|
|
53
|
+
- [ ] AI-related behavior is optional and explicit
|
|
54
|
+
- [ ] Maintainers remain in control of generated output
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
python-version:
|
|
19
|
+
- "3.10"
|
|
20
|
+
- "3.11"
|
|
21
|
+
- "3.12"
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- name: Check out repository
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Install package
|
|
33
|
+
run: |
|
|
34
|
+
python -m pip install --upgrade pip
|
|
35
|
+
pip install -e ".[dev]"
|
|
36
|
+
|
|
37
|
+
- name: Run ruff
|
|
38
|
+
run: |
|
|
39
|
+
ruff check .
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: |
|
|
43
|
+
pytest
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
name: Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
|
|
25
|
+
- name: Install build tools
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install build twine
|
|
29
|
+
|
|
30
|
+
- name: Build distributions
|
|
31
|
+
run: |
|
|
32
|
+
python -m build
|
|
33
|
+
|
|
34
|
+
- name: Check distributions
|
|
35
|
+
run: |
|
|
36
|
+
python -m twine check dist/*
|
|
37
|
+
|
|
38
|
+
- name: Inspect wheel contents
|
|
39
|
+
run: |
|
|
40
|
+
python - <<'PY'
|
|
41
|
+
from pathlib import Path
|
|
42
|
+
import zipfile
|
|
43
|
+
|
|
44
|
+
wheels = list(Path("dist").glob("*.whl"))
|
|
45
|
+
if not wheels:
|
|
46
|
+
raise SystemExit("No wheel file was built.")
|
|
47
|
+
|
|
48
|
+
wheel = wheels[0]
|
|
49
|
+
print(f"Inspecting {wheel}")
|
|
50
|
+
|
|
51
|
+
with zipfile.ZipFile(wheel) as archive:
|
|
52
|
+
names = archive.namelist()
|
|
53
|
+
|
|
54
|
+
if not any(name.startswith("reviewpack/") for name in names):
|
|
55
|
+
raise SystemExit("Wheel does not contain the reviewpack package.")
|
|
56
|
+
|
|
57
|
+
if any(name.startswith("tests/") for name in names):
|
|
58
|
+
raise SystemExit("Wheel unexpectedly contains tests/.")
|
|
59
|
+
|
|
60
|
+
if any(name.startswith("docs/") for name in names):
|
|
61
|
+
raise SystemExit("Wheel unexpectedly contains docs/.")
|
|
62
|
+
|
|
63
|
+
if any(name.startswith(".github/") for name in names):
|
|
64
|
+
raise SystemExit("Wheel unexpectedly contains .github/.")
|
|
65
|
+
|
|
66
|
+
print("Wheel contents look reasonable.")
|
|
67
|
+
PY
|
|
68
|
+
|
|
69
|
+
- name: Smoke test installed wheel
|
|
70
|
+
run: |
|
|
71
|
+
python -m venv .smoke
|
|
72
|
+
. .smoke/bin/activate
|
|
73
|
+
python -m pip install --upgrade pip
|
|
74
|
+
|
|
75
|
+
WHEEL_FILE="$(ls dist/*.whl | head -n 1)"
|
|
76
|
+
echo "Installing $WHEEL_FILE"
|
|
77
|
+
python -m pip install "$WHEEL_FILE"
|
|
78
|
+
|
|
79
|
+
reviewpack version
|
|
80
|
+
reviewpack from-fixture examples/fixtures/simple-pr.json --output .reviewpack-smoke
|
|
81
|
+
|
|
82
|
+
test -f .reviewpack-smoke/pr-summary.md
|
|
83
|
+
test -f .reviewpack-smoke/risk-checklist.md
|
|
84
|
+
test -f .reviewpack-smoke/reviewer-checklist.md
|
|
85
|
+
test -f .reviewpack-smoke/release-note-hints.md
|
|
86
|
+
test -f .reviewpack-smoke/ai-review-prompt.md
|
|
87
|
+
test -f .reviewpack-smoke/reviewpack.json
|
|
88
|
+
|
|
89
|
+
echo "Installed wheel smoke test passed."
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
repository:
|
|
7
|
+
description: Target package repository.
|
|
8
|
+
required: true
|
|
9
|
+
default: testpypi
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- testpypi
|
|
13
|
+
- pypi
|
|
14
|
+
dry-run:
|
|
15
|
+
description: Build and validate only. Do not publish.
|
|
16
|
+
required: true
|
|
17
|
+
default: true
|
|
18
|
+
type: boolean
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Check out repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.12"
|
|
35
|
+
|
|
36
|
+
- name: Install build tools
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install --upgrade pip
|
|
39
|
+
python -m pip install build twine
|
|
40
|
+
|
|
41
|
+
- name: Build distributions
|
|
42
|
+
run: |
|
|
43
|
+
python -m build
|
|
44
|
+
|
|
45
|
+
- name: Check distributions
|
|
46
|
+
run: |
|
|
47
|
+
python -m twine check dist/*
|
|
48
|
+
|
|
49
|
+
- name: Inspect wheel contents
|
|
50
|
+
run: |
|
|
51
|
+
python - <<'PY'
|
|
52
|
+
from pathlib import Path
|
|
53
|
+
import zipfile
|
|
54
|
+
|
|
55
|
+
wheels = list(Path("dist").glob("*.whl"))
|
|
56
|
+
if not wheels:
|
|
57
|
+
raise SystemExit("No wheel file was built.")
|
|
58
|
+
|
|
59
|
+
wheel = wheels[0]
|
|
60
|
+
print(f"Inspecting {wheel}")
|
|
61
|
+
|
|
62
|
+
with zipfile.ZipFile(wheel) as archive:
|
|
63
|
+
names = archive.namelist()
|
|
64
|
+
|
|
65
|
+
if not any(name.startswith("reviewpack/") for name in names):
|
|
66
|
+
raise SystemExit("Wheel does not contain the reviewpack package.")
|
|
67
|
+
|
|
68
|
+
if any(name.startswith("tests/") for name in names):
|
|
69
|
+
raise SystemExit("Wheel unexpectedly contains tests/.")
|
|
70
|
+
|
|
71
|
+
if any(name.startswith("docs/") for name in names):
|
|
72
|
+
raise SystemExit("Wheel unexpectedly contains docs/.")
|
|
73
|
+
|
|
74
|
+
if any(name.startswith(".github/") for name in names):
|
|
75
|
+
raise SystemExit("Wheel unexpectedly contains .github/.")
|
|
76
|
+
|
|
77
|
+
print("Wheel contents look reasonable.")
|
|
78
|
+
PY
|
|
79
|
+
|
|
80
|
+
- name: Smoke test installed wheel
|
|
81
|
+
run: |
|
|
82
|
+
python -m venv .smoke
|
|
83
|
+
. .smoke/bin/activate
|
|
84
|
+
python -m pip install --upgrade pip
|
|
85
|
+
|
|
86
|
+
WHEEL_FILE="$(ls dist/*.whl | head -n 1)"
|
|
87
|
+
echo "Installing $WHEEL_FILE"
|
|
88
|
+
python -m pip install "$WHEEL_FILE"
|
|
89
|
+
|
|
90
|
+
reviewpack version
|
|
91
|
+
reviewpack from-fixture examples/fixtures/simple-pr.json --output .reviewpack-smoke
|
|
92
|
+
|
|
93
|
+
test -f .reviewpack-smoke/pr-summary.md
|
|
94
|
+
test -f .reviewpack-smoke/risk-checklist.md
|
|
95
|
+
test -f .reviewpack-smoke/reviewer-checklist.md
|
|
96
|
+
test -f .reviewpack-smoke/release-note-hints.md
|
|
97
|
+
test -f .reviewpack-smoke/ai-review-prompt.md
|
|
98
|
+
test -f .reviewpack-smoke/reviewpack.json
|
|
99
|
+
|
|
100
|
+
echo "Installed wheel smoke test passed."
|
|
101
|
+
|
|
102
|
+
- name: Upload distributions artifact
|
|
103
|
+
uses: actions/upload-artifact@v4
|
|
104
|
+
with:
|
|
105
|
+
name: reviewpack-distributions
|
|
106
|
+
path: dist/*
|
|
107
|
+
if-no-files-found: error
|
|
108
|
+
|
|
109
|
+
publish-testpypi:
|
|
110
|
+
needs: build
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.repository == 'testpypi' && inputs['dry-run'] == false }}
|
|
113
|
+
|
|
114
|
+
permissions:
|
|
115
|
+
id-token: write
|
|
116
|
+
|
|
117
|
+
environment:
|
|
118
|
+
name: testpypi
|
|
119
|
+
|
|
120
|
+
steps:
|
|
121
|
+
- name: Download distributions artifact
|
|
122
|
+
uses: actions/download-artifact@v4
|
|
123
|
+
with:
|
|
124
|
+
name: reviewpack-distributions
|
|
125
|
+
path: dist
|
|
126
|
+
|
|
127
|
+
- name: Publish to TestPyPI
|
|
128
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
129
|
+
with:
|
|
130
|
+
repository-url: https://test.pypi.org/legacy/
|
|
131
|
+
|
|
132
|
+
publish-pypi:
|
|
133
|
+
needs: build
|
|
134
|
+
runs-on: ubuntu-latest
|
|
135
|
+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.repository == 'pypi' && inputs['dry-run'] == false }}
|
|
136
|
+
|
|
137
|
+
permissions:
|
|
138
|
+
id-token: write
|
|
139
|
+
|
|
140
|
+
environment:
|
|
141
|
+
name: pypi
|
|
142
|
+
|
|
143
|
+
steps:
|
|
144
|
+
- name: Download distributions artifact
|
|
145
|
+
uses: actions/download-artifact@v4
|
|
146
|
+
with:
|
|
147
|
+
name: reviewpack-distributions
|
|
148
|
+
path: dist
|
|
149
|
+
|
|
150
|
+
- name: Publish to PyPI
|
|
151
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: TestPyPI Install
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
package-version:
|
|
7
|
+
description: Reviewpack version to install from TestPyPI.
|
|
8
|
+
required: true
|
|
9
|
+
default: "0.4.0"
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
verify:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Install Reviewpack from TestPyPI
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
python -m pip install \
|
|
28
|
+
--index-url https://test.pypi.org/simple/ \
|
|
29
|
+
--extra-index-url https://pypi.org/simple/ \
|
|
30
|
+
"reviewpack==${{ inputs.package-version }}"
|
|
31
|
+
|
|
32
|
+
- name: Verify CLI version
|
|
33
|
+
run: |
|
|
34
|
+
reviewpack version
|
|
35
|
+
|
|
36
|
+
- name: Create synthetic fixture
|
|
37
|
+
run: |
|
|
38
|
+
cat > simple-pr.json <<'JSON'
|
|
39
|
+
{
|
|
40
|
+
"pr": {
|
|
41
|
+
"title": "Verify Reviewpack from TestPyPI",
|
|
42
|
+
"author": "test-user",
|
|
43
|
+
"url": "https://github.com/Yuanzitech/reviewpack/pull/1",
|
|
44
|
+
"description": "Synthetic fixture for TestPyPI installation verification."
|
|
45
|
+
},
|
|
46
|
+
"changed_files": [
|
|
47
|
+
{
|
|
48
|
+
"path": "reviewpack/cli.py",
|
|
49
|
+
"additions": 10,
|
|
50
|
+
"deletions": 2
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "tests/test_cli.py",
|
|
54
|
+
"additions": 20,
|
|
55
|
+
"deletions": 0
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"path": "README.md",
|
|
59
|
+
"additions": 5,
|
|
60
|
+
"deletions": 1
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
JSON
|
|
65
|
+
|
|
66
|
+
- name: Run Reviewpack from installed package
|
|
67
|
+
run: |
|
|
68
|
+
reviewpack from-fixture simple-pr.json --output .reviewpack-testpypi
|
|
69
|
+
|
|
70
|
+
- name: Verify generated outputs
|
|
71
|
+
run: |
|
|
72
|
+
test -f .reviewpack-testpypi/pr-summary.md
|
|
73
|
+
test -f .reviewpack-testpypi/risk-checklist.md
|
|
74
|
+
test -f .reviewpack-testpypi/reviewer-checklist.md
|
|
75
|
+
test -f .reviewpack-testpypi/release-note-hints.md
|
|
76
|
+
test -f .reviewpack-testpypi/ai-review-prompt.md
|
|
77
|
+
test -f .reviewpack-testpypi/reviewpack.json
|
|
78
|
+
|
|
79
|
+
- name: Run Reviewpack with AI input preview
|
|
80
|
+
run: |
|
|
81
|
+
reviewpack from-fixture simple-pr.json --output .reviewpack-testpypi-ai --preview-ai-input
|
|
82
|
+
|
|
83
|
+
- name: Verify AI input preview output
|
|
84
|
+
run: |
|
|
85
|
+
test -f .reviewpack-testpypi-ai/ai-input-preview.md
|
|
86
|
+
|
|
87
|
+
- name: Upload verification outputs
|
|
88
|
+
uses: actions/upload-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: testpypi-install-verification
|
|
91
|
+
path: |
|
|
92
|
+
simple-pr.json
|
|
93
|
+
.reviewpack-testpypi/
|
|
94
|
+
.reviewpack-testpypi-ai/
|
|
95
|
+
if-no-files-found: error
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
ENV/
|
|
17
|
+
|
|
18
|
+
# Test and coverage
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.coverage
|
|
21
|
+
coverage.xml
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# Type checking and tooling
|
|
25
|
+
.mypy_cache/
|
|
26
|
+
.ruff_cache/
|
|
27
|
+
.pyre/
|
|
28
|
+
|
|
29
|
+
# Reviewpack output
|
|
30
|
+
.reviewpack/
|
|
31
|
+
|
|
32
|
+
# Environment files
|
|
33
|
+
.env
|
|
34
|
+
.env.*
|
|
35
|
+
!.env.example
|
|
36
|
+
|
|
37
|
+
# IDE and editor
|
|
38
|
+
.vscode/
|
|
39
|
+
.idea/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
.DS_Store
|
|
43
|
+
|
|
44
|
+
# Logs
|
|
45
|
+
*.log
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Example Reviewpack configuration.
|
|
2
|
+
#
|
|
3
|
+
# Copy this file to .reviewpack.yml and adjust it for your repository.
|
|
4
|
+
#
|
|
5
|
+
# Reviewpack is local-first and privacy-first by default.
|
|
6
|
+
# This example does not enable network access or AI usage.
|
|
7
|
+
|
|
8
|
+
risk_paths_high:
|
|
9
|
+
- "src/auth/**"
|
|
10
|
+
- "src/security/**"
|
|
11
|
+
- "src/payment/**"
|
|
12
|
+
|
|
13
|
+
test_paths:
|
|
14
|
+
- "tests/**"
|
|
15
|
+
- "__tests__/**"
|
|
16
|
+
- "test/**"
|
|
17
|
+
|
|
18
|
+
docs_paths:
|
|
19
|
+
- "README.md"
|
|
20
|
+
- "docs/**"
|
|
21
|
+
|
|
22
|
+
large_pr:
|
|
23
|
+
changed_files: 20
|
|
24
|
+
changed_lines: 800
|
|
25
|
+
|
|
26
|
+
privacy:
|
|
27
|
+
include_branch_name: false
|
|
28
|
+
include_commit_messages: false
|
|
29
|
+
include_diff_snippets: false
|
|
30
|
+
include_file_paths: true
|
|
31
|
+
redact_secrets: true
|
|
32
|
+
|
|
33
|
+
ai:
|
|
34
|
+
enabled: false
|
|
35
|
+
provider: null
|
|
36
|
+
model: null
|
|
37
|
+
max_input_chars: 12000
|