mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
Bitbucket server
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
"authentication": {
|
"authentication": {
|
||||||
"type": "jwt"
|
"type": "jwt"
|
||||||
},
|
},
|
||||||
"baseUrl": "https://53e2-212-199-118-78.ngrok-free.app",
|
"baseUrl": "base_url",
|
||||||
"lifecycle": {
|
"lifecycle": {
|
||||||
"installed": "/installed",
|
"installed": "/installed",
|
||||||
"uninstalled": "/uninstalled"
|
"uninstalled": "/uninstalled"
|
||||||
|
@ -54,9 +54,11 @@ async def get_bearer_token(shared_secret: str, client_key: str):
|
|||||||
|
|
||||||
@router.get("/")
|
@router.get("/")
|
||||||
async def handle_manifest(request: Request, response: Response):
|
async def handle_manifest(request: Request, response: Response):
|
||||||
manifest = open("atlassian-connect.json", "rt").read()
|
cur_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
manifest = open(os.path.join(cur_dir, "atlassian-connect.json"), "rt").read()
|
||||||
try:
|
try:
|
||||||
manifest = manifest.replace("app_key", get_settings().bitbucket.app_key)
|
manifest = manifest.replace("app_key", get_settings().bitbucket.app_key)
|
||||||
|
manifest = manifest.replace("base_url", get_settings().bitbucket.base_url)
|
||||||
except:
|
except:
|
||||||
logging.error("Failed to replace api_key in Bitbucket manifest, trying to continue")
|
logging.error("Failed to replace api_key in Bitbucket manifest, trying to continue")
|
||||||
manifest_obj = json.loads(manifest)
|
manifest_obj = json.loads(manifest)
|
||||||
|
Reference in New Issue
Block a user