Skip to content

Commit e75c359

Browse files
author
Hamel Husain
authored
Merge pull request #31 from fastai/GHE
Allow different GH_HOST
2 parents 378bbe9 + 703c83c commit e75c359

File tree

3 files changed

+38
-22
lines changed

3 files changed

+38
-22
lines changed

00_core.ipynb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"from urllib.request import Request\n",
3636
"from urllib.error import HTTPError\n",
3737
"from datetime import datetime,timedelta\n",
38-
"from pprint import pprint"
38+
"from pprint import pprint\n",
39+
"import os"
3940
]
4041
},
4142
{
@@ -55,10 +56,17 @@
5556
"outputs": [],
5657
"source": [
5758
"#export\n",
58-
"GH_HOST = \"https://api.github.com\"\n",
59+
"GH_HOST = os.getenv('GH_HOST', \"https://api.github.com\")\n",
5960
"_DOC_URL = 'https://docs.github.com/'"
6061
]
6162
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {},
66+
"source": [
67+
"You can set an environment variable named `GH_HOST` to override the default of `https://api.github.com` incase you are running [GitHub Enterprise](https://github.com/enterprise)(GHE). However, this library has not been tested on GHE, so proceed at your own risk."
68+
]
69+
},
6270
{
6371
"cell_type": "code",
6472
"execution_count": null,

0 commit comments

Comments
 (0)