Skip to content

Commit

Permalink
修复新增label无颜色的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Meekdai committed Jul 25, 2024
1 parent 1efcf27 commit 72df000
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Gmeek.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ def __init__(self,options):
for label in self.repo.get_labels():
self.labelColorDict[label.name]='#'+label.color
print(self.labelColorDict)

self.defaultConfig()

def cleanFile(self):
workspace_path = os.environ.get('GITHUB_WORKSPACE')
if os.path.exists(workspace_path+"/"+self.backup_dir):
Expand Down Expand Up @@ -86,7 +85,6 @@ def cleanFile(self):
else:
print("static does not exist")


def defaultConfig(self):
dconfig={"singlePage":[],"startSite":"","filingNum":"","onePageListNum":15,"commentLabelColor":"#006b75","yearColorList":["#bc4c00", "#0969da", "#1f883d", "#A333D0"],"i18n":"CN","themeMode":"manual","dayTheme":"light","nightTheme":"dark","urlMode":"pinyin","script":"","style":"","head":"","indexScript":"","indexStyle":"","bottomText":"","showPostSource":1,"iconList":{},"UTC":+8,"rssSplit":"sentence","exlink":{},"needComment":1,"allHead":""}
config=json.loads(open('config.json', 'r', encoding='utf-8').read())
Expand Down Expand Up @@ -465,8 +463,8 @@ def createFileName(self,issue,useLabel=False):
oldBlogBase=json.loads(f.read())
for key, value in oldBlogBase.items():
blog.blogBase[key] = value

f.close()
blog.blogBase["labelColorDict"]=blog.labelColorDict
blog.runOne(options.issue_number)

listFile=open("blogBase.json","w")
Expand Down

0 comments on commit 72df000

Please sign in to comment.