github-code-review 3.4.2__tar.gz → 3.4.3__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.
- {github_code_review-3.4.2 → github_code_review-3.4.3}/PKG-INFO +5 -5
- {github_code_review-3.4.2 → github_code_review-3.4.3}/README.md +4 -4
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/deploy.py +2 -2
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/config.toml +17 -5
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/constants.py +1 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/project_config.py +18 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/github_workflows/components/installs.j2 +2 -2
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/github_workflows/gito-code-review.yml.j2 +2 -2
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/github_workflows/gito-react-to-comments.yml.j2 +1 -1
- {github_code_review-3.4.2 → github_code_review-3.4.3}/pyproject.toml +1 -1
- {github_code_review-3.4.2 → github_code_review-3.4.3}/LICENSE +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/__init__.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/__main__.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/bootstrap.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/cli.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/cli_base.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/__init__.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/fix.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/gh_post_review_comment.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/gh_react_to_comment.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/linear_comment.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/repl.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/version.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/context.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/core.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/env.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/gh_api.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/issue_trackers.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/pipeline.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/pipeline_steps/__init__.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/pipeline_steps/jira.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/pipeline_steps/linear.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/report_struct.py +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/answer.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/github_workflows/components/env-vars.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/partial/aux_files.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/questions/changes_summary.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/questions/release_notes.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/tpl/questions/test_cases.j2 +0 -0
- {github_code_review-3.4.2 → github_code_review-3.4.3}/gito/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github-code-review
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.3
|
|
4
4
|
Summary: AI code review tool that works with any language model provider. It detects issues in GitHub pull requests or local changes—instantly, reliably, and without vendor lock-in.
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
@@ -96,10 +96,10 @@ jobs:
|
|
|
96
96
|
runs-on: ubuntu-latest
|
|
97
97
|
permissions: { contents: read, pull-requests: write } # 'write' for leaving the summary comment
|
|
98
98
|
steps:
|
|
99
|
-
- uses: actions/checkout@
|
|
99
|
+
- uses: actions/checkout@v6
|
|
100
100
|
with: { fetch-depth: 0 }
|
|
101
101
|
- name: Set up Python
|
|
102
|
-
uses: actions/setup-python@
|
|
102
|
+
uses: actions/setup-python@v6
|
|
103
103
|
with: { python-version: "3.13" }
|
|
104
104
|
- name: Install AI Code Review tool
|
|
105
105
|
run: pip install gito.bot~=3.4
|
|
@@ -107,13 +107,13 @@ jobs:
|
|
|
107
107
|
env:
|
|
108
108
|
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
|
109
109
|
LLM_API_TYPE: openai
|
|
110
|
-
MODEL: "gpt-
|
|
110
|
+
MODEL: "gpt-5.2"
|
|
111
111
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
112
112
|
PR_NUMBER_FROM_WORKFLOW_DISPATCH: ${{ github.event.inputs.pr_number }}
|
|
113
113
|
run: |
|
|
114
114
|
gito --verbose review
|
|
115
115
|
gito github-comment --token ${{ secrets.GITHUB_TOKEN }}
|
|
116
|
-
- uses: actions/upload-artifact@
|
|
116
|
+
- uses: actions/upload-artifact@v6
|
|
117
117
|
with:
|
|
118
118
|
name: ai-code-review-results
|
|
119
119
|
path: |
|
|
@@ -64,10 +64,10 @@ jobs:
|
|
|
64
64
|
runs-on: ubuntu-latest
|
|
65
65
|
permissions: { contents: read, pull-requests: write } # 'write' for leaving the summary comment
|
|
66
66
|
steps:
|
|
67
|
-
- uses: actions/checkout@
|
|
67
|
+
- uses: actions/checkout@v6
|
|
68
68
|
with: { fetch-depth: 0 }
|
|
69
69
|
- name: Set up Python
|
|
70
|
-
uses: actions/setup-python@
|
|
70
|
+
uses: actions/setup-python@v6
|
|
71
71
|
with: { python-version: "3.13" }
|
|
72
72
|
- name: Install AI Code Review tool
|
|
73
73
|
run: pip install gito.bot~=3.4
|
|
@@ -75,13 +75,13 @@ jobs:
|
|
|
75
75
|
env:
|
|
76
76
|
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
|
77
77
|
LLM_API_TYPE: openai
|
|
78
|
-
MODEL: "gpt-
|
|
78
|
+
MODEL: "gpt-5.2"
|
|
79
79
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
80
80
|
PR_NUMBER_FROM_WORKFLOW_DISPATCH: ${{ github.event.inputs.pr_number }}
|
|
81
81
|
run: |
|
|
82
82
|
gito --verbose review
|
|
83
83
|
gito github-comment --token ${{ secrets.GITHUB_TOKEN }}
|
|
84
|
-
- uses: actions/upload-artifact@
|
|
84
|
+
- uses: actions/upload-artifact@v6
|
|
85
85
|
with:
|
|
86
86
|
name: ai-code-review-results
|
|
87
87
|
path: |
|
|
@@ -46,8 +46,8 @@ def deploy(
|
|
|
46
46
|
|
|
47
47
|
api_types = [ApiType.ANTHROPIC, ApiType.OPEN_AI, ApiType.GOOGLE_AI_STUDIO]
|
|
48
48
|
default_models = {
|
|
49
|
-
ApiType.ANTHROPIC: "claude-sonnet-4-
|
|
50
|
-
ApiType.OPEN_AI: "gpt-
|
|
49
|
+
ApiType.ANTHROPIC: "claude-sonnet-4-5",
|
|
50
|
+
ApiType.OPEN_AI: "gpt-5.2",
|
|
51
51
|
ApiType.GOOGLE_AI_STUDIO: "gemini-2.5-pro",
|
|
52
52
|
}
|
|
53
53
|
secret_names = {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
# :class: gito.project_config.ProjectConfig
|
|
2
2
|
|
|
3
|
+
# This is default project configuration file bundled within gito.bot distribution.
|
|
4
|
+
# You can override any settings here by creating a .gito/config.toml file in your
|
|
5
|
+
# project root directory.
|
|
6
|
+
|
|
7
|
+
|
|
3
8
|
# Defines the keyword or mention tag that triggers bot actions when referenced in code review comments.
|
|
4
9
|
# list of strings, case-insensitive
|
|
5
10
|
mention_triggers = ["gito", "bot", "ai", "/fix"]
|
|
11
|
+
# Collapse previous code review comments in the GitHub PR before posting new ones
|
|
6
12
|
collapse_previous_code_review_comments = true
|
|
13
|
+
# Code review report template in Markdown format, used for GitHub PR comments.
|
|
7
14
|
report_template_md = """
|
|
8
15
|
<h2>{{ HTML_TEXT_ICON }}I've Reviewed the Code</h2>
|
|
9
16
|
|
|
@@ -45,6 +52,7 @@ report_template_md = """
|
|
|
45
52
|
{%- endif -%}
|
|
46
53
|
{{- HTML_CR_COMMENT_MARKER -}}
|
|
47
54
|
"""
|
|
55
|
+
# Code review report template used for CLI output
|
|
48
56
|
report_template_cli = """
|
|
49
57
|
{{ Back.BLUE }} + + + ---==<<[ CODE REVIEW{{Style.NORMAL}} ]>>==--- + + + {{Style.RESET_ALL}}
|
|
50
58
|
{% if report.total_issues > 0 -%}
|
|
@@ -123,7 +131,9 @@ report_template_cli = """
|
|
|
123
131
|
{%- endfor -%}
|
|
124
132
|
{%- endif -%}
|
|
125
133
|
"""
|
|
134
|
+
# Number of retries for LLM requests in case of failures
|
|
126
135
|
retries = 3
|
|
136
|
+
# Code review prompt template
|
|
127
137
|
prompt = """
|
|
128
138
|
{{ self_id }}
|
|
129
139
|
----TASK----
|
|
@@ -145,7 +155,7 @@ Review the provided code diff carefully and identify *only* highly confident iss
|
|
|
145
155
|
- Do **not** report vague, theoretical, or overly generic advice.
|
|
146
156
|
- Do **not** report anything with medium or lower confidence.
|
|
147
157
|
- Typographical errors have highest severity.
|
|
148
|
-
{{ requirements -}}
|
|
158
|
+
{{ requirements -}}{#- see prompt_vars.requirements in the .gito/config.toml -#}
|
|
149
159
|
{{ json_requirements }}
|
|
150
160
|
|
|
151
161
|
Respond with a valid JSON array of issues following this schema:
|
|
@@ -259,13 +269,13 @@ If there are concerns about how thoroughly the code covers the requirements and
|
|
|
259
269
|
answer_github_comments = true
|
|
260
270
|
answer_prompt = "tpl:answer.j2"
|
|
261
271
|
aux_files = []
|
|
262
|
-
[pipeline_steps.jira]
|
|
272
|
+
[pipeline_steps.jira] # Jira integration step, fetches associated issue details for the review context.
|
|
263
273
|
call="gito.pipeline_steps.jira.fetch_associated_issue"
|
|
264
274
|
envs=["local","gh-action"]
|
|
265
|
-
[pipeline_steps.linear]
|
|
275
|
+
[pipeline_steps.linear] # Linear integration step, fetches associated issue details for the review context.
|
|
266
276
|
call="gito.pipeline_steps.linear.fetch_associated_issue"
|
|
267
277
|
envs=["local","gh-action"]
|
|
268
|
-
[prompt_vars]
|
|
278
|
+
[prompt_vars] # Additional variables to pass to prompts.
|
|
269
279
|
self_id = """
|
|
270
280
|
You are a subsystem of an AI-powered software platform, specifically tasked with performing expert code reviews.
|
|
271
281
|
Act as a senior, highly experienced software engineer.
|
|
@@ -441,8 +451,10 @@ decorators add depth and texture, and observer masterfully completes the composi
|
|
|
441
451
|
The Gang of Four gives a standing ovation from the stalls."
|
|
442
452
|
```
|
|
443
453
|
"""
|
|
454
|
+
# Used in review prompt template
|
|
444
455
|
requirements = """
|
|
445
|
-
-
|
|
456
|
+
- Treat language issues as critical defects: Unclear or incorrect English that may cause misunderstanding must be flagged, not ignored.
|
|
457
|
+
- Enforce consistency: Terminology, tense, and naming patterns must be consistent across the codebase.
|
|
446
458
|
"""
|
|
447
459
|
summary_requirements = ""
|
|
448
460
|
answering_instructions = """
|
|
@@ -3,6 +3,7 @@ from .env import Env
|
|
|
3
3
|
|
|
4
4
|
PROJECT_GITO_FOLDER = ".gito"
|
|
5
5
|
PROJECT_CONFIG_FILE_NAME = "config.toml"
|
|
6
|
+
# Standard project config file path relative to the current project root
|
|
6
7
|
PROJECT_CONFIG_FILE_PATH = Path(".gito") / PROJECT_CONFIG_FILE_NAME
|
|
7
8
|
PROJECT_CONFIG_BUNDLED_DEFAULTS_FILE = Path(__file__).resolve().parent / PROJECT_CONFIG_FILE_NAME
|
|
8
9
|
HOME_ENV_PATH = Path("~/.gito/.env").expanduser()
|
|
@@ -52,6 +52,12 @@ class ProjectConfig:
|
|
|
52
52
|
|
|
53
53
|
@staticmethod
|
|
54
54
|
def _read_bundled_defaults() -> dict:
|
|
55
|
+
"""
|
|
56
|
+
Read the bundled default project configuration,
|
|
57
|
+
typically located at <root>/gito/config.toml in the gito.bot distribution.
|
|
58
|
+
Returns:
|
|
59
|
+
dict: The default project configuration.
|
|
60
|
+
"""
|
|
55
61
|
with open(PROJECT_CONFIG_BUNDLED_DEFAULTS_FILE, "rb") as f:
|
|
56
62
|
config = tomllib.load(f)
|
|
57
63
|
return config
|
|
@@ -62,6 +68,18 @@ class ProjectConfig:
|
|
|
62
68
|
|
|
63
69
|
@staticmethod
|
|
64
70
|
def load(config_path: str | Path | None = None) -> "ProjectConfig":
|
|
71
|
+
"""
|
|
72
|
+
Load the project configuration from the specified path.
|
|
73
|
+
If no path is provided, it defaults to the standard project config file path
|
|
74
|
+
(<current_project>/.gito/config.toml).
|
|
75
|
+
If the file exists, it merges the project-specific
|
|
76
|
+
configuration with the bundled defaults.
|
|
77
|
+
If not found, it uses only the defaults.
|
|
78
|
+
Args:
|
|
79
|
+
config_path (str | Path | None): Alternative path to the project configuration file.
|
|
80
|
+
Returns:
|
|
81
|
+
ProjectConfig: The loaded project configuration instance.
|
|
82
|
+
"""
|
|
65
83
|
config = ProjectConfig._read_bundled_defaults()
|
|
66
84
|
github_env = detect_github_env()
|
|
67
85
|
config["prompt_vars"] |= github_env | dict(github_env=github_env)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
- name: Set up Python
|
|
4
|
-
uses: actions/setup-python@
|
|
4
|
+
uses: actions/setup-python@v6
|
|
5
5
|
with: { python-version: "3.13" }
|
|
6
6
|
|
|
7
7
|
- name: Fetch Latest Gito Version
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
run: pip index versions gito.bot 2>/dev/null | head -1 | sed -n 's/.* (\([^)]*\)).*/version=\1/p' >> $GITHUB_OUTPUT
|
|
10
10
|
|
|
11
11
|
{% raw -%}
|
|
12
|
-
- uses: actions/cache@
|
|
12
|
+
- uses: actions/cache@v5
|
|
13
13
|
id: cache
|
|
14
14
|
with:
|
|
15
15
|
path: |
|
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
permissions: { contents: read, pull-requests: write } # 'write' for leaving the summary comment
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
16
|
with: { fetch-depth: 0 }
|
|
17
17
|
|
|
18
18
|
{%- include("github_workflows/components/installs.j2") %}
|
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
gito --verbose review
|
|
26
26
|
gito github-comment{% endraw %}
|
|
27
27
|
|
|
28
|
-
- uses: actions/upload-artifact@
|
|
28
|
+
- uses: actions/upload-artifact@v6
|
|
29
29
|
with:
|
|
30
30
|
name: gito-code-review-results
|
|
31
31
|
path: |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "github-code-review"
|
|
3
|
-
version = "3.4.
|
|
3
|
+
version = "3.4.3"
|
|
4
4
|
description = "AI code review tool that works with any language model provider. It detects issues in GitHub pull requests or local changes—instantly, reliably, and without vendor lock-in."
|
|
5
5
|
authors = ["Nayjest <mail@vitaliy.in>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{github_code_review-3.4.2 → github_code_review-3.4.3}/gito/commands/gh_post_review_comment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|