xai-review 0.36.0__py3-none-any.whl → 0.38.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xai-review might be problematic. Click here for more details.
- ai_review/clients/{bitbucket → bitbucket_cloud}/client.py +8 -7
- ai_review/clients/{bitbucket → bitbucket_cloud}/pr/client.py +51 -39
- ai_review/clients/bitbucket_cloud/pr/schema/comments.py +59 -0
- ai_review/clients/{bitbucket → bitbucket_cloud}/pr/schema/files.py +7 -7
- ai_review/clients/bitbucket_cloud/pr/schema/pull_request.py +34 -0
- ai_review/clients/{bitbucket → bitbucket_cloud}/pr/schema/user.py +1 -1
- ai_review/clients/bitbucket_cloud/pr/types.py +44 -0
- ai_review/clients/{bitbucket → bitbucket_cloud}/tools.py +1 -1
- ai_review/clients/bitbucket_server/client.py +32 -0
- ai_review/clients/bitbucket_server/pr/client.py +163 -0
- ai_review/clients/bitbucket_server/pr/schema/changes.py +36 -0
- ai_review/clients/bitbucket_server/pr/schema/comments.py +55 -0
- ai_review/clients/bitbucket_server/pr/schema/pull_request.py +48 -0
- ai_review/clients/bitbucket_server/pr/schema/user.py +13 -0
- ai_review/clients/bitbucket_server/pr/types.py +44 -0
- ai_review/clients/bitbucket_server/tools.py +6 -0
- ai_review/clients/claude/client.py +1 -0
- ai_review/clients/gemini/client.py +1 -0
- ai_review/clients/gitea/client.py +4 -3
- ai_review/clients/github/client.py +2 -1
- ai_review/clients/gitlab/client.py +2 -1
- ai_review/clients/ollama/client.py +1 -0
- ai_review/clients/openai/v1/client.py +1 -0
- ai_review/clients/openai/v2/client.py +1 -0
- ai_review/clients/openrouter/client.py +1 -0
- ai_review/libs/config/http.py +2 -1
- ai_review/libs/config/vcs/base.py +23 -6
- ai_review/libs/config/vcs/{bitbucket.py → bitbucket_cloud.py} +2 -2
- ai_review/libs/config/vcs/bitbucket_server.py +13 -0
- ai_review/libs/constants/vcs_provider.py +2 -1
- ai_review/libs/http/client.py +1 -1
- ai_review/resources/pricing.yaml +4 -0
- ai_review/services/vcs/bitbucket_cloud/__init__.py +0 -0
- ai_review/services/vcs/{bitbucket → bitbucket_cloud}/adapter.py +2 -2
- ai_review/services/vcs/{bitbucket → bitbucket_cloud}/client.py +24 -21
- ai_review/services/vcs/bitbucket_server/__init__.py +0 -0
- ai_review/services/vcs/bitbucket_server/adapter.py +27 -0
- ai_review/services/vcs/bitbucket_server/client.py +263 -0
- ai_review/services/vcs/factory.py +6 -3
- ai_review/tests/fixtures/clients/bitbucket_cloud.py +207 -0
- ai_review/tests/fixtures/clients/bitbucket_server.py +265 -0
- ai_review/tests/suites/clients/bitbucket_cloud/__init__.py +0 -0
- ai_review/tests/suites/clients/bitbucket_cloud/test_client.py +14 -0
- ai_review/tests/suites/clients/bitbucket_cloud/test_tools.py +31 -0
- ai_review/tests/suites/clients/bitbucket_server/__init__.py +0 -0
- ai_review/tests/suites/clients/bitbucket_server/test_client.py +14 -0
- ai_review/tests/suites/clients/bitbucket_server/test_tools.py +38 -0
- ai_review/tests/suites/services/vcs/bitbucket_cloud/__init__.py +0 -0
- ai_review/tests/suites/services/vcs/{bitbucket → bitbucket_cloud}/test_adapter.py +24 -24
- ai_review/tests/suites/services/vcs/{bitbucket → bitbucket_cloud}/test_client.py +51 -51
- ai_review/tests/suites/services/vcs/bitbucket_server/__init__.py +0 -0
- ai_review/tests/suites/services/vcs/bitbucket_server/test_adapter.py +115 -0
- ai_review/tests/suites/services/vcs/bitbucket_server/test_client.py +201 -0
- ai_review/tests/suites/services/vcs/test_factory.py +11 -4
- xai_review-0.38.0.dist-info/METADATA +519 -0
- {xai_review-0.36.0.dist-info → xai_review-0.38.0.dist-info}/RECORD +66 -44
- ai_review/clients/bitbucket/pr/schema/comments.py +0 -63
- ai_review/clients/bitbucket/pr/schema/pull_request.py +0 -34
- ai_review/clients/bitbucket/pr/types.py +0 -44
- ai_review/tests/fixtures/clients/bitbucket.py +0 -204
- ai_review/tests/suites/clients/bitbucket/test_client.py +0 -14
- ai_review/tests/suites/clients/bitbucket/test_tools.py +0 -31
- xai_review-0.36.0.dist-info/METADATA +0 -317
- /ai_review/clients/{bitbucket → bitbucket_cloud}/__init__.py +0 -0
- /ai_review/clients/{bitbucket → bitbucket_cloud}/pr/__init__.py +0 -0
- /ai_review/clients/{bitbucket → bitbucket_cloud}/pr/schema/__init__.py +0 -0
- /ai_review/{services/vcs/bitbucket → clients/bitbucket_server}/__init__.py +0 -0
- /ai_review/{tests/suites/clients/bitbucket → clients/bitbucket_server/pr}/__init__.py +0 -0
- /ai_review/{tests/suites/services/vcs/bitbucket → clients/bitbucket_server/pr/schema}/__init__.py +0 -0
- {xai_review-0.36.0.dist-info → xai_review-0.38.0.dist-info}/WHEEL +0 -0
- {xai_review-0.36.0.dist-info → xai_review-0.38.0.dist-info}/entry_points.txt +0 -0
- {xai_review-0.36.0.dist-info → xai_review-0.38.0.dist-info}/licenses/LICENSE +0 -0
- {xai_review-0.36.0.dist-info → xai_review-0.38.0.dist-info}/top_level.txt +0 -0
|
@@ -10,27 +10,38 @@ ai_review/cli/commands/run_review.py,sha256=i39IYNDE_lAiQQnKLmxG71Ao8WAIOSn82L9E
|
|
|
10
10
|
ai_review/cli/commands/run_summary_reply_review.py,sha256=xtrKM1-E4-0P1jpO8mZ6LTGAdEW1q6Df9C6nUcvOywo,236
|
|
11
11
|
ai_review/cli/commands/run_summary_review.py,sha256=NqjepGH5cbqczPzcuMEAxO4dI58FEUZl0b6uRVQ9SiA,224
|
|
12
12
|
ai_review/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
ai_review/clients/
|
|
14
|
-
ai_review/clients/
|
|
15
|
-
ai_review/clients/
|
|
16
|
-
ai_review/clients/
|
|
17
|
-
ai_review/clients/
|
|
18
|
-
ai_review/clients/
|
|
19
|
-
ai_review/clients/
|
|
20
|
-
ai_review/clients/
|
|
21
|
-
ai_review/clients/
|
|
22
|
-
ai_review/clients/
|
|
23
|
-
ai_review/clients/
|
|
13
|
+
ai_review/clients/bitbucket_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
ai_review/clients/bitbucket_cloud/client.py,sha256=qEXsx65oomXjgNanxh-tQnLsKZ3fowSi7M8jiW8mqdA,1265
|
|
15
|
+
ai_review/clients/bitbucket_cloud/tools.py,sha256=h4i6Ig-vpu10eUwegn6-VFUKWSwXnJTv5TXlvevRyBo,153
|
|
16
|
+
ai_review/clients/bitbucket_cloud/pr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
ai_review/clients/bitbucket_cloud/pr/client.py,sha256=FPgvJmH6t7IxzU4BGXvFvmDzaZW6Sbv9eXIcJ8Sc0-w,6167
|
|
18
|
+
ai_review/clients/bitbucket_cloud/pr/types.py,sha256=gvsYADExSNum7-TCVJeGyoufxluBXmec8STFn2uJoF0,1369
|
|
19
|
+
ai_review/clients/bitbucket_cloud/pr/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
+
ai_review/clients/bitbucket_cloud/pr/schema/comments.py,sha256=rcYtb-yo7QvUcwCUXdPbRjUXCMx2pvtW1SoyPY7rzV4,1789
|
|
21
|
+
ai_review/clients/bitbucket_cloud/pr/schema/files.py,sha256=LH14nSHQJGy4PSBPlMGIxfOZcSHMQviMMGyJdZu0Edw,785
|
|
22
|
+
ai_review/clients/bitbucket_cloud/pr/schema/pull_request.py,sha256=ZMsDlmVPub6C6wlXY4Za_9ZJi1RFxjGNSHXWOnEM4k0,921
|
|
23
|
+
ai_review/clients/bitbucket_cloud/pr/schema/user.py,sha256=lR8YCdHtG3V3xi5K7FBXgicUFJ2LoCSFNqK_h9Jii4g,130
|
|
24
|
+
ai_review/clients/bitbucket_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
+
ai_review/clients/bitbucket_server/client.py,sha256=tPWpvQ7TcGW048kQjtnCIZdMqNJy5Y-QyifdQswVZKc,1273
|
|
26
|
+
ai_review/clients/bitbucket_server/tools.py,sha256=zkYzMo1BRkiDWrAmFKcZn-FX31juL7UPyN6B6Pr1jQs,164
|
|
27
|
+
ai_review/clients/bitbucket_server/pr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
+
ai_review/clients/bitbucket_server/pr/client.py,sha256=Ya1-Cw3KlI6_5y_ZTqcIcHDmct15AxLloylQFDIoxno,6573
|
|
29
|
+
ai_review/clients/bitbucket_server/pr/types.py,sha256=SKOmYMW4PUjGC0-h6bxrfDnQO-ku7W7ggSaS9sXrxqQ,1401
|
|
30
|
+
ai_review/clients/bitbucket_server/pr/schema/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
+
ai_review/clients/bitbucket_server/pr/schema/changes.py,sha256=ewli3ghjX6rRFREELY6GtbjiyRorb0Bt6JC5utaPc-U,1102
|
|
32
|
+
ai_review/clients/bitbucket_server/pr/schema/comments.py,sha256=eU102AFInDHJMts93bUqv07SZSnPh6U6sJim4_5FUS8,1631
|
|
33
|
+
ai_review/clients/bitbucket_server/pr/schema/pull_request.py,sha256=XPmDrta_YaEfULdJVmKil859eHWsHa7eaS7KR_FKLGA,1382
|
|
34
|
+
ai_review/clients/bitbucket_server/pr/schema/user.py,sha256=vjD-f31IefKCpOTwFMtU1VloXzeTuUd5Mu0NjKB1hMM,402
|
|
24
35
|
ai_review/clients/claude/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
ai_review/clients/claude/client.py,sha256=
|
|
36
|
+
ai_review/clients/claude/client.py,sha256=FcSsY5awnEyih41p3mY-ysu8SoyHLMJdV3pG39PPEOA,1955
|
|
26
37
|
ai_review/clients/claude/schema.py,sha256=FJy5Wh5A3IJWPNn4K6KIFn4OTC713pxO9KCqdfUKwNA,915
|
|
27
38
|
ai_review/clients/claude/types.py,sha256=y_-yF7zQrTvyiowS2b9xjIlAzkF8i6OfOjqo9eB8Xo4,267
|
|
28
39
|
ai_review/clients/gemini/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
ai_review/clients/gemini/client.py,sha256=
|
|
40
|
+
ai_review/clients/gemini/client.py,sha256=Y8-n7Wv95ee1rvMHA9etsevEsZA2MK_XUJEVqynsuAc,1966
|
|
30
41
|
ai_review/clients/gemini/schema.py,sha256=mBESW6CupZaRRSzFv5K0WTEPfzk6brAFpZG_EiloKRI,2299
|
|
31
42
|
ai_review/clients/gemini/types.py,sha256=D-P0THorrQ8yq5P-NKAC65zzhEYRa9HkiXTORG9QoIk,267
|
|
32
43
|
ai_review/clients/gitea/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
ai_review/clients/gitea/client.py,sha256=
|
|
44
|
+
ai_review/clients/gitea/client.py,sha256=SLQ7Cm-g4PZTDy1sgvBuShYfd6QRlJOU4w5gIdvwQcE,1188
|
|
34
45
|
ai_review/clients/gitea/tools.py,sha256=vg805Gk4hsEn8_zePtCZkvkxYPxT-A1o0mkU_RqAlC0,196
|
|
35
46
|
ai_review/clients/gitea/pr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
47
|
ai_review/clients/gitea/pr/client.py,sha256=eFAZai2zinr7ZGscVHa0cZIaYJJucNcLb08f73cKo-o,4945
|
|
@@ -41,7 +52,7 @@ ai_review/clients/gitea/pr/schema/files.py,sha256=O4c4Z3R775OuGOJgf5baMH5ivzHCVs
|
|
|
41
52
|
ai_review/clients/gitea/pr/schema/pull_request.py,sha256=lT4r-Am5MmFQqB5WnQ0OWw6cB3e-NlBAi08Jw1fmAE8,361
|
|
42
53
|
ai_review/clients/gitea/pr/schema/user.py,sha256=5YIys_MFFm612hKMMQdjwlsH-FG_bS-vSQsPbBueEPU,94
|
|
43
54
|
ai_review/clients/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
|
-
ai_review/clients/github/client.py,sha256=
|
|
55
|
+
ai_review/clients/github/client.py,sha256=OTN9k7JkyYWk7nIbUSMHAMetaF1wRo56F3JBq2j54W4,1197
|
|
45
56
|
ai_review/clients/github/tools.py,sha256=sD2eS_iNhzT4ZLgTRmO2uBLuId-fa2aSvbu6VFeKSlc,201
|
|
46
57
|
ai_review/clients/github/pr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
58
|
ai_review/clients/github/pr/client.py,sha256=f9wYQq-zIbfFBkEEDLDWg0woKAXFoM9GjiO5X3WBL08,9918
|
|
@@ -53,7 +64,7 @@ ai_review/clients/github/pr/schema/pull_request.py,sha256=Fr41RCLhmAloEIfJQVj-hf
|
|
|
53
64
|
ai_review/clients/github/pr/schema/reviews.py,sha256=qRJpBu03CBwC_tPng9q9tkqT_u2WcdDELblAi-OzxWI,380
|
|
54
65
|
ai_review/clients/github/pr/schema/user.py,sha256=odOgadMfNck4M53BZ49vKJjWMqKFoqvnGwGuFVgT2Yw,109
|
|
55
66
|
ai_review/clients/gitlab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
-
ai_review/clients/gitlab/client.py,sha256=
|
|
67
|
+
ai_review/clients/gitlab/client.py,sha256=HrrLb1-eOlnLe8yiYsfUT97Ry5EP8ev9pmOt3unZYZQ,1199
|
|
57
68
|
ai_review/clients/gitlab/tools.py,sha256=ed8t2-dy2XtSRpYWhLxUobYvbBX_1zMZTPuzjbgPzTg,136
|
|
58
69
|
ai_review/clients/gitlab/mr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
70
|
ai_review/clients/gitlab/mr/client.py,sha256=ydkecV9SlmXJvkoBVF0c-5C7RsadYTP9RXC7tKLjJWo,7611
|
|
@@ -65,20 +76,20 @@ ai_review/clients/gitlab/mr/schema/notes.py,sha256=9wmwULegmTO6ETSjYlMC6Fc_DIeT_
|
|
|
65
76
|
ai_review/clients/gitlab/mr/schema/position.py,sha256=oYml4x6rlrqGahEEbSB1c1ko70geL_0_otbwP0JqV6k,371
|
|
66
77
|
ai_review/clients/gitlab/mr/schema/user.py,sha256=RxgCM8oryPBNPDaFxcVqe11MogchMGaO1gALkZiscrU,112
|
|
67
78
|
ai_review/clients/ollama/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
-
ai_review/clients/ollama/client.py,sha256=
|
|
79
|
+
ai_review/clients/ollama/client.py,sha256=eQFB4STr8mPXdV8cqPm2CQdcalEDIfoQfY0XBMvLq4k,1785
|
|
69
80
|
ai_review/clients/ollama/schema.py,sha256=A6oKwkkEVrduyzMR_lhLnaLyvKXqlfsXjkMIF2eXaYw,1310
|
|
70
81
|
ai_review/clients/ollama/types.py,sha256=9ES8K-EClKYU7UsaMKgXvZ3sUOF9o6reEvfL6wFOJ4M,267
|
|
71
82
|
ai_review/clients/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
83
|
ai_review/clients/openai/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
-
ai_review/clients/openai/v1/client.py,sha256=
|
|
84
|
+
ai_review/clients/openai/v1/client.py,sha256=SpXcCP-lnunUwSvuH8YDd58h0byLI50QCL6E11-G2qk,1909
|
|
74
85
|
ai_review/clients/openai/v1/schema.py,sha256=WnYzQP4e5rHfX40kVHCekxgXXufX7pz6FBw4qiSKUKA,792
|
|
75
86
|
ai_review/clients/openai/v1/types.py,sha256=giLb2LKyoHNgIq4wO__asPl4dUi1PEMiOAQIbsPpuNk,272
|
|
76
87
|
ai_review/clients/openai/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
|
-
ai_review/clients/openai/v2/client.py,sha256=
|
|
88
|
+
ai_review/clients/openai/v2/client.py,sha256=KYROrfZvDnZRTwIOQoCQJOXpxoV33Ngtd-PqLnnAzMw,1944
|
|
78
89
|
ai_review/clients/openai/v2/schema.py,sha256=AU9ewqgLSozSgAgVh15ql18VMMchQeTO7MW9gUT9jd0,1195
|
|
79
90
|
ai_review/clients/openai/v2/types.py,sha256=BE4iFUSW1OHsah3YxTwMt1bWhZCZMssBEkTlLcR0POs,304
|
|
80
91
|
ai_review/clients/openrouter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
-
ai_review/clients/openrouter/client.py,sha256=
|
|
92
|
+
ai_review/clients/openrouter/client.py,sha256=WOsk9TsZBbF-A_o_4xEvpgErfrjLgvefMP8MNu05zho,2153
|
|
82
93
|
ai_review/clients/openrouter/schema.py,sha256=hTPLIMIUHIKD4wDJsVPidn0LTQz58SsI1fId6JVU8KQ,827
|
|
83
94
|
ai_review/clients/openrouter/types.py,sha256=9CFUy52GnfjjLRufz7SwY_fnzhQnn8czLl-XLWBSKGc,303
|
|
84
95
|
ai_review/libs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -91,7 +102,7 @@ ai_review/libs/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
91
102
|
ai_review/libs/config/artifacts.py,sha256=8BzbQu5GxwV6i6qzrUKM1De1Ogb00Ph5WTqwZ3fVpGg,483
|
|
92
103
|
ai_review/libs/config/base.py,sha256=sPf3OKeF1ID0ouOwiVaUtvpWuZXJXQvIw5kbnPUyN9o,686
|
|
93
104
|
ai_review/libs/config/core.py,sha256=ZQ2QtYr7vAF0tXbVLvVwk9QFE5h6JjAKAUQWcb9gHws,87
|
|
94
|
-
ai_review/libs/config/http.py,sha256=
|
|
105
|
+
ai_review/libs/config/http.py,sha256=5ycHfmfGhuarJAEy13SEyKIUgu0MwcW4BkYrAkDUKPc,450
|
|
95
106
|
ai_review/libs/config/logger.py,sha256=oPmjpjf6EZwW7CgOjT8mOQdGnT98CLwXepiGB_ajZvU,384
|
|
96
107
|
ai_review/libs/config/prompt.py,sha256=jPBYvi75u6BUIHOZnXCg5CiL0XRONDfW5T4WaYlxPEE,6066
|
|
97
108
|
ai_review/libs/config/review.py,sha256=jCfHfGfHs7Sc6H92hVUBd8bMRbLiIiThVmk6lFNlv40,1224
|
|
@@ -104,21 +115,22 @@ ai_review/libs/config/llm/ollama.py,sha256=M6aiPb5GvYvkiGcgHTsh9bOw5JsBLqmfSKoIb
|
|
|
104
115
|
ai_review/libs/config/llm/openai.py,sha256=g2EF0h2JGD5iTOtNHg-G9bdqgVtqGjg4KLf-p9V6flY,395
|
|
105
116
|
ai_review/libs/config/llm/openrouter.py,sha256=6G5fApCOv0fKRHCUpsuiPOcEdyUpDe5qiUUbHjA6TbE,337
|
|
106
117
|
ai_review/libs/config/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
|
-
ai_review/libs/config/vcs/base.py,sha256=
|
|
108
|
-
ai_review/libs/config/vcs/
|
|
118
|
+
ai_review/libs/config/vcs/base.py,sha256=6ovVAjK05K1aw03jbvYZ4n9ohHWc5_4xIr1CYCQfs1o,1892
|
|
119
|
+
ai_review/libs/config/vcs/bitbucket_cloud.py,sha256=7U_exmS6gFZorqBI-Gp8eMUOAbuInk2jFBo1mf-zdS8,285
|
|
120
|
+
ai_review/libs/config/vcs/bitbucket_server.py,sha256=cQ7p8P6ZGfKSkMA4GItJKZ5GwW5SFHL6kMC8QU5Ah1o,289
|
|
109
121
|
ai_review/libs/config/vcs/gitea.py,sha256=elJjWnHxdC9kDWu0oHsxYsqv7FC-1zvmLfaWAlWYan4,254
|
|
110
122
|
ai_review/libs/config/vcs/github.py,sha256=hk-kuDLd8wecqtEb8PSqF7Yy_pkihplJhi6nB6FZID4,256
|
|
111
123
|
ai_review/libs/config/vcs/gitlab.py,sha256=ecYfU158VgVlM6P5mgZn8FOqk3Xt60xx7gUqT5e22a4,252
|
|
112
124
|
ai_review/libs/config/vcs/pagination.py,sha256=S-XxWQYkIjhu3ffpHQ44d7UtRHH81fh9GaJ-xQXUUy4,175
|
|
113
125
|
ai_review/libs/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
126
|
ai_review/libs/constants/llm_provider.py,sha256=_ysUQFFspG1oCuCyRwdEE9kVlqLyP1hxL_Kc-tWV2F0,173
|
|
115
|
-
ai_review/libs/constants/vcs_provider.py,sha256=
|
|
127
|
+
ai_review/libs/constants/vcs_provider.py,sha256=cBS_3X7fbOi96Yhk556ncuv3Vv0WKysWV7uwUEFtJT0,201
|
|
116
128
|
ai_review/libs/diff/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
129
|
ai_review/libs/diff/models.py,sha256=RT4YJboOPA-AjNJGRj_HIZaJLEmROOhOgMh1wIGpIwY,2344
|
|
118
130
|
ai_review/libs/diff/parser.py,sha256=2BGxZnRN3SRjNnZK4qIOW28aM93Ij__1SltwclJrlno,3817
|
|
119
131
|
ai_review/libs/diff/tools.py,sha256=CZWRDlOW2YS-b8h9gv_uP1MG194_FLkKzcKTwwZHocI,686
|
|
120
132
|
ai_review/libs/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
|
-
ai_review/libs/http/client.py,sha256=
|
|
133
|
+
ai_review/libs/http/client.py,sha256=NML5xbbZEnnH0F6eF8wMtLZo2IykTSCohoi_lY3ZjVE,476
|
|
122
134
|
ai_review/libs/http/handlers.py,sha256=k1VvCIFjLzfH3qQ--aj4CZVgbU0oj78sYStMBrxo_Ek,1040
|
|
123
135
|
ai_review/libs/http/paginate.py,sha256=yAryDaUkQd-wojXOaak9HyicT-QZwx3L49AJlUEins4,1305
|
|
124
136
|
ai_review/libs/http/event_hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -142,7 +154,7 @@ ai_review/prompts/default_system_inline_reply.md,sha256=OhWQ5PZ-QFFgVVfmrsXEmvNA
|
|
|
142
154
|
ai_review/prompts/default_system_summary.md,sha256=unEJ09G925TKqvjkTFKgl3g2AXT9GICe8kxTO50QhRg,224
|
|
143
155
|
ai_review/prompts/default_system_summary_reply.md,sha256=qGc_qQtVUpmj_gOw-6dhL2gz6saSA__9UOcS0jAjBD0,687
|
|
144
156
|
ai_review/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
ai_review/resources/pricing.yaml,sha256=
|
|
157
|
+
ai_review/resources/pricing.yaml,sha256=HokxKrL2fgwiMBI-Kh7VuX5jVuYYbywP4HCPX9JQwdg,1607
|
|
146
158
|
ai_review/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
159
|
ai_review/services/artifacts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
148
160
|
ai_review/services/artifacts/schema.py,sha256=o4dqG5LFCdAQY3wjRF5rImANe-X20g4zX_bCIKiHLSk,291
|
|
@@ -220,11 +232,14 @@ ai_review/services/review/runner/summary.py,sha256=KfQkfw_sqyvKnsi2-eD2YLfjfpOMa
|
|
|
220
232
|
ai_review/services/review/runner/summary_reply.py,sha256=8YWMhw4dNjFgxTTgxyb6yLh-CkK_4AtfP36eD0DV4nY,3683
|
|
221
233
|
ai_review/services/review/runner/types.py,sha256=lZJCiCAHnedXqYBIvnb8A0HzOQd3GEPWC_wu_mk46KY,113
|
|
222
234
|
ai_review/services/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
|
-
ai_review/services/vcs/factory.py,sha256=
|
|
235
|
+
ai_review/services/vcs/factory.py,sha256=E0BuOh4ZqTF56HVfC9YuGMkZ41_5eYMv2Ypqo-n-wwE,1079
|
|
224
236
|
ai_review/services/vcs/types.py,sha256=LemhQ4LAGlOdwMSF-HlYIo7taSRu4494YQ0Rp2PBgcg,3169
|
|
225
|
-
ai_review/services/vcs/
|
|
226
|
-
ai_review/services/vcs/
|
|
227
|
-
ai_review/services/vcs/
|
|
237
|
+
ai_review/services/vcs/bitbucket_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
238
|
+
ai_review/services/vcs/bitbucket_cloud/adapter.py,sha256=AhvcdqmwOVjhr327Sm_WxMakgjtmkk2DSpEIJwet4u4,944
|
|
239
|
+
ai_review/services/vcs/bitbucket_cloud/client.py,sha256=ypQ6uQc6ZFQo5eibrvW4TqU37JtgIXzB4FgnUuN76ac,10875
|
|
240
|
+
ai_review/services/vcs/bitbucket_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
241
|
+
ai_review/services/vcs/bitbucket_server/adapter.py,sha256=HNfy2g5zHH3YxsGsdvXkcW4_4u5C6XXoEpw_smWWJWc,885
|
|
242
|
+
ai_review/services/vcs/bitbucket_server/client.py,sha256=GissxYMHiPvLBLiatXNwb0dSegiz_hSYwWbY-LnDD_k,10874
|
|
228
243
|
ai_review/services/vcs/gitea/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
229
244
|
ai_review/services/vcs/gitea/adapter.py,sha256=DxzcXReKTGHkw4DCJa8X3Mnczcg9hqx6sIAQYY-8HAI,784
|
|
230
245
|
ai_review/services/vcs/gitea/client.py,sha256=A2qpuk5kiPyeaPt-hYv0PcC_VlshMHhycED2nmB9bOE,5776
|
|
@@ -237,7 +252,8 @@ ai_review/services/vcs/gitlab/client.py,sha256=Dal_GeOAIdJzOQ2dRX7fm1E9p02no9_8s
|
|
|
237
252
|
ai_review/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
238
253
|
ai_review/tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
239
254
|
ai_review/tests/fixtures/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
240
|
-
ai_review/tests/fixtures/clients/
|
|
255
|
+
ai_review/tests/fixtures/clients/bitbucket_cloud.py,sha256=UvJh4Rsjdm3zI3EnGErAdlK7pqxSaZXDV6TPyjBJdZI,7558
|
|
256
|
+
ai_review/tests/fixtures/clients/bitbucket_server.py,sha256=EAIQawgckp3VzZF3hz1WTAILzdX0bUJ_EdjVbSkZ7uk,9237
|
|
241
257
|
ai_review/tests/fixtures/clients/claude.py,sha256=6ldJlSSea0zsZV0hRDMi9mqWm0hWT3mp_ROwG_sVU1c,2203
|
|
242
258
|
ai_review/tests/fixtures/clients/gemini.py,sha256=zhLJhm49keKEBCPOf_pLu8_zCatsKKAWM4-gXOhaXeM,2429
|
|
243
259
|
ai_review/tests/fixtures/clients/gitea.py,sha256=WQLbOyFTqqtVQGHuLFgk9qANYS03eeCdY6dtN3a7fIE,4965
|
|
@@ -280,9 +296,12 @@ ai_review/tests/suites/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
280
296
|
ai_review/tests/suites/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
281
297
|
ai_review/tests/suites/cli/test_main.py,sha256=_h2wvZAryfhearOJbbBA8bbAhiYwjY88qk3qyTA4JCk,2218
|
|
282
298
|
ai_review/tests/suites/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
283
|
-
ai_review/tests/suites/clients/
|
|
284
|
-
ai_review/tests/suites/clients/
|
|
285
|
-
ai_review/tests/suites/clients/
|
|
299
|
+
ai_review/tests/suites/clients/bitbucket_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
300
|
+
ai_review/tests/suites/clients/bitbucket_cloud/test_client.py,sha256=_brrkJoH816IAcR7xZm48HOguyZHUGUloDtma6WVQus,656
|
|
301
|
+
ai_review/tests/suites/clients/bitbucket_cloud/test_tools.py,sha256=Fd4Ianf24jLROnxbpB1wWGhh6WQ5ISb1MDtD6YJEq20,947
|
|
302
|
+
ai_review/tests/suites/clients/bitbucket_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
303
|
+
ai_review/tests/suites/clients/bitbucket_server/test_client.py,sha256=ojwfZnDx9HkDEKLo2rm_Z7ns34b5e-k_gHHkPz9rbUA,694
|
|
304
|
+
ai_review/tests/suites/clients/bitbucket_server/test_tools.py,sha256=sGLjT0g1gPiHGWzABP9mEKl7EbOUFR5YM5RkZW1wAyE,1370
|
|
286
305
|
ai_review/tests/suites/clients/claude/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
287
306
|
ai_review/tests/suites/clients/claude/test_client.py,sha256=jLGqK7lzYc8LjJO-3HjBtLqCdg-ubw-xZ4EvFeFGRhY,404
|
|
288
307
|
ai_review/tests/suites/clients/claude/test_schema.py,sha256=MUZXvEROgLNpUVHfCsH5D3ruJPQwTx0OgeT3_BRVjgI,1671
|
|
@@ -387,10 +406,13 @@ ai_review/tests/suites/services/review/runner/test_inline_reply.py,sha256=Q3gsOd
|
|
|
387
406
|
ai_review/tests/suites/services/review/runner/test_summary.py,sha256=VLIcKffScWSaxUztYHNLAsNUMGiJQWn7j_Le8Zcrizo,3974
|
|
388
407
|
ai_review/tests/suites/services/review/runner/test_summary_reply.py,sha256=UExBEkWh-EG0akVchgLdnnpcd7HFqEnDyMAVbFY_rtU,4576
|
|
389
408
|
ai_review/tests/suites/services/vcs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
390
|
-
ai_review/tests/suites/services/vcs/test_factory.py,sha256=
|
|
391
|
-
ai_review/tests/suites/services/vcs/
|
|
392
|
-
ai_review/tests/suites/services/vcs/
|
|
393
|
-
ai_review/tests/suites/services/vcs/
|
|
409
|
+
ai_review/tests/suites/services/vcs/test_factory.py,sha256=mbpt9G3rlGFSvtwzB2UCzCXWNOjqKe1zKDO6_-b-QCg,1751
|
|
410
|
+
ai_review/tests/suites/services/vcs/bitbucket_cloud/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
411
|
+
ai_review/tests/suites/services/vcs/bitbucket_cloud/test_adapter.py,sha256=F-UiXjPZ-IW08PYwjEesX0ttDN36KgIEeX4BrSqYKWY,3888
|
|
412
|
+
ai_review/tests/suites/services/vcs/bitbucket_cloud/test_client.py,sha256=oPlF1XWY9b_A4PTtQDIXQUNP4AjoE8XWJpMbJD9WdbM,8276
|
|
413
|
+
ai_review/tests/suites/services/vcs/bitbucket_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
414
|
+
ai_review/tests/suites/services/vcs/bitbucket_server/test_adapter.py,sha256=i5uIX3MKv4fP8wfaUrDhmxpCVJDkaYNrDt8l7g2Tyu0,3569
|
|
415
|
+
ai_review/tests/suites/services/vcs/bitbucket_server/test_client.py,sha256=0XtEUGgFUeO7JOoGhFAhZn4-ZqeW3MVVTDqUfIEcIl8,8165
|
|
394
416
|
ai_review/tests/suites/services/vcs/gitea/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
395
417
|
ai_review/tests/suites/services/vcs/gitea/test_adapter.py,sha256=7UPsbDQhn99obPZZ2fKnLE3_h9uoY_ujMD0WbHGAegY,1782
|
|
396
418
|
ai_review/tests/suites/services/vcs/gitea/test_client.py,sha256=bUrc7QpqIgyehzYW4Yr5ewzNRzGAfvX2DQmx01GdYYo,3449
|
|
@@ -400,9 +422,9 @@ ai_review/tests/suites/services/vcs/github/test_client.py,sha256=mNt1bA6aVU3REsJ
|
|
|
400
422
|
ai_review/tests/suites/services/vcs/gitlab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
401
423
|
ai_review/tests/suites/services/vcs/gitlab/test_adapter.py,sha256=BYBP2g1AKF_jCSJYJj16pW7M_6PprwD9reYEpdw3StU,4340
|
|
402
424
|
ai_review/tests/suites/services/vcs/gitlab/test_client.py,sha256=dnI-YxYADmVF2GS9rp6-JPkcqsn4sN8Fjbe4MkeYMaE,8476
|
|
403
|
-
xai_review-0.
|
|
404
|
-
xai_review-0.
|
|
405
|
-
xai_review-0.
|
|
406
|
-
xai_review-0.
|
|
407
|
-
xai_review-0.
|
|
408
|
-
xai_review-0.
|
|
425
|
+
xai_review-0.38.0.dist-info/licenses/LICENSE,sha256=p-v8m7Kmz4KKc7PcvsGiGEmCw9AiSXY4_ylOPy_u--Y,11343
|
|
426
|
+
xai_review-0.38.0.dist-info/METADATA,sha256=uprb_gB3hKk09s_VwXhmIVRcC3N2nYsG74BSFxRn9Vk,25959
|
|
427
|
+
xai_review-0.38.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
428
|
+
xai_review-0.38.0.dist-info/entry_points.txt,sha256=JyC5URanMi5io5P_PXQf7H_I1OGIpk5cZQhaPQ0g4Zs,53
|
|
429
|
+
xai_review-0.38.0.dist-info/top_level.txt,sha256=sTsZbfzLoqvRZKdKa-BcxWvjlHdrpbeJ6DrGY0EuR0E,10
|
|
430
|
+
xai_review-0.38.0.dist-info/RECORD,,
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel, Field, ConfigDict
|
|
2
|
-
|
|
3
|
-
from ai_review.clients.bitbucket.pr.schema.user import BitbucketUserSchema
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class BitbucketCommentContentSchema(BaseModel):
|
|
7
|
-
raw: str
|
|
8
|
-
html: str | None = None
|
|
9
|
-
markup: str | None = None
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class BitbucketCommentInlineSchema(BaseModel):
|
|
13
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
14
|
-
|
|
15
|
-
path: str
|
|
16
|
-
to_line: int | None = Field(alias="to", default=None)
|
|
17
|
-
from_line: int | None = Field(alias="from", default=None)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class BitbucketCommentParentSchema(BaseModel):
|
|
21
|
-
id: int
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class BitbucketPRCommentSchema(BaseModel):
|
|
25
|
-
id: int
|
|
26
|
-
user: BitbucketUserSchema | None = None
|
|
27
|
-
parent: BitbucketCommentParentSchema | None = None
|
|
28
|
-
inline: BitbucketCommentInlineSchema | None = None
|
|
29
|
-
content: BitbucketCommentContentSchema
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class BitbucketGetPRCommentsQuerySchema(BaseModel):
|
|
33
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
34
|
-
|
|
35
|
-
page: int = 1
|
|
36
|
-
page_len: int = Field(alias="pagelen", default=100)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class BitbucketGetPRCommentsResponseSchema(BaseModel):
|
|
40
|
-
model_config = ConfigDict(populate_by_name=True)
|
|
41
|
-
|
|
42
|
-
size: int
|
|
43
|
-
page: int | None = None
|
|
44
|
-
next: str | None = None
|
|
45
|
-
values: list[BitbucketPRCommentSchema]
|
|
46
|
-
page_len: int = Field(alias="pagelen")
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
class BitbucketParentSchema(BaseModel):
|
|
50
|
-
id: int
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
class BitbucketCreatePRCommentRequestSchema(BaseModel):
|
|
54
|
-
parent: BitbucketParentSchema | None = None
|
|
55
|
-
inline: BitbucketCommentInlineSchema | None = None
|
|
56
|
-
content: BitbucketCommentContentSchema
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class BitbucketCreatePRCommentResponseSchema(BaseModel):
|
|
60
|
-
id: int
|
|
61
|
-
parent: BitbucketParentSchema | None = None
|
|
62
|
-
inline: BitbucketCommentInlineSchema | None = None
|
|
63
|
-
content: BitbucketCommentContentSchema
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel, Field
|
|
2
|
-
|
|
3
|
-
from ai_review.clients.bitbucket.pr.schema.user import BitbucketUserSchema
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class BitbucketBranchSchema(BaseModel):
|
|
7
|
-
name: str
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class BitbucketCommitSchema(BaseModel):
|
|
11
|
-
hash: str
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class BitbucketRepositorySchema(BaseModel):
|
|
15
|
-
uuid: str
|
|
16
|
-
full_name: str
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class BitbucketPRLocationSchema(BaseModel):
|
|
20
|
-
branch: BitbucketBranchSchema
|
|
21
|
-
commit: BitbucketCommitSchema
|
|
22
|
-
repository: BitbucketRepositorySchema
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class BitbucketGetPRResponseSchema(BaseModel):
|
|
26
|
-
id: int
|
|
27
|
-
title: str
|
|
28
|
-
description: str | None = None
|
|
29
|
-
state: str
|
|
30
|
-
author: BitbucketUserSchema
|
|
31
|
-
source: BitbucketPRLocationSchema
|
|
32
|
-
destination: BitbucketPRLocationSchema
|
|
33
|
-
reviewers: list[BitbucketUserSchema] = Field(default_factory=list)
|
|
34
|
-
participants: list[BitbucketUserSchema] = Field(default_factory=list)
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
from typing import Protocol
|
|
2
|
-
|
|
3
|
-
from ai_review.clients.bitbucket.pr.schema.comments import (
|
|
4
|
-
BitbucketGetPRCommentsResponseSchema,
|
|
5
|
-
BitbucketCreatePRCommentRequestSchema,
|
|
6
|
-
BitbucketCreatePRCommentResponseSchema,
|
|
7
|
-
)
|
|
8
|
-
from ai_review.clients.bitbucket.pr.schema.files import BitbucketGetPRFilesResponseSchema
|
|
9
|
-
from ai_review.clients.bitbucket.pr.schema.pull_request import BitbucketGetPRResponseSchema
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class BitbucketPullRequestsHTTPClientProtocol(Protocol):
|
|
13
|
-
async def get_pull_request(
|
|
14
|
-
self,
|
|
15
|
-
workspace: str,
|
|
16
|
-
repo_slug: str,
|
|
17
|
-
pull_request_id: str
|
|
18
|
-
) -> BitbucketGetPRResponseSchema:
|
|
19
|
-
...
|
|
20
|
-
|
|
21
|
-
async def get_files(
|
|
22
|
-
self,
|
|
23
|
-
workspace: str,
|
|
24
|
-
repo_slug: str,
|
|
25
|
-
pull_request_id: str
|
|
26
|
-
) -> BitbucketGetPRFilesResponseSchema:
|
|
27
|
-
...
|
|
28
|
-
|
|
29
|
-
async def get_comments(
|
|
30
|
-
self,
|
|
31
|
-
workspace: str,
|
|
32
|
-
repo_slug: str,
|
|
33
|
-
pull_request_id: str
|
|
34
|
-
) -> BitbucketGetPRCommentsResponseSchema:
|
|
35
|
-
...
|
|
36
|
-
|
|
37
|
-
async def create_comment(
|
|
38
|
-
self,
|
|
39
|
-
workspace: str,
|
|
40
|
-
repo_slug: str,
|
|
41
|
-
pull_request_id: str,
|
|
42
|
-
request: BitbucketCreatePRCommentRequestSchema,
|
|
43
|
-
) -> BitbucketCreatePRCommentResponseSchema:
|
|
44
|
-
...
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from pydantic import HttpUrl, SecretStr
|
|
3
|
-
|
|
4
|
-
from ai_review.clients.bitbucket.pr.schema.comments import (
|
|
5
|
-
BitbucketPRCommentSchema,
|
|
6
|
-
BitbucketCommentContentSchema,
|
|
7
|
-
BitbucketCommentInlineSchema,
|
|
8
|
-
BitbucketGetPRCommentsResponseSchema,
|
|
9
|
-
BitbucketCreatePRCommentRequestSchema,
|
|
10
|
-
BitbucketCreatePRCommentResponseSchema,
|
|
11
|
-
)
|
|
12
|
-
from ai_review.clients.bitbucket.pr.schema.files import (
|
|
13
|
-
BitbucketGetPRFilesResponseSchema,
|
|
14
|
-
BitbucketPRFileSchema,
|
|
15
|
-
BitbucketPRFilePathSchema,
|
|
16
|
-
)
|
|
17
|
-
from ai_review.clients.bitbucket.pr.schema.pull_request import (
|
|
18
|
-
BitbucketUserSchema,
|
|
19
|
-
BitbucketBranchSchema,
|
|
20
|
-
BitbucketCommitSchema,
|
|
21
|
-
BitbucketRepositorySchema,
|
|
22
|
-
BitbucketPRLocationSchema,
|
|
23
|
-
BitbucketGetPRResponseSchema,
|
|
24
|
-
)
|
|
25
|
-
from ai_review.clients.bitbucket.pr.types import BitbucketPullRequestsHTTPClientProtocol
|
|
26
|
-
from ai_review.config import settings
|
|
27
|
-
from ai_review.libs.config.vcs.base import BitbucketVCSConfig
|
|
28
|
-
from ai_review.libs.config.vcs.bitbucket import BitbucketPipelineConfig, BitbucketHTTPClientConfig
|
|
29
|
-
from ai_review.libs.constants.vcs_provider import VCSProvider
|
|
30
|
-
from ai_review.services.vcs.bitbucket.client import BitbucketVCSClient
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class FakeBitbucketPullRequestsHTTPClient(BitbucketPullRequestsHTTPClientProtocol):
|
|
34
|
-
def __init__(self):
|
|
35
|
-
self.calls: list[tuple[str, dict]] = []
|
|
36
|
-
|
|
37
|
-
async def get_pull_request(
|
|
38
|
-
self,
|
|
39
|
-
workspace: str,
|
|
40
|
-
repo_slug: str,
|
|
41
|
-
pull_request_id: str
|
|
42
|
-
) -> BitbucketGetPRResponseSchema:
|
|
43
|
-
self.calls.append(
|
|
44
|
-
(
|
|
45
|
-
"get_pull_request",
|
|
46
|
-
{"workspace": workspace, "repo_slug": repo_slug, "pull_request_id": pull_request_id}
|
|
47
|
-
)
|
|
48
|
-
)
|
|
49
|
-
return BitbucketGetPRResponseSchema(
|
|
50
|
-
id=1,
|
|
51
|
-
title="Fake Bitbucket PR",
|
|
52
|
-
description="This is a fake PR for testing",
|
|
53
|
-
state="OPEN",
|
|
54
|
-
author=BitbucketUserSchema(uuid="u1", display_name="Tester", nickname="tester"),
|
|
55
|
-
source=BitbucketPRLocationSchema(
|
|
56
|
-
commit=BitbucketCommitSchema(hash="def456"),
|
|
57
|
-
branch=BitbucketBranchSchema(name="feature/test"),
|
|
58
|
-
repository=BitbucketRepositorySchema(uuid="r1", full_name="workspace/repo"),
|
|
59
|
-
),
|
|
60
|
-
destination=BitbucketPRLocationSchema(
|
|
61
|
-
commit=BitbucketCommitSchema(hash="abc123"),
|
|
62
|
-
branch=BitbucketBranchSchema(name="main"),
|
|
63
|
-
repository=BitbucketRepositorySchema(uuid="r1", full_name="workspace/repo"),
|
|
64
|
-
),
|
|
65
|
-
reviewers=[BitbucketUserSchema(uuid="u2", display_name="Reviewer", nickname="reviewer")],
|
|
66
|
-
participants=[BitbucketUserSchema(uuid="u3", display_name="Participant", nickname="participant")],
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
async def get_files(
|
|
70
|
-
self,
|
|
71
|
-
workspace: str,
|
|
72
|
-
repo_slug: str,
|
|
73
|
-
pull_request_id: str
|
|
74
|
-
) -> BitbucketGetPRFilesResponseSchema:
|
|
75
|
-
self.calls.append(
|
|
76
|
-
(
|
|
77
|
-
"get_files",
|
|
78
|
-
{"workspace": workspace, "repo_slug": repo_slug, "pull_request_id": pull_request_id}
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
return BitbucketGetPRFilesResponseSchema(
|
|
82
|
-
size=2,
|
|
83
|
-
page=1,
|
|
84
|
-
page_len=100,
|
|
85
|
-
next=None,
|
|
86
|
-
values=[
|
|
87
|
-
BitbucketPRFileSchema(
|
|
88
|
-
new=BitbucketPRFilePathSchema(path="app/main.py"),
|
|
89
|
-
old=None,
|
|
90
|
-
status="modified",
|
|
91
|
-
lines_added=10,
|
|
92
|
-
lines_removed=2,
|
|
93
|
-
),
|
|
94
|
-
BitbucketPRFileSchema(
|
|
95
|
-
new=BitbucketPRFilePathSchema(path="utils/helper.py"),
|
|
96
|
-
old=None,
|
|
97
|
-
status="added",
|
|
98
|
-
lines_added=5,
|
|
99
|
-
lines_removed=0,
|
|
100
|
-
),
|
|
101
|
-
],
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
async def get_comments(
|
|
105
|
-
self,
|
|
106
|
-
workspace: str,
|
|
107
|
-
repo_slug: str,
|
|
108
|
-
pull_request_id: str
|
|
109
|
-
) -> BitbucketGetPRCommentsResponseSchema:
|
|
110
|
-
self.calls.append(
|
|
111
|
-
(
|
|
112
|
-
"get_comments",
|
|
113
|
-
{"workspace": workspace, "repo_slug": repo_slug, "pull_request_id": pull_request_id}
|
|
114
|
-
)
|
|
115
|
-
)
|
|
116
|
-
return BitbucketGetPRCommentsResponseSchema(
|
|
117
|
-
size=2,
|
|
118
|
-
page=1,
|
|
119
|
-
next=None,
|
|
120
|
-
values=[
|
|
121
|
-
BitbucketPRCommentSchema(
|
|
122
|
-
id=1,
|
|
123
|
-
inline=None,
|
|
124
|
-
content=BitbucketCommentContentSchema(raw="General comment"),
|
|
125
|
-
),
|
|
126
|
-
BitbucketPRCommentSchema(
|
|
127
|
-
id=2,
|
|
128
|
-
inline=BitbucketCommentInlineSchema(path="file.py", to_line=5),
|
|
129
|
-
content=BitbucketCommentContentSchema(raw="Inline comment"),
|
|
130
|
-
),
|
|
131
|
-
],
|
|
132
|
-
page_len=100,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
async def create_comment(
|
|
136
|
-
self,
|
|
137
|
-
workspace: str,
|
|
138
|
-
repo_slug: str,
|
|
139
|
-
pull_request_id: str,
|
|
140
|
-
request: BitbucketCreatePRCommentRequestSchema
|
|
141
|
-
) -> BitbucketCreatePRCommentResponseSchema:
|
|
142
|
-
self.calls.append(
|
|
143
|
-
(
|
|
144
|
-
"create_comment",
|
|
145
|
-
{
|
|
146
|
-
"workspace": workspace,
|
|
147
|
-
"repo_slug": repo_slug,
|
|
148
|
-
"pull_request_id": pull_request_id,
|
|
149
|
-
**request.model_dump(by_alias=True)
|
|
150
|
-
}
|
|
151
|
-
)
|
|
152
|
-
)
|
|
153
|
-
return BitbucketCreatePRCommentResponseSchema(
|
|
154
|
-
id=10,
|
|
155
|
-
content=request.content,
|
|
156
|
-
inline=request.inline,
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
class FakeBitbucketHTTPClient:
|
|
161
|
-
def __init__(self, pull_requests_client: BitbucketPullRequestsHTTPClientProtocol):
|
|
162
|
-
self.pr = pull_requests_client
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
@pytest.fixture
|
|
166
|
-
def fake_bitbucket_pull_requests_http_client() -> FakeBitbucketPullRequestsHTTPClient:
|
|
167
|
-
return FakeBitbucketPullRequestsHTTPClient()
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
@pytest.fixture
|
|
171
|
-
def fake_bitbucket_http_client(
|
|
172
|
-
fake_bitbucket_pull_requests_http_client: FakeBitbucketPullRequestsHTTPClient
|
|
173
|
-
) -> FakeBitbucketHTTPClient:
|
|
174
|
-
return FakeBitbucketHTTPClient(pull_requests_client=fake_bitbucket_pull_requests_http_client)
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
@pytest.fixture
|
|
178
|
-
def bitbucket_vcs_client(
|
|
179
|
-
monkeypatch: pytest.MonkeyPatch,
|
|
180
|
-
fake_bitbucket_http_client: FakeBitbucketHTTPClient
|
|
181
|
-
) -> BitbucketVCSClient:
|
|
182
|
-
monkeypatch.setattr(
|
|
183
|
-
"ai_review.services.vcs.bitbucket.client.get_bitbucket_http_client",
|
|
184
|
-
lambda: fake_bitbucket_http_client,
|
|
185
|
-
)
|
|
186
|
-
return BitbucketVCSClient()
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
@pytest.fixture
|
|
190
|
-
def bitbucket_http_client_config(monkeypatch: pytest.MonkeyPatch):
|
|
191
|
-
fake_config = BitbucketVCSConfig(
|
|
192
|
-
provider=VCSProvider.BITBUCKET,
|
|
193
|
-
pipeline=BitbucketPipelineConfig(
|
|
194
|
-
workspace="workspace",
|
|
195
|
-
repo_slug="repo",
|
|
196
|
-
pull_request_id="123",
|
|
197
|
-
),
|
|
198
|
-
http_client=BitbucketHTTPClientConfig(
|
|
199
|
-
timeout=10,
|
|
200
|
-
api_url=HttpUrl("https://api.bitbucket.org/2.0"),
|
|
201
|
-
api_token=SecretStr("fake-token"),
|
|
202
|
-
)
|
|
203
|
-
)
|
|
204
|
-
monkeypatch.setattr(settings, "vcs", fake_config)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from httpx import AsyncClient
|
|
3
|
-
|
|
4
|
-
from ai_review.clients.bitbucket.client import get_bitbucket_http_client, BitbucketHTTPClient
|
|
5
|
-
from ai_review.clients.bitbucket.pr.client import BitbucketPullRequestsHTTPClient
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@pytest.mark.usefixtures("bitbucket_http_client_config")
|
|
9
|
-
def test_get_bitbucket_http_client_builds_ok():
|
|
10
|
-
bitbucket_http_client = get_bitbucket_http_client()
|
|
11
|
-
|
|
12
|
-
assert isinstance(bitbucket_http_client, BitbucketHTTPClient)
|
|
13
|
-
assert isinstance(bitbucket_http_client.pr, BitbucketPullRequestsHTTPClient)
|
|
14
|
-
assert isinstance(bitbucket_http_client.pr.client, AsyncClient)
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
from httpx import Response, Request
|
|
2
|
-
|
|
3
|
-
from ai_review.clients.bitbucket.tools import bitbucket_has_next_page
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def make_response(data: dict) -> Response:
|
|
7
|
-
return Response(
|
|
8
|
-
json=data,
|
|
9
|
-
request=Request("GET", "http://bitbucket.test"),
|
|
10
|
-
status_code=200,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def test_bitbucket_has_next_page_true():
|
|
15
|
-
resp = make_response({"next": "https://api.bitbucket.org/2.0/repositories/test/repo?page=2"})
|
|
16
|
-
assert bitbucket_has_next_page(resp) is True
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def test_bitbucket_has_next_page_false_none():
|
|
20
|
-
resp = make_response({"next": None})
|
|
21
|
-
assert bitbucket_has_next_page(resp) is False
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def test_bitbucket_has_next_page_false_missing():
|
|
25
|
-
resp = make_response({})
|
|
26
|
-
assert bitbucket_has_next_page(resp) is False
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def test_bitbucket_has_next_page_false_empty_string():
|
|
30
|
-
resp = make_response({"next": ""})
|
|
31
|
-
assert bitbucket_has_next_page(resp) is False
|