Commit graph

526 commits

Author SHA1 Message Date
mrT23
24bf875db6
fix: handle GitHub permission errors when editing comments 2025-02-03 07:51:44 +02:00
Griffin Anspach
664f1938c9 Remove false log that file was modified, but no patch found for bitbucket server 2025-01-20 14:56:10 -05:00
polacekpavel
fe6540275c fix(local_git): add interface method stubs for local git provider compatibility 2025-01-15 18:19:36 +01:00
med8bra
bd611bc1c2
fix(azure-provider): handle renamed files as new files
This fixes a bug when azure-provider tries to fetch original content of a renamed file and fails since the file doesn't exist in base yet.
Also handles case when `diff_type` includes multiple actions as `edit, rename`.

This can be improved to fetch the actual old content using the old path before renaming, but IMO for azure devops since its dying anyway, this fix should be enough.
2025-01-13 22:22:13 +01:00
Tal
8819293770
Merge pull request #1406 from vishwamartur/support-personal-spaces
Support pull requests in personal spaces in Bitbucket Server
2025-01-01 09:26:29 +02:00
mrT23
95d0fafa75
refactor: optimize file content loading and improve rate limit handling 2024-12-29 11:25:33 +02:00
Vishwanath Martur
4688b20284 Support pull requests in personal spaces in Bitbucket Server
Related to #1148

Update `_parse_pr_url` method in `pr_agent/git_providers/bitbucket_server_provider.py` to handle URLs with `/users/`.

* Add logic to check for both `/projects/` and `/users/` in the URL path and process them accordingly.
* Modify the method to raise a `ValueError` if neither `/projects/` nor `/users/` is found in the URL.
* Update the `workspace_slug` to include a `~` prefix if the URL contains `/users/`.

Add test case for URL with `/users/` in `tests/unittest/test_bitbucket_provider.py`.

* Ensure the new test case verifies the correct parsing of URLs with `/users/`.
2024-12-22 00:42:11 +05:30
mrT23
7e8361b5fd
feat: enhance code review output with collapsible code snippets and variable links 2024-12-19 20:30:56 +02:00
Trung Dinh
e3d779c30d Fix typo model_weak 2024-12-08 22:09:48 +07:00
Trung Dinh
3c31048afc Update model in git provider 2024-12-08 22:00:37 +07:00
Patrick Decat
a825aec5f3
Add publish_output_progress config support to AzureDevOps, BitBucket and Gitlab providers 2024-11-28 17:15:24 +01:00
mrT23
f08b20c667
Improve logging and error handling in Azure DevOps provider for code suggestions 2024-11-21 13:37:48 +02:00
mrT23
eb0c959ca9
Add validation for committable comments within PR hunks in GitHub provider 2024-11-20 17:28:13 +02:00
mrT23
741a70ad9d
Add detailed diff code generation for GitLab suggestions and improve comment formatting 2024-11-20 17:26:36 +02:00
mrT23
22ee03981e
Add diff code generation for Bitbucket code suggestions and improve logging 2024-11-20 17:25:10 +02:00
mrT23
2f4545dc15
Refactor byte decoding in Bitbucket server provider using decode_if_bytes function 2024-11-12 08:26:33 +02:00
mrT23
cbd490b3d7
use a more modern version 2024-11-12 08:23:11 +02:00
mrT23
065777040f
Improve PR file content retrieval and logging verbosity handling 2024-11-12 08:06:02 +02:00
Tal
5c5a3e267c
Merge branch 'main' into introduce-pre-commit 2024-11-08 09:54:21 +02:00
mrT23
2f5e8472b9
Add PRDescriptionHeader enum for consistent "Changes walkthrough" usage across modules 2024-10-30 08:48:08 +02:00
Yu Ishikawa
81dea65856 Format files by pre-commit run -a
Signed-off-by: Yu Ishikawa <yu-iskw@users.noreply.github.com>
2024-10-30 10:00:36 +09:00
mrT23
597f1c6f83
Add PRDescriptionHeader enum for consistent "Changes walkthrough" usage across modules 2024-10-28 08:12:56 +02:00
mrT23
27abe48a34
feat: import Range utility in GitHubProvider for enhanced functionality 2024-10-14 09:43:58 +03:00
mrT23
8fe504a7ec
feat: import Range utility in GitHubProvider for enhanced functionality 2024-10-14 09:40:57 +03:00
mrT23
f6ba49819a
feat: enhance GitHubProvider with improved error handling and URL parsing
- Add traceback logging for exceptions in diff file retrieval
- Improve URL parsing to handle '/api/v3' paths and validate GitHub URLs
- Modify `publish_comment` to return None for temporary comments
- Update constructor to accept an optional GitHub client parameter
2024-10-14 09:18:06 +03:00
Cory Ball
a476e85fa7 bug-fix_azuredevops-new-file 2024-10-08 01:13:44 -05:00
mrT23
e2b5489495
feat: add error handling for invalid repo settings configuration
- Implement error handling for invalid TOML configurations in repo settings.
- Log warnings and send comments to PRs when configuration errors occur.
- Introduce `handle_configurations_errors` function to manage error reporting.
- Ensure compatibility with different markdown formats for error messages.
2024-10-07 09:13:17 +03:00
yzongyue
ce8e637800 get_line_link compatible with old gitlab versions 2024-09-15 14:56:08 +08:00
eddielu
29028d43cf
Set azure devops default status to ByDesign 2024-09-13 18:01:08 -07:00
Tal
3ea691e70a
Merge pull request #1216 from Codium-ai/tr/azure_parsing
fix: improve Azure DevOps PR URL parsing and add unit tests
2024-09-12 09:09:24 +03:00
mrT23
01ba6fe63d
feat: enhance error handling and logging, update AI metadata terminology
- Improved error handling and logging in `pr_processing.py` and `github_polling.py` to provide more detailed error information.
- Updated AI metadata terminology from "AI-generated file summary" to "AI-generated changes summary" across multiple files for consistency.
- Added a placeholder method `publish_file_comments` in `azuredevops_provider.py`.
- Refined logging messages in `azuredevops_provider.py` for better clarity.
2024-09-10 17:44:26 +03:00
mrT23
e444da8378
fix: improve Azure DevOps PR URL parsing and add unit tests 2024-09-10 08:19:22 +03:00
mrT23
1a9638cf87
bug fix: remove unused get_pr_description method from Azure DevOps provider 2024-09-09 16:25:34 +03:00
mrT23
8706f643ef
enable ai_metadata 2024-09-08 16:26:26 +03:00
mrT23
d01cfe443c
avoid_full_files 2024-09-07 11:44:24 +03:00
Tal
d4d9a7f8b4
Merge pull request #1172 from MaxHoecker/bugfix/bb-2-way-diff-fix
Bugfix/bb 2 way diff fix
2024-09-03 16:24:42 +03:00
mrT23
2c496b9d4e
fix: improve PR patch decoding and clean up Bitbucket provider code
- Add fallback encodings for PR patch decoding to handle non-UTF-8 encodings.
- Update logging messages for better clarity.
- Remove unnecessary blank lines and fix minor formatting issues.
- Ensure full files are retrieved in `get_diff_files` method.
2024-09-01 08:38:26 +03:00
mhoecke1
cf14e45674 further cleaned up code based on feedback 2024-08-30 10:10:39 -04:00
mhoecke1
29c50758bc implementing more feedback, choosing a different Bitbucket diff strategy depending on API version, and expanded unit test cases 2024-08-28 17:13:36 -04:00
mhoecke1
0442cdcd3d adding config value for old Bitbucket Server diff functionality 2024-08-26 16:07:21 -04:00
mhoecke1
a99ebf8953 implementing PR bot feedback 2024-08-23 11:18:42 -04:00
mhoecke1
2a9e3ee1ef removing unnecessary if check 2024-08-23 10:57:58 -04:00
mhoecke1
2beefab89a BB server 2 way diff fixes 2024-08-23 10:47:27 -04:00
mrT23
229d7b34c7
Limit comment body length and adjust logging levels in GitHub provider 2024-08-18 08:24:27 +03:00
mrT23
a6f772c6d5
Refactor comment deletion method to 'remove_comment' in git providers and update references 2024-08-18 08:19:25 +03:00
mrT23
4a71ec90c6
Add null check for 'suggestion' in publish_code_suggestions method in gitlab_provider.py 2024-08-16 09:04:45 +03:00
mrT23
3456c8e039
Add 'original_suggestion' parameter to publish_inline_comment methods across git providers for enhanced inline comment handling 2024-08-16 08:58:51 +03:00
Tal
01c18d7d98
Merge pull request #1134 from Codium-ai/tr/err_protections
Tr/err protections
2024-08-14 08:17:19 +03:00
mrT23
8414e109c5
Update logging levels and add error handling for empty data in PR tools and providers 2024-08-14 08:02:34 +03:00
mrT23
8adfca5b3c
Add error handling for short diffs and improve logging in Bitbucket provider 2024-08-14 07:54:11 +03:00
Tal
672cdc03ab
Merge pull request #1133 from Codium-ai/tr/err_protections
Add error handling for empty diff files in utils.py and optimize file…
2024-08-13 22:36:00 +03:00
mrT23
86a9cfedc8
Add error handling for empty diff files in utils.py and optimize file content retrieval in Bitbucket provider 2024-08-13 22:33:07 +03:00
Tal
7ac9f27b70
Merge pull request #1132 from Codium-ai/tr/err_protections
Add error handling for missing GitLab URL and improve inline comment …
2024-08-13 19:05:00 +03:00
mrT23
a3b3d6c77a
Add error handling for missing GitLab URL and improve inline comment logic in gitlab_provider.py 2024-08-13 19:00:09 +03:00
Stephen Quinn
2e41701d07 fixes 2024-08-13 16:21:46 +01:00
Stephen Quinn
578f56148a
Merge branch 'Codium-ai:main' into main 2024-08-13 16:04:55 +01:00
mrT23
a2fb415c53
Add git_files attribute to Bitbucket provider class for enhanced file handling 2024-08-13 12:39:45 +03:00
mrT23
1aa6dd9b5d
Add error handling for missing file paths in Bitbucket provider and improve file validation logic 2024-08-13 11:28:21 +03:00
Stephen Quinn
11d69e05aa fix git provider 2024-08-13 09:25:59 +01:00
mrT23
5252e1826d
Add handling for empty diffs in Bitbucket provider to avoid logging errors 2024-08-13 09:45:45 +03:00
mrT23
396d11aa45
Improve logging and diff filtering in Bitbucket provider
- Enhance logging to include both kept and filtered file names
- Add conditional check to filter diff elements based on original and current diffs
2024-08-13 08:59:45 +03:00
mrT23
8589941ffe
Improve Bitbucket diff handling for new and deleted files and add error protection for missing file links 2024-08-12 21:15:26 +03:00
Tal
4228f92e7e
Merge pull request #1119 from Codium-ai/hl/limit_long_comments
Hl/limit long comments
2024-08-12 16:25:42 +03:00
Hussam.lawen
9c1ab06491
fix long comments 2024-08-12 12:27:09 +03:00
mrT23
5c4bc0a008
Add Bitbucket diff handling and improve error logging
- Implement `publish_file_comments` method placeholder
- Enhance `is_supported` method to include `publish_file_comments`
- Refactor diff splitting logic to handle Bitbucket-specific headers
- Improve error handling and logging for file content retrieval
- Add `get_pr_owner_id` method to retrieve PR owner ID
- Update `_get_pr_file_content` to fetch file content from remote link
- Fix variable name typo in `extend_patch` function in `git_patch_processing.py`
2024-08-12 09:48:26 +03:00
mrT23
7438190ed1
set_claude_model 2024-08-11 11:43:57 +03:00
mrT23
8a75d3101d
Enhance PR description handling and improve logging for invalid file extensions in Bitbucket provider 2024-08-07 16:32:36 +03:00
KennyDizi
aef9a04b32 Fix use requests HTTPError 2024-08-02 07:58:23 +07:00
KennyDizi
fe4e642a47 Removed unused json import 2024-08-02 07:57:09 +07:00
Tal
23ec25c949
Merge pull request #1079 from MarkRx/feature/bitbucket-server-multi-line-suggestion-workaround
Use code blocks instead of suggestion blocks for Bitbucket Server multi-line suggestions
2024-08-01 09:29:18 +03:00
MarkRx
288e9bb8ca Fix Bitbucket Server 401 unauthorized when posting inline coments; fix Bitbucket loading .pr_agent.toml 2024-07-30 16:19:57 -04:00
MarkRx
95f23de7ec Use code blocks instead of suggestion blocks for Bitbucket Server multi-line suggestions to workaround BSERV-4553 2024-07-30 10:43:56 -04:00
Tal
3a77652660
Merge pull request #1061 from MarkRx/feature/bitbucket-server-get-line-link
Implement BitbucketServerProvider.get_line_link
2024-07-27 16:04:09 +03:00
MarkRx
81d07a55d7 Implement BitbucketServerProvider.get_line_link 2024-07-26 12:34:12 -04:00
mrT23
652ced5406
bitbucket server 2024-07-26 08:31:21 +03:00
mrT23
3d3b49e3ee
remove github.com 2024-07-15 20:18:21 +03:00
mrT23
034ec8f53a
provider 2024-07-11 18:37:37 +03:00
mrT23
eccd00b86f
github 2024-07-11 18:30:16 +03:00
mrT23
734a027702
azure fix 2024-07-11 18:21:21 +03:00
mrT23
9a57d00951
GitHub Enterprise Server 2024-07-08 09:01:56 +03:00
Hussam.lawen
0c3940b6a7
persistent release notes 2024-07-03 16:38:13 +03:00
Tal
6a5f43f8ce
Merge pull request #1005 from KennyDizi/main
Centralize PR Review Title Definition
2024-06-29 21:53:20 +03:00
mrT23
e5aae0d14f
fixes 2024-06-28 08:04:35 +03:00
KennyDizi
b20f364b15 Change the data structure for prefixes to a list to preserve order 2024-06-27 07:16:26 +07:00
KennyDizi
692904bb71 Use ReviewHeaderTitle in lieu of PrReviewTitle 2024-06-27 07:11:57 +07:00
KennyDizi
ba963149ac Fix extract PrReviewTitle member value 2024-06-27 07:10:57 +07:00
KennyDizi
7348d4144b Rename PrReviewTitle enum 2024-06-27 07:05:03 +07:00
KennyDizi
2d21df61c7 Apply PrReviewTitles enum for github provider file 2024-06-27 07:03:25 +07:00
mrT23
0c1331f77e
Add context-aware git provider retrieval and refactor related functions 2024-06-19 09:49:47 +03:00
mrT23
a710f3ff43
Add context-aware git provider retrieval and refactor related functions 2024-06-19 09:41:53 +03:00
mrT23
025a14014a
Add context-aware git provider retrieval and refactor related functions 2024-06-19 09:36:37 +03:00
Tal
deda06866d
Merge pull request #971 from brianteeman/typos-1
Fix typos/Spelling
2024-06-18 18:00:42 +03:00
BrianTeeman
e53badbac4
Overall_success
Correct the spelling of this variable.

Fix spelling errors now will prevent issues going forward where people have to misspell something on purpose
2024-06-16 17:12:11 +01:00
BrianTeeman
a9a27b5a8f
Fix typos/Spelling
This simple PR fixes typos and spelling errors in code comments and documentation. It has no functional changes but does at least make the instruction more readable and match the code.
2024-06-16 17:06:30 +01:00
mrT23
e083841d96
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 13:18:15 +03:00
mrT23
58bc54b193
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 12:27:10 +03:00
mrT23
aa56c0097d
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 12:20:21 +03:00
mrT23
20f6af803c
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 12:09:52 +03:00
mrT23
2076454798
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 12:01:50 +03:00
mrT23
e367df352b
Add file ignore functionality and update documentation for ignore patterns 2024-06-13 11:41:13 +03:00
Tal
aac7aeabd1
Update PR review prompts and terminology for clarity and consistency (#954)
* Update PR review prompts and terminology for clarity and consistency
2024-06-10 08:44:11 +03:00
Kamakura
86d901d5a6 Update __init__.py 2024-06-04 11:17:04 +08:00
Mark
4971071b1f
Merge branch 'main' into feature/valid-file-filter-log 2024-05-31 09:10:50 -04:00
Tal
ea9d410c84
Merge pull request #928 from MarkRx/bugfix/bb-server-fixes
Bitbucket Server Provider Fixes
2024-05-31 11:12:41 +03:00
MarkRx
bd2f2b3a87 Improve bb server error logging 2024-05-30 17:31:46 -04:00
MarkRx
c11ee8643e Bitbucket server filter out globally ignored files before attempting diff 2024-05-30 11:34:39 -04:00
mrT23
e6c5236156
Add logging for skipping non-code files in GitHub provider 2024-05-30 17:05:30 +03:00
MarkRx
ee90f38501 BB Server fixes. Fix ID not being retrieved, inline comments, url generation, and pr review not working 2024-05-30 10:05:00 -04:00
mrT23
4231a84e7a
Refactor Azure DevOps provider to use PR iterations for change detection, improving accuracy of diff file identification 2024-05-15 09:15:12 +03:00
mrT23
e56320540b
Refactor Azure DevOps provider to use PR iterations for change detection, improving accuracy of diff file identification 2024-05-15 09:05:01 +03:00
mrT23
e4565f7106
Refactor Azure DevOps provider to use PR iterations for change detection, improving accuracy of diff file identification 2024-05-14 21:43:14 +03:00
mrT23
34ad5f2aa2
toolbar emojis in pr-agent feedbacks 2024-05-05 13:33:54 +03:00
phuongvietnamlab
0257b619ff Failed to review PR: name 'is_valid_file' is not defined 2024-04-09 15:47:54 +07:00
mrT23
8a5b01b465
empty calc_pr_statistics 2024-04-08 14:49:00 +03:00
mrT23
99a676d792
Merge remote-tracking branch 'origin/main' into tr/split 2024-03-17 09:00:04 +02:00
mrT23
31a8f5302a
Update get_pr_labels method to support label updates and prevent unnecessary label republishing 2024-03-12 17:02:45 +02:00
Hussam.lawen
5c20fffee9
fix when no previous review where found, reivew -i should run as regular review 2024-03-11 09:59:16 +02:00
Hussam.lawen
84dadb0469
rename + check github 2024-03-11 09:42:10 +02:00
Hussam.lawen
003c49052e
skip incremental review if no file changed since last review 2024-03-10 17:15:25 +02:00
mrT23
8324e9a38d
can_be_split 2024-03-10 16:56:32 +02:00
Ori Kotek
1ff0afabae
Refactor update changelog 2024-03-07 00:48:33 +02:00
mrT23
acefbff62b
Add 'final_update_message' option to control publishing of update message in persistent comments 2024-03-05 17:29:17 +02:00
Ori Kotek
a86a3f52f0
a minor bugfix 2024-02-29 16:03:00 +02:00
mrT23
4921c26432
Add functionality to calculate and log PR statistics on closure 2024-02-26 20:02:11 +02:00
mrT23
5f9969f30c
base_url 2024-02-25 17:22:35 +02:00
Ori Kotek
2dfddd8cea
Fix a bug 2024-02-25 17:13:35 +02:00
Ori Kotek
bc88e0492f
Fix a bug 2024-02-25 17:12:40 +02:00
mrT23
a15d4f7a94
base_url 2024-02-25 16:55:20 +02:00
mrT23
4258ce165b
Refactor link generation in github_provider.py to use get_pr_url method 2024-02-25 16:33:19 +02:00
mrT23
1275cf0123
adjustment 2024-02-25 16:23:44 +02:00
mrT23
877796b539
Refactor logging statements for better readability and debugging 2024-02-25 09:46:07 +02:00
mrT23
8b76eb1014
fixed bugs with incremental review 2024-02-22 18:03:00 +02:00
mrT23
4d0f691b64
repo_settings 2024-02-21 18:23:34 +02:00
mrT23
8ffdaf00c1
repo_settings 2024-02-21 17:18:54 +02:00
mrT23
fc7b267c9a
self.diff_files 2024-02-21 17:00:11 +02:00
mrT23
e291bd352e
protections 2024-02-21 16:46:57 +02:00
mrT23
f08ce53de3
Optimize PR commit retrieval and caching in GitHub provider and utils 2024-02-21 16:33:32 +02:00
mrT23
4a0b12c036
Refactor reaction handling in GitHub provider and update help text in PR tools 2024-02-20 08:06:33 +02:00
Yochai Lehman
3770704db7 reset commit 2024-02-19 08:35:45 -05:00
Tal
7b15101051
Merge pull request #661 from Codium-ai/hl/ask_line
Hl/ask line
2024-02-17 22:08:55 -08:00
Tal
2b12042a85
Merge pull request #667 from Codium-ai/tr_ado
azure webhook
2024-02-17 22:01:57 -08:00
mrT23
de4af313ba
azure dev ops 2024-02-17 19:40:06 +02:00
yochail
b402bd5591
revert azuredevops_provider.py change 2024-02-17 08:36:26 -05:00
mrT23
c98e736e3b
added github action support 2024-02-16 14:49:01 +02:00
Hussam.lawen
6712c0a7f8
remove unnecessary call 2024-02-15 21:43:25 +02:00
Hussam.lawen
cfe794947d
Gitlab /ask line works 2024-02-15 21:35:51 +02:00
Hussam.lawen
fff52e9e26
Add ask line feature 2024-02-15 14:25:22 +02:00
mrT23
d2ad8b1dbd
Refactor publish_persistent_comment method to include name parameter 2024-02-15 08:45:17 +02:00
yochail
9ff62dce08
Add legacy url support 2024-02-12 18:40:06 -05:00
Yochai Lehman
076d8e7187 fix PR code suggestions 2024-02-11 17:17:25 -05:00