feat: expand MCP server tools for PR and label management, add helper CLI scripts

Closes #7
This commit is contained in:
2026-06-24 00:14:47 -04:00
parent 8b1c115647
commit 82fcd5a4bc
17 changed files with 901 additions and 5 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env python3
import os
import sys
# Auto-execute using the project's local virtual environment Python
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
venv_python = os.path.join(PROJECT_ROOT, "venv", "bin", "python3")
if os.path.exists(venv_python) and sys.executable != venv_python:
os.execv(venv_python, [venv_python] + sys.argv)
from gitea_auth import get_auth_header, api_request
def main():
host = 'gitea.prgs.cc'
org = 'Scaled-Tech-Consulting'
repo = 'Gitea-Tools'
print(f"Checking repo: {host}/{org}/{repo}...")
try:
auth = get_auth_header(host)
if not auth:
print(f" No auth header found for {host}")
return
url = f"https://{host}/api/v1/repos/{org}/{repo}/pulls?state=open"
prs = api_request("GET", url, auth)
if not prs:
print(" No open pull requests.")
for pr in prs:
print(f" PR #{pr['number']}: {pr['title']}")
print(f" Branch: {pr['head']['ref']} -> {pr['base']['ref']}")
print(f" URL: {pr['html_url']}")
print(f" Mergeable: {pr.get('mergeable')}")
except Exception as e:
print(f" Error: {e}")
if __name__ == '__main__':
main()