Commit graph

180 commits

Author SHA1 Message Date
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
8b76eb1014
fixed bugs with incremental review 2024-02-22 18:03:00 +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
mrT23
c98e736e3b
added github action support 2024-02-16 14:49:01 +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
Hussam.lawen
0e08520c0c
match pr-pro 2024-02-11 13:21:59 +02:00
Hussam.lawen
73d2b1565d
Implement edit comment 2024-02-11 12:31:30 +02:00
Hussam.lawen
a40643bbba
add return response 2024-02-11 12:20:06 +02:00
mrT23
fa077dc516
formatting 2024-02-08 18:55:58 +02:00
mrT23
b190b1879e
auto approval 2024-02-06 09:09:07 +02:00
mrT23
2ee329674f
insert_br_after_x_chars 2024-02-05 09:20:36 +02:00
mrT23
e54388d807
s 2024-01-20 11:59:45 +02:00
mrT23
d942bdb8bd
s 2024-01-20 11:56:17 +02:00
mrT23
9f5c2e5f17
feat: Refactor comment verification in github_provider.py 2024-01-14 11:55:07 +02:00
mrT23
7377f4e4b2
feat: Refactor comment verification in github_provider.py 2024-01-14 11:49:51 +02:00
mrT23
d6f4c1638d
feat: Refactor comment verification in github_provider.py 2024-01-14 10:49:05 +02:00
zmeir
b9951fce62 Typo when parsing the suggestion part 2024-01-10 11:59:45 +02:00
zmeir
19c14b940e Try fixing invalid inline comments 2024-01-09 09:54:29 +02:00
zmeir
28c5ad1d8b nit 2024-01-08 13:06:03 +02:00
zmeir
2bb5ae8c0d Remove redundant condition (status 422 already means the same) 2024-01-08 13:05:10 +02:00
zmeir
b0bffdec84 Refactor and add configuration toggle 2024-01-08 12:00:20 +02:00
zmeir
22d17985a1 Less noisy fallback for publish_code_suggestions in case of invalid comments
As a first option, `publish_code_suggestions` will try to post all review comments in a single GitHub review. This is preferred because it will group all comments together in the GitHub UI under the same review, and will trigger just one notification for any viewers of the PR.

If just one of the comments is malformed, the entire API request will fail and none of the comments will be posted to the PR. In the current implementation, the fallback mechanism is to just post each comment separately with `try/except` and skip the invalid comments. This works, but potentially creates a lot of noise in the PR as each comment is posted as in a separate review, creating multiple notifications.

This suggested fallback is based on a similar idea, but without creating multiple review notifications. The it works is by iterating over the potential comments, and starting a PENDING review for the current comment. The review is not submitted and does not trigger a notification, but it is verified against the GitHub API, and so we can verify if the comment is valid. After checking all comments we then submit a single review with all the verified comments which is guaranteed to succeed.

The end result is having the exact same comments posted to the PR as with the current fallback method, but the downside is having twice as many API calls (for each comment we have 1 extra API call to delete the pending review).
2024-01-07 16:00:44 +02:00
mrT23
5c49ff216a
feat: Update inline comment creation in git providers and improve code suggestion handling
- Update `create_inline_comment` method in various git providers to include `absolute_position` parameter
- Remove `create_inline_comment` method from providers that do not support inline comments
- Enhance `find_line_number_of_relevant_line_in_file` function to handle absolute position
- Modify `pr_code_suggestions.py` to handle improved code inclusion in suggestions
- Add `include_improved_code` configuration option in `configuration.toml` and update documentation accordingly
2023-12-24 09:44:08 +02:00
Hussam.lawen
fdc776887d
Refactor labels 2023-12-11 16:47:38 +02:00
mrT23
eeb20b055a
feat: Add line count to file patch info and enhance PR description formatting 2023-12-06 15:29:45 +02:00
mrT23
cf3401536a
feat: Remove 'Refactoring' label from custom labels and update related descriptions 2023-12-05 07:48:21 +02:00
mrT23
21a7a0f136
feat: Enhance link generation for relevant lines and refactor code in git providers and PR description tools 2023-12-04 21:06:56 +02:00
mrT23
37812dfede
feat: Update pr_url assignment in github_provider.py for GitHub Actions compatibility 2023-12-03 11:34:17 +02:00
mrT23
586785ffde
feat: Add pr_url attribute to git providers and final update message in PR description 2023-12-03 10:46:02 +02:00
mrT23
c22084c7ac
feat: Add exception handling for missing previous review in github_provider.py 2023-12-01 11:56:03 +02:00
mrT23
b1c374808d
feat: Add line link generation in Bitbucket provider and improve markdown formatting in pr_code_suggestions.py and IMRPOVE.md 2023-11-26 17:12:02 +02:00
mrT23
f96d4924e7
feat: Add line link generation in git providers and refactor code suggestions generation 2023-11-26 11:57:45 +02:00
mrT23
9465b7b577
refactor: Move clip_tokens function from pr_processing to utils module, and add tests 2023-11-26 08:29:47 +02:00
Ori Kotek
613ccb4c34
Add support for base_url in GitHub SDK 2023-11-21 16:48:36 +02:00
mrT23
2567a6cf27
gitlab 2023-11-15 09:40:45 +02:00
mrT23
94cb6b9795
more feedback 2023-11-15 09:06:26 +02:00
mrT23
737792d83c
publish_persistent_comment 2023-11-09 15:24:55 +02:00
mrT23
7e5889061c
publish_persistent_comment 2023-11-09 15:20:31 +02:00
mrT23
14610d5375
persistent
s
2023-11-08 20:16:08 +02:00
mrT23
10ec0a1812
s 2023-11-08 14:21:03 +02:00
mrT23
69b68b78f5
s 2023-11-08 14:17:59 +02:00
zmeir
c623c3baf4 Added new configurations to prevent too frequent incremental commits on push trigger 2023-11-02 12:24:54 +02:00
Ori Kotek
61d3e1ebf4
Merge pull request #394 from zmeir/zmeir-external-push_trigger
Added support for automatic review on push event
2023-10-29 13:04:33 +02:00
mrT23
638db96311
github action now also uses .pr_agent.toml 2023-10-28 13:34:32 +03:00
zmeir
414f2b6767 Fix incremental review if there are no new commits (would have performed a full review instead) 2023-10-26 16:49:55 +03:00
zmeir
02570ea797 Remove previous review comment on push event 2023-10-26 16:46:54 +03:00
Hussam Lawen
88ca501c0c
Merge pull request #377 from zmeir/zmeir-review_incremental_detect_header
Get previous incremental review
2023-10-18 00:30:42 +03:00
Zohar Meir
d8de89ae33
Get previous incremental review
When getting the last commit in `/review -i` consider also the last __incremental__ review, not just the last __full__ review

Full disclosure I'm not really sure the `/review -i` feature work very well - I might be wrong but it seemed like the actual review in fact addressed all the changes in the PR, and not just the ones from the last review (even though it adds a link to the commit of the last review).  
I think the commit list gathered in `/review -i` doesn't propagate the actual list the reviewer uses. Again, I might be wrong, just took a brief glance at it.
2023-10-16 16:37:10 +03:00
Ori Kotek
c324d88be3
Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
mrT23
4c72cfbff4
auto tools in github action 2023-09-25 18:56:10 +03:00
mrT23
be54fb5bf8
pr_id 2023-09-21 21:29:41 +03:00
mrT23
901c1dc3f0
issue tool 2023-09-06 08:43:01 +03:00
mrT23
c0b23e1091
Merge remote-tracking branch 'origin/main' into tr/issue_tool
# Conflicts:
#	pr_agent/algo/utils.py
2023-09-05 08:05:33 +03:00
mrT23
635b243280
Merge pull request #223 from zmeir/zmeir-keep_original_pr_description
Enhancement: Retain Original User Description and Title in PRs
2023-08-22 16:47:16 +03:00
mrT23
9157fa670e
-> bool 2023-08-22 16:32:22 +03:00
zmeir
31e91edebc Allow keeping the original user description 2023-08-20 18:59:40 +03:00
mrT23
6693aa3cbc
semi stable 2023-08-20 15:01:06 +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
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
Zohar Meir
164ed77d72
Attempt to fix bug in create_inline_comment 2023-08-07 17:09:50 +03:00
Ori Kotek
886139c6b5
Support adding / removing reaction from comments in GitHub different servers 2023-08-07 16:18:08 +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
mrT23
7a57db5d88
load_large_diff is done once 2023-08-03 22:14:05 +03:00
mrT23
c92648cbd5
caching 2023-08-03 21:38:18 +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
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
Ori Kotek
63a703c000
Handle marketplace hook 2023-07-28 11:30:51 +03:00
Ori Kotek
1a8fce1505
Updated handling of installation id 2023-07-28 02:44:28 +03:00
Ori Kotek
8ae5faca53
Fix cyclic dependency 2023-07-25 16:52:18 +03:00
idavidov
1229fba346 + settings.github.ratelimit_retries setup in configuration.toml 2023-07-25 16:37:13 +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
Ori Kotek
b9c25e487a
On /describe, preserve the current labels 2023-07-24 10:17:26 +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
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
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