Skip to content

Commit

Permalink
Release Notes Creataion Script Updates (#121)
Browse files Browse the repository at this point in the history
Signed-off-by: prudvi-danda <[email protected]>
  • Loading branch information
prudvi-hpe authored and GitHub Enterprise committed Jan 23, 2025
1 parent f303450 commit 0fa1d10
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
UNDERSCORE = '_'
NL = '\n'
PIPE = '|'
H2 = '##'
H1 = '#'
EMPTY_CONTENT = '<br>N/A<br>'
WHITE_SPACE = ' '
MARKDOWN_SAFE_NL ='<br>'
Expand Down Expand Up @@ -92,10 +92,10 @@
UNDERSCORE : f'{ESCAPE}{UNDERSCORE}' }

SUMMARY_TEMPLATE = '''
Date of Release: {}
{} {}
Date of Release: {}
{}'''

RELEASE_NOTE_CONTENTS = [ NS_NEW_FEATURES,
Expand Down Expand Up @@ -131,7 +131,7 @@ def commandline_args() -> tuple:


def generate_heading(fd : TextIOWrapper, key : str) -> int:
return fd.write(f'{NL}{H2} {HEADINGS[key]}{NL}')
return fd.write(f'{NL}{H1} {HEADINGS[key]}{NL}')


def generate_markdown_table(fd : TextIOWrapper, col : str) -> int:
Expand All @@ -154,7 +154,7 @@ def generate_markdown_summary(fd : TextIOWrapper, contents : list) -> int:
except:
date_str = contents[0]

content = SUMMARY_TEMPLATE.format(date_str, H2, HEADINGS[NS_SUMMARY], contents[1])
content = SUMMARY_TEMPLATE.format(H1, HEADINGS[NS_SUMMARY],date_str, contents[1])

return generate_markdown_content(fd, content)

Expand Down Expand Up @@ -233,6 +233,7 @@ def query(file_name : str) -> list:
user, password, cacert = commandline_args()
query_uri = JIRA_HOST + JIRA_API_ENDPOINT + QUERY_FILTERS[file_name]
query_resp = requests.get(query_uri, verify = cacert, auth = HTTPBasicAuth(user, password))
query_resp.raise_for_status()
query_resp_text = json.loads(query_resp.text)

return [[safe_query_result(i, x) for x in QUERY_FIELDS[file_name]]
Expand Down

0 comments on commit 0fa1d10

Please sign in to comment.