Change Tool Repository authentication scope (#1378)

This commit adds a new command for adding custom PyPI indexes
credentials to the project. This was changed because credentials are now
user-scoped instead of organization.
This commit is contained in:
Vini Brasil
2024-10-01 18:44:08 -03:00
committed by GitHub
parent 5113bca025
commit 0e11b33f6e
9 changed files with 220 additions and 150 deletions

View File

@@ -27,6 +27,9 @@ class PlusAPI:
url = urljoin(self.base_url, endpoint)
return requests.request(method, url, headers=self.headers, **kwargs)
def login_to_tool_repository(self):
return self._make_request("POST", f"{self.TOOLS_RESOURCE}/login")
def get_tool(self, handle: str):
return self._make_request("GET", f"{self.TOOLS_RESOURCE}/{handle}")