Add dashboard logging

This commit is contained in:
dsk-minchulahn
2023-08-16 14:00:44 +09:00
parent 72287e3a71
commit 79f66bcf3b
4 changed files with 43 additions and 6 deletions

View File

@@ -5,6 +5,8 @@ repo = Repo('.')
file_path = './version.json'
repo.config_writer().set_value('user', 'name', 'dsk-minchulahn').release()
repo.config_writer().set_value('user', 'email', 'minchulahn@ex-em.com').release()
api_url = 'https://api.github.com/repos/cloudmoa/sample-app/releases'
github_token = os.environ.get('GITHUB_TOKEN')
def get_datasaker():
return json.load(open(file_path, 'r'))['datasaker']
@@ -19,8 +21,6 @@ def get_tags():
return repo.tags
def get_github_releases():
api_url = 'https://api.github.com/repos/cloudmoa/dsk-version-management/releases'
github_token = os.environ.get('GITHUB_TOKEN')
headers = {'Authorization': f'Bearer {github_token}', 'Accept': 'application/vnd.github.v3+json'}
releases = requests.get(api_url, headers=headers).json()
return releases
@@ -51,8 +51,6 @@ def git_push(commit_message, extended_description):
repo.git.push(force=False)
def publish_release(selected_tag, release_title, release_describe):
api_url = 'https://api.github.com/repos/cloudmoa/sample-app/releases'
github_token = os.environ.get('GITHUB_TOKEN')
headers = {'Authorization': f'Bearer {github_token}', 'Accept': 'application/vnd.github.v3+json'}
release_data = {
'tag_name': selected_tag,