Commit graph

348 commits

Author SHA1 Message Date
MarkRx
c9c14c10b0 Fix some server implementations not properly logging context 2024-05-30 20:16:21 -04:00
mrT23
34ad5f2aa2
toolbar emojis in pr-agent feedbacks 2024-05-05 13:33:54 +03:00
mrT23
7563af08a0
docs 2024-04-18 08:44:08 +03:00
mrT23
2f4e40860d
Replace keep_original_user_title with generate_ai_title for PR description customization and update documentation accordingly 2024-04-17 16:29:12 +03:00
mrT23
86e64501df
ask 2024-04-14 12:43:26 +03:00
mrT23
4683a29819
s 2024-04-14 12:34:14 +03:00
mrT23
8f0f08006f
s 2024-04-14 12:00:19 +03:00
Pavel Kvach
4c83bf695d Handle OPENAI_KEY not set error in github_action_runner.py
Fixes https://github.com/Codium-ai/pr-agent/issues/855
2024-04-12 10:50:00 +03:00
idubnori
9e4ffd824c
Merge branch 'main' into feature/gha-outputs-1 2024-04-10 23:27:44 +09:00
idubnori
3412095d81 chore: change default to true, if use in github actions 2024-04-10 09:18:21 +09:00
idubnori
75c4befadf feat: set review data to github actions output 2024-04-10 01:02:05 +09:00
mrT23
aa2121a48d
readme 2024-04-07 16:28:30 +03:00
idubnori
493f73f1ce chore: add logging the reason not execute 2024-03-27 12:03:27 +09:00
mrT23
1491bcba96
logs 2024-03-26 08:09:33 +02:00
mrT23
9c284e64cf
dont log pr-agent bot 2024-03-25 12:27:45 +02:00
mrT23
3cdadb3ad1
always ignore bot 2024-03-25 09:04:07 +02:00
mrT23
695f0706a8
Refactor help text for clarity and update configuration links in help.py; standardize variable naming in cli.py 2024-03-25 08:53:13 +02:00
mrT23
07f5025b03
Refactor help text for clarity and update configuration links in help.py; standardize variable naming in cli.py 2024-03-25 08:51:59 +02:00
mrT23
887d640ba5
Merge remote-tracking branch 'origin/main' into tr/pypi 2024-03-22 21:36:45 +02:00
mrT23
0816370b1a
adjustments to pypi 2024-03-22 21:36:22 +02:00
koid
cae0b96054 use sender_type on bot check 2024-03-21 12:06:46 +09:00
koid
b71523f13e use endswith 2024-03-18 16:14:58 +09:00
koid
80a793a257 ignore bot pr option on github app mode 2024-03-18 16:14:54 +09:00
mrT23
99a676d792
Merge remote-tracking branch 'origin/main' into tr/split 2024-03-17 09:00:04 +02:00
mrT23
785fbe04ae
update links 2024-03-12 17:42:19 +02:00
Tal
256d1a3369
Merge pull request #751 from danstis/fix/ado-spaces
Fix URL encoding in Azure DevOps webhook handler
2024-03-10 23:57:59 -07:00
mrT23
33a911da4c
log 2024-03-11 08:56:48 +02:00
mrT23
a27ad0feb6
log 2024-03-11 08:55:07 +02:00
mrT23
6c5697b07c
Enhance logging and refactor code in gitlab_webhook.py, update logger level in bitbucket_app.py and github_polling.py, remove redundant section in github.md 2024-03-11 08:50:19 +02:00
mrT23
4810b8549b
docs 2024-03-10 16:59:37 +02:00
Dan Anstis
73624148a5 Fix URL encoding in Azure DevOps webhook handler 2024-03-08 04:39:57 +00:00
mrT23
2f6f1d5879
Add command execution functionality to Bitbucket app and update configuration settings 2024-03-06 07:53:13 +02:00
mrT23
5880221d00
Update logger setup to include debug level in github_app.py 2024-03-02 23:32:26 +02:00
Tal
9a0288250d
Merge pull request #729 from Codium-ai/tr/wiki
wiki
2024-03-02 10:24:27 -08:00
mrT23
917bdd5cb8
Refactor Usage.md for improved readability and organization 2024-03-02 20:23:10 +02:00
Tal
2340f95488
Merge pull request #727 from Codium-ai/tr/repo_log
log event
2024-02-28 22:10:26 -08:00
mrT23
dd4dc4b761
log event 2024-02-29 08:09:25 +02:00
Tal
6a51a646ee
Merge pull request #725 from Codium-ai/tr/repo_log
get_log_context
2024-02-28 11:26:53 -08:00
mrT23
8d498cd70c
git_org 2024-02-28 16:14:13 +02:00
mrT23
d5e72c2183
get_log_context 2024-02-28 16:10:57 +02:00
mrT23
b09b936b15
get_log_context 2024-02-28 16:05:52 +02:00
Ori Kotek
9c7ac125e1
Tweak analytics log message to add api_url 2024-02-28 12:05:01 +02:00
mrT23
4316d00941
log_context 2024-02-26 21:12:28 +02:00
mrT23
edc9d8944e
Refactor handle_closed_pr function to check for merged PRs 2024-02-26 20:56:43 +02:00
Ori Kotek
910c56c851
Merge pull request #721 from Codium-ai/ok/identity_provider
Identity provider
2024-02-26 20:23:09 +02:00
Ori Kotek
ab29cf2b30
Identity provider 2024-02-26 20:21:20 +02:00
mrT23
60a37158b1
Add functionality to calculate and log PR statistics on closure 2024-02-26 20:09:01 +02:00
mrT23
4921c26432
Add functionality to calculate and log PR statistics on closure 2024-02-26 20:02:11 +02:00
Ori Kotek
8bdc90c0f7
Identity provider 2024-02-26 19:00:21 +02:00
Ori Kotek
8843f7bc8b
Add analytics logging 2024-02-26 16:15:23 +02:00
mrT23
ffe4512b7d
small log improvement 2024-02-26 15:16:59 +02:00
Ori Kotek
5ab69af5a7
Merge pull request #695 from Codium-ai/ok/analytics
Add support for analytics file
2024-02-25 11:17:09 +02:00
mrT23
dad3d3429f
artifact 2024-02-25 10:45:15 +02:00
mrT23
877796b539
Refactor logging statements for better readability and debugging 2024-02-25 09:46:07 +02:00
Tal
51ce484bab
Update github_app.py 2024-02-24 09:40:15 +02:00
Ori Kotek
4d8c38e5e1
Change github app startup logic to support gunicorj 2024-02-23 18:29:35 +02:00
Ori Kotek
2f3171e422
Change github app startup logic to support gunicorj 2024-02-23 18:28:58 +02:00
Ori Kotek
b878f64793
add analytics support 2024-02-23 17:30:20 +02:00
mrT23
85492f20fa
'debug' for request body 2024-02-22 18:13:42 +02:00
mrT23
8b76eb1014
fixed bugs with incremental review 2024-02-22 18:03:00 +02:00
mrT23
adc5709b29
Refactor github_app.py to improve handling of PR events and comments 2024-02-22 17:34:51 +02:00
mrT23
b884920ef2
Refactor github_app.py to improve handling of PR events and comments 2024-02-22 17:26:47 +02:00
Ori Kotek
e3dba12fea
Adds an option to ignore PR opens by regex matching 2024-02-22 12:14:04 +02:00
mrT23
4d0f691b64
repo_settings 2024-02-21 18:23:34 +02:00
Ori Kotek
048d90623f
Ignore comment not starting with a slash 2024-02-21 17:59:58 +02:00
mrT23
dd5386e07e
try-except 2024-02-21 09:27:40 +02:00
mrT23
275f0d6a05
Update GitLab configuration and documentation for webhook setup 2024-02-21 09:20:28 +02:00
mrT23
0e3417b4ab
webhook 2024-02-21 08:55:59 +02:00
Tal
7b15101051
Merge pull request #661 from Codium-ai/hl/ask_line
Hl/ask line
2024-02-17 22:08:55 -08:00
mrT23
481a4fe7a1
revert 2024-02-17 19:43:34 +02:00
mrT23
de4af313ba
azure dev ops 2024-02-17 19:40:06 +02:00
mrT23
c98e736e3b
added github action support 2024-02-16 14:49:01 +02:00
mrT23
40fbd55da4
added github action support 2024-02-16 12:58:55 +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
yochail
1053fa84f6
rename azure_devops_server var 2024-02-13 22:27:07 -05:00
yochail
e8c2ec034d
Update azuredevops_server_webhook.py
fix returned HTTP status
2024-02-12 18:38:08 -05:00
yochail
bbd0d62c85
fix auto_describe key 2024-02-11 18:10:22 -05:00
yochail
34378384da
add get endpoint for container status 2024-02-11 17:59:02 -05:00
Yochai Lehman
95344c7083 fix basic auth 2024-02-11 17:42:06 -05:00
Yochai Lehman
bc38fad4db add support for auto events 2024-02-11 17:23:56 -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
86d4a31eef add docs 2024-02-11 17:02:14 -05:00
Yochai Lehman
9a54be5414 add webhook support 2024-02-11 16:52:49 -05:00
Tal
159e2f7dd6
Merge pull request #654 from rajyan/rajyan-patch-2
add pull_request event triggers for github action
2024-02-11 06:08:48 -08:00
Yohta Kimura
67fde2c17e
add pull_request event triggers for github action
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
2024-02-11 21:21:20 +09:00
mrT23
6837e43114
help 2024-02-09 11:30:28 +02:00
mrT23
3e96812c5d
Merge remote-tracking branch 'origin/main' into tr/auto_approve 2024-02-06 09:10:00 +02:00
mrT23
b190b1879e
auto approval 2024-02-06 09:09:07 +02:00
mrT23
9579be028d
protections for 'get_secret_provider' 2024-02-01 08:31:11 +02:00
mrT23
98ce0a7036
s 2024-01-27 21:25:43 +02:00
mrT23
06dede29f2
feat: Update configuration and handling of GitHub Action settings 2024-01-27 21:15:23 +02:00
mrT23
4077c5556d
enable_review_labels_effort set to true by default 2024-01-24 19:49:43 +02:00
mrT23
f4037e0dfa
feat: Add LanceDB support for similar_issue tool and refactor SOC2 compliance feature name 2024-01-24 19:40:58 +02:00
Hussam.lawen
60c0371854
highlight options 2024-01-23 18:13:08 +02:00
Hussam.lawen
139bbfc67a
update docs and usage guide 2024-01-23 17:58:55 +02:00
mrT23
e4af0b22ad
s 2024-01-17 15:51:42 +02:00
mrT23
58163e5129
improve usage guide 2024-01-17 09:50:48 +02:00
mrT23
729b5d11c9
feat: Refactor instructions and fields in pr_code_suggestions_prompts.toml 2024-01-09 22:56:25 +02:00
mrT23
fc502a6fd5
feat: Refactor instructions and fields in pr_code_suggestions_prompts.toml 2024-01-09 22:49:26 +02:00
mrT23
9c6aabb0bb
feat: Add custom labels and extra instructions sections to help.py, summarize mode to pr_code_suggestions.py, and summarize mode condition to pr_code_suggestions_prompts.toml 2024-01-09 22:09:48 +02:00
mrT23
a42e57d09b
ask helper 2024-01-09 16:36:39 +02:00
mrT23
e56c443fd6
ask helper 2024-01-09 16:34:27 +02:00
mrT23
abc05e7711
ask helper 2024-01-09 16:25:23 +02:00
mrT23
e0f4bc7ded
feat: Remove bot help text from github_polling.py 2024-01-08 11:45:01 +02:00
mrT23
9cfb8ce475
s 2024-01-08 09:39:19 +02:00
mrT23
67cb133c52
s 2024-01-08 09:28:44 +02:00
mrT23
a6bbd04efb
s 2024-01-07 17:02:18 +02:00
mrT23
578d15c6fc
usage guide 2024-01-07 16:38:08 +02:00
mrT23
a854e1a408
feat: Refactor help text addition in pr_reviewer.py and update tool names in README.md 2023-12-26 09:18:38 +02:00
mrT23
0c4d451d9a
readme 2023-12-24 16:18:20 +02:00
Ori Kotek
ccb116922f
Merge pull request #529 from lukefx/bitbucket_webhook_improvements
feat: Improved server, security and commands
2023-12-20 17:27:06 +02:00
Luca Simone
e25980f141 fix: using the same get_settings convention 2023-12-18 14:58:25 +01:00
Luca Simone
7a5acb29ac feat: Improved server, security and commands
Signed-off-by: Luca Simone <info@lucasimone.info>
2023-12-17 17:38:27 +01: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
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
a043eb939b
feat: Apply repo settings on push trigger in github_app.py 2023-12-07 08:42:18 +02:00
mrT23
0b70e07b8c
feat: Improve formatting in help.py command descriptions 2023-12-05 18:26:35 +02: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
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
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
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
Ori Kotek
2add584fbc
Fix a bug in GitLab webhook 2023-11-21 16:28:01 +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
koid
f0991526b5 remove unnecessary setup_logger 2023-11-08 16:56:44 +09:00
koid
e6ef123ce5 add middleware when initializing fastapi 2023-11-05 15:38:19 +09:00
Zohar Meir
cf4d007737
Fix commands list for push trigger 2023-10-31 00:00:48 +02:00
Ori Kotek
775ccb3f25
Refactor _perform_commands function in github_app.py to improve command handling 2023-10-30 20:14:25 +02:00
Ori Kotek
71a341855e
Add log_context to handle_request calls in gitlab_webhook.py 2023-10-30 16:00:09 +02:00
mrT23
e97a03f522
Merge remote-tracking branch 'origin/main' into tr/final_fixes 2023-10-29 14:38:33 +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
ae375c2ff0
final fixes 2023-10-29 13:01:55 +02:00
mrT23
c27dc436c4
final fixes 2023-10-29 12:29:14 +02:00
mrT23
638db96311
github action now also uses .pr_agent.toml 2023-10-28 13:34:32 +03:00
Hussam.lawen
6f2bbd3baa
Add documentation 2023-10-28 00:45:59 +03:00
Hussam.lawen
ca0ea77415
refactor 2023-10-27 07:58:42 +03:00
zmeir
6541575a0e Refactor to use pull_request synchronize event 2023-10-26 16:49: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