Skip to content

Commit

Permalink
Merge branch 'main' into gcalendar-connector
Browse files Browse the repository at this point in the history
# Conflicts:
#	confluence/provider/client.py
  • Loading branch information
EugeneP committed Dec 4, 2023
2 parents e4e8a29 + 9cb2bd7 commit 4a12673
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 74 deletions.
75 changes: 5 additions & 70 deletions _template_/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions confluence/provider/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@


class ConfluenceClient:
def __init__(self, url, user, password, space, search_limit=10):
def __init__(self, url, user, api_token, space, search_limit=10):
try:
self.confluence = Confluence(
url=url,
username=user,
password=password,
password=api_token,
)
self.space = space
self.search_limit = search_limit
Expand Down Expand Up @@ -77,9 +77,11 @@ def get_client():

assert (url := app.config.get("PRODUCT_URL")), "CONFLUENCE_PRODUCT_URL must be set"
assert (user := app.config.get("USER")), "CONFLUENCE_USER must be set"
assert (password := app.config.get("API_TOKEN")), "CONFLUENCE_API_TOKEN must be set"
assert (
api_token := app.config.get("API_TOKEN")
), "CONFLUENCE_API_TOKEN must be set"
assert (space := app.config.get("SPACE_NAME")), "CONFLUENCE_SPACE_NAME must be set"
search_limit = app.config.get("SEARCH_LIMIT", 10)
client = ConfluenceClient(url, user, password, space, search_limit)
client = ConfluenceClient(url, user, api_token, space, search_limit)

return client

0 comments on commit 4a12673

Please sign in to comment.