diff --git a/action.yml b/action.yml index 9886c91..d96d619 100644 --- a/action.yml +++ b/action.yml @@ -71,4 +71,8 @@ inputs: required: false IDENTIFIERS: description: 'Dictionary of custom identifiers' - required: false \ No newline at end of file + required: false + GITHUB_URL: + description: 'Base url of GitHub API' + required: false + default: ${{ github.api_url }} \ No newline at end of file diff --git a/main.py b/main.py index c6219c6..11c2645 100644 --- a/main.py +++ b/main.py @@ -43,10 +43,11 @@ class Issue(object): class GitHubClient(object): """Basic client for getting the last diff and creating/closing issues.""" existing_issues = [] - base_url = 'https://api.github.com/' - repos_url = f'{base_url}repos/' def __init__(self): + self.github_url = os.getenv('INPUT_GITHUB_URL') + self.base_url = f'{self.github_url}/' + self.repos_url = f'{self.base_url}repos/' self.repo = os.getenv('INPUT_REPO') self.before = os.getenv('INPUT_BEFORE') self.sha = os.getenv('INPUT_SHA')