aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/code_snippets.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/exts/info/code_snippets.py b/bot/exts/info/code_snippets.py
index 4c8de05fc..e149b5637 100644
--- a/bot/exts/info/code_snippets.py
+++ b/bot/exts/info/code_snippets.py
@@ -127,8 +127,11 @@ class CodeSnippets(Cog):
enc_repo = quote_plus(repo)
# Searches the GitLab API for the specified branch
- branches = await self._fetch_response(f'https://api.github.com/repos/{repo}/branches', 'json')
- tags = await self._fetch_response(f'https://api.github.com/repos/{repo}/tags', 'json')
+ branches = await self._fetch_response(
+ f'https://gitlab.com/api/v4/projects/{enc_repo}/repository/branches',
+ 'json'
+ )
+ tags = await self._fetch_response(f'https://gitlab.com/api/v4/projects/{enc_repo}/repository/tags', 'json')
refs = branches + tags
ref, file_path = self._find_ref(path, refs)
enc_ref = quote_plus(ref)