Skip to content

Commit

Permalink
Merge branch 'contribute_action' of https://github.com/parteekcoder/c…
Browse files Browse the repository at this point in the history
…oncore into contribute_action
  • Loading branch information
parteekcoder committed Aug 4, 2023
2 parents 63b9475 + 415452f commit 5db7186
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def runWorkflow(repo,upstream_repo):
if openPR==None:
workflow_runned = repo.get_workflow(id_or_name="pull_request.yml").create_dispatch(ref=BRANCH_NAME,inputs={'title':f"[BOT]: {PR_TITLE}",'body':PR_BODY,'upstreamRepo':UPSTREAM_ACCOUNT,'botRepo':BOT_ACCOUNT,'repo':REPO_NAME})
if not workflow_runned:
print("Some error occured.Please try after some time")
print("Some error occured. Please try after some time")
exit(0)
else:
printPRStatus(upstream_repo)
else:
print("Successfully uploaded all files,your example is in waiting.Please wait for us to accept it.",end="")
print("Successfully uploaded all files, your example is in waiting.Please wait for us to accept it.",end="")
printPR(openPR)

def printPRStatus(upstream_repo):
Expand All @@ -88,7 +88,7 @@ def printPRStatus(upstream_repo):
time.sleep(4)
print(f'Check your example here https://github.com/{UPSTREAM_ACCOUNT}/{REPO_NAME}/pulls/{max_num+1}',end="")
except Exception as e:
print("Your example successfully uploaded but unable to fetch status.Please try again")
print("Your example successfully uploaded but unable to fetch status. Please try again")


def isImageFile(filename):
Expand Down Expand Up @@ -133,7 +133,7 @@ def decode_token(encoded_token):
DIR_PATH = DIR_PATH.replace(" ","_")
is_present = any(branch.name == BRANCH_NAME for branch in branches)
except Exception as e:
print("Some error occured.Authentication failed",end="")
print("Authentication failed", end="")
exit(0)


Expand All @@ -145,7 +145,7 @@ def decode_token(encoded_token):
# Get current branch
branch = repo.get_branch(branch=BRANCH_NAME)
except Exception as e:
print("Not able to create study for you.Please try again after some time",end="")
print("Not able to create study for you. Please try again after some time", end="")
exit(0)


Expand Down

0 comments on commit 5db7186

Please sign in to comment.