2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 09:02:10 +00:00

Merge branch 'staging' into v5.x

This commit is contained in:
Ankush Menat 2022-08-28 18:48:20 +05:30
commit aef5587744
2 changed files with 3 additions and 2 deletions

View File

@ -17,3 +17,4 @@
{{ user }} ALL = (root) NOPASSWD: {{ certbot }}
Defaults:{{ user }} !requiretty

View File

@ -181,11 +181,11 @@ def get_required_deps(org, name, branch, deps="hooks.py"):
import base64
git_api_url = f"https://api.github.com/repos/{org}/{name}/contents/{name}/{deps}"
params = {"branch": branch or "develop"}
params = {"ref": branch or "develop"}
res = requests.get(url=git_api_url, params=params).json()
if "message" in res:
git_url = f"https://raw.githubusercontent.com/{org}/{name}/{params['branch']}/{deps}"
git_url = f"https://raw.githubusercontent.com/{org}/{name}/{params['ref']}/{name}/{deps}"
return requests.get(git_url).text
return base64.decodebytes(res["content"].encode()).decode()