Commit graph

677 commits

Author SHA1 Message Date
Hussam Lawen
4dffabf397
Merge pull request #396 from Codium-ai/hl/custom_labels
Implement Custom Labels for PRs
2023-10-28 01:37:54 +03:00
Hussam.lawen
6f2bbd3baa
Add documentation 2023-10-28 00:45:59 +03:00
Hussam.lawen
9e41f3780c
disable custom labels by default 2023-10-27 21:22:56 +03:00
Hussam.lawen
f53ec1d0cc
move enable custom labels to custom labels function 2023-10-27 21:12:58 +03:00
Hussam.lawen
a7cb59ca8b
small fix 2023-10-27 08:10:29 +03:00
Hussam.lawen
ca0ea77415
refactor 2023-10-27 07:58:42 +03:00
Hussam.lawen
0cf27e5fee
custom labels disabled by default 2023-10-27 07:54:59 +03:00
Hussam.lawen
f3bdbfc103
Add /generate_labels function + fix issues 2023-10-26 23:28:33 +03:00
Zohar Meir
e6bea76eee
Typo 2023-10-26 17:07:16 +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
6541575a0e Refactor to use pull_request synchronize event 2023-10-26 16:49:54 +03:00
zmeir
02570ea797 Remove previous review comment on push event 2023-10-26 16:46:54 +03:00
Hussam.lawen
16777a5334
Add custom label description 2023-10-25 13:48:27 +03:00
zmeir
65bb70a1dd Added support for automatic review on push event
The new feature can be enabled via the new configuration `github_app.handle_push_event`. To avoid any unwanted side-effects, the current default of this configuration is set to `false`.

The high level flow (assuming the configuration is enabled):
1. receive push event from GitHub
2. extract branch and commits from event
3. find PR url for branch (currently does not support PRs from forks)
4. perform configured commands (e.g. `/describe`, `/review -i`)

The push event flow is guarded by a backlog queue so that multiple push events on the same branch won't trigger multiple duplicate runs of the PR-Agent commands.
Example timeline:
1. push 1 - start handling event
2. push 2 - waiting to be handled while push 1 event is still running
3. push 3 - event is dropped since handling it and handling push 2 is the same, so it is redundant
4. push 1 finished being handled
5. push 2 awakens from wait and continues handling (potentially reviewing the commits of both push 2 and push 3)

All of these options are configurable and can be enabled/disabled as per the user's desire.

Additional minor changes in this PR:
1. Created `DefaultDictWithTimeout` utility class to avoid too much boilerplate code in managing caches for outdated triggers.
2. Guard against running increment review when there are no new commits.
3. Minor styling changes for incremented review text.
2023-10-25 11:15:23 +03:00
Hussam.lawen
1a89c7eadf
refactor + add description options 2023-10-24 22:28:57 +03:00
Hussam.lawen
07617eab5a
add custom labels 2023-10-24 22:06:27 +03:00
Krystal Boozel
f9e4c2b098
Update configuration.toml 2023-10-23 21:34:12 -04:00
Hussam.lawen
fa24413201
Custom Labels 2023-10-23 16:29:33 +03:00
mrT23
b6cabda586
quick fix 2023-10-19 17:24:37 +03:00
mrT23
abbce60f18
Merge remote-tracking branch 'origin/main' 2023-10-19 17:10:30 +03:00
mrT23
5daaaf2c1d
quick fix 2023-10-19 17:10:21 +03:00
mrT23
e8f207691e
Merge pull request #391 from Codium-ai/tr/readme
Update and Enhance DESCRIBE.md Documentation
2023-10-19 02:03:50 -07:00
mrT23
b0dce4ceae
describe 2023-10-19 12:02:12 +03:00
Ori Kotek
fc494296d7
Merge pull request #387 from Codium-ai/ok/json_logging_in_bitbucket
Enhancing Logging in Bitbucket, GitLab, and Google Cloud Storage Secret Provider
2023-10-19 11:59:26 +03:00
Hussam Lawen
1b6fb3ea53
Merge pull request #385 from Codium-ai/hl/fix_add_docs_in_scripts
Add Blacklist for Non-Editable File Extensions in Documentation
2023-10-19 11:21:36 +03:00
mrT23
a2c3db463a
use_bullet_points 2023-10-19 10:45:42 +03:00
mrT23
21a1cc970e
- update readme
- minor prompts change
2023-10-19 09:16:20 +03:00
Ori Kotek
1314898cbf
Enhance logging in bitbucket_app, gitlab_webhook, and google_cloud_storage_secret_provider with JSON format and additional context 2023-10-18 16:44:03 +03:00
Ori Kotek
ff04d459d7
Update Bitbucket Pipeline instructions in INSTALL.md, remove redundant functionality 2023-10-18 15:46:43 +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
mrT23
d41fe0cf79
comment 2023-10-17 19:45:04 +03:00
Hussam.lawen
3673924fe9
Add docs editable blacklist of file extensions like sql, yaml... 2023-10-17 18:50:39 +03:00
mrT23
d5c098de73
another protection 2023-10-17 10:21:05 +03:00
mrT23
9f5c0daa8e
protection 2023-10-17 09:43:48 +03:00
Marius Anderie
e6f1e0520a remove azure.com url restriction 2023-10-16 20:38:14 +02: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
83e670c5df
Enhance logging context in github_app server with server type 2023-10-16 16:13:09 +03:00
Ori Kotek
c324d88be3
Refactor logging system to use custom logger across the codebase 2023-10-16 14:56:00 +03:00
Ori Kotek
e7258e732b
Refactor repo-specific settings application into a utility function, fix merge bug 2023-10-14 01:39:05 +03:00
mrT23
e2417ebe88
Merge pull request #363 from Codium-ai/tr/pr_suggestions
publish each suggestion seperatly only on gitlab
2023-10-08 17:01:44 +03:00
mrT23
da98fd712f
note 2023-10-08 16:58:22 +03:00
mrT23
e6548f4fe1
simpler solution 2023-10-08 16:57:22 +03:00
mrT23
e66fed2468
Merge pull request #362 from zmeir/zmeir-fix_help_message_for_bot
Fixed help message for bot user
2023-10-08 16:52:18 +03:00
mrT23
1b3fb49f9c
publish each suggestion seperatly only on gitlab 2023-10-08 16:50:25 +03:00
Zohar Meir
8f9f09ecbf
Fixed help message for bot user
This changes the help message to display properly when running a custom deployment of the PR-Agent app (i.e. not via GitHub Actions, and with the setting `github_app.override_deployment_type=false`)
2023-10-08 16:19:11 +03:00
jamesrom
92e9012fb6 Error handling 2023-10-07 09:39:53 +11:00
jamesrom
43dc648b05 Simplify filter 2023-10-06 22:44:29 +11:00
jamesrom
baa0e95227 Code comments for ignore.toml 2023-10-06 21:53:10 +11:00
jamesrom
b27f57d05d Update settings, documentation 2023-10-06 21:03:36 +11:00
mrT23
fd8c90041c
azure 2023-10-06 08:31:31 +03:00
mrT23
ea6253e2e8
revert azure 2023-10-06 08:12:11 +03:00
mrT23
2945c36899
source_branch 2023-10-05 18:21:52 +03:00
mrT23
1bab26f1c5
gfm_supported 2023-10-05 18:08:02 +03:00
mrT23
72eecbbf61
add line number 2023-10-05 17:59:08 +03:00
mrT23
989c56220b
add line number 2023-10-05 17:48:36 +03:00
jamesrom
e387086890 Add support for ignoring files
Add ignore.toml, configuration for ignoring files
Add file_filter.py, for matching files against glob/regex patterns
Update relevant code to use file filter
+Tests
2023-10-06 01:43:35 +11:00
mrT23
088f256415
stable 2023-10-05 17:03:10 +03:00
mrT23
44239f1a79
Patch Extra Lines 2023-10-05 08:38:43 +03:00
mrT23
428e6382bd
prompts minor update 2023-10-05 08:17:37 +03:00
mrT23
02ea2c7a40
Merge pull request #345 from brianpham93/azure-devops-get-item-error
Azure Devops: Set file content as empty string when azure_devops_client.get_item fails
2023-10-02 10:57:08 +03:00
Brian Pham
589d329a3c Add error logs for troubleshooting 2023-10-02 05:37:27 +00:00
Hussam.lawen
e941fa9ec0
Add to user tools guide 2023-10-01 19:51:15 +03:00
Brian Pham
4479c5f11b Azure Devops: Set file content as empty string when error 2023-10-01 16:22:37 +00:00
Hussam.lawen
b2369c66d8
Merge commit '8d075b76ae081d0d38813f789478e4fa0f404cd8' into hl/add_docs
# Conflicts:
#	README.md
2023-10-01 13:55:50 +03:00
Hussam.lawen
ab5ac8ffa8
rename vars + Add to README.md 2023-10-01 13:52:00 +03:00
Hussam.lawen
ccc7f1e10a
rename vars 2023-10-01 13:07:08 +03:00
mrT23
8d075b76ae
Merge pull request #344 from brianpham93/azure-devops-ignore-tree
Ignore change item with `gitObjectType == 'tree'`
2023-10-01 10:39:03 +03:00
BrianPham
32a8b0e9bc Ignore change item with gitObjectType == 'tree' 2023-10-01 07:34:01 +00:00
mrT23
e07412c098
prompt and readme updates 2023-10-01 09:00:58 +03:00
mrT23
813fa8571e
tools guide 2023-09-29 11:44:03 +03:00
Stefan Petrushevski
cae0f627e2
Add lockb to bad extensions 2023-09-28 22:26:25 +02:00
Hussam.lawen
7fbdc3aead
rstrip 2023-09-28 22:47:26 +03:00
Hussam.lawen
0551922839
Merge commit '663ae92bdf3bb3a22b8b7ab437385c882f96e475' into hl/add_docs
# Conflicts:
#	pr_agent/tools/pr_add_docs.py
2023-09-28 22:46:07 +03:00
Hussam.lawen
043d453cab
add doc placement before after 2023-09-28 22:44:15 +03:00
Hussam Lawen
663ae92bdf
Add Docs 2023-09-28 22:42:03 +03:00
Hussam.lawen
96824aa9e2
Revert "Add Docs"
This reverts commit 5cca299b16.
2023-09-28 21:16:14 +03:00
Hussam Lawen
5cca299b16
Add Docs 2023-09-28 21:13:48 +03:00
Hussam.lawen
cd3527f7d4
add configurable docstring style 2023-09-28 20:58:37 +03:00
Hussam.lawen
bb12c75431
reformat 2023-09-28 20:15:18 +03:00
Hussam.lawen
4accddcaa7
revert verbosity 2023-09-28 20:12:36 +03:00
Hussam.lawen
bb8a0f10f4
refine /add_docs 2023-09-28 20:11:18 +03:00
Hussam.lawen
c3cbaaf09e
Initial add docs 2023-09-27 16:48:17 +03:00
mrT23
4c72cfbff4
auto tools in github action 2023-09-25 18:56:10 +03:00
mrT23
34ed598c20
yaml 2023-09-25 18:30:20 +03:00
mrT23
e7aee84ea8
isinstance 2023-09-25 18:23:56 +03:00
mrT23
388684e2e8
none 2023-09-25 18:19:35 +03:00
mrT23
8f81c18647
auto commands in github action 2023-09-25 18:01:32 +03:00
mrT23
ba78475944
Merge pull request #327 from Codium-ai/tr/no_comments
Update Review Guidelines to Exclude Comments
2023-09-25 17:25:31 +03:00
mrT23
aa32024078
no comments 2023-09-25 16:58:08 +03:00
Phill Zarfos
9167c20512 added unit tests 2023-09-23 10:41:53 -04:00
Phill Zarfos
a7fb5d98b1 add get_pr_id() to CodeCommitProvider 2023-09-23 08:08:46 -04:00
Hussam Lawen
fda47bb5cf
Merge pull request #304 from sarbjitsinghgrewal/fix_bitbucket_pipeline
Fix bitbucket pipeline
2023-09-22 14:36:42 +03:00
sarbjitgrewal
56cc804fcf Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_pipeline 2023-09-22 12:19:49 +05:30
dulalbert
62746294e3
Correct typo in pr_reviewer_prompts.toml 2023-09-22 10:23:01 +08:00
mrT23
3e07fe618f
pr_id gitlab 2023-09-21 21:35:00 +03:00
mrT23
be54fb5bf8
pr_id 2023-09-21 21:29:41 +03:00
sarbjitgrewal
46ec3c0754 implement suggestions in bitbucket pipeline 2023-09-21 14:42:59 +05:30
sarbjitgrewal
5e608cc7e7 Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_pipeline 2023-09-21 12:48:32 +05:30
mrT23
992f51a019
protections 2023-09-20 15:59:35 +03:00
mrT23
fcd9821d10
protections 2023-09-20 15:57:06 +03:00
sarbjitgrewal
f7abdc6ae8 Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_pipeline 2023-09-20 14:47:21 +05:30
mrT23
632de3f186
protections 2023-09-20 07:39:56 +03:00
sarbjitgrewal
a2ca43afcd Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_pipeline 2023-09-18 10:34:18 +05:30
mrT23
c0511c954e
icon 2023-09-17 17:08:02 +03:00
mrT23
818ab5a9e8
fixed tests 2023-09-17 16:56:23 +03:00
mrT23
291ffdd6ae
gfm_markdown 2023-09-17 16:51:16 +03:00
mrT23
4fbe7d14b5
protection for no language 2023-09-17 16:41:53 +03:00
mrT23
ea91a38541
Estimated effort to review 2023-09-17 16:31:58 +03:00
mrT23
caaee4e43d
Estimated time to review 2023-09-15 17:09:58 +03:00
sarbjitgrewal
43af4aa182 remove token from config 2023-09-15 16:08:13 +05:30
sarbjitgrewal
e343ce8468 bitbucket pipeline for adding reviews 2023-09-15 16:05:55 +05:30
sarbjitgrewal
978c56c128 update pipeline 2023-09-15 12:38:34 +05:30
sarbjitgrewal
4043dfff9e Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_pipeline 2023-09-14 15:31:18 +05:30
mrT23
084256b923
fixed config 2023-09-14 08:23:34 +03:00
mrT23
99f17666c5
merge 2023-09-14 08:20:36 +03:00
mrT23
bba22667f1
merge 2023-09-14 08:13:00 +03:00
mrT23
1b8349b0ef
merge 2023-09-14 07:47:04 +03:00
mrT23
b94e3521d1
Merge remote-tracking branch 'origin/main' into markers
# Conflicts:
#	pr_agent/tools/pr_description.py
2023-09-14 07:46:30 +03:00
mrT23
9c0656c296
graphic adjustments 2023-09-13 08:16:23 +03:00
mrT23
ee3874f0aa
Merge pull request #297 from Codium-ai/tr/fix_tests
Enhancing Logging in pr_similar_issue.py
2023-09-13 07:27:50 +03:00
Ori Kotek
b7a2551cab
Support issue comments in GitHub Actions 2023-09-12 16:46:02 +03:00
Ori Kotek
21feb92b75
Support issue comments in GitHub Actions 2023-09-12 16:41:12 +03:00
Ori Kotek
2f6178306f
Fix a bug in GitHub Actions 2023-09-12 13:28:35 +03:00
sarbjitgrewal
caee7cbf50 add bitbucket access token 2023-09-12 11:20:38 +05:30
mrT23
901eda2f10
logs 2023-09-12 07:57:21 +03:00
mrT23
d7f43d6ee0
gfm_supported 2023-09-12 07:43:15 +03:00
sarbjitgrewal
9bd5140ea4 update access token 2023-09-11 16:33:45 +05:30
sarbjitgrewal
12bd9e8b42 add bitbucket pipeline 2023-09-11 16:08:23 +05:30
Ori Kotek
98d0835c48
Merge remote-tracking branch 'origin/main' into fix_bitbucket_publish_description 2023-09-10 14:08:17 +03:00
Ori Kotek
2aef9dfe55
Merge remote-tracking branch 'origin/main' into fix_bitbucket_publish_description 2023-09-10 14:06:54 +03:00
Ori Kotek
115b513c9b
Remove 'bitbucket' explicit dependency anywhere that's not in bitbucket_provider.py 2023-09-10 14:06:13 +03:00
mrT23
d40285e4d3
Merge branch 'main' into tr/litellm_debugger 2023-09-10 13:40:35 +03:00
mrT23
517658fb37
Merge pull request #282 from Codium-ai/tr/issue_tool
Adding Similar Issue Tool and Pinecone Integration
2023-09-10 13:39:34 +03:00
mrT23
6382b8a68b
LITELLM_TOKEN 2023-09-10 13:28:56 +03:00
mrT23
e371b217ec
Merge remote-tracking branch 'origin/main' into tr/litellm_debugger 2023-09-10 13:27:19 +03:00
mrT23
892dbe458e
litellm client 2023-09-09 17:35:45 +03:00
Krrish Dholakia
1b098aea13 adding documentation on how to call local hf models 2023-09-08 09:59:44 -07:00
mrT23
e90c9e5853
Merge pull request #287 from cloudlinux/gerrit
[gerrit] Added support project's config file: `.pr_agent.toml`
2023-09-07 19:06:32 +03:00
Nikolay Telepenin
e4f28b157f Added support project's config file: .pr_agent.toml
+ removed markdown/html formatting from the review due to gerrit does not support it
2023-09-07 13:13:07 +01:00
mrT23
b23a4c0535
Merge remote-tracking branch 'origin/main' into tr/issue_tool
# Conflicts:
#	requirements.txt
2023-09-07 12:30:16 +03:00
mrT23
145b5db458
added 'publish_description_as_comment' support 2023-09-07 12:10:33 +03:00
mrT23
8af8fd8e5d
github action 2023-09-06 17:43:43 +03:00
mrT23
8962c9cf8a
stable 2023-09-06 09:43:23 +03:00
mrT23
bc95cf5b8e
stable 2023-09-06 09:12:25 +03:00
mrT23
dcd8196b94
Merge remote-tracking branch 'origin/main' into tr/issue_tool
# Conflicts:
#	pr_agent/settings/configuration.toml
2023-09-06 08:43:41 +03:00
mrT23
901c1dc3f0
issue tool 2023-09-06 08:43:01 +03:00
sarbjitgrewal
adb9964823 Merge branch 'main' of https://github.com/Codium-ai/pr-agent into fix_bitbucket_publish_description 2023-09-06 09:32:43 +05:30
sarbjitgrewal
335877c4a7 fix publish description for bitbucket 2023-09-06 09:26:23 +05:30
Krrish Dholakia
5da6a0147c showing how to use huggingface models 2023-09-05 16:23:22 -07:00
Krrish Dholakia
ca50724952 adding details on calling azure 2023-09-05 15:19:56 -07:00