Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
access token move to const
Browse files Browse the repository at this point in the history
  • Loading branch information
FeeiCN committed Sep 18, 2017
1 parent 7b4a229 commit 26a565a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cobra/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:license: MIT, see LICENSE for more details.
:copyright: Copyright (c) 2017 Feei. All rights reserved
"""
access_token = 'YzA4YTVhOTA1ZGExYjg5YTc1ZmI4NmE3MmM3ZjUyNzg2NmRmZmRlNA=='

# Match-Mode
mm_find_extension = 'find-extension'
Expand Down
3 changes: 2 additions & 1 deletion cobra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from .exceptions import PickupException, NotExistException, AuthFailedException
from .log import logger
from .pickup import Git, NotExistError, AuthError, Decompress
from .const import access_token

TARGET_MODE_GIT = 'git'
TARGET_MODE_FILE = 'file'
Expand Down Expand Up @@ -547,7 +548,7 @@ def create_github_issue(err_msg, exc_msg):
"title": "[AUTO] Unhandled exception (#{k})".format(k=key),
"body": "## Environment\n```\n{err}\n```\n## Traceback\n```\n{exc}\n```\n".format(err=err_msg, exc=exc_msg)
}
headers = {"Authorization": "token {t}".format(t=base64.b64decode("YzA4YTVhOTA1ZGExYjg5YTc1ZmI4NmE3MmM3ZjUyNzg2NmRmZmRlNA=="))}
headers = {"Authorization": "token {t}".format(t=base64.b64decode(access_token))}
resp = requests.post(url=url, data=json.dumps(data), headers=headers)
content = resp.text
except Exception as ex:
Expand Down

0 comments on commit 26a565a

Please sign in to comment.