Commit graph

884 commits

Author SHA1 Message Date
Brian Pham
6c7beccb4f add LangChain AI Handler 2023-12-12 23:03:49 +08:00
Brian Pham
7eb2e769cf Move ai handlers to specific folder 2023-12-12 23:03:38 +08:00
Brian Pham
5239e1c3e9 Load default AI Handler from util function 2023-12-12 21:51:05 +08:00
mrT23
648dd3299f
Merge pull request #521 from Codium-ai/tr/bitbucket_app
feat: Enable PR description publishing as comment in bitbucket_app.py
2023-12-12 00:27:48 -08:00
mrT23
512c92fe51
feat: Enable PR description publishing as comment in bitbucket_app.py 2023-12-12 10:19:17 +02:00
mrT23
1853b4ef47
Merge pull request #520 from Codium-ai/tr/bitbucket_app
Refactor auto tool execution order and enhance logging and documentation
2023-12-12 00:02:02 -08:00
mrT23
2f10b4f3c5
feat: Refactor auto tool execution order in bitbucket_app.py, add logging in pr_description.py, and update tool configuration instructions in Usage.md 2023-12-12 09:59:26 +02:00
mrT23
73a20076eb
Merge pull request #519 from Codium-ai/tr/bitbucket_app
Enhancement: Automatic Tool Configuration for Bitbucket App
2023-12-11 23:26:30 -08:00
mrT23
afb633811f
remove bad default 2023-12-12 09:18:51 +02:00
mrT23
81da328ae3
feat: Add automatic tool configuration for Bitbucket app in bitbucket_app.py and configuration.toml, update Usage.md 2023-12-12 08:06:20 +02:00
Hussam Lawen
729f5e9c8e
Merge pull request #518 from Codium-ai/hl/github_native_labels
Refactoring Label Handling Across Git Providers
2023-12-11 16:50:19 +02:00
Hussam.lawen
fdc776887d
Refactor labels 2023-12-11 16:47:38 +02:00
mrT23
cb64f92cce
Merge pull request #511 from Codium-ai/tr/local_settings_on_push
Enhancement: Apply Repository Settings on Every 'Synchronize' Event
2023-12-11 06:27:29 -08:00
mrT23
f3ad0e1d2a
Merge pull request #517 from Codium-ai/tr/main_tmp
Improve PR description formatting and handling in pr_description.py
2023-12-11 06:15:46 -08:00
mrT23
480e2ee678
feat: Improve PR description formatting in pr_description.py 2023-12-11 15:55:04 +02:00
mrT23
9b97073174
s 2023-12-11 12:00:44 +02:00
Brian Pham
ebf7027aab add openai handler 2023-12-11 17:49:20 +08:00
Brian Pham
a1cbd80b2a update base ai handler 2023-12-11 17:49:09 +08:00
Brian Pham
b8021d7ca3 rename file 2023-12-11 16:57:23 +08:00
Brian Pham
523a896465 Rename AiHandler to LiteLLMAiHandler 2023-12-11 16:56:49 +08:00
mrT23
02c0c89b13
feat: Add exception handling for discussion creation in gitlab_provider.py 2023-12-11 08:29:09 +02:00
mrT23
2b1e841ef1
s 2023-12-10 19:45:54 +02:00
mrT23
a247fc3263
s 2023-12-10 17:46:49 +02:00
mrT23
654938f27c
feat: Enhance code feedback formatting in utils.py 2023-12-10 17:30:27 +02:00
Brian Pham
b6409929d2 Remove extra code 2023-12-09 16:51:50 +00:00
Brian Pham
c0303ff9ec Merge remote-tracking branch 'upstream/main' into abstract-BaseAiHandler 2023-12-09 16:47:13 +00:00
Brian Pham
f2abe5c73e Abstract AiHandler to BaseAiHandler 2023-12-09 16:39:25 +00:00
Brian Pham
7e47baa9db Refactor AI handler classes 2023-12-10 00:25:25 +08:00
mrT23
f908d02ab4
readme 2023-12-07 15:26:36 +02:00
mrT23
7d2a35e32c
final commit 2023-12-07 10:27:19 +02:00
mrT23
e351428848
s 2023-12-07 10:24:36 +02:00
mrT23
4cd6649a44
feat: Enhance PR description formatting in pr_description.py
Improve the table structure for relevant files in PR description by adjusting the header and filename display. Add padding for filename and change summary, and move diff_plus_minus to a separate column. Refactor _insert_br_after_x_chars function to accept a variable length parameter.
2023-12-07 10:14:18 +02:00
mrT23
e62acef6d2
s1 2023-12-07 09:50:36 +02:00
mrT23
a043eb939b
feat: Apply repo settings on push trigger in github_app.py 2023-12-07 08:42:18 +02:00
mrT23
a61e492fe1
feat: Refactor PR files processing into separate function in pr_description.py 2023-12-06 17:01:21 +02:00
mrT23
93b6d31505
s 2023-12-06 16:36:27 +02:00
mrT23
429aed04b1
s 2023-12-06 16:32:53 +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
4b073b32a5
feat: Enhance PR description with file label dictionary and update prompts in pr_description_prompts.toml 2023-12-06 12:30:51 +02:00
mrT23
f629755a9a
feat: Refine field descriptions in pr_description_prompts.toml for semantic file labels 2023-12-06 10:59:44 +02:00
mrT23
c1ed3ee511
feat: Refine field descriptions in pr_description_prompts.toml for semantic file labels 2023-12-06 08:08:01 +02:00
mrT23
0b70e07b8c
feat: Improve formatting in help.py command descriptions 2023-12-05 18:26:35 +02:00
mrT23
862c236076
s 2023-12-05 18:10:13 +02:00
mrT23
cf3401536a
feat: Remove 'Refactoring' label from custom labels and update related descriptions 2023-12-05 07:48:21 +02:00
mrT23
2feaee4306
feat: Update field descriptions in pr_description_prompts.toml for clarity 2023-12-04 21:45:22 +02:00
mrT23
863eb0105d
feat: Refactor semantic labels in PR description and improve clarity in pr_description.py and pr_description_prompts.toml 2023-12-04 21:23:59 +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
Hussam.lawen
d2a129fe30
Add labeling files 2023-12-04 18:22:35 +02:00
mrT23
fe796245a3
Merge pull request #501 from Codium-ai/tr/prompt_tuning
Refactoring and Enhancement of PR Agent Prompts
2023-12-04 03:18:12 -08:00
Phill Zarfos
317fec0536 Throw descriptive error message if model is not in MAX_TOKENS array 2023-12-03 21:06:55 -05:00
mrT23
4dcbce41c8
feat: Refine prompts and improve formatting in pr_sort_code_suggestions_prompts.toml and pr_update_changelog_prompts.toml 2023-12-03 17:27:22 +02:00
mrT23
b3fa654446
feat: Refactor prompts and improve formatting in pr_questions_prompts.toml 2023-12-03 17:23:52 +02:00
mrT23
e09439fc1b
feat: Enhance formatting and clarity in pr_information_from_user_prompts.toml 2023-12-03 17:17:24 +02:00
mrT23
324e481ce7
feat: Improve formatting and clarity in pr_custom_labels.toml 2023-12-03 17:15:29 +02:00
mrT23
abfad088e3
feat: Refine prompts and instructions in pr_add_docs.toml 2023-12-03 17:10:33 +02:00
mrT23
f30789e6c8
feat: Refactor and enhance prompts in pr_code_suggestions_prompts.toml 2023-12-03 16:59:47 +02:00
mrT23
5c01f97f54
feat: Enhance PR description prompts in pr_description_prompts.toml 2023-12-03 16:48:26 +02:00
mrT23
2d726edbe4
feat: Improve formatting and clarity in pr_reviewer_prompts.toml 2023-12-03 16:40:06 +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
3af9c3bfb9
feat: Enhance code suggestion publishing with language-specific formatting in pr_code_suggestions.py 2023-12-01 12:12:49 +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
b90dde48c0
Merge pull request #483 from tmokmss/add-bedrock-support
Add Amazon Bedrock support
2023-11-29 03:08:01 -08:00
Ori Kotek
0e54a13272
Improve error handling in settings retrieval
Fix bug where default values were not being used in GitHub Action runners when environmental variables are not set. Now, if an environmental variable cannot be found and no default is given, the default value will be used if one exists. This will prevent errors during setup on different environments and ensure system stability.
2023-11-29 11:52:02 +02:00
Ori Kotek
b67d06ae59
"Add fallback to environment variables in GitHub Action Runner"
A new function `get_setting_or_env` was implemented to facilitate fetching of either settings or environmental variables in the GitHub Action Runner. This was necessary to resolve an issue where a certain undefined behaviour occurs in GitHub Actions, leading to an attribute error. The new function also provides a default value parameter to ensure the return of a value even in failed attempts to fetch from either settings or environment variables.
2023-11-29 11:47:52 +02:00
tmokmss
5e642c10fa fallback to try_fix_yaml 2023-11-29 17:57:54 +09:00
Ori Kotek
580eede021
Add utility function to handle boolean type conversion
A utility function (`is_true`) was added to take care of validating and converting boolean values from string or boolean types. This function is used in three parts of the `run_action` method where automatic PR review, description, and improvement actions are triggered based on environment settings. This change makes the condition checks cleaner and prevents code duplication.
2023-11-29 10:33:12 +02:00
mrT23
ea56910a2f
Merge pull request #485 from Codium-ai/tr/bitbucket
Enhancement of Inline Comment Publishing in Bitbucket Provider and Logging Addition
2023-11-28 08:35:40 -08:00
mrT23
51e1278cd7
feat: Enhance inline comment publishing in Bitbucket provider and add logging for no suggestions in pr_code_suggestions.py 2023-11-28 18:29:35 +02:00
mrT23
7e029ead45
refactor: Improve label handling in pr_reviewer.py 2023-11-28 17:03:55 +02:00
tmokmss
f8f57419c4 Update ai_handler.py 2023-11-28 23:08:17 +09:00
tmokmss
917f4b6a01 hard code value 2023-11-28 20:59:21 +09:00
tmokmss
97d6fb999a set max_tokens_to_sample 2023-11-28 20:58:57 +09:00
tmokmss
1373ca23fc support Amazon Bedrock 2023-11-28 20:58:42 +09:00
mrT23
6264624c05
Merge branch 'main' into ok/fix_improve 2023-11-27 07:27:25 -08:00
Ori Kotek
2dcee63df5
fix improve 2023-11-27 12:32:53 +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
20978402ea
s 2023-11-26 16:56:06 +02:00
mrT23
8f615e17a3
s 2023-11-26 16:42:41 +02:00
mrT23
5cbbaf44c9
feat: Add line link generation for GitLab and improve markdown formatting in pr_code_suggestions.py 2023-11-26 13:42:57 +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
f36b672eaa
feat: Add option to summarize code suggestions in pr_code_suggestions.py 2023-11-26 11:22:14 +02:00
mrT23
668041c09f
Code suggestions guidelines: 2023-11-26 09:32:02 +02:00
mrT23
aa73eb2841
PR 2023-11-26 09:24:33 +02:00
mrT23
14d4ca8c74
PR 2023-11-26 09:22:19 +02:00
mrT23
690c113603
refactor: Improve clarity and consistency in pr_code_suggestions_prompts.toml and pr_reviewer_prompts.toml files 2023-11-26 09:17:42 +02:00
mrT23
1a28c77783
Previous description 2023-11-26 09:08:33 +02:00
mrT23
0326b7e4ac
refactor: Update PR prompts in toml files for clarity and consistency 2023-11-26 09:05:45 +02:00
mrT23
d8ae32fc55
language_extension_map 2023-11-26 08:52:55 +02:00
mrT23
8db2e3b2a0
feat: Enhance readability in toml files and add verbosity level logging in pr_generate_labels.py 2023-11-26 08:42:04 +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
mrT23
d7df4287f8
feat: Update PR prompts in toml files to enhance readability and consistency 2023-11-26 08:17:16 +02:00
mrT23
b3238e90f2
s 2023-11-26 08:10:01 +02:00
mrT23
fdfd6247fb
Merge branch 'main' into tr/pydantic 2023-11-25 21:36:16 -08:00
mrT23
46d4d04e94
Merge pull request #455 from lukefx/bitbucket-server
Added BitBucket Server and Data Center support
2023-11-25 21:33:26 -08:00
Luca Simone
0f6564f42d feat: Added server and documentation 2023-11-25 17:37:44 +01:00
mrT23
e80a0ed9c8
glob 2023-11-23 09:16:50 +02:00
Ori Kotek
613ccb4c34
Add support for base_url in GitHub SDK 2023-11-21 16:48:36 +02:00
Ori Kotek
2add584fbc
Fix a bug in GitLab webhook 2023-11-21 16:28:01 +02:00
mrT23
b3129c7dd9
Merge pull request #464 from Codium-ai/tr/more_protections
Refactor YAML parsing for improved error handling
2023-11-20 02:28:57 -08:00
mrT23
1b600cd85f
Refactor YAML parsing for improved error handling 2023-11-20 10:30:59 +02:00
mrT23
26cc26129c
Merge pull request #463 from Codium-ai/tr/more_protections
minor fix
2023-11-19 07:45:39 -08:00
mrT23
d1d7903e39
minor fix 2023-11-19 17:44:11 +02:00
mrT23
dff4d1befc
Merge pull request #462 from Codium-ai/tr/more_protections
Enhancements in YAML Parsing and Error Handling
2023-11-19 07:40:06 -08:00
mrT23
3504a64269
protections 2023-11-19 17:35:40 +02:00
mrT23
83247cadec
protections 2023-11-19 17:30:57 +02:00
mrT23
c7a681038d
gfm instructions 2023-11-19 11:11:11 +02:00
mrT23
eb977b4c24
gfm instructions 2023-11-19 11:02:11 +02:00
Luca Simone
b62e0967d5 fix: Revert back to exception since context.get will not throw KeyError 2023-11-17 10:08:40 +01:00
Luca Simone
26dc2e9d21
fix: raising exception instead of empty string
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-16 11:19:46 +01:00
Luca Simone
d78a71184d
fix: Use checked exception KeyError for missing key
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-16 10:59:01 +01:00
Luca Simone
eae30c32a2
fix: Use checked exception for ValueError
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-16 10:58:35 +01:00
mrT23
bc28d657b2
Merge pull request #438 from koid/fix/remove-unnecessary-setup
Removal of Redundant Logger Setup
2023-11-15 10:35:13 -08:00
Luca Simone
3fae5cbd8d feat: Added BitBucket Server
Signed-off-by: Luca Simone <info@lucasimone.info>
2023-11-15 15:47:44 +01:00
mrT23
388cc740b6
Merge pull request #436 from rhyst/support-vertex-ai
Support Google's Vertex AI
2023-11-15 04:26:08 -08:00
mrT23
762a6981e1
extra_labels 2023-11-15 14:12:59 +02:00
mrT23
b362c406bc
Merge remote-tracking branch 'origin/main' into tr/review_extra_labels 2023-11-15 14:07:44 +02:00
mrT23
7a342d3312
extra_labels 2023-11-15 14:07:32 +02:00
mrT23
2e95988741
extra_labels 2023-11-15 14:04:17 +02:00
mrT23
9478447141
extra_labels 2023-11-15 14:02:13 +02:00
Rhys Tyers
557ec72bfe Update documentation for Vertex AI 2023-11-15 10:27:48 +00:00
Rhys Tyers
6b4b16dcf9 Support Google's Vertex AI 2023-11-15 10:26:58 +00:00
mrT23
c4899a6c54
bitbucket 2023-11-15 12:11:02 +02:00
mrT23
24d82e65cb
gitlab 2023-11-15 09:45:10 +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
0df0542958
prompt 2023-11-13 15:55:35 +02:00
Zohar Meir
7d89b82967
Fix get_user_description in case pr_description.enable_pr_type=false
Fixes an issue when getting the user description after a PR-Agent description was already generated, in case the configuration setting `pr_description.enable_pr_type` was `false`.
2023-11-13 14:41:14 +02:00
Hussam.lawen
a5e5a82952
s 2023-11-13 13:49:16 +02:00
Hussam.lawen
ccbb62b50a
remove the "one or more" for custom labels 2023-11-13 13:47:06 +02:00
mrT23
a8dddd1999
prompt 2023-11-13 12:14:18 +02:00
mrT23
f5c6dd55b8
triple quote 2023-11-13 12:04:58 +02:00
mrT23
0e932af2e3
multi line 2023-11-13 12:01:08 +02:00
mrT23
e9891fc530
s1 2023-11-12 16:37:53 +02:00
Ori Kotek
9e5e9afe92
Refactor CLI argument handling and request processing 2023-11-12 16:11:34 +02:00
mrT23
5e43c202dd
s1 2023-11-12 15:45:22 +02:00
mrT23
727eea2b62
s1 2023-11-12 15:00:06 +02:00
mrT23
8fdf174dec
fallback 2023-11-10 18:44:19 +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
755e04cf65
bitbucket finally works 2023-11-08 20:41:55 +02:00
mrT23
44d6c95714
response 2023-11-08 20:38:18 +02:00
mrT23
14610d5375
persistent
s
2023-11-08 20:16:08 +02:00
mrT23
c2bec614e5
s 2023-11-08 14:46:11 +02:00
mrT23
49725e92f2
s 2023-11-08 14:41:15 +02:00
mrT23
a1e32d8331
s 2023-11-08 14:36:59 +02:00
mrT23
0293412a42
s 2023-11-08 14:31: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
mrT23
c5bc4b44ff
fix added files 2023-11-08 12:51:30 +02:00