File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,17 @@ def get_kst_time(commit_time):
13
13
kst_time = utc_time .replace (tzinfo = pytz .utc ).astimezone (KST )
14
14
return kst_time .strftime ('%Y-%m-%d %H:%M' )
15
15
16
+ # ๋ ํฌ์งํ ๋ฆฌ๊ฐ public์ธ์ง ํ์ธํ๋ ํจ์
17
+ def is_public_repo (user_repo ):
18
+ url = f"https://api.github.com/repos/{ user_repo } "
19
+ response = requests .get (url )
20
+ if response .status_code == 200 :
21
+ return response .json ().get ('private' , False ) == False
22
+ return False
23
+
16
24
# GitHub API ์๋ต์์ ํ์ผ ๋ชฉ๋ก์ ์ฒ๋ฆฌํ๋ ์ฝ๋
17
25
def get_data (user_repo ):
18
- token = os .getenv ('GITHUB_TOKEN' ) # GITHUB_TOKEN ํ๊ฒฝ ๋ณ์์์ ํ ํฐ์ ๊ฐ์ ธ์ต๋๋ค.
26
+ token = os .getenv ('GITHUB_TOKEN' ) # GITHUB_TOKEN ํ๊ฒฝ ๋ณ์์์ ํ ํฐ ๊ฐ์ ธ์ค๊ธฐ
19
27
headers = {}
20
28
21
29
# private ๋ ํฌ์ผ ๋๋ง Authorization ํค๋ ์ถ๊ฐ
You canโt perform that action at this time.
0 commit comments