File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# SPDX-FileCopyrightText: 2022 Pen-Yuan Hsing
44# SPDX-License-Identifier: AGPL-3.0-or-later
55
6+ # Python Standard Library imports
7+ import os
8+ import sys
9+
10+ # Internal imports
611import oshminer .GitHub
712import oshminer .Wikifactory
813
14+ # Set Wikifactory base URL for projects
15+ # Looks for the `WIF_BASE_URL` environment variable, and if not found, default to:
16+ # `wikifactory.com`
17+ # See:
18+ # https://www.twilio.com/blog/environment-variables-python
19+ WIF_BASE_URL : str = os .environ .get ("WIF_BASE_URL" , "wikifactory.com" )
20+ print (f"Wikifactory base URL: { WIF_BASE_URL } " , file = sys .stderr )
21+
922# Supported hosting platforms as a dictionary of their domains, which are
1023# matched to names of internal functions that construct API requests to the
1124# associated platforms.
12- # `repo_urls` need to include one of these domains.
25+ # `repo_urls` in the request body needs to include one of these domains.
1326supported_domains : dict = {
1427 "github.com" : oshminer .GitHub .make_GitHub_request ,
15- "wikifactory.com" : oshminer .Wikifactory .make_Wikifactory_request
28+ WIF_BASE_URL : oshminer .Wikifactory .make_Wikifactory_request
1629}
You can’t perform that action at this time.
0 commit comments