diff options
author | 2022-07-12 09:25:05 +0400 | |
---|---|---|
committer | 2022-07-12 14:54:34 +0400 | |
commit | fe4def75dc0a316789cec068a574713a2b2af92f (patch) | |
tree | bec3f37fc390219b6ea616c48240841a9f2d39d7 /pydis_site/apps/api/urls.py | |
parent | Merge pull request #740 from python-discord/update-django (diff) |
Add GitHub Artifact API View
Adds an API route to fetch GitHub build artifacts through a GitHub app.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/api/urls.py')
-rw-r--r-- | pydis_site/apps/api/urls.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pydis_site/apps/api/urls.py b/pydis_site/apps/api/urls.py index 1e564b29..2757f176 100644 --- a/pydis_site/apps/api/urls.py +++ b/pydis_site/apps/api/urls.py @@ -1,7 +1,7 @@ from django.urls import include, path from rest_framework.routers import DefaultRouter -from .views import HealthcheckView, RulesView +from .views import GitHubArtifactsView, HealthcheckView, RulesView from .viewsets import ( AocAccountLinkViewSet, AocCompletionistBlockViewSet, @@ -86,5 +86,10 @@ urlpatterns = ( # from django_hosts.resolvers import reverse path('bot/', include((bot_router.urls, 'api'), namespace='bot')), path('healthcheck', HealthcheckView.as_view(), name='healthcheck'), - path('rules', RulesView.as_view(), name='rules') + path('rules', RulesView.as_view(), name='rules'), + path( + 'github/artifact/<str:owner>/<str:repo>/<str:sha>/<str:action_name>/<str:artifact_name>', + GitHubArtifactsView.as_view(), + name="github-artifacts" + ), ) |