Verified Commit 5a4d78fc authored by Sofus Rose's avatar Sofus Rose

Stopped using test token & github user. Fixed github project link.

parent 65996a98
......@@ -5,8 +5,10 @@ import json
import sys
import os, os.path
github_user = 'so-rose'
TOKEN = 'siueyrhg87w35ht8jmwfy7h5g'
#For this to work,
github_user = open('/opt/git-repos/github-user', 'r').readlines()[0].rstrip()
TOKEN = open('/opt/git-repos/token', 'r').readlines()[0].rstrip()
app = Flask(__name__)
......@@ -19,7 +21,7 @@ def foo():
if request.headers['X-Gitlab-Token'] == TOKEN :
proj_name = data['project']['name']
github_link = 'git@github.com/{0}/{1}.git'.format(github_user, proj_name)
github_link = 'git@github.com:{0}/{1}.git'.format(github_user, proj_name)
gitlab_link = data['project']['git_http_url']
repo_path = "/opt/git-repos/{}".format(proj_name)
......@@ -39,7 +41,7 @@ def foo():
gitlab.pull()
github.push()
print(github.fetch())
print(str(github.fetch()))
return "OK"
else :
......
siueyrhg87w35ht8jmwfy7h5g
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment