Skip to content

Commit aca1288

Browse files
committed
Add activitypub tests ( test_person_create_note, test_person_follow_purl , test_person_delete_note , ... )
Add a django post-save signal to clone the git repo when it's created Fix ap_collection error Signed-off-by: ziad <ziadhany2016@gmail.com>
1 parent e2db557 commit aca1288

11 files changed

Lines changed: 489 additions & 168 deletions

File tree

purl_sync/purl_sync/urls.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
#
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
3+
# VulnerableCode is a trademark of nexB Inc.
4+
# SPDX-License-Identifier: Apache-2.0
5+
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6+
# See https://github.com/nexB/vulnerablecode for support or download.
7+
# See https://aboutcode.org for more information about nexB OSS projects.
8+
#
19
from django.conf import settings
210
from django.conf.urls.static import static
311
from django.contrib import admin
@@ -28,6 +36,7 @@
2836
from review.views import comment_vote
2937
from review.views import fetch_repository_file
3038
from review.views import redirect_repository
39+
from review.views import redirect_vulnerability
3140
from review.views import review_vote
3241

3342
urlpatterns = [
@@ -53,7 +62,10 @@
5362
path("notes/<uuid:note_id>/votes/", comment_vote, name="comment-votes"),
5463
path("repository/<uuid:repository_id>/", redirect_repository, name="repository-page"),
5564
path("repository/<uuid:repository_id>/fetch", fetch_repository_file, name="repository-fetch"),
56-
path("notes/<uuid:uuid>/", NoteView.as_view(), name="note-page"),
65+
path(
66+
"vulnerability/<uuid:vulnerability_id>/", redirect_vulnerability, name="vulnerability-page"
67+
),
68+
path("notes/<uuid:uuid>", NoteView.as_view(), name="note-page"),
5769
path("/api/v0/users/@<str:username>/outbox/", PersonOutbox.as_view(), name="user-outbox"),
5870
path("/api/v0/users/@<str:username>/outbox/", PersonInbox.as_view(), name="user-inbox"),
5971
path("/api/v0/purls/@<path:purl_string>/inbox/", PurlInbox.as_view(), name="purl-inbox"),
@@ -72,5 +84,6 @@
7284
path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")),
7385
]
7486

87+
7588
if settings.DEBUG:
7689
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 commit comments

Comments
 (0)