Commit Graph

135 Commits

Author SHA1 Message Date
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
e6c5236156 Add logging for skipping non-code files in GitHub provider 2024-05-30 17:05:30 +03:00
8a5b01b465 empty calc_pr_statistics 2024-04-08 14:49:00 +03:00
99a676d792 Merge remote-tracking branch 'origin/main' into tr/split 2024-03-17 09:00:04 +02:00
31a8f5302a Update get_pr_labels method to support label updates and prevent unnecessary label republishing 2024-03-12 17:02:45 +02:00
5c20fffee9 fix when no previous review where found, reivew -i should run as regular review 2024-03-11 09:59:16 +02:00
84dadb0469 rename + check github 2024-03-11 09:42:10 +02:00
003c49052e skip incremental review if no file changed since last review 2024-03-10 17:15:25 +02:00
8324e9a38d can_be_split 2024-03-10 16:56:32 +02:00
1ff0afabae Refactor update changelog 2024-03-07 00:48:33 +02:00
acefbff62b Add 'final_update_message' option to control publishing of update message in persistent comments 2024-03-05 17:29:17 +02:00
a86a3f52f0 a minor bugfix 2024-02-29 16:03:00 +02:00
4921c26432 Add functionality to calculate and log PR statistics on closure 2024-02-26 20:02:11 +02:00
5f9969f30c base_url 2024-02-25 17:22:35 +02:00
2dfddd8cea Fix a bug 2024-02-25 17:13:35 +02:00
bc88e0492f Fix a bug 2024-02-25 17:12:40 +02:00
a15d4f7a94 base_url 2024-02-25 16:55:20 +02:00
4258ce165b Refactor link generation in github_provider.py to use get_pr_url method 2024-02-25 16:33:19 +02:00
1275cf0123 adjustment 2024-02-25 16:23:44 +02:00
8b76eb1014 fixed bugs with incremental review 2024-02-22 18:03:00 +02:00
fc7b267c9a self.diff_files 2024-02-21 17:00:11 +02:00
e291bd352e protections 2024-02-21 16:46:57 +02:00
f08ce53de3 Optimize PR commit retrieval and caching in GitHub provider and utils 2024-02-21 16:33:32 +02:00
4a0b12c036 Refactor reaction handling in GitHub provider and update help text in PR tools 2024-02-20 08:06:33 +02:00
c98e736e3b added github action support 2024-02-16 14:49:01 +02:00
fff52e9e26 Add ask line feature 2024-02-15 14:25:22 +02:00
d2ad8b1dbd Refactor publish_persistent_comment method to include name parameter 2024-02-15 08:45:17 +02:00
0e08520c0c match pr-pro 2024-02-11 13:21:59 +02:00
73d2b1565d Implement edit comment 2024-02-11 12:31:30 +02:00
a40643bbba add return response 2024-02-11 12:20:06 +02:00
fa077dc516 formatting 2024-02-08 18:55:58 +02:00
b190b1879e auto approval 2024-02-06 09:09:07 +02:00
2ee329674f insert_br_after_x_chars 2024-02-05 09:20:36 +02:00
e54388d807 s 2024-01-20 11:59:45 +02:00
d942bdb8bd s 2024-01-20 11:56:17 +02:00
9f5c2e5f17 feat: Refactor comment verification in github_provider.py 2024-01-14 11:55:07 +02:00
7377f4e4b2 feat: Refactor comment verification in github_provider.py 2024-01-14 11:49:51 +02:00
d6f4c1638d feat: Refactor comment verification in github_provider.py 2024-01-14 10:49:05 +02:00
b9951fce62 Typo when parsing the suggestion part 2024-01-10 11:59:45 +02:00
19c14b940e Try fixing invalid inline comments 2024-01-09 09:54:29 +02:00
28c5ad1d8b nit 2024-01-08 13:06:03 +02:00
2bb5ae8c0d Remove redundant condition (status 422 already means the same) 2024-01-08 13:05:10 +02:00
b0bffdec84 Refactor and add configuration toggle 2024-01-08 12:00:20 +02:00
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
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
fdc776887d Refactor labels 2023-12-11 16:47:38 +02:00
eeb20b055a feat: Add line count to file patch info and enhance PR description formatting 2023-12-06 15:29:45 +02:00
cf3401536a feat: Remove 'Refactoring' label from custom labels and update related descriptions 2023-12-05 07:48:21 +02:00
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