File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 6
6
# import requests
7
7
import os
8
8
9
-
9
+ # API Docs: https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#create-a-review-for-a-pull-request
10
10
11
11
def default_matcher ( entry , tool_name = '' ) -> dict :
12
12
@@ -277,6 +277,15 @@ def pylint_matcher( entry ) -> dict:
277
277
)
278
278
279
279
280
+ if len (api_body ['comments' ]) == 0 :
281
+
282
+ api_body .update ({
283
+ 'event' : 'APPROVE'
284
+ })
285
+ del api_body ['body' ]
286
+
287
+
288
+
280
289
data = {
281
290
"pull_request" : pull_request ,
282
291
"api_body" : api_body
Original file line number Diff line number Diff line change 18
18
ansible.builtin.set_fact :
19
19
git_api_url : " {{ payload.repository.url }}"
20
20
when : >
21
- git_api_url == ""
21
+ git_api_url == ""
22
22
23
23
24
24
- name : Set var gitea_replace_url if empty
25
25
ansible.builtin.set_fact :
26
26
gitea_replace_url : " {{ payload.repository.url }}"
27
27
when : >
28
- gitea_replace_url == ""
28
+ gitea_replace_url == ""
29
29
30
30
31
31
- name : Set required Facts
You can’t perform that action at this time.
0 commit comments