api: client default URLs should come from stack.toml not string literals #137
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Python API clients have hardcoded default base URLs:
api.clients.gitea—http://gitea:3000/api/v1api.clients.woodpecker—http://woodpecker-server:8000/apiapi.clients.rustfs—http://rustfs:9000api.auth.provision— duplicates of above (lines 212, 300)api.auth.deploy— duplicates (lines 73, 95)Fix
Add a
[services]section tostack.toml:Clients read from conf with env var override:
Remove duplicated defaults from auth modules — they should call the clients.
Files
stack.tomlsrc/api/clients/gitea/client.pysrc/api/clients/woodpecker/client.pysrc/api/clients/rustfs/client.pysrc/api/auth/provision.pysrc/api/auth/deploy.py