Skip to content

Commit 0120c91

Browse files
authored
Merge pull request #38 from Nayjest/multibuild
multibuild, links fix
2 parents 5b17191 + 9e1266f commit 0120c91

File tree

4 files changed

+55
-13
lines changed

4 files changed

+55
-13
lines changed

Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ install:
88
pip install -e .
99

1010
pkg:
11-
python -m poetry build
11+
python multi-build.py
12+
build: pkg
1213

13-
clean-dist:
14+
clear-dist:
1415
python -c "import shutil, os; shutil.rmtree('dist', ignore_errors=True); os.makedirs('dist', exist_ok=True)"
15-
clear-dist: clean-dist
16-
cln-dist: clean-dist
17-
clr-dist: clean-dist
16+
clr-dist: clear-dist
1817

1918
publish:
2019
python -c "import os;t=os.getenv('PYPI_TOKEN');__import__('subprocess').run(f'python -m twine upload dist/* -u __token__ -p {t}',shell=True)"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ An AI-powered GitHub code review tool that uses LLMs to detect high-confidence,
1616
- Posts review results as a comment on your PR
1717
- Can be used locally; works with both local and remote Git repositories
1818
- Optional, fun AI-generated code awards 🏆
19-
- Easily configurable via [`.ai-code-review.toml`](ai_code_review/.ai-code-review.toml)
19+
- Easily configurable via [`.ai-code-review.toml`](https://github.com/Nayjest/ai-code-review/blob/main/ai_code_review/.ai-code-review.toml) in your repository root
2020
- Extremely fast, parallel LLM usage
2121
- Model-agnostic (OpenAI, Anthropic, Google, local PyTorch inference, etc.)
2222

@@ -43,7 +43,7 @@ jobs:
4343
with: { python-version: "3.13" }
4444
- name: Install AI Code Review tool
4545
run: pip install ai-code-review==0.4.1
46-
- name: Run AI code review
46+
- name: Run AI code analysis
4747
env:
4848
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
4949
LLM_API_TYPE: openai
@@ -65,7 +65,7 @@ jobs:
6565
💪 Done!
6666
PRs to your repository will now receive AI code reviews automatically. ✨
6767

68-
### 2. Run Locally
68+
### 2. Run Code Analysis Locally
6969

7070
Install and run:
7171

@@ -98,7 +98,7 @@ Change behavior via `.ai-code-review.toml`:
9898
You can override the default config by placing `.ai-code-review.toml` in your repo root.
9999

100100

101-
See default configuration [here](ai_code_review/.ai-code-review.toml).
101+
See default configuration [here](https://github.com/Nayjest/ai-code-review/blob/main/ai_code_review/.ai-code-review.toml).
102102

103103
## 💻 Development Setup
104104

@@ -123,10 +123,10 @@ pytest
123123

124124
## 🤝 Contributing
125125

126-
We ❤️ contributions! See [CONTRIBUTING.md](CONTRIBUTING.md).
126+
We ❤️ contributions! See [CONTRIBUTING.md](https://github.com/Nayjest/ai-code-review/blob/main/CONTRIBUTING.md).
127127

128128
## 📝 License
129129

130-
Licensed under the [MIT License](LICENSE).
130+
Licensed under the [MIT License](https://github.com/Nayjest/ai-code-review/blob/main/LICENSE).
131131

132132
© 2025 [Vitalii Stepanenko](mailto:mail@vitaliy.in)

multi-build.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""
2+
Multi-build script for delivering to PYPI with aliased names.
3+
4+
(c) Vitalii Stepanenko (Nayjest) <mailto:mail@vitaliy.in>, 2025
5+
"""
6+
import re
7+
from pathlib import Path
8+
import subprocess
9+
10+
NAMES = [
11+
["ai-code-review"],
12+
["ai-cr"],
13+
["github-code-review"],
14+
]
15+
FILES = [
16+
"pyproject.toml",
17+
]
18+
19+
20+
def replace_name(old_names: list[str], new_names: list[str], files: list[str] = None):
21+
files = files or FILES
22+
for i in range(len(old_names)):
23+
old_name = old_names[i]
24+
new_name = new_names[i]
25+
for path in files:
26+
p = Path(path)
27+
p.write_text(
28+
re.sub(
29+
fr'(?<![\\/\w\-\_]){old_name}\b',
30+
new_name,
31+
p.read_text(encoding="utf-8"),
32+
flags=re.M
33+
), encoding="utf-8"
34+
)
35+
36+
37+
prev = NAMES[0]
38+
for nxt in NAMES[1:] + [NAMES[0]]:
39+
print(f"Building for project name: {nxt[0]}...")
40+
replace_name(prev, nxt)
41+
subprocess.run(["poetry", "build"], check=True)
42+
prev = nxt
43+
print("All builds completed.")

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[tool.poetry]
22
name = "ai-code-review"
3-
version = "0.4.1"
3+
version = "0.4.5"
44
description = "LLM-agnostic GitHub AI Code Review Tool with integration to GitHub actions"
55
authors = ["Nayjest <mail@vitaliy.in>"]
66
readme = "README.md"
77
license = "MIT"
88
homepage = "https://github.com/Nayjest/github-ai-code-review"
99
repository = "https://github.com/Nayjest/github-ai-code-review"
10-
keywords = ["ai", "coding", "assistant", "llm", "code review", "github", "automation", "devops", "developer tools", "github actions", "workflows"]
10+
keywords = ["static code analysis", "code review", "code quality", "ai", "coding", "assistant", "llm", "github", "automation", "devops", "developer tools", "github actions", "workflows", "git"]
1111
classifiers = [
1212
"Environment :: Console",
1313
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)