Merge pull request #139 from KevinMSampson/support-gh-enterprise-server

Add GITHUB_URL to support GHES
This commit is contained in:
Alastair Mooney 2023-02-10 09:13:18 +00:00 committed by GitHub
commit eaaa34a3c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -71,4 +71,8 @@ inputs:
required: false
IDENTIFIERS:
description: 'Dictionary of custom identifiers'
required: false
required: false
GITHUB_URL:
description: 'Base url of GitHub API'
required: false
default: ${{ github.api_url }}

View File

@ -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')