Merge branch 'varunsridharan-main'
This commit is contained in:
commit
2e0abb332d
|
@ -49,7 +49,7 @@ def gistsSource():
|
|||
"uid" : gitea_uid,
|
||||
}
|
||||
|
||||
status = giteaCreateRepo(m,isPrivate)
|
||||
status = giteaCreateRepo(m,isPrivate,False)
|
||||
|
||||
if status != 'failed':
|
||||
try:
|
||||
|
@ -72,4 +72,4 @@ def gistsSource():
|
|||
log(repo)
|
||||
|
||||
log(False)
|
||||
saveLocalCache()
|
||||
saveLocalCache()
|
||||
|
|
|
@ -49,7 +49,7 @@ def gistsStared():
|
|||
"uid" : gitea_uid,
|
||||
}
|
||||
|
||||
status = giteaCreateRepo(m,isPrivate)
|
||||
status = giteaCreateRepo(m,isPrivate,False)
|
||||
|
||||
if status != 'failed':
|
||||
try:
|
||||
|
@ -72,4 +72,4 @@ def gistsStared():
|
|||
log(repo)
|
||||
|
||||
log(False)
|
||||
saveLocalCache()
|
||||
saveLocalCache()
|
||||
|
|
|
@ -69,11 +69,18 @@ def giteaSetRepoStar(owner,repo_name):
|
|||
else:
|
||||
print(' ---> Error : Unable To Star The Repository')
|
||||
|
||||
def giteaCreateRepo(data,isPrivate):
|
||||
def giteaCreateRepo(data,isPrivate,isRepository):
|
||||
if isPrivate:
|
||||
data["auth_username"] = config['github']['username']
|
||||
data["auth_password"] = "{0}".format(config['github']['accesstoken'])
|
||||
|
||||
if isRepository:
|
||||
data["service"] = 'github'
|
||||
data["wiki"] = True
|
||||
data["auth_token"] = "{0}".format(config['github']['accesstoken'])
|
||||
|
||||
|
||||
|
||||
jsonstring = json.dumps(data)
|
||||
r = session.post(giteaHost('repos/migrate'), data=jsonstring)
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ def repositoryForked():
|
|||
|
||||
if repo.description: m["description"] = repo.description[:255]
|
||||
|
||||
status = giteaCreateRepo(m,repo.private)
|
||||
status = giteaCreateRepo(m,repo.private,True)
|
||||
if status != 'failed':
|
||||
try:
|
||||
if status != 'exists':
|
||||
|
|
|
@ -43,7 +43,7 @@ def repositorySource():
|
|||
|
||||
if repo.description: m["description"] = repo.description[:255]
|
||||
|
||||
status = giteaCreateRepo(m,repo.private)
|
||||
status = giteaCreateRepo(m,repo.private,True)
|
||||
if status != 'failed':
|
||||
try:
|
||||
if status != 'exists':
|
||||
|
|
|
@ -39,7 +39,7 @@ def repositoryStared():
|
|||
"uid" : gitea_uid,
|
||||
}
|
||||
|
||||
status = giteaCreateRepo(m,repo.private)
|
||||
status = giteaCreateRepo(m,repo.private,True)
|
||||
if status != 'failed':
|
||||
try:
|
||||
if status != 'exists':
|
||||
|
@ -63,4 +63,4 @@ def repositoryStared():
|
|||
time.sleep(5)
|
||||
else:
|
||||
log(False)
|
||||
saveLocalCache()
|
||||
saveLocalCache()
|
||||
|
|
Reference in a new issue