Commit graph

289 commits

Author SHA1 Message Date
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
Yochai Lehman
22d0c275d7 fix PR comments 2024-02-11 17:13:59 -05:00
Yochai Lehman
9a54be5414 add webhook support 2024-02-11 16:52:49 -05:00
Tal
ec2aab805d
Merge pull request #650 from yochail/yocail/support_azure_inline_comment
Support Azure Inline Comment
2024-02-11 10:54:10 -08:00
yochail
47060ddcac
fix PR comments
- added line position
- added try-catch per comment
2024-02-11 12:40:36 -05: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
yochail
ba854c228b
Update azuredevops_provider.py 2024-02-10 22:36:01 -05:00
yochail
d8ea2731ea add support for azure inline commnets 2024-02-11 03:27:47 +00:00
mrT23
555151602f
rstrip() 2024-02-09 11:26:43 +02:00
mrT23
f74b35fb6f
Merge remote-tracking branch 'origin/main' into hl/pr_review_table 2024-02-09 11:05:13 +02:00
mrT23
f8e1bd3d4c
get_pr_url 2024-02-09 11:02:23 +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
Tal
2430a1a608
Merge pull request #594 from Codium-ai/tr/fallback_bad_review_comment
Enhanced Comment Verification and Fallback Mechanism for Inline Comment Publishing
2024-01-20 02:04:06 -08:00
mrT23
e54388d807
s 2024-01-20 11:59:45 +02:00
mrT23
d942bdb8bd
s 2024-01-20 11:56:17 +02:00
Sagi Medina
d7858efbbe
Merge pull request #581 from Codium-ai/sm/azure_devops
Enhancement of AzureDevopsProvider with new functionalities and refactoring
2024-01-18 16:28:28 +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
samanhappy
36f1cfb51f Enhancement: Update GitLab link generation to support self-managed GitLab server and different projects 2024-01-09 15:11:27 +08: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
mrT23
46a38473e4
Merge remote-tracking branch 'origin/main' into tr/unique_titles 2024-01-08 10:30:58 +02:00
mrT23
c9e55be275
s 2024-01-08 10:30:47 +02:00
mrT23
8bb2eb48af
s 2024-01-08 09:43:34 +02:00
mrT23
9cfb8ce475
s 2024-01-08 09:39:19 +02:00
Sagi Medina
b776e5069c
feat: Refactor AzureDevopsProvider class in azuredevops_provider.py
- Reorder class methods and constructor for better readability
- Add error logging for failed operations
- Implement get_pr_description_full method
- Update get_pr_description method to always return full description
- Modify _parse_pr_url method to return workspace_slug, repo_slug, and pr_number
- Make _get_azure_devops_client a static method
- Add error handling in get_pr_id method
2024-01-08 09:15:34 +02:00
Sagi Medina
c8bca487e5
feat: Implement methods in AzureDevopsProvider for publishing code suggestions, labels, and removing comments 2024-01-08 08:59:12 +02:00
mrT23
3ea08a6cf5
feat: Add debug logs to git_provider and pr_description modules 2024-01-07 19:57:49 +02:00
mrT23
3154ebbf9f
feat: Add debug logs to git_provider and pr_description modules 2024-01-07 19:56:05 +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