Commit graph

594 commits

Author SHA1 Message Date
idavidov
35afe758e9 revert back conf 2023-08-19 16:16:16 +03:00
idavidov
50125ae57f various changes as outcomes from AI review 2023-08-19 16:12:48 +03:00
idavidov
6595c3e0c9 2 more /improve good suggestions 2023-08-19 15:47:45 +03:00
idavidov
fdd16f6c75 raize exception when no diffs in MR 2023-08-19 15:40:40 +03:00
idavidov
7b7e913195 to changes suggested by /improve with my small touch 2023-08-19 15:31:02 +03:00
idavidov
5477469a91 in order to have exact sha's we have to find correct diff for this change
otherwise gitlab web doesn't able show diff on page and return 500 or 400 errors based on different scenarios
2023-08-19 15:06:22 +03:00
sarbjitgrewal
dff4646920 fix bitbucket improve issue 2023-08-18 17:48:45 +05:30
Tim Perkins
631fb93b28 Implement Automatic Review Configuration for GitHub app 2023-08-16 16:24:30 -04:00
mrT23
dee1f168f8
Merge pull request #206 from pzarfos/fix/bitbucket_get_repo_settings
Implement get_repo_settings for BitbucketProvider
2023-08-16 18:54:36 +03:00
mrT23
bb18e32c56
Merge pull request #209 from tjwp/no-suggestions
Publish comment when improve has no suggestions
2023-08-16 18:53:39 +03:00
Tim Perkins
70286e9574
Make the message more modest 2023-08-15 08:35:57 -04:00
Tim Perkins
3f60d12a9a Publish comment when improve has no suggestions 2023-08-14 13:07:00 -04:00
Phill Zarfos
164b340c29 Merge branch 'main' into fix/bitbucket_get_repo_settings 2023-08-14 08:30:14 -04:00
Ori Kotek
4bb035ec0f
Merge pull request #208 from sarbjitsinghgrewal/fix_bitbucket_ask_issue
Fix bitbucket ask issue
2023-08-14 14:52:45 +03:00
Ori Kotek
23a79bc8fe
Merge pull request #183 from zmeir/zmeir-fallback_deployments
Support fallback deployments to accompany fallback models
2023-08-14 14:51:14 +03:00
sarbjitgrewal
cca951d787 fix bitbucket ask issue 2023-08-14 14:30:30 +05:30
Phill Zarfos
f82b9620af Implement get_repo_settings for BitbucketProvider 2023-08-13 18:25:11 -04:00
Péter Szécsi
524faadffb init AzureDevopsProvider 2023-08-13 23:00:45 +02:00
Péter Szécsi
82710c2d15 add AzureDevopsProvider to __init__.py 2023-08-13 22:56:50 +02:00
Zohar Meir
b7b650eb05
Remove extra blank line in help message 2023-08-13 11:32:02 +03:00
zmeir
6ca0655517 Extracted to helper functions 2023-08-13 11:03:10 +03:00
zmeir
edcf89a456 Improve comment 2023-08-13 10:56:16 +03:00
zmeir
7762a67250 Fail if not enough fallback deployments 2023-08-13 10:55:44 +03:00
zmeir
7049c73790 Merge branch 'main' into zmeir-fallback_deployments 2023-08-13 10:48:21 +03:00
mrT23
d3a5aea89e
update_changelog 2023-08-11 18:50:56 +03:00
mrT23
dd87df49f5
block scalar 2023-08-11 18:43:46 +03:00
mrT23
e85bcf3a17
Merge remote-tracking branch 'origin/tr/block_scalar' into tr/block_scalar 2023-08-11 18:38:06 +03:00
mrT23
abb754b16b
block scalar 2023-08-11 18:37:55 +03:00
mrT23
bb5878c99a
Merge branch 'main' into tr/block_scalar 2023-08-11 18:36:21 +03:00
mrT23
273a9e35d9
block scalar 2023-08-11 18:35:34 +03:00
Ori Kotek
17ed050ca7
Merge pull request #192 from coditamar/fix/minor_cli_and_requirements_fixes
Correcting CLI and README Descriptions and Fixing Requirements.txt
2023-08-10 02:18:13 +03:00
Ori Kotek
b206b1c5ff
Protect for empty description 2023-08-10 02:08:36 +03:00
Itamar Friedman
725ac9e85d fixing cli pr_url help description 2023-08-10 01:30:12 +03:00
mrT23
d38c5236dd
Merge pull request #187 from Codium-ai/ok/limit_description
Limiting Description and Commit Messages Length
2023-08-09 14:14:47 +03:00
mrT23
1b0b90e51d
block scalar 2023-08-09 14:11:58 +03:00
mrT23
64481e2d84
block scalar 2023-08-09 14:01:48 +03:00
Ori Kotek
e0f295659d
A less hacky way 2023-08-09 12:17:54 +03:00
mrT23
fe75e3f2ec
yaml
yaml
2023-08-09 12:15:52 +03:00
Ori Kotek
e3274af831
A (still) hacky way to clip description and commit messages 2023-08-09 10:17:58 +03:00
Zohar Meir
95b6abef09
Merge branch 'main' into zmeir-fallback_deployments 2023-08-08 11:00:13 +03:00
zmeir
7f1849a867 Logging 2023-08-07 22:42:53 +03:00
mrT23
7760f37dee
Merge pull request #185 from zmeir/zmeir-fix_inline_comment_position
Attempt to fix bug in create_inline_comment
2023-08-07 20:41:52 +03:00
Ori Kotek
ebbe655c40
Don't commment on Github, only eyes reaction 2023-08-07 18:09:39 +03:00
Zohar Meir
164ed77d72
Attempt to fix bug in create_inline_comment 2023-08-07 17:09:50 +03:00
Ori Kotek
b1148e5f7a
Don't commment on Github, only eyes reaction 2023-08-07 16:34:28 +03:00
Ori Kotek
a75253097b
Don't remove eyes 2023-08-07 16:28:20 +03:00
zmeir
6c4a5bae52 Support fallback deployments to accompany fallback models
This is useful for example in Azure OpenAI deployments where you have a different deployment per model, so the current fallback implementation doesn't work (still uses the same deployment for each fallback attempt)
2023-08-07 16:18:48 +03:00
Ori Kotek
886139c6b5
Support adding / removing reaction from comments in GitHub different servers 2023-08-07 16:18:08 +03:00
Ori Kotek
8f751f7371
Default timeout for AI is now 180s, configurable 2023-08-07 13:26:28 +03:00
Ori Kotek
a00038fbd8
Merge remote-tracking branch 'origin/main' into patch-1 2023-08-06 18:09:09 +03:00
Krrish Dholakia
703215fe83 updating secrets template 2023-08-05 22:53:59 -07:00
Krrish Dholakia
0f975ccf4a bug fixes 2023-08-05 22:50:41 -07:00
mrT23
7367c62cf9
TestFindLineNumberOfRelevantLineInFile 2023-08-06 08:31:15 +03:00
mrT23
fed0ea349a
find_line_number_of_relevant_line_in_file
find_line_number_of_relevant_line_in_file
2023-08-06 08:13:07 +03:00
Krrish Dholakia
ed8554699b bug fixes and updates 2023-08-03 16:05:46 -07:00
mrT23
0e3dbbd0f2
fix major bug in gitlab 2023-08-03 22:51:38 +03:00
mrT23
7a57db5d88
load_large_diff is done once 2023-08-03 22:14:05 +03:00
Krish Dholakia
102edcdcf1
adding support for Anthropic, Cohere, Replicate, Azure 2023-08-03 12:04:08 -07:00
mrT23
c92648cbd5
caching 2023-08-03 21:38:18 +03:00
Hussam Lawen
26b008565b
Merge pull request #170 from Codium-ai/tr/edge_case_for_hunks
Handling edge case for hunks in git patch processing
2023-08-03 12:11:27 +03:00
mrT23
0dec24aa37
edge case for hunks 2023-08-03 10:50:22 +03:00
mrT23
cfa14178f8
Merge pull request #168 from Codium-ai/tr/further_use_commit_messages
Use commit messages in PR tools
2023-08-03 07:58:25 +03:00
mrT23
3e94a71dcd
commit_messages_str is used in all tools 2023-08-02 18:26:39 +03:00
zmeir
dd14423b07 Add /config command to list the possible configuration settings 2023-08-02 16:42:54 +03:00
Ori Kotek
ab607d74be
Support repo-specific configuration file 2023-08-01 18:36:20 +03:00
Ori Kotek
e12874b696
Support repo-specific configuration file 2023-08-01 17:44:08 +03:00
Ori Kotek
696e2bd6ff
Support repo-specific configuration file 2023-08-01 17:27:25 +03:00
Ori Kotek
450f410e3c
Support repo-specific configuration file 2023-08-01 17:22:03 +03:00
Ori Kotek
c5a79ceedd
Merge remote-tracking branch 'origin/main' into ok/settings_refactor 2023-08-01 16:01:04 +03:00
Ori Kotek
8ae936e504
Bug fixes 2023-08-01 15:58:23 +03:00
mrT23
dfb73c963a
get_commit_messages for gitlab 2023-08-01 15:30:14 +03:00
mrT23
8c0370a166
Commit messages in pr-description 2023-08-01 15:15:59 +03:00
Ori Kotek
d7b77764c3
Support context aware settings (for each incoming request), support override of settings, refactor CLI to use pr_agent.py 2023-08-01 14:43:26 +03:00
mrT23
6605f9c444
typos in 'commands_text' 2023-07-31 11:02:30 +03:00
mrT23
e2d015a20c
final 2023-07-30 12:27:32 +03:00
mrT23
a6ba8b614a
Example args 2023-07-30 12:16:43 +03:00
mrT23
4f0fabd2ca
update_settings_from_args refactor 2023-07-30 12:14:26 +03:00
mrT23
42b047a14e
update_settings_from_args 2023-07-30 12:04:57 +03:00
mrT23
3daf94954a
update_settings_from_args 2023-07-30 11:43:44 +03:00
Ori Kotek
b564d8ac32
Merge pull request #147 from zmeir/zmeir-align_describe_styling
Minor improvements to describe command
2023-07-28 20:55:15 +03:00
Marshall Yount
ef71a7049e fix TypeError when iterating discussion_messages
When `pr-agent` is reviewing a long list of messages, a TypeError is thrown on the line

```python
for message in reversed(discussion_messages):
```

When reviewing the PyGithub library, the recommend an alternate syntax for iterating a paginated list in reverse.

https://github.com/PyGithub/PyGithub/blob/v1.59.0/github/PaginatedList.py#L122-L125

```
    If you want to iterate in reversed order, just do::

        for repo in user.get_repos().reversed:
            print(repo.name)
```

And here's a copy of the actual traceback

```
Traceback (most recent call last):
  File "/app/pr_agent/servers/github_action_runner.py", line 68, in <module>
    asyncio.run(run_action())
  File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/app/pr_agent/servers/github_action_runner.py", line 64, in run_action
    await PRAgent().handle_request(pr_url, body)
  File "/app/pr_agent/agent/pr_agent.py", line 19, in handle_request
    await PRReviewer(pr_url, is_answer=True).review()
  File "/app/pr_agent/tools/pr_reviewer.py", line 49, in __init__
    answer_str, question_str = self._get_user_answers()
  File "/app/pr_agent/tools/pr_reviewer.py", line 253, in _get_user_answers
    for message in reversed(discussion_messages):
TypeError: object of type 'PaginatedList' has no len()
```
2023-07-28 11:04:46 +02:00
mrT23
6fde87b3bd
Merge pull request #152 from Codium-ai/tr/gitlab_fixes
Improvements and Error Handling for GitLab Provider
2023-07-28 11:40:53 +03:00
Ori Kotek
63a703c000
Handle marketplace hook 2023-07-28 11:30:51 +03:00
mrT23
4664d91844
bug fixes in gitlab code suggestion 2023-07-28 11:24:14 +03:00
mrT23
8f16c46012
try-except 2023-07-28 10:52:49 +03:00
Ori Kotek
a8780f722d
Handle marketplace hook 2023-07-28 03:22:25 +03:00
Ori Kotek
1a8fce1505
Updated handling of installation id 2023-07-28 02:44:28 +03:00
Ori Kotek
42388b1f8d
Merge pull request #146 from idavidov/idsvidov/gitlabpaginator_fix
Fix for GitLab Paginator in GitLab Provider
2023-07-28 02:01:04 +03:00
Ori Kotek
0167003bbc
handle no diffs 2023-07-28 01:59:10 +03:00
zmeir
4aa54b9bd4 Add /describe -c option 2023-07-27 17:42:50 +03:00
zmeir
c6d0bacc08 Match styling of both /describe modes 2023-07-27 17:31:31 +03:00
idavidov
99ed9b22a1 latest documentation suggest get_all not all
https://python-gitlab.readthedocs.io/en/stable/api-usage.html#pagination
2023-07-27 15:39:19 +03:00
idavidov
eee6d51b40 issue #145
get all diffs in merge request and not only gitlab default 20
2023-07-27 14:41:36 +03:00
Ori Kotek
a50e137bba
Merge pull request #133 from idavidov/idavidov/github-ratelimit-message
Handling GitHub API Rate Limit Exceeded Exception
2023-07-27 14:22:11 +03:00
mrT23
6a72df2981
Merge pull request #139 from Codium-ai/tr/changelog
Add feature to update CHANGELOG.md based on PR content
2023-07-27 09:04:48 +03:00
mrT23
808ca48605
if not self.commit_changelog: 2023-07-27 08:48:39 +03:00
mrT23
c827cbc0ae
final touches 2023-07-27 08:47:26 +03:00
mrT23
413e5f6d77
general 2023-07-26 20:37:38 +03:00
mrT23
801923789b
final 2023-07-26 20:33:21 +03:00
mrT23
14eceb6e61
PRUpdateChangelog 2023-07-26 20:05:18 +03:00
mrT23
884317c4f7
stable 2023-07-26 20:03:22 +03:00
mrT23
c5f4b229b8
Merge pull request #142 from patryk-kowalski-ds/pk/local-git-provider-impvs
Improvements to Local Git Provider
2023-07-26 19:18:35 +03:00
mrT23
1bd47b0d53
enhance pr_reviewer.py code 2023-07-26 17:24:03 +03:00
mrT23
7531ccd31f
stable 2023-07-26 16:29:42 +03:00
Patryk Kowalski
3b19827ae2 Add validation for repository path 2023-07-26 15:29:09 +02:00
Patryk Kowalski
ea6e1811c1 Fixed PR title - should be feature branch name, not target branch name 2023-07-26 14:15:50 +02:00
mrT23
e3846a480e
s 2023-07-26 09:21:31 +03:00
mrT23
a60a58794c
Merge pull request #132 from Codium-ai/tr/code_enhancment
Enhancement of GitHub Webhook and Polling Server
2023-07-26 07:24:46 +03:00
Ori Kotek
8ae5faca53
Fix cyclic dependency 2023-07-25 16:52:18 +03:00
Ori Kotek
28d6adf62a
Quick fix for github action 2023-07-25 16:41:29 +03:00
idavidov
1229fba346 + settings.github.ratelimit_retries setup in configuration.toml 2023-07-25 16:37:13 +03:00
Ori Kotek
59a59ebf66
Quick fix for github action 2023-07-25 16:36:58 +03:00
Ori Kotek
36ab12c486
Merge pull request #136 from Codium-ai/ok/handle_sub_group
Handle subgroup in GitLab merge request URL parsing
2023-07-25 16:15:35 +03:00
Ori Kotek
0254e3d04a
Merge pull request #128 from patryk-kowalski-ds/deepsense.ai/local-git-provider
Add Local Git Provider Support
2023-07-25 16:15:02 +03:00
idavidov
f6036e936e + settings.github.ratelimit_retries setup in configuration.toml 2023-07-25 15:23:40 +03:00
Ori Kotek
10a07e497d
Handle sub group in gitlab MR URLs 2023-07-25 15:15:51 +03:00
idavidov
3b334805ee still need GithubException.RateLimitExceededException in pr_processing.py for correct exception catch 2023-07-25 15:14:56 +03:00
idavidov
b6f6c903a0 moved @retry to github_provider.py and fetch number of retries from settings 2023-07-25 15:12:02 +03:00
idavidov
55637a5620 added retry decorator similar to used in ai_handler following @okotek suggestion 2023-07-25 14:42:54 +03:00
idavidov
404cc0a00e small change to show message and fail 2023-07-25 14:20:20 +03:00
Patryk Kowalski
0815e2024c - Replaced two dot diff with three dot diff. Cleaned up obsolete code linked to double dot diff.
- Moved target_branch_existence assertion to _prepare_repo method
- Renamed branch_name -> target_branch_name
- Simplified get_files method
2023-07-25 13:07:21 +02:00
Ori Kotek
d23daf880f
Change gitlab API to use oauth_token instead of PAT (PAT shuold work as well) 2023-07-25 13:58:48 +03:00
idavidov
d1a8a610e9 Revert "show how much time until rate limit reset"
This reverts commit 8f482cd41a.
2023-07-25 13:38:55 +03:00
Patryk Kowalski
918549a4fc Implementing 'is_supported' method 2023-07-25 12:35:39 +02:00
Ilya Davidov
8f482cd41a
show how much time until rate limit reset
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-25 13:23:19 +03:00
idavidov
34096059ff quick and dirty response for github API ratelimit, until some smart solution will be implemented 2023-07-25 13:05:56 +03:00
mrT23
2dfbfec8c2
refactor 2023-07-24 19:48:24 +03:00
Patryk Kowalski
6170995665 replaced hardcoded main with actual target_branch name' 2023-07-24 16:59:07 +02:00
Patryk Kowalski (deepsense.ai)
ca42a54bc3
Update pr_agent/git_providers/local_git_provider.py
Co-authored-by: Ori Kotek <orikotek@gmail.com>
2023-07-24 16:47:05 +02:00
Patryk Kowalski (deepsense.ai)
c0610afe2a
Update pr_agent/git_providers/local_git_provider.py
Co-authored-by: Ori Kotek <orikotek@gmail.com>
2023-07-24 16:46:46 +02:00
Patryk Kowalski (deepsense.ai)
d4cbcc465c
Update pr_agent/git_providers/local_git_provider.py
Co-authored-by: Ori Kotek <orikotek@gmail.com>
2023-07-24 16:46:36 +02:00
Ori Kotek
adb3f17258
Merge pull request #131 from Codium-ai/ok/gitlab_webook
GitLab Webhook Integration and Provider Enhancements
2023-07-24 16:01:17 +03:00
Ori Kotek
2c03a67312
Add labels 2023-07-24 16:00:51 +03:00
Patryk Kowalski
8e6518f071 Added GitPython to requirements. Changed default review path (aesthetics) 2023-07-24 14:28:37 +02:00
Ori Kotek
c9c95d60d4
Implement gitlab webhook 2023-07-24 15:05:24 +03:00
Patryk Kowalski
02ecaa340f Local Git Provider Implementation 2023-07-24 12:49:57 +02:00
mrT23
cca809e91c
run_action 2023-07-24 12:45:24 +03:00
mrT23
57ff46ecc1
stable 2023-07-24 12:41:00 +03:00
mrT23
3819d52eb0
Merge remote-tracking branch 'origin/tr/code_enhancment' into tr/code_enhancment 2023-07-24 12:15:17 +03:00
mrT23
3072325d2c
PRDescription 2023-07-24 12:14:53 +03:00
Ori Kotek
abca2fdcb7
Merge remote-tracking branch 'origin/main' into tr/code_enhancment 2023-07-24 12:04:54 +03:00
mrT23
4d84f76948
_get_prediction 2023-07-24 11:31:35 +03:00
Ori Kotek
b9c25e487a
On /describe, preserve the current labels 2023-07-24 10:17:26 +03:00
mrT23
1bf27c38a7
_prepare_pr_answer 2023-07-24 09:15:45 +03:00
salberts
cd8bbbf889 bugfix 2023-07-24 00:58:21 +03:00
Ori Kotek
cd51bef7f7
Merge pull request #119 from zmeir/zmeir-code_suggestions_single_api_call
Optimize Code Suggestions API Calls
2023-07-23 17:30:37 +03:00
Ori Kotek
32151e3d9a
Temporarily remove gitlab polling server until a rewrite is ready 2023-07-23 17:04:41 +03:00
zmeir
32358678e6 Reduce the number of GitHub API calls when pushing code suggestions 2023-07-23 16:59:08 +03:00
Ori Kotek
1e97236a15
Add support for fallback models 2023-07-23 16:39:25 +03:00
Ori Kotek
02a1d8dbfc
Add support for fallback models 2023-07-23 16:16:36 +03:00
mrT23
f4a226b0f7
Merge pull request #113 from Codium-ai/tr/cli_refactor
Refactoring CLI Commands Handling
2023-07-23 08:37:26 +03:00
mrT23
f5e2838fc3
refactor 2023-07-21 22:12:51 +03:00
mrT23
bbdfd2c3d4
Merge pull request #108 from patryk-kowalski-ds/deepsense.ai/configurable-language-extensions
Configurable Language Extensions
2023-07-21 21:47:52 +03:00
sambone
05f29cc406 Fix TypeError for GitlabProvider 2023-07-20 11:49:42 -05:00
Ori Kotek
63c4c7e584
Merge pull request #90 from zmeir/zmeir-output_progress
Add Option to Control Comment Publishing Progress
2023-07-20 18:48:20 +03:00
Patryk Kowalski
79cb94b4c2 Add use_extra_bad_extensions to configuration.toml 2023-07-20 15:41:03 +02:00
Patryk Kowalski
a71a12791b Move hard-coded language configurations to a configuration file.
Load this configuration file in the config loader.
2023-07-20 15:37:42 +02:00
Ori Kotek
2e246869d0
Retry on rate limit error on OpenAI calls 2023-07-20 15:02:34 +03:00
Ori Kotek
2f9546e144
Retry on rate limit error on OpenAI calls 2023-07-20 15:01:12 +03:00
mrT23
cd0438005b
Merge pull request #101 from Codium-ai/tr/docstring
Adding Docstrings to Python Files
2023-07-20 11:53:17 +03:00
Hussam.lawen
6cd38a37cd
fix question cli 2023-07-20 11:10:34 +03:00
mrT23
12e51bb6aa
Merge remote-tracking branch 'origin/main' into tr/docstring 2023-07-20 10:54:53 +03:00
mrT23
e2a4cd6b03
docstring 2023-07-20 10:51:21 +03:00
mrT23
3d5d517f2a
code suggestions 2023-07-19 20:57:14 +03:00
mrT23
a2eb2e4dac
Update pr_agent/git_providers/github_provider.py 2023-07-19 20:31:10 +03:00
mrT23
d89792d379
PR Type label 2023-07-19 20:25:54 +03:00
Ori Kotek
df25a3ede2
typo 2023-07-19 18:22:26 +03:00
Ori Kotek
4c36fb4df2
args bug 2023-07-19 18:18:18 +03:00
Ori Kotek
67c61e0ac8
Update help 2023-07-19 17:27:12 +03:00
Ori Kotek
0985db4e36
Update help 2023-07-19 17:20:26 +03:00
Ori Kotek
ee2c00abeb
split(" ") -> split() 2023-07-19 17:14:55 +03:00
mrT23
577f24d107
Merge pull request #89 from zmeir/zmeir-review_score
Add Score Review Feature
2023-07-19 17:07:05 +03:00
Hussam.lawen
3326327572
More refactoring.... 2023-07-19 17:01:56 +03:00
Hussam.lawen
36be79ea38
ignore merge from main 2023-07-19 16:14:59 +03:00
Hussam.lawen
523839be7d
Merge commit 'd1586ddd77b86f0d3b29aee3370f29624799e388' into hl/incremental_review 2023-07-19 16:14:33 +03:00
mrT23
7fdbd6a680
Update utils.py 2023-07-19 15:12:50 +03:00
Hussam.lawen
17b40a1fa1
Merge commit '7abbe08ff15d31c7e20de6d88638bfe27430c2f4' into hl/incremental_review 2023-07-19 14:24:44 +03:00
Hussam.lawen
c47e74c5c7
Merge commit '5bc2ef1eff1f570779191a8f3c7a562f5b8fe230' into hl/incremental_review 2023-07-19 14:24:01 +03:00
mrT23
7abbe08ff1
Merge pull request #95 from Codium-ai/tr/disable_review_suggestiosn
disable code suggestions by default for review
2023-07-19 14:23:54 +03:00
Hussam.lawen
8038b6ab99
refactor and clean 2023-07-19 14:22:34 +03:00
zmeir
6e26ad0966 Merge branch 'main' into zmeir-review_score 2023-07-19 13:37:55 +03:00
zmeir
7e2449b228 Changed score type to int 2023-07-19 13:37:35 +03:00
mrT23
97bfee47a3
minor fixes 2023-07-19 11:34:55 +03:00
Ori Kotek
5bc2ef1eff
Merge pull request #92 from YuviGold/deploy-on-lambda
Deployment on AWS Lambda
2023-07-19 11:12:29 +03:00
zmeir
8868c92141 Merge branch 'main' into zmeir-review_score 2023-07-19 11:05:24 +03:00
zmeir
e17dd66dce Disable score review by default 2023-07-19 11:00:28 +03:00
zmeir
fc8494d696 Rephrase score description in promt 2023-07-19 10:59:52 +03:00
zmeir
f8aea909b4 Add example output 2023-07-19 10:57:35 +03:00
mrT23
ccddbeccad
num_code_suggestions=0 for review 2023-07-19 09:34:17 +03:00
mrT23
a47fa342cb
Merge pull request #88 from zmeir/zmeir-cli_args
CLI Arguments Refactoring
2023-07-19 08:15:19 +03:00
Hussam.lawen
f73cddcb93
Change Review title when 2023-07-19 01:03:47 +03:00
Hussam.lawen
5f36f0d753
Merge commit 'bdf7eff7cd0a8894c3e66e49bdf89f27da1bfcb4' into hl/incremental_review 2023-07-18 23:28:43 +03:00
Hussam.lawen
dc4bf13d39
Add Incremental Review 2023-07-18 23:14:47 +03:00
Yuval Goldberg
dc67e6a66e Support deploying pr-agent on AWS Lambda 2023-07-18 17:46:42 +03:00
zmeir
6d91f44634 Added configuration option to control publishing review progress
This can be useful in a few situations:
1. To reduce the number of GitHub API calls (thus avoiding hitting the rate limit)
2. When the trigger for the agent is an external process (e.g. some external CI job), so there is no need to publish a message like "preparing review..." because it's not a part of a natual conversation with the user
2023-07-18 16:41:58 +03:00
zmeir
0396e10706 Add configuration to request a score for the PR
This can help teams compare the review of the PR agent with that of a human reviewer, and fine-tune a score threshold for automatic approval where they decide the agent's review is satisfactory.
2023-07-18 16:40:35 +03:00
zmeir
77f243b7ab Allow passing CLI args (helps with debugging) 2023-07-18 16:39:46 +03:00
mrT23
c507785475
bugfix 2023-07-18 16:32:51 +03:00
Hussam Lawen
3efe08d619
Merge pull request #85 from Codium-ai/hl/always_filer_bad_extensions
Filter out bad files before getting their head and original source code and diff
2023-07-18 13:50:25 +03:00
Hussam Lawen
2e36fce4eb
Merge pull request #83 from Codium-ai/hl/gitlab_description
Support describe for Gitlab
2023-07-18 13:47:32 +03:00
Hussam.lawen
5d45632247
Performance improvement: Filter out bad files before getting their head and original source code and diff 2023-07-18 13:33:32 +03:00
Hussam.lawen
8fb9affef3
add try catch 2023-07-18 13:14:01 +03:00
Hussam Lawen
6c42a471e1
Merge pull request #76 from zmeir/zmeir-publish_inline_comments_single_api_call
Optimization of Inline Comments Publishing
2023-07-18 13:05:11 +03:00
Hussam.lawen
f2b74b6970
support gitlab describe function 2023-07-18 13:03:36 +03:00
Ori Kotek
05e4e09dfc
Lint 2023-07-18 12:27:28 +03:00
Ori Kotek
13092118dc
Move the new git provider function to the abstract interface 2023-07-18 12:26:49 +03:00
Ori Kotek
7d108992fc
Merge remote-tracking branch 'origin/main' into zmeir-publish_inline_comments_single_api_call 2023-07-18 11:53:41 +03:00
Ori Kotek
90f97b0226
Lint fixes 2023-07-18 11:34:57 +03:00
Ori Kotek
9e0f5f0ccc
Merge pull request #78 from Codium-ai/tr/agent_logic
Enhancement of PR Agent with User Interaction
2023-07-18 10:37:08 +03:00
mrT23
6d2673f39d
Merge remote-tracking branch 'origin/tr/agent_logic' into tr/agent_logic 2023-07-18 10:32:43 +03:00
mrT23
b3a1d456b2
if settings.pr_reviewer.num_code_suggestions 2023-07-18 10:32:36 +03:00
Ori Kotek
fdeae9c209
Update pr_agent/agent/pr_agent.py 2023-07-18 10:20:52 +03:00
Ori Kotek
a994ec1427
Call PRAgent from github_action_runner.py 2023-07-18 10:19:32 +03:00
Ori Kotek
e5259e2f5c
Small refactor 2023-07-18 10:17:09 +03:00
mrT23
51e08c3c2b
reflect and review + protections 2023-07-18 08:22:25 +03:00
mrT23
4c29ff2db1
Merge remote-tracking branch 'origin/tr/agent_logic' into tr/agent_logic
# Conflicts:
#	pr_agent/tools/pr_description.py
2023-07-18 08:06:47 +03:00
mrT23
5fbaa4366f
publish_output instead publish_review 2023-07-18 08:05:42 +03:00
mrT23
aee08ebbfe
Merge branch 'main' into tr/agent_logic 2023-07-18 08:04:47 +03:00
mrT23
539edcad3c
works 2023-07-17 16:53:38 +03:00
mrT23
ea27c63f13
Insights from user's answers 2023-07-17 15:59:57 +03:00
mrT23
c866288b0a
Merge remote-tracking branch 'origin/main' into tr/agent_logic 2023-07-17 15:59:37 +03:00
Patryk Kowalski
8ae3c60670 In case of new file creation by the MR there is a 404 error on file retrieval by gitlab provider.
It was handled by catching the error and replacing the file string with an empty string.
Type checking was added before byte decoding - necessary in case of the empty string.
2023-07-17 14:53:23 +02:00
mrT23
f8f415eb75
stable 2023-07-17 15:49:29 +03:00
zmeir
24583b05f7 Publish GitHub review comments with single API call 2023-07-17 10:41:02 +03:00
Ori Kotek
fa421fd169
Merge pull request #75 from Codium-ai/bugfix/rename_get_description
get_description was removed
2023-07-17 10:32:01 +03:00
Ori Kotek
e0ae5c945e
get_description was removed 2023-07-17 10:30:44 +03:00
mrT23
3b7cfe7bc5
Merge pull request #73 from Codium-ai/hl/clean_comments
Clean comments
2023-07-17 09:33:49 +03:00
Hussam Lawen
7884aa2348
Clean 2023-07-17 09:25:38 +03:00
mrT23
8f3520807c
minor fixes
minor fixes
2023-07-17 08:42:18 +03:00
mrT23
fa90b242e3
pr_information_from_user_prompts 2023-07-17 08:09:56 +03:00
Ori Kotek
c58e1f90e7
Merge branch 'main' into hl/gitlab_code_suggestion 2023-07-17 02:10:15 +03:00
Ori Kotek
d363f148f0
Merge pull request #65 from Codium-ai/tr/agent_logic
pr_information_from_user_prompts
2023-07-17 02:08:56 +03:00
Ori Kotek
cbf96a2e67
Merge pull request #68 from ilchemla/feature/remove-duplicate-function
Removal of Duplicate Function Across Git Providers
2023-07-17 02:07:09 +03:00
Hussam.lawen
fc309f69b9
Support Code Suggestion in Gitlab 2023-07-17 01:44:40 +03:00
Ori Kotek
0b1edd9716
A small typo 2023-07-16 21:47:50 +03:00
Ilan Chemla
e638dc075c Remove git_provider.get_description() which is a duplicate of git_provider.get_pr_description() 2023-07-16 21:47:48 +03:00
mrT23
f4de3d2899
pr_information_from_user_prompts 2023-07-16 19:36:20 +03:00
Ori Kotek
d54ee252ee
Improve help text 2023-07-16 17:41:23 +03:00
Ori Kotek
b030299547
Merge pull request #51 from ilchemla/feature/new-bitbucket-handler
Adding Bitbucket Provider Support
2023-07-16 17:04:06 +03:00
Zohar Meir
399d5c5c5d
Fixed minor typos in promts 2023-07-16 16:37:19 +03:00
mrT23
94173cbb06
Merge pull request #58 from Codium-ai/tr/readme_update2
update readme
2023-07-16 16:12:26 +03:00
mrT23
5edff8b7e4
update readme
update readme
2023-07-16 16:04:06 +03:00
Ori Kotek
93311a9d9b
Update GitHub app 2023-07-16 15:42:50 +03:00
Ori Kotek
704030230f
Merge pull request #59 from Codium-ai/enhancement/github_action_apply
Update Github polling
2023-07-16 15:03:44 +03:00
Ori Kotek
60bce8f049
Update Github polling 2023-07-16 15:00:13 +03:00
Ori Kotek
6cc9fe3d06
Merge pull request #57 from Codium-ai/enhancement/github_action_apply
Enhancement: Apply Github Action
2023-07-16 14:30:56 +03:00
Ori Kotek
0acf423450
Update comment 2023-07-16 14:30:34 +03:00
Ori Kotek
7958786b4c
Github action to work with an image stored on Dockerhub for faster execution 2023-07-16 14:19:02 +03:00
Ori Kotek
71efd84113
Merge pull request #52 from Codium-ai/enhancement/cli_update
cli.py - modify command line for a more coherent command invokation
2023-07-16 13:51:24 +03:00
Ori Kotek
2531849b73
Update usage instructions in PR comment 2023-07-16 13:45:20 +03:00
Ori Kotek
19f11f99ce
Github action support for new style commands 2023-07-16 13:36:02 +03:00
Ori Kotek
b3e79ed677
cli.py - modify command line for a more coherent command invokation 2023-07-16 13:18:29 +03:00
Ori Kotek
5d2fe07bf7
Merge pull request #47 from Codium-ai/feature/github_action
Github custom action development
2023-07-16 12:54:40 +03:00
mrT23
4f4989af8c
full code suggestions
full code suggestions
2023-07-16 09:01:57 +03:00
Ilan Chemla
0a4a604c28 Adding handler for Bitbucket Cloud users 2023-07-15 21:29:36 +03:00
Hussam Lawen
4a6bf4c55a
Merge branch 'main' into hl/gitlab_fix 2023-07-14 22:48:13 +03:00
Hussam.lawen
3f75b14ba3
small addition 2023-07-14 22:45:07 +03:00
mrT23
ae9cedd50d
Merge pull request #46 from Codium-ai/tr/description_tool
Add PR Description Tool
2023-07-13 21:00:50 +03:00
Hussam.lawen
ae63833043
Merge commit '055a8ea8590fbe9078cdc6af6398df2f053b9ce7' into hl/gitlab_fix 2023-07-13 20:44:26 +03:00
Hussam.lawen
da6828ad87
Inline suggestion refactor + Gitlab WORKS 2023-07-13 20:43:49 +03:00
Ori Kotek
1c1aad2806
Github custom action development - WIP 2023-07-13 19:08:10 +03:00
Ori Kotek
e2323dfb9f
Github custom action development - WIP 2023-07-13 18:54:40 +03:00
Ori Kotek
f6d4a214ca
Github custom action development - WIP 2023-07-13 18:40:03 +03:00
Ori Kotek
f337d76af6
Github custom action development - WIP 2023-07-13 18:32:28 +03:00
mrT23
4e59693c76
diff_files 2023-07-13 18:26:35 +03:00
Ori Kotek
4033303c1f
Github custom action development - WIP 2023-07-13 18:18:23 +03:00
Ori Kotek
38c8d187d2
Github custom action development - WIP 2023-07-13 18:16:25 +03:00
Ori Kotek
f8ddfd2f25
Merge remote-tracking branch 'origin/tr/description_tool' into feature/github_action 2023-07-13 18:06:35 +03:00
mrT23
4b4fda37a6
publish_description as abstract method 2023-07-13 18:04:28 +03:00
Ori Kotek
9ca6b789a7
Github custom action development - WIP 2023-07-13 18:02:38 +03:00
mrT23
0f73f5f906
set as title 2023-07-13 17:53:17 +03:00
Ori Kotek
055a8ea859
Merge pull request #44 from zmeir/patch-1
Typo when setting `openai.api_version`
2023-07-13 17:52:33 +03:00
Ori Kotek
5742a9be1e
Github custom action development 2023-07-13 17:46:12 +03:00
mrT23
914cc6639a
ignore current title 2023-07-13 17:34:18 +03:00
mrT23
f34cda126a
stable 2023-07-13 17:31:28 +03:00
mrT23
dece20c984
PRDescription 2023-07-13 17:24:56 +03:00
mrT23
94c1f430af
General PR suggestions prompt 2023-07-13 16:34:56 +03:00
mrT23
9fadde388b
remove title and description 2023-07-13 16:26:33 +03:00
Zohar Meir
f57d58ee7d
Typo when setting openai.api_version 2023-07-13 10:22:57 +03:00
mrT23
77a451ada0
inline_code_comments 2023-07-13 09:44:33 +03:00
mrT23
4b8420aa16
remove suggestion number 2023-07-13 08:10:36 +03:00
Hussam Lawen
e2faf117c5
Update gitlab config 2023-07-12 18:02:28 +03:00
Ori Kotek
cd1e62ec96
Add Azure OpenAI support 2023-07-12 11:53:46 +03:00
Ori Kotek
1bc206e7b2
Remove installation_id from cli 2023-07-12 11:31:06 +03:00
Hussam.lawen
b8a71b369d
add max_iter 2023-07-11 22:22:08 +03:00
Hussam.lawen
fd4a2bf7ff
refactor try_fix_json, generalize finding the ending of a json item (support new lines, spaces tab) 2023-07-11 22:11:42 +03:00
Hussam.lawen
a3211d4958
Merge commit '210d94f2aa6ebf872b9b85051d1842c32d4fc34e' into hl/try_fix_when_broken_output 2023-07-11 17:33:02 +03:00
Hussam.lawen
86d7ed5f82
Try to fix broken json output 2023-07-11 17:32:48 +03:00
Ori Kotek
b2d952cafa
1. Move deployment_type to configuration.toml
2. Lint
3. Inject GitHub app installation ID into GitHub provider using the settings mechanism.
2023-07-11 16:55:09 +03:00
Ori Kotek
6eacf4791d
Merge remote-tracking branch 'origin/main' into feature/gitlab_provider 2023-07-11 15:49:06 +03:00
Ori Kotek
4076f67ab8
Merge pull request #35 from ilchemla/hotfix/bad-filename-in-docs
Fix secrets filename extension in README
2023-07-11 15:37:09 +03:00
Ori Kotek
c2639a2520
Merge pull request #32 from Codium-ai/tr/focused_pr
Focused PR update
2023-07-11 15:29:36 +03:00
Ilan Chemla
38db65831e Fix secrets filename extension in README 2023-07-11 15:01:52 +03:00
Hussam Lawen
e1b856f7e6
Merge pull request #34 from Codium-ai/enhancement/soft_and_hard_thresh
Separate output token threshold to soft and hard instead of implicit hard = soft/2
2023-07-11 14:35:00 +03:00
Ori Kotek
5fdc9223e9
Separate output token threshold to soft and hard instead of implicit hard = soft/2 2023-07-11 14:11:46 +03:00
mrT23
301622216f
Focused PR update 2023-07-11 08:50:28 +03:00
Eugene Kaushnian
8fba670bda Rename github_app_webhook.py to github_app.py 2023-07-08 13:36:47 -04:00
salberts
ca47833c56 Merge remote-tracking branch 'refs/remotes/origin/feature/gitlab_provider' into feature/gitlab_provider 2023-07-08 17:19:54 +03:00
Albert
567475c18c
Update pr_agent/settings/.secrets_template.toml
Co-authored-by: Sergii Kovalev <enasik@gmail.com>
2023-07-08 15:29:05 +03:00
salberts
fb4badd160 changes 2023-07-08 12:14:32 +03:00