mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-22 21:07:57 +00:00
fix(forgejo): encode repository paths and branch refs
This commit is contained in:
parent
7d680d5930
commit
c39385546e
1 changed files with 4 additions and 2 deletions
|
|
@ -158,7 +158,8 @@ async def get_branches(
|
||||||
|
|
||||||
branches = await get(
|
branches = await get(
|
||||||
app_settings,
|
app_settings,
|
||||||
f"/api/v1/repos/{owner}/{repo}/branches?limit={limit}&page={page}",
|
f"/api/v1/repos/{quote(owner, safe='')}/{quote(repo, safe='')}/branches?"
|
||||||
|
f"{httpx.QueryParams({'limit': limit, 'page': page})}",
|
||||||
access_token,
|
access_token,
|
||||||
)
|
)
|
||||||
if not branches:
|
if not branches:
|
||||||
|
|
@ -191,7 +192,8 @@ async def get_commits(
|
||||||
"""
|
"""
|
||||||
commits = await get(
|
commits = await get(
|
||||||
app_settings,
|
app_settings,
|
||||||
f"/api/v1/repos/{owner}/{repo}/commits?sha={ref}&limit={limit}&page={page}",
|
f"/api/v1/repos/{quote(owner, safe='')}/{quote(repo, safe='')}/commits?"
|
||||||
|
f"{httpx.QueryParams({'sha': ref, 'limit': limit, 'page': page})}",
|
||||||
access_token,
|
access_token,
|
||||||
)
|
)
|
||||||
if not commits:
|
if not commits:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue