File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ def refresh_data(branch="master"):
181
181
182
182
try :
183
183
sha = requests .get (
184
- 'https://api.github.com/repos/org-id/register/branches/' + branch
184
+ 'https://api.github.com/repos/org-id/register/branches/' + branch ,
185
+ auth = (settings .GITHUB_USER , settings .GITHUB_API_TOKEN ) if settings .GITHUB_USER and settings .GITHUB_API_TOKEN else ''
185
186
).json ()['commit' ]['sha' ]
186
187
using_github = True
187
188
if sha == git_commit_ref .get (branch ,'' ):
Original file line number Diff line number Diff line change 32
32
SECRET_KEY = (str , secret_key ),
33
33
DB_NAME = (str , os .path .join (BASE_DIR , 'db.sqlite3' )),
34
34
LOCAL_DATA = (bool , False ),
35
+ GITHUB_USER = (str , '' ),
36
+ GITHUB_API_TOKEN = (str , '' ),
35
37
)
36
38
37
39
PIWIK = {
40
42
}
41
43
42
44
LOCAL_DATA = env ('LOCAL_DATA' )
45
+ GITHUB_USER = env ('GITHUB_USER' )
46
+ GITHUB_API_TOKEN = env ('GITHUB_API_TOKEN' )
43
47
44
48
# Quick-start development settings - unsuitable for production
45
49
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
You can’t perform that action at this time.
0 commit comments