mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 21:30:40 +08:00
add bitbucket pipeline
This commit is contained in:
16
pr_agent/servers/bitbucket_pipeline_runner.py
Normal file
16
pr_agent/servers/bitbucket_pipeline_runner.py
Normal file
@ -0,0 +1,16 @@
|
||||
import os
|
||||
from pr_agent.agent.pr_agent import PRAgent
|
||||
import os
|
||||
from pr_agent.tools.pr_reviewer import PRReviewer
|
||||
import asyncio
|
||||
|
||||
async def run_action():
|
||||
pull_request_id = os.environ.get("BITBUCKET_PR_ID", '')
|
||||
slug = os.environ.get("BITBUCKET_REPO_SLUG", '')
|
||||
workspace = os.environ.get("BITBUCKET_WORKSPACE", '')
|
||||
if pull_request_id and slug and workspace:
|
||||
pr_url = f"https://bitbucket.org/{workspace}/{slug}/pull-requests/{pull_request_id}"
|
||||
await PRReviewer(pr_url).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(run_action())
|
Reference in New Issue
Block a user