Skip to content

Commit

Permalink
last pylint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
humanendpoint committed Oct 23, 2023
1 parent eee33db commit f93ba3e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def process_directory(envs, links):


def update_confluence_page(envs, config, links):
"""
Update a Confluence page
"""
update_url = f"https://{envs['cloud']}.atlassian.net/wiki/api/v2/pages/{config['page_id']}"
headers = {"Content-Type": "application/json"}
update_content = {
Expand All @@ -103,14 +106,14 @@ def update_confluence_page(envs, config, links):
headers=headers,
timeout=10,
)

if update_response.status_code == 200:
updated_link = (
f"https://{envs['cloud']}.atlassian.net/wiki"
+ update_response.json()["_links"]["webui"]
)
links.append(f"{config['page_title']}: {updated_link}")
print(f"{config['page_title']}: Content update successful. New version: {config['new_version']}")
print(f"{config['page_title']}: Success. New version: {config['new_version']}")
else:
print(f"{config['page_title']}: Failed. HTTP status code: {update_response.status_code}")

Expand Down

0 comments on commit f93ba3e

Please sign in to comment.