Skip to content

Commit 5f9a23a

Browse files
committed
fix(pr): log dbg msg if fail to create
1 parent ed815eb commit 5f9a23a

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

main.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# @Author : BobAnkh
55
# @Github : https://github.com/BobAnkh
66
# @Date : 2020-08-06 10:48:37
7-
# @LastEditTime : 2021-12-29 09:16:06
7+
# @LastEditTime : 2021-12-29 09:26:46
88
# @Description : Main script of Github Action
99
# @Copyright 2020 BobAnkh
1010

@@ -278,10 +278,14 @@ def write_data(self, changelog):
278278
self.__pull_request).commit.sha
279279
self.__repo.create_git_ref(
280280
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)
285289
else:
286290
raise github.GithubException(e.status, e.data)
287291

0 commit comments

Comments
 (0)