minor fix
This commit is contained in:
parent
8d9b94a12d
commit
49f78b8be2
|
@ -29,6 +29,9 @@ __provider_git = {
|
|||
'repo_url' : 'web_url', },
|
||||
}
|
||||
|
||||
|
||||
HEADERS = { "accept": "application/json", "content-type": "application/json" }
|
||||
|
||||
@click.group()
|
||||
def cli():
|
||||
pass
|
||||
|
@ -149,7 +152,6 @@ def list_repo(provider_git, team_org, verbose):
|
|||
def list_repo_token(domain, team_org,
|
||||
access_token, verbose):
|
||||
HOST = "https://%s/api/v1" % (domain)
|
||||
HEADERS = { "accept": "application/json", "content-type": "application/json" }
|
||||
HEADERS["Authorization"] = "token %s" % (access_token)
|
||||
Gitea.listRepo(HOST, team_org, HEADERS, verbose)
|
||||
|
||||
|
@ -170,7 +172,6 @@ def mirror_repo(domain, provider_git, team_org_source,
|
|||
HOST = "https://%s/api/v1" % (domain)
|
||||
MIGRATE_URI = "/repos/migrate"
|
||||
ENDPOINT_MIGRATE = "%s%s" % (HOST, MIGRATE_URI)
|
||||
HEADERS = { "accept": "application/json", "content-type": "application/json" }
|
||||
HEADERS["Authorization"] = "token %s" % (access_token)
|
||||
count = 0
|
||||
for repo in repos:
|
||||
|
@ -189,7 +190,6 @@ def get_branch_repo_gitea(domain, team_org, access_token,
|
|||
HOST = "https://%s/api/v1" % (domain)
|
||||
BRANCH_URI = "/repos/%s" % (team_org)
|
||||
ENDPOINT_BRANCH = "%s%s" % (HOST, BRANCH_URI)
|
||||
HEADERS = { "accept": "application/json", "content-type": "application/json" }
|
||||
HEADERS["Authorization"] = "token %s" % (access_token)
|
||||
repos = Gitea.listRepo(HOST, team_org, HEADERS)
|
||||
for repo in repos:
|
||||
|
|
Loading…
Reference in New Issue