Skip to content

Commit

Permalink
chore: Edit problem id to number
Browse files Browse the repository at this point in the history
  • Loading branch information
gogumaC committed Jun 9, 2024
1 parent c15cff8 commit 18ad8a1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .git-commit-template.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@


# id: 문제 id를 숫자로 작성
# number: 문제 id를 숫자로 작성
# categories : 해당 문제의 유형을 ,로 구분하여 작성
# tags : 해당 문제의 태그를 ,로 구분하여 작성
# time : 해당 문제 풀이에 걸린 시간을 분단위 숫자로 작성
# try : 해당 문제에 몇번의 시도를 했는지 숫자로 작성
# help: 해당 문제에 외부의 도움을 받았는지 true/false로 작성
# url : 해당 문제의 url을 작성
id:
categories:
tags:
number:
categories: []
tags: []
time:
try:
help: false
Expand Down
22 changes: 18 additions & 4 deletions requestNotionUpload.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@

class Problem:

def __init__(self,title,id,lan,platform,level):
def __init__(self,title,lan,platform,level):
self.title=title
self.id=id
self.lan=lan
self.platform=platform
self.level=level

def __str__(self):
return f"Title: {self.title}, ID: {self.id}, Language: {self.lan}, Platform: {self.platform}, Level: {self.level}"
return f"Title: {self.title}, Language: {self.lan}, Platform: {self.platform}, Level: {self.level}"

def request_notion_update(body):

Expand All @@ -42,7 +41,6 @@ def parse_commit_msg(msg,pattern):
_, platform, level, title,lans = match.groups()
problem=Problem(
title=title,
id=id,
lan=[lan for lan in lans.split('_')],
platform=platform,
level=level
Expand Down Expand Up @@ -88,6 +86,22 @@ def parse_commit_msg(msg,pattern):
COMMIT_MSG = os.environ['COMMIT_MSG'] if os.environ.get('COMMIT_MSG') != None else local_commit_msg
PATTERN=os.environ['COMMIT_PATTERN'] if os.environ.get('COMMIT_PATTERN')!=None else local_pattern

COMMIT_MSG='''solve(BOJ): LV1_no additional info2_py
# number: 문제 번호를 숫자로 작성d
# categories : 해당 문제의 유형을 ,로 구분하여 작성
# tags : 해당 문제의 태그를 ,로 구분하여 작성
# time : 해당 문제 풀이에 걸린 시간을 분단위 숫자로 작성
# try : 해당 문제에 몇번의 시도를 했는지 숫자로 작성
# help: 해당 문제에 외부의 도움을 받았는지 true/false로 작성
# url : 해당 문제의 url을 작성
number:
categories: []
tags: []
time:
try:
help: false
url:'''
print("commit : ",COMMIT_MSG,"\n")

body=parse_commit_msg(COMMIT_MSG,PATTERN)
Expand Down

0 comments on commit 18ad8a1

Please sign in to comment.