|
1
|
from django.urls import path |
|
2
|
|
|
3
|
from . import api_views, views |
|
4
|
|
|
5
|
app_name = "fossil" |
|
6
|
|
|
7
|
urlpatterns = [ |
|
8
|
# JSON API |
|
9
|
path("api/", api_views.api_docs, name="api_docs"), |
|
10
|
path("api/project", api_views.api_project, name="api_project"), |
|
11
|
path("api/timeline", api_views.api_timeline, name="api_timeline"), |
|
12
|
path("api/tickets", api_views.api_tickets, name="api_tickets"), |
|
13
|
# Unclaimed must be before <str:ticket_uuid> to avoid matching "unclaimed" as a UUID |
|
14
|
path("api/tickets/unclaimed", api_views.api_tickets_unclaimed, name="api_tickets_unclaimed"), |
|
15
|
path("api/tickets/<str:ticket_uuid>", api_views.api_ticket_detail, name="api_ticket_detail"), |
|
16
|
path("api/wiki", api_views.api_wiki_list, name="api_wiki_list"), |
|
17
|
path("api/wiki/<path:page_name>", api_views.api_wiki_page, name="api_wiki_page"), |
|
18
|
path("api/branches", api_views.api_branches, name="api_branches"), |
|
19
|
path("api/tags", api_views.api_tags, name="api_tags"), |
|
20
|
path("api/releases", api_views.api_releases, name="api_releases"), |
|
21
|
path("api/search", api_views.api_search, name="api_search"), |
|
22
|
# Batch API |
|
23
|
path("api/batch", api_views.api_batch, name="api_batch"), |
|
24
|
# Agent Workspaces |
|
25
|
path("api/workspaces", api_views.api_workspace_list, name="api_workspace_list"), |
|
26
|
path("api/workspaces/create", api_views.api_workspace_create, name="api_workspace_create"), |
|
27
|
path("api/workspaces/<str:workspace_name>", api_views.api_workspace_detail, name="api_workspace_detail"), |
|
28
|
path("api/workspaces/<str:workspace_name>/commit", api_views.api_workspace_commit, name="api_workspace_commit"), |
|
29
|
path("api/workspaces/<str:workspace_name>/merge", api_views.api_workspace_merge, name="api_workspace_merge"), |
|
30
|
path("api/workspaces/<str:workspace_name>/abandon", api_views.api_workspace_abandon, name="api_workspace_abandon"), |
|
31
|
# Task Claiming |
|
32
|
path("api/tickets/<str:ticket_uuid>/claim", api_views.api_ticket_claim, name="api_ticket_claim"), |
|
33
|
path("api/tickets/<str:ticket_uuid>/release", api_views.api_ticket_release, name="api_ticket_release"), |
|
34
|
path("api/tickets/<str:ticket_uuid>/submit", api_views.api_ticket_submit, name="api_ticket_submit"), |
|
35
|
# Server-Sent Events |
|
36
|
path("api/events", api_views.api_events, name="api_events"), |
|
37
|
# Code Reviews |
|
38
|
path("api/reviews", api_views.api_review_list, name="api_review_list"), |
|
39
|
path("api/reviews/create", api_views.api_review_create, name="api_review_create"), |
|
40
|
path("api/reviews/<int:review_id>", api_views.api_review_detail, name="api_review_detail"), |
|
41
|
path("api/reviews/<int:review_id>/comment", api_views.api_review_comment, name="api_review_comment"), |
|
42
|
path("api/reviews/<int:review_id>/approve", api_views.api_review_approve, name="api_review_approve"), |
|
43
|
path("api/reviews/<int:review_id>/request-changes", api_views.api_review_request_changes, name="api_review_request_changes"), |
|
44
|
path("api/reviews/<int:review_id>/merge", api_views.api_review_merge, name="api_review_merge"), |
|
45
|
# |
|
46
|
path("code/", views.code_browser, name="code"), |
|
47
|
path("code/tree/<path:dirpath>/", views.code_browser, name="code_dir"), |
|
48
|
path("code/file/<path:filepath>", views.code_file, name="code_file"), |
|
49
|
path("timeline/", views.timeline, name="timeline"), |
|
50
|
path("checkin/<str:checkin_uuid>/", views.checkin_detail, name="checkin_detail"), |
|
51
|
path("tickets/", views.ticket_list, name="tickets"), |
|
52
|
path("tickets/create/", views.ticket_create, name="ticket_create"), |
|
53
|
path("tickets/export/", views.tickets_csv, name="tickets_csv"), |
|
54
|
# Custom Ticket Fields (must be before tickets/<str:ticket_uuid>/ to avoid str match) |
|
55
|
path("tickets/fields/", views.ticket_fields_list, name="ticket_fields"), |
|
56
|
path("tickets/fields/create/", views.ticket_fields_create, name="ticket_field_create"), |
|
57
|
path("tickets/fields/<int:pk>/edit/", views.ticket_fields_edit, name="ticket_field_edit"), |
|
58
|
path("tickets/fields/<int:pk>/delete/", views.ticket_fields_delete, name="ticket_field_delete"), |
|
59
|
# Custom Ticket Reports (must be before tickets/<str:ticket_uuid>/ to avoid str match) |
|
60
|
path("tickets/reports/", views.ticket_reports_list, name="ticket_reports"), |
|
61
|
path("tickets/reports/create/", views.ticket_report_create, name="ticket_report_create"), |
|
62
|
path("tickets/reports/<int:pk>/", views.ticket_report_run, name="ticket_report_run"), |
|
63
|
path("tickets/reports/<int:pk>/edit/", views.ticket_report_edit, name="ticket_report_edit"), |
|
64
|
path("tickets/<str:ticket_uuid>/", views.ticket_detail, name="ticket_detail"), |
|
65
|
path("tickets/<str:ticket_uuid>/edit/", views.ticket_edit, name="ticket_edit"), |
|
66
|
path("tickets/<str:ticket_uuid>/comment/", views.ticket_comment, name="ticket_comment"), |
|
67
|
path("wiki/", views.wiki_list, name="wiki"), |
|
68
|
path("wiki/create/", views.wiki_create, name="wiki_create"), |
|
69
|
path("wiki/page/<path:page_name>", views.wiki_page, name="wiki_page"), |
|
70
|
path("wiki/edit/<path:page_name>", views.wiki_edit, name="wiki_edit"), |
|
71
|
path("forum/", views.forum_list, name="forum"), |
|
72
|
path("forum/create/", views.forum_create, name="forum_create"), |
|
73
|
path("forum/<str:thread_uuid>/", views.forum_thread, name="forum_thread"), |
|
74
|
path("forum/<int:post_id>/reply/", views.forum_reply, name="forum_reply"), |
|
75
|
# Webhooks |
|
76
|
path("webhooks/", views.webhook_list, name="webhooks"), |
|
77
|
path("webhooks/create/", views.webhook_create, name="webhook_create"), |
|
78
|
path("webhooks/<int:webhook_id>/edit/", views.webhook_edit, name="webhook_edit"), |
|
79
|
path("webhooks/<int:webhook_id>/delete/", views.webhook_delete, name="webhook_delete"), |
|
80
|
path("webhooks/<int:webhook_id>/deliveries/", views.webhook_deliveries, name="webhook_deliveries"), |
|
81
|
path("user/<str:username>/", views.user_activity, name="user_activity"), |
|
82
|
path("branches/", views.branch_list, name="branches"), |
|
83
|
path("tags/", views.tag_list, name="tags"), |
|
84
|
path("technotes/", views.technote_list, name="technotes"), |
|
85
|
path("technotes/create/", views.technote_create, name="technote_create"), |
|
86
|
path("technotes/<str:technote_id>/", views.technote_detail, name="technote_detail"), |
|
87
|
path("technotes/<str:technote_id>/edit/", views.technote_edit, name="technote_edit"), |
|
88
|
# Unversioned content |
|
89
|
path("files/", views.unversioned_list, name="unversioned"), |
|
90
|
path("files/upload/", views.unversioned_upload, name="unversioned_upload"), |
|
91
|
path("files/download/<path:filename>", views.unversioned_download, name="unversioned_download"), |
|
92
|
path("search/", views.search, name="search"), |
|
93
|
path("stats/", views.repo_stats, name="stats"), |
|
94
|
path("compare/", views.compare_checkins, name="compare"), |
|
95
|
path("settings/", views.repo_settings, name="repo_settings"), |
|
96
|
path("sync/", views.sync_pull, name="sync"), |
|
97
|
path("sync/git/", views.git_mirror_config, name="git_mirror"), |
|
98
|
path("sync/git/<int:mirror_id>/edit/", views.git_mirror_config, name="git_mirror_edit"), |
|
99
|
path("sync/git/<int:mirror_id>/delete/", views.git_mirror_delete, name="git_mirror_delete"), |
|
100
|
path("sync/git/<int:mirror_id>/run/", views.git_mirror_run, name="git_mirror_run"), |
|
101
|
path("sync/git/connect/github/", views.oauth_github_start, name="oauth_github"), |
|
102
|
path("sync/git/connect/gitlab/", views.oauth_gitlab_start, name="oauth_gitlab"), |
|
103
|
# Per-project OAuth callbacks removed — global /oauth/callback/ handlers |
|
104
|
# enforce nonce/state validation. Keeping these would bypass that check. |
|
105
|
path("code/raw/<path:filepath>", views.code_raw, name="code_raw"), |
|
106
|
path("code/blame/<path:filepath>", views.code_blame, name="code_blame"), |
|
107
|
path("code/history/<path:filepath>", views.file_history, name="file_history"), |
|
108
|
path("watch/", views.toggle_watch, name="toggle_watch"), |
|
109
|
path("timeline/rss/", views.timeline_rss, name="timeline_rss"), |
|
110
|
path("docs/", views.fossil_docs, name="docs"), |
|
111
|
path("docs/<path:doc_path>", views.fossil_doc_page, name="doc_page"), |
|
112
|
path("xfer", views.fossil_xfer, name="xfer"), |
|
113
|
# Releases |
|
114
|
path("releases/", views.release_list, name="releases"), |
|
115
|
path("releases/create/", views.release_create, name="release_create"), |
|
116
|
path("releases/<str:tag_name>/", views.release_detail, name="release_detail"), |
|
117
|
path("releases/<str:tag_name>/edit/", views.release_edit, name="release_edit"), |
|
118
|
path("releases/<str:tag_name>/delete/", views.release_delete, name="release_delete"), |
|
119
|
path("releases/<str:tag_name>/upload/", views.release_asset_upload, name="release_asset_upload"), |
|
120
|
path("releases/<str:tag_name>/assets/<int:asset_id>/", views.release_asset_download, name="release_asset_download"), |
|
121
|
path("releases/<str:tag_name>/source.<str:fmt>", views.release_source_archive, name="release_source_archive"), |
|
122
|
# CI Status API |
|
123
|
path("api/status", views.status_check_api, name="status_check_api"), |
|
124
|
path("api/status/<str:checkin_uuid>/badge.svg", views.status_badge, name="status_badge"), |
|
125
|
# API Tokens |
|
126
|
path("tokens/", views.api_token_list, name="api_tokens"), |
|
127
|
path("tokens/create/", views.api_token_create, name="api_token_create"), |
|
128
|
path("tokens/<int:token_id>/delete/", views.api_token_delete, name="api_token_delete"), |
|
129
|
# Branch Protection |
|
130
|
path("branches/protect/", views.branch_protection_list, name="branch_protections"), |
|
131
|
path("branches/protect/create/", views.branch_protection_create, name="branch_protection_create"), |
|
132
|
path("branches/protect/<int:pk>/edit/", views.branch_protection_edit, name="branch_protection_edit"), |
|
133
|
path("branches/protect/<int:pk>/delete/", views.branch_protection_delete, name="branch_protection_delete"), |
|
134
|
# Artifact Shunning |
|
135
|
path("admin/shun/", views.shun_list_view, name="shun_list"), |
|
136
|
path("admin/shun/add/", views.shun_artifact, name="shun_artifact"), |
|
137
|
# SQLite Explorer |
|
138
|
path("explorer/", views.repo_explorer, name="explorer"), |
|
139
|
path("explorer/table/<str:table_name>/", views.repo_explorer_table, name="explorer_table"), |
|
140
|
path("explorer/query/", views.repo_explorer_query, name="explorer_query"), |
|
141
|
# Bundle export/import |
|
142
|
path("bundle/export/", views.bundle_export, name="bundle_export"), |
|
143
|
path("bundle/import/", views.bundle_import, name="bundle_import"), |
|
144
|
# Chat |
|
145
|
path("chat/", views.chat_room, name="chat"), |
|
146
|
path("chat/send/", views.chat_send, name="chat_send"), |
|
147
|
] |
|
148
|
|