mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-22 22:06:43 +00:00
Merge pull request #139 from KevinMSampson/support-gh-enterprise-server
Add GITHUB_URL to support GHES
This commit is contained in:
commit
eaaa34a3c7
@ -72,3 +72,7 @@ inputs:
|
|||||||
IDENTIFIERS:
|
IDENTIFIERS:
|
||||||
description: 'Dictionary of custom identifiers'
|
description: 'Dictionary of custom identifiers'
|
||||||
required: false
|
required: false
|
||||||
|
GITHUB_URL:
|
||||||
|
description: 'Base url of GitHub API'
|
||||||
|
required: false
|
||||||
|
default: ${{ github.api_url }}
|
||||||
5
main.py
5
main.py
@ -43,10 +43,11 @@ class Issue(object):
|
|||||||
class GitHubClient(object):
|
class GitHubClient(object):
|
||||||
"""Basic client for getting the last diff and creating/closing issues."""
|
"""Basic client for getting the last diff and creating/closing issues."""
|
||||||
existing_issues = []
|
existing_issues = []
|
||||||
base_url = 'https://api.github.com/'
|
|
||||||
repos_url = f'{base_url}repos/'
|
|
||||||
|
|
||||||
def __init__(self):
|
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.repo = os.getenv('INPUT_REPO')
|
||||||
self.before = os.getenv('INPUT_BEFORE')
|
self.before = os.getenv('INPUT_BEFORE')
|
||||||
self.sha = os.getenv('INPUT_SHA')
|
self.sha = os.getenv('INPUT_SHA')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user