forge-tools/frg/forgejo/browser.py
Marc Cataford 5cbe845e6e
feat: initial push
fix: broken import get_context -> get_git_context
2024-11-02 15:00:48 -04:00

13 lines
348 B
Python

import subprocess
def _open_browser(url: str):
subprocess.run(["xdg-open", url])
def create_pull_request_via_web(*, head: str, host: str, repo: str, owner: str):
_open_browser(f"{host}/{owner}/{repo}/compare/main...{head}")
def view_repository_via_web(*, host: str, repo: str, owner: str):
_open_browser(f"{host}/{owner}/{repo}")