File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 4
4
# @Author : BobAnkh
5
5
# @Github : https://github.com/BobAnkh
6
6
# @Date : 2020-08-06 10:48:37
7
- # @LastEditTime : 2021-12-29 09:16:06
7
+ # @LastEditTime : 2021-12-29 09:26:46
8
8
# @Description : Main script of Github Action
9
9
# @Copyright 2020 BobAnkh
10
10
@@ -278,10 +278,14 @@ def write_data(self, changelog):
278
278
self .__pull_request ).commit .sha
279
279
self .__repo .create_git_ref (
280
280
f'refs/heads/{ self .__branch } ' , new_sha )
281
- self .__repo .create_file (self .__path ,
282
- self .__commit_message ,
283
- changelog , self .__branch ,
284
- self .__author )
281
+ try :
282
+ self .__repo .create_file (self .__path ,
283
+ self .__commit_message ,
284
+ changelog , self .__branch ,
285
+ self .__author )
286
+ except github .GithubException as e :
287
+ print (f'[DEBUG] { self .__path } , { self .__commit_message } , { self .__branch } , { self .__author } ' )
288
+ raise github .GithubException (e .status , e .data )
285
289
else :
286
290
raise github .GithubException (e .status , e .data )
287
291
You can’t perform that action at this time.
0 commit comments