Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions contribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import os,sys,platform,base64,time

# Intializing the Variables
# Hashed token
BOT_TOKEN = "Z2l0aHViX3BhdF8xMUFYS0pGVFkwU2VhNW9ORjRyN0E5X053WDAwTVBUUU5RVUNTa2lNNlFYZHJET1lZa3B4cTIxS091YVhkeVhUYmRQMzdVUkZaRWpFMjlRRXM5"
BOT_TOKEN = os.environ.get('CONCORE_BOT_TOKEN', '')
BOT_ACCOUNT = 'concore-bot' #bot account name
REPO_NAME = 'concore-studies' #study repo name
UPSTREAM_ACCOUNT = 'ControlCore-Project' #upstream account name
Expand Down Expand Up @@ -113,7 +112,7 @@ def decode_token(encoded_token):
PR_BODY = f"Study Name: {STUDY_NAME}\nAuthor Name: {AUTHOR_NAME}" if PR_BODY == "#" else PR_BODY
DIR_PATH = STUDY_NAME
DIR_PATH = DIR_PATH.replace(" ","_")
g = Github(decode_token(BOT_TOKEN))
g = Github(BOT_TOKEN)
repo = g.get_user(BOT_ACCOUNT).get_repo(REPO_NAME)
upstream_repo = g.get_repo(f'{UPSTREAM_ACCOUNT}/{REPO_NAME}') #controlcore-Project/concore-studies
base_ref = upstream_repo.get_branch(repo.default_branch)
Expand Down