pr-agent-pro 1.0.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.
- pr_agent_pro-1.0.0/PKG-INFO +54 -0
- pr_agent_pro-1.0.0/README.md +39 -0
- pr_agent_pro-1.0.0/ai_pr_reviewer/__init__.py +9 -0
- pr_agent_pro-1.0.0/ai_pr_reviewer/client.py +40 -0
- pr_agent_pro-1.0.0/pr_agent_pro.egg-info/PKG-INFO +54 -0
- pr_agent_pro-1.0.0/pr_agent_pro.egg-info/SOURCES.txt +10 -0
- pr_agent_pro-1.0.0/pr_agent_pro.egg-info/dependency_links.txt +1 -0
- pr_agent_pro-1.0.0/pr_agent_pro.egg-info/requires.txt +1 -0
- pr_agent_pro-1.0.0/pr_agent_pro.egg-info/top_level.txt +1 -0
- pr_agent_pro-1.0.0/pyproject.toml +13 -0
- pr_agent_pro-1.0.0/setup.cfg +4 -0
- pr_agent_pro-1.0.0/setup.py +22 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pr-agent-pro
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Automated AI Pull Request Reviewer & Security Code Auditor.
|
|
5
|
+
Home-page: https://github.com/meanusarcanus/ai-pr-reviewer-action
|
|
6
|
+
Author: Meanus Arcanus
|
|
7
|
+
Author-email: meanusarcanus@gmail.com
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.25.0
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: author-email
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
|
|
16
|
+
# 🤖 PR-Agent Pro Python SDK & CLI
|
|
17
|
+
|
|
18
|
+
Automated AI Pull Request Code Reviewer & Security Auditor.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⚡ Quickstart
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install ai-pr-reviewer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from ai_pr_reviewer import review_diff, audit_security, generate_changelog
|
|
30
|
+
|
|
31
|
+
diff = """
|
|
32
|
+
--- a/db.py
|
|
33
|
+
+++ b/db.py
|
|
34
|
+
@@ -10,3 +10,4 @@
|
|
35
|
+
+ query = f"SELECT * FROM users WHERE email = '{user_email}'"
|
|
36
|
+
+ cursor.execute(query)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
# 1. Security & Secret Leak Audit
|
|
40
|
+
security = audit_security(diff)
|
|
41
|
+
print(f"Security Grade: {security['security_grade']} (Score: {security['security_score']}/100)")
|
|
42
|
+
for f in security['findings']:
|
|
43
|
+
print(f"⚠️ {f['type']}: {f['description']}")
|
|
44
|
+
|
|
45
|
+
# 2. Automated Code Review with 1-Click Suggestions
|
|
46
|
+
review = review_code_diff(diff)
|
|
47
|
+
print(f"Verdict: {review['verdict']}")
|
|
48
|
+
for c in review['comments']:
|
|
49
|
+
print(f"📝 {c['file']}: {c['comment']}")
|
|
50
|
+
|
|
51
|
+
# 3. Semantic Changelog
|
|
52
|
+
changelog = generate_pr_summary_and_changelog(diff, pr_title="Add user query")
|
|
53
|
+
print(changelog['summary_markdown'])
|
|
54
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# 🤖 PR-Agent Pro Python SDK & CLI
|
|
2
|
+
|
|
3
|
+
Automated AI Pull Request Code Reviewer & Security Auditor.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ⚡ Quickstart
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install ai-pr-reviewer
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from ai_pr_reviewer import review_diff, audit_security, generate_changelog
|
|
15
|
+
|
|
16
|
+
diff = """
|
|
17
|
+
--- a/db.py
|
|
18
|
+
+++ b/db.py
|
|
19
|
+
@@ -10,3 +10,4 @@
|
|
20
|
+
+ query = f"SELECT * FROM users WHERE email = '{user_email}'"
|
|
21
|
+
+ cursor.execute(query)
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
# 1. Security & Secret Leak Audit
|
|
25
|
+
security = audit_security(diff)
|
|
26
|
+
print(f"Security Grade: {security['security_grade']} (Score: {security['security_score']}/100)")
|
|
27
|
+
for f in security['findings']:
|
|
28
|
+
print(f"⚠️ {f['type']}: {f['description']}")
|
|
29
|
+
|
|
30
|
+
# 2. Automated Code Review with 1-Click Suggestions
|
|
31
|
+
review = review_code_diff(diff)
|
|
32
|
+
print(f"Verdict: {review['verdict']}")
|
|
33
|
+
for c in review['comments']:
|
|
34
|
+
print(f"📝 {c['file']}: {c['comment']}")
|
|
35
|
+
|
|
36
|
+
# 3. Semantic Changelog
|
|
37
|
+
changelog = generate_pr_summary_and_changelog(diff, pr_title="Add user query")
|
|
38
|
+
print(changelog['summary_markdown'])
|
|
39
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PR-Agent Pro Python SDK & CLI
|
|
3
|
+
Official Python client for automated pull request code review and security audits.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .client import PRAgentClient, review_diff, audit_security, generate_changelog
|
|
7
|
+
|
|
8
|
+
__version__ = "1.0.0"
|
|
9
|
+
__all__ = ["PRAgentClient", "review_diff", "audit_security", "generate_changelog"]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Dict, Any, Optional
|
|
3
|
+
|
|
4
|
+
def review_diff(diff_text: str, base_url: str = "https://ai-pr-reviewer-api.vercel.app") -> Dict[str, Any]:
|
|
5
|
+
endpoint = f"{base_url.rstrip('/')}/api/v1/review-diff"
|
|
6
|
+
try:
|
|
7
|
+
res = requests.post(endpoint, json={"diff_text": diff_text}, timeout=20)
|
|
8
|
+
return res.json()
|
|
9
|
+
except Exception as e:
|
|
10
|
+
return {"status": "error", "message": str(e)}
|
|
11
|
+
|
|
12
|
+
def audit_security(diff_text: str, base_url: str = "https://ai-pr-reviewer-api.vercel.app") -> Dict[str, Any]:
|
|
13
|
+
endpoint = f"{base_url.rstrip('/')}/api/v1/audit-security"
|
|
14
|
+
try:
|
|
15
|
+
res = requests.post(endpoint, json={"diff_text": diff_text}, timeout=20)
|
|
16
|
+
return res.json()
|
|
17
|
+
except Exception as e:
|
|
18
|
+
return {"status": "error", "message": str(e)}
|
|
19
|
+
|
|
20
|
+
def generate_changelog(diff_text: str, pr_title: str = "Feature update", base_url: str = "https://ai-pr-reviewer-api.vercel.app") -> Dict[str, Any]:
|
|
21
|
+
endpoint = f"{base_url.rstrip('/')}/api/v1/generate-changelog"
|
|
22
|
+
try:
|
|
23
|
+
res = requests.post(endpoint, json={"diff_text": diff_text, "pr_title": pr_title}, timeout=20)
|
|
24
|
+
return res.json()
|
|
25
|
+
except Exception as e:
|
|
26
|
+
return {"status": "error", "message": str(e)}
|
|
27
|
+
|
|
28
|
+
class PRAgentClient:
|
|
29
|
+
def __init__(self, api_key: Optional[str] = None, base_url: str = "https://ai-pr-reviewer-api.vercel.app"):
|
|
30
|
+
self.api_key = api_key
|
|
31
|
+
self.base_url = base_url.rstrip("/")
|
|
32
|
+
|
|
33
|
+
def review(self, diff_text: str) -> Dict[str, Any]:
|
|
34
|
+
return review_diff(diff_text, base_url=self.base_url)
|
|
35
|
+
|
|
36
|
+
def audit(self, diff_text: str) -> Dict[str, Any]:
|
|
37
|
+
return audit_security(diff_text, base_url=self.base_url)
|
|
38
|
+
|
|
39
|
+
def changelog(self, diff_text: str, pr_title: str = "Feature update") -> Dict[str, Any]:
|
|
40
|
+
return generate_changelog(diff_text, pr_title=pr_title, base_url=self.base_url)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pr-agent-pro
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Automated AI Pull Request Reviewer & Security Code Auditor.
|
|
5
|
+
Home-page: https://github.com/meanusarcanus/ai-pr-reviewer-action
|
|
6
|
+
Author: Meanus Arcanus
|
|
7
|
+
Author-email: meanusarcanus@gmail.com
|
|
8
|
+
Requires-Python: >=3.8
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: requests>=2.25.0
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: author-email
|
|
13
|
+
Dynamic: home-page
|
|
14
|
+
Dynamic: requires-python
|
|
15
|
+
|
|
16
|
+
# 🤖 PR-Agent Pro Python SDK & CLI
|
|
17
|
+
|
|
18
|
+
Automated AI Pull Request Code Reviewer & Security Auditor.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## ⚡ Quickstart
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install ai-pr-reviewer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
from ai_pr_reviewer import review_diff, audit_security, generate_changelog
|
|
30
|
+
|
|
31
|
+
diff = """
|
|
32
|
+
--- a/db.py
|
|
33
|
+
+++ b/db.py
|
|
34
|
+
@@ -10,3 +10,4 @@
|
|
35
|
+
+ query = f"SELECT * FROM users WHERE email = '{user_email}'"
|
|
36
|
+
+ cursor.execute(query)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
# 1. Security & Secret Leak Audit
|
|
40
|
+
security = audit_security(diff)
|
|
41
|
+
print(f"Security Grade: {security['security_grade']} (Score: {security['security_score']}/100)")
|
|
42
|
+
for f in security['findings']:
|
|
43
|
+
print(f"⚠️ {f['type']}: {f['description']}")
|
|
44
|
+
|
|
45
|
+
# 2. Automated Code Review with 1-Click Suggestions
|
|
46
|
+
review = review_code_diff(diff)
|
|
47
|
+
print(f"Verdict: {review['verdict']}")
|
|
48
|
+
for c in review['comments']:
|
|
49
|
+
print(f"📝 {c['file']}: {c['comment']}")
|
|
50
|
+
|
|
51
|
+
# 3. Semantic Changelog
|
|
52
|
+
changelog = generate_pr_summary_and_changelog(diff, pr_title="Add user query")
|
|
53
|
+
print(changelog['summary_markdown'])
|
|
54
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
ai_pr_reviewer/__init__.py
|
|
5
|
+
ai_pr_reviewer/client.py
|
|
6
|
+
pr_agent_pro.egg-info/PKG-INFO
|
|
7
|
+
pr_agent_pro.egg-info/SOURCES.txt
|
|
8
|
+
pr_agent_pro.egg-info/dependency_links.txt
|
|
9
|
+
pr_agent_pro.egg-info/requires.txt
|
|
10
|
+
pr_agent_pro.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
requests>=2.25.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ai_pr_reviewer
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pr-agent-pro"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Automated AI Pull Request Reviewer & Security Code Auditor."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"requests>=2.25.0"
|
|
13
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="pr-agent-pro",
|
|
5
|
+
version="1.0.0",
|
|
6
|
+
description="Automated AI Pull Request Reviewer & Security Code Audit Engine.",
|
|
7
|
+
long_description=open("README.md").read() if open("README.md") else "",
|
|
8
|
+
long_description_content_type="text/markdown",
|
|
9
|
+
author="Meanus Arcanus",
|
|
10
|
+
author_email="meanusarcanus@gmail.com",
|
|
11
|
+
url="https://github.com/meanusarcanus/ai-pr-reviewer-action",
|
|
12
|
+
packages=find_packages(),
|
|
13
|
+
install_requires=[
|
|
14
|
+
"requests>=2.25.0",
|
|
15
|
+
],
|
|
16
|
+
classifiers=[
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
],
|
|
21
|
+
python_requires=">=3.8",
|
|
22
|
+
)
|