pygitweb 0.3.1__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. {pygitweb-0.3.1 → pygitweb-0.4.0}/PKG-INFO +87 -32
  2. {pygitweb-0.3.1 → pygitweb-0.4.0}/README.md +78 -27
  3. {pygitweb-0.3.1 → pygitweb-0.4.0}/pyproject.toml +9 -5
  4. {pygitweb-0.3.1 → pygitweb-0.4.0}/pyproject.toml.orig +10 -5
  5. pygitweb-0.4.0/src/pygitweb/__init__.py +22 -0
  6. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/__meta__.py +1 -1
  7. pygitweb-0.4.0/src/pygitweb/actions.py +1403 -0
  8. pygitweb-0.4.0/src/pygitweb/actions_routes_test.py +562 -0
  9. pygitweb-0.4.0/src/pygitweb/addproject_permissions_test.py +113 -0
  10. pygitweb-0.4.0/src/pygitweb/api/action.py +21 -0
  11. pygitweb-0.4.0/src/pygitweb/api/plugins/project_zip.py +71 -0
  12. pygitweb-0.4.0/src/pygitweb/api/project.py +67 -0
  13. pygitweb-0.4.0/src/pygitweb/api/subpage.py +63 -0
  14. pygitweb-0.4.0/src/pygitweb/auth.py +988 -0
  15. pygitweb-0.4.0/src/pygitweb/auth_config.py +301 -0
  16. pygitweb-0.4.0/src/pygitweb/auth_keys_test.py +309 -0
  17. pygitweb-0.4.0/src/pygitweb/auth_oauth.py +342 -0
  18. pygitweb-0.4.0/src/pygitweb/auth_test.py +823 -0
  19. pygitweb-0.4.0/src/pygitweb/blog_routes_test.py +155 -0
  20. pygitweb-0.4.0/src/pygitweb/board_refs.py +156 -0
  21. pygitweb-0.4.0/src/pygitweb/board_refs_test.py +106 -0
  22. pygitweb-0.4.0/src/pygitweb/boards_permissions_test.py +143 -0
  23. pygitweb-0.4.0/src/pygitweb/capacity_config.py +79 -0
  24. pygitweb-0.4.0/src/pygitweb/change_queue.py +130 -0
  25. pygitweb-0.4.0/src/pygitweb/change_queue_routes_test.py +202 -0
  26. pygitweb-0.4.0/src/pygitweb/change_queue_test.py +126 -0
  27. pygitweb-0.4.0/src/pygitweb/comments_permissions_test.py +223 -0
  28. pygitweb-0.4.0/src/pygitweb/config.py +208 -0
  29. pygitweb-0.4.0/src/pygitweb/conftest.py +43 -0
  30. pygitweb-0.4.0/src/pygitweb/dependencies.py +203 -0
  31. pygitweb-0.4.0/src/pygitweb/diff_routes.py +48 -0
  32. pygitweb-0.4.0/src/pygitweb/diff_routes_test.py +84 -0
  33. pygitweb-0.4.0/src/pygitweb/event_dispatch.py +42 -0
  34. pygitweb-0.4.0/src/pygitweb/event_dispatch_test.py +68 -0
  35. pygitweb-0.4.0/src/pygitweb/event_subscribers.py +154 -0
  36. pygitweb-0.4.0/src/pygitweb/event_subscribers_test.py +275 -0
  37. pygitweb-0.4.0/src/pygitweb/formatting.py +182 -0
  38. pygitweb-0.4.0/src/pygitweb/formatting_test.py +68 -0
  39. pygitweb-0.4.0/src/pygitweb/git_helpers.py +616 -0
  40. pygitweb-0.4.0/src/pygitweb/git_helpers_test.py +267 -0
  41. pygitweb-0.4.0/src/pygitweb/gravatar.py +16 -0
  42. pygitweb-0.4.0/src/pygitweb/gravatar_test.py +10 -0
  43. pygitweb-0.4.0/src/pygitweb/hooks_install.py +349 -0
  44. pygitweb-0.4.0/src/pygitweb/hooks_install_test.py +396 -0
  45. pygitweb-0.4.0/src/pygitweb/hooks_permissions_test.py +115 -0
  46. pygitweb-0.4.0/src/pygitweb/main.py +1037 -0
  47. pygitweb-0.4.0/src/pygitweb/merge_requests.py +512 -0
  48. pygitweb-0.4.0/src/pygitweb/merge_requests_test.py +359 -0
  49. pygitweb-0.4.0/src/pygitweb/mr_comments_test.py +216 -0
  50. pygitweb-0.4.0/src/pygitweb/mr_permissions_test.py +227 -0
  51. pygitweb-0.4.0/src/pygitweb/password_hash.py +89 -0
  52. pygitweb-0.4.0/src/pygitweb/password_hash_test.py +27 -0
  53. pygitweb-0.4.0/src/pygitweb/permissions.py +351 -0
  54. pygitweb-0.4.0/src/pygitweb/permissions_test.py +307 -0
  55. pygitweb-0.4.0/src/pygitweb/plugin_loader.py +156 -0
  56. pygitweb-0.4.0/src/pygitweb/plugin_loader_test.py +154 -0
  57. pygitweb-0.4.0/src/pygitweb/project_actions.py +515 -0
  58. pygitweb-0.4.0/src/pygitweb/project_list_routes_test.py +58 -0
  59. pygitweb-0.4.0/src/pygitweb/projects.py +215 -0
  60. pygitweb-0.4.0/src/pygitweb/projects_test.py +186 -0
  61. pygitweb-0.4.0/src/pygitweb/sessions.py +73 -0
  62. pygitweb-0.4.0/src/pygitweb/settings.py +461 -0
  63. pygitweb-0.4.0/src/pygitweb/settings_config.py +172 -0
  64. pygitweb-0.4.0/src/pygitweb/settings_config_test.py +152 -0
  65. pygitweb-0.4.0/src/pygitweb/settings_permissions_test.py +97 -0
  66. pygitweb-0.4.0/src/pygitweb/settings_plugins_test.py +58 -0
  67. pygitweb-0.4.0/src/pygitweb/shutdown.py +63 -0
  68. pygitweb-0.4.0/src/pygitweb/smart_http.py +332 -0
  69. pygitweb-0.4.0/src/pygitweb/smart_http_test.py +1033 -0
  70. pygitweb-0.4.0/src/pygitweb/static/activity-feed.js +341 -0
  71. pygitweb-0.4.0/src/pygitweb/static/blob-view.js +242 -0
  72. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/blog.js +3 -1
  73. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-cards.js +19 -12
  74. pygitweb-0.4.0/src/pygitweb/static/board-comments.js +265 -0
  75. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-context.js +48 -6
  76. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-dnd.js +6 -5
  77. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-markdown.js +16 -3
  78. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-popout.js +63 -20
  79. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board-refs.js +4 -1
  80. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/board.js +2 -5
  81. pygitweb-0.4.0/src/pygitweb/static/code-callout-diff.js +145 -0
  82. pygitweb-0.4.0/src/pygitweb/static/code-callouts.js +496 -0
  83. pygitweb-0.4.0/src/pygitweb/static/d2h-render.js +63 -0
  84. pygitweb-0.4.0/src/pygitweb/static/diff-callout-highlight.js +149 -0
  85. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/diff-view.js +20 -16
  86. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/hook-install.js +6 -20
  87. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/logo.svg +8 -32
  88. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/main.css +346 -116
  89. pygitweb-0.4.0/src/pygitweb/static/markdown-settings.js +18 -0
  90. pygitweb-0.4.0/src/pygitweb/static/mr-comments.js +341 -0
  91. pygitweb-0.4.0/src/pygitweb/static/mr-diff.js +450 -0
  92. pygitweb-0.4.0/src/pygitweb/static/mr-tabs.js +103 -0
  93. pygitweb-0.4.0/src/pygitweb/static/mr-watch.js +67 -0
  94. pygitweb-0.4.0/src/pygitweb/static/pgw-diff.css +419 -0
  95. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/readme-render.js +47 -57
  96. pygitweb-0.4.0/src/pygitweb/static/summary-actions.js +302 -0
  97. pygitweb-0.4.0/src/pygitweb/static_tests/conftest.py +68 -0
  98. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static_tests/harness.js +12 -0
  99. pygitweb-0.4.0/src/pygitweb/static_tests/js_runtime.py +277 -0
  100. pygitweb-0.4.0/src/pygitweb/static_tests/pages.py +141 -0
  101. pygitweb-0.4.0/src/pygitweb/static_tests/test_addproject.py +167 -0
  102. pygitweb-0.4.0/src/pygitweb/static_tests/test_blob-view.py +137 -0
  103. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-cards.py +200 -0
  104. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-comments.py +304 -0
  105. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-context.py +154 -0
  106. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-dnd.py +115 -0
  107. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-markdown.py +76 -0
  108. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-popout.py +216 -0
  109. pygitweb-0.4.0/src/pygitweb/static_tests/test_board-refs.py +142 -0
  110. pygitweb-0.4.0/src/pygitweb/static_tests/test_board.py +156 -0
  111. pygitweb-0.4.0/src/pygitweb/static_tests/test_code-callouts.py +151 -0
  112. pygitweb-0.4.0/src/pygitweb/static_tests/test_diff-callout-highlight.py +92 -0
  113. pygitweb-0.4.0/src/pygitweb/static_tests/test_diff-view.py +79 -0
  114. pygitweb-0.4.0/src/pygitweb/static_tests/test_dom.py +14 -0
  115. pygitweb-0.4.0/src/pygitweb/static_tests/test_hook-install.py +80 -0
  116. pygitweb-0.4.0/src/pygitweb/static_tests/test_login.py +36 -0
  117. pygitweb-0.4.0/src/pygitweb/static_tests/test_mr-comments.py +239 -0
  118. pygitweb-0.4.0/src/pygitweb/static_tests/test_mr-diff.py +224 -0
  119. pygitweb-0.4.0/src/pygitweb/static_tests/test_mr-tabs.py +92 -0
  120. pygitweb-0.4.0/src/pygitweb/static_tests/test_mr-watch.py +32 -0
  121. pygitweb-0.4.0/src/pygitweb/static_tests/test_navbar-auth.py +131 -0
  122. pygitweb-0.4.0/src/pygitweb/static_tests/test_readme-render.py +163 -0
  123. pygitweb-0.4.0/src/pygitweb/static_tests/test_search-page.py +153 -0
  124. pygitweb-0.4.0/src/pygitweb/static_tests/test_summary-actions.py +153 -0
  125. pygitweb-0.4.0/src/pygitweb/static_tests/test_summary-ref-switcher.py +160 -0
  126. pygitweb-0.4.0/src/pygitweb/tasks.py +987 -0
  127. pygitweb-0.4.0/src/pygitweb/tasks_mutations_test.py +480 -0
  128. pygitweb-0.4.0/src/pygitweb/tasks_permissions_test.py +120 -0
  129. pygitweb-0.4.0/src/pygitweb/tasks_routes_test.py +573 -0
  130. pygitweb-0.4.0/src/pygitweb/team.py +183 -0
  131. pygitweb-0.4.0/src/pygitweb/team_routes_test.py +143 -0
  132. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/base.html +2 -2
  133. pygitweb-0.4.0/src/pygitweb/templates/blob.html +28 -0
  134. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/blobdiff.html +1 -1
  135. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/board.html +4 -0
  136. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/board_card.html +4 -3
  137. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/commitdiff.html +1 -1
  138. pygitweb-0.4.0/src/pygitweb/templates/hooks_summary_cell.html +22 -0
  139. pygitweb-0.4.0/src/pygitweb/templates/merge_request_tag.html +153 -0
  140. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/summary.html +42 -1
  141. pygitweb-0.4.0/src/pygitweb/templates/updates.html +42 -0
  142. pygitweb-0.4.0/src/pygitweb/templates_env.py +107 -0
  143. pygitweb-0.4.0/src/pygitweb/templates_env_test.py +116 -0
  144. pygitweb-0.4.0/src/pygitweb/timeline_cache.py +243 -0
  145. pygitweb-0.4.0/src/pygitweb/watches.py +364 -0
  146. pygitweb-0.4.0/src/pygitweb/watches_config.py +115 -0
  147. pygitweb-0.4.0/src/pygitweb/watches_config_test.py +44 -0
  148. pygitweb-0.4.0/src/pygitweb/watches_routes_test.py +234 -0
  149. pygitweb-0.3.1/src/pygitweb/__init__.py +0 -22
  150. pygitweb-0.3.1/src/pygitweb/actions.py +0 -1374
  151. pygitweb-0.3.1/src/pygitweb/addproject_permissions_test.py +0 -113
  152. pygitweb-0.3.1/src/pygitweb/api/action.py +0 -21
  153. pygitweb-0.3.1/src/pygitweb/api/plugins/project_zip.py +0 -71
  154. pygitweb-0.3.1/src/pygitweb/api/project.py +0 -67
  155. pygitweb-0.3.1/src/pygitweb/api/subpage.py +0 -62
  156. pygitweb-0.3.1/src/pygitweb/auth.py +0 -961
  157. pygitweb-0.3.1/src/pygitweb/auth_config.py +0 -301
  158. pygitweb-0.3.1/src/pygitweb/auth_keys_test.py +0 -309
  159. pygitweb-0.3.1/src/pygitweb/auth_oauth.py +0 -342
  160. pygitweb-0.3.1/src/pygitweb/auth_test.py +0 -823
  161. pygitweb-0.3.1/src/pygitweb/blog_routes_test.py +0 -155
  162. pygitweb-0.3.1/src/pygitweb/board_refs.py +0 -154
  163. pygitweb-0.3.1/src/pygitweb/board_refs_test.py +0 -106
  164. pygitweb-0.3.1/src/pygitweb/boards_permissions_test.py +0 -143
  165. pygitweb-0.3.1/src/pygitweb/capacity_config.py +0 -79
  166. pygitweb-0.3.1/src/pygitweb/change_queue.py +0 -130
  167. pygitweb-0.3.1/src/pygitweb/change_queue_routes_test.py +0 -168
  168. pygitweb-0.3.1/src/pygitweb/change_queue_test.py +0 -126
  169. pygitweb-0.3.1/src/pygitweb/comments_permissions_test.py +0 -232
  170. pygitweb-0.3.1/src/pygitweb/config.py +0 -193
  171. pygitweb-0.3.1/src/pygitweb/conftest.py +0 -43
  172. pygitweb-0.3.1/src/pygitweb/dependencies.py +0 -166
  173. pygitweb-0.3.1/src/pygitweb/formatting.py +0 -182
  174. pygitweb-0.3.1/src/pygitweb/formatting_test.py +0 -68
  175. pygitweb-0.3.1/src/pygitweb/git_helpers.py +0 -513
  176. pygitweb-0.3.1/src/pygitweb/git_helpers_test.py +0 -267
  177. pygitweb-0.3.1/src/pygitweb/gravatar.py +0 -16
  178. pygitweb-0.3.1/src/pygitweb/gravatar_test.py +0 -10
  179. pygitweb-0.3.1/src/pygitweb/hooks_install.py +0 -323
  180. pygitweb-0.3.1/src/pygitweb/hooks_install_test.py +0 -383
  181. pygitweb-0.3.1/src/pygitweb/hooks_permissions_test.py +0 -115
  182. pygitweb-0.3.1/src/pygitweb/main.py +0 -998
  183. pygitweb-0.3.1/src/pygitweb/merge_requests.py +0 -233
  184. pygitweb-0.3.1/src/pygitweb/merge_requests_test.py +0 -103
  185. pygitweb-0.3.1/src/pygitweb/mr_permissions_test.py +0 -227
  186. pygitweb-0.3.1/src/pygitweb/password_hash.py +0 -89
  187. pygitweb-0.3.1/src/pygitweb/password_hash_test.py +0 -27
  188. pygitweb-0.3.1/src/pygitweb/permissions.py +0 -302
  189. pygitweb-0.3.1/src/pygitweb/permissions_test.py +0 -218
  190. pygitweb-0.3.1/src/pygitweb/plugin_loader.py +0 -156
  191. pygitweb-0.3.1/src/pygitweb/plugin_loader_test.py +0 -154
  192. pygitweb-0.3.1/src/pygitweb/project_list_routes_test.py +0 -58
  193. pygitweb-0.3.1/src/pygitweb/projects.py +0 -213
  194. pygitweb-0.3.1/src/pygitweb/projects_test.py +0 -186
  195. pygitweb-0.3.1/src/pygitweb/sessions.py +0 -73
  196. pygitweb-0.3.1/src/pygitweb/settings.py +0 -458
  197. pygitweb-0.3.1/src/pygitweb/settings_config.py +0 -122
  198. pygitweb-0.3.1/src/pygitweb/settings_config_test.py +0 -111
  199. pygitweb-0.3.1/src/pygitweb/settings_permissions_test.py +0 -97
  200. pygitweb-0.3.1/src/pygitweb/settings_plugins_test.py +0 -58
  201. pygitweb-0.3.1/src/pygitweb/shutdown.py +0 -63
  202. pygitweb-0.3.1/src/pygitweb/smart_http.py +0 -332
  203. pygitweb-0.3.1/src/pygitweb/smart_http_test.py +0 -992
  204. pygitweb-0.3.1/src/pygitweb/static/blob-view.js +0 -127
  205. pygitweb-0.3.1/src/pygitweb/static/board-comments.js +0 -164
  206. pygitweb-0.3.1/src/pygitweb/static/vendor/diff2html-3.4.56.min.css +0 -1
  207. pygitweb-0.3.1/src/pygitweb/static_tests/conftest.py +0 -68
  208. pygitweb-0.3.1/src/pygitweb/static_tests/js_runtime.py +0 -277
  209. pygitweb-0.3.1/src/pygitweb/static_tests/pages.py +0 -114
  210. pygitweb-0.3.1/src/pygitweb/static_tests/test_addproject.py +0 -167
  211. pygitweb-0.3.1/src/pygitweb/static_tests/test_blob-view.py +0 -83
  212. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-cards.py +0 -195
  213. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-comments.py +0 -132
  214. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-context.py +0 -143
  215. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-dnd.py +0 -115
  216. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-markdown.py +0 -76
  217. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-popout.py +0 -172
  218. pygitweb-0.3.1/src/pygitweb/static_tests/test_board-refs.py +0 -142
  219. pygitweb-0.3.1/src/pygitweb/static_tests/test_board.py +0 -156
  220. pygitweb-0.3.1/src/pygitweb/static_tests/test_diff-view.py +0 -77
  221. pygitweb-0.3.1/src/pygitweb/static_tests/test_dom.py +0 -14
  222. pygitweb-0.3.1/src/pygitweb/static_tests/test_hook-install.py +0 -89
  223. pygitweb-0.3.1/src/pygitweb/static_tests/test_login.py +0 -36
  224. pygitweb-0.3.1/src/pygitweb/static_tests/test_navbar-auth.py +0 -131
  225. pygitweb-0.3.1/src/pygitweb/static_tests/test_readme-render.py +0 -119
  226. pygitweb-0.3.1/src/pygitweb/static_tests/test_search-page.py +0 -153
  227. pygitweb-0.3.1/src/pygitweb/static_tests/test_summary-ref-switcher.py +0 -160
  228. pygitweb-0.3.1/src/pygitweb/tasks.py +0 -801
  229. pygitweb-0.3.1/src/pygitweb/tasks_permissions_test.py +0 -136
  230. pygitweb-0.3.1/src/pygitweb/tasks_routes_test.py +0 -598
  231. pygitweb-0.3.1/src/pygitweb/team.py +0 -183
  232. pygitweb-0.3.1/src/pygitweb/team_routes_test.py +0 -143
  233. pygitweb-0.3.1/src/pygitweb/templates/blob.html +0 -19
  234. pygitweb-0.3.1/src/pygitweb/templates/hooks_summary_cell.html +0 -37
  235. pygitweb-0.3.1/src/pygitweb/templates/merge_request_tag.html +0 -97
  236. pygitweb-0.3.1/src/pygitweb/templates_env.py +0 -107
  237. pygitweb-0.3.1/src/pygitweb/templates_env_test.py +0 -116
  238. pygitweb-0.3.1/src/pygitweb/timeline_cache.py +0 -243
  239. pygitweb-0.3.1/src/pygitweb/validation.py +0 -75
  240. pygitweb-0.3.1/src/pygitweb/validation_test.py +0 -167
  241. {pygitweb-0.3.1 → pygitweb-0.4.0}/LICENSE +0 -0
  242. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/api/__init__.py +0 -0
  243. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/api/plugins/__init__.py +0 -0
  244. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/addproject.js +0 -0
  245. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/dom.js +0 -0
  246. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud-down.svg +0 -0
  247. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud-exclamation.svg +0 -0
  248. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud-filled.svg +0 -0
  249. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud-storm.svg +0 -0
  250. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud-up.svg +0 -0
  251. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/icons/cloud.svg +0 -0
  252. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/login.js +0 -0
  253. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/navbar-auth.js +0 -0
  254. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/search-page.js +0 -0
  255. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/summary-ref-switcher.js +0 -0
  256. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/theme.js +0 -0
  257. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/themes/solarized.css +0 -0
  258. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/user-keys.js +0 -0
  259. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/vendor/diff2html-3.4.56-ui.min.js +0 -0
  260. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/vendor/highlight-11.9.0.min.js +0 -0
  261. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/vendor/showdown-2.1.0.min.js +0 -0
  262. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/vendor/tabler-1.0.0-beta17.min.css +0 -0
  263. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/static/vendor/tabler-1.0.0-beta17.min.js +0 -0
  264. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/activity.html +0 -0
  265. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/addproject.html +0 -0
  266. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/blog.html +0 -0
  267. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/login.html +0 -0
  268. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/macros.html +0 -0
  269. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/merge_request_summary_cell.html +0 -0
  270. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/message.html +0 -0
  271. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/pagination.html +0 -0
  272. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/project_list.html +0 -0
  273. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/project_settings.html +0 -0
  274. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/pygit2_settings.html +0 -0
  275. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/pygitweb_settings.html +0 -0
  276. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/readme_card.html +0 -0
  277. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/search.html +0 -0
  278. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/settings_form_field.html +0 -0
  279. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/shutdown_ack.html +0 -0
  280. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/subpage.html +0 -0
  281. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/table.html +0 -0
  282. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/table_page.html +0 -0
  283. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/tasks.html +0 -0
  284. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/team.html +0 -0
  285. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/team_capacity_form.html +0 -0
  286. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/tree.html +0 -0
  287. {pygitweb-0.3.1 → pygitweb-0.4.0}/src/pygitweb/templates/user_profile.html +0 -0
@@ -1,20 +1,24 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygitweb
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: Gitweb reimplementation with FastAPI and Pygit2
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
7
- Requires-Dist: pygittools>=0.3.1
8
- Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.104.0
7
+ Requires-Dist: pygittools>=0.4.0
8
+ Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.137.0,<0.138.0
9
9
  Requires-Dist: uvicorn[standard]>=0.24.0
10
- Requires-Dist: python-multipart>=0.0.6
10
+ Requires-Dist: python-multipart>=0.0.31
11
11
  Requires-Dist: jinja2>=3.1.0
12
12
  Requires-Dist: orjson>=0.19.0
13
13
  Requires-Dist: pygit2>=1.12.0
14
- Requires-Dist: pydantic-settings>=2.13.0
14
+ Requires-Dist: pydantic-settings>=2.16.3
15
15
  Requires-Dist: httpx>=0.27.0
16
16
  Requires-Dist: python-ripgrep==0.0.9
17
17
  Requires-Dist: abcreg>=0.2.0
18
+ Requires-Dist: anyio>=4.14.2
19
+ Requires-Dist: certifi>=2026.10.18
20
+ Requires-Dist: dnspython>=2.9.2
21
+ Requires-Dist: starlette>=1.3.1
18
22
  Requires-Python: >=3.12
19
23
  Description-Content-Type: text/markdown
20
24
 
@@ -24,39 +28,82 @@ Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported fr
24
28
 
25
29
  ## Config
26
30
 
27
- Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), `PYGITWEB_*`
28
- environment variables, and optionally a `.env` file in the working directory via
29
- `pydantic-settings`. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
31
+ Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`). On first run the file is created from field defaults (environment is ignored for that initial write). When the file exists, `PYGITWEB_*` environment variables and an optional `.env` file override it for the **current process only** (with a warning) and are **not** written back. Use the settings UI or edit `settings.json` to change saved values. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
30
32
 
31
33
  - `PYGITWEB_PROJECTROOT` — absolute path to directory containing git repositories (default: `$HOME`)
32
34
  - `PYGITWEB_PROJECTS_LIST` — directory to scan, or path to a project-list file (default: `PROJECTROOT`)
33
35
  - `PYGITWEB_EXPORT_OK` — filename that must exist to allow export (e.g. `git-daemon-export-ok`); empty = no check
34
36
  - `PYGITWEB_SITE_NAME` — site name in titles (default: `PyGitWeb`)
35
37
  - `PYGITWEB_GIT` — path to the git executable (default: `git`)
36
- - `PYGITWEB_AUTH` — `0` / `false` / `off` disables auth; `1` / `true` / `on` enables it. If **unset or empty**, auth defaults to **on**.
38
+ - `PYGITWEB_AUTH` — `0` / `false` / `no` / `off` / `none` disables auth; `1` / `true` / `yes` / `on` enables it. If **unset or empty**, auth defaults to **on**.
37
39
  - `PYGITWEB_AUTH_CONFIG` — path to the auth JSON file (default: `~/.pygitweb/auth.json`). Generated to a reasonable default if not present.
38
- - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from the environment on first run if missing.
40
+ - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from field defaults on first run if missing.
41
+ - `PYGITWEB_CAPACITY_CONFIG` — path to the sprint capacity JSON file (default: `~/.pygitweb/capacity.json`)
42
+ - `PYGITWEB_WATCHES_CONFIG` — path to the per-user watched tasks/MRs file (default: `~/.pygitweb/watches.json`). See `watches.schema.json`.
39
43
  - `PYGITWEB_ENABLED_PLUGINS` — installed plugins to load. The settings page can change this list and reload plugins immediately (`POST /settings/pygitweb/plugins`).
40
44
  - `PYGITWEB_API_KEY_MAX_COUNT` — maximum Smart HTTP API keys each local user may hold (default: `2`).
41
45
  - `PYGITWEB_API_KEY_EXPIRY_DAYS` — lifetime of a newly issued API key, in days. `0` means the key does not expire (the default).
42
- - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie.
46
+ - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie. `POST /token` (OAuth2 password form) returns the same opaque session id as `access_token` for API clients.
43
47
  - Account and Smart HTTP keys (auth required): `GET /user` is the account page. `POST /user/keys` with JSON `{"id": "...", "readonly": false}` issues a key and returns the plaintext secret once; only its scrypt hash is stored. `readonly: true` allows fetch but not push. `DELETE /user/keys?id=<id>` revokes one key. Clone and push attempts are appended to `~/.pygitweb/smart_http.log`.
44
48
 
45
49
  ## Routes
46
50
 
47
- Load the `/docs` page for a detailed view of routes (below the readme).
51
+ Load the `/docs` page for a detailed OpenAPI view of routes.
48
52
 
49
- **No-project routes**
53
+ **Site-wide (no project)**
50
54
 
51
55
  - `GET /`: project list
52
56
  - `GET /index`: plain text project index (path, owner)
53
57
  - `GET /opml`: OPML feed list
54
- - `GET /project/{name}`: Project dispatch (See actions table)
58
+ - `GET /activity`: cross-project activity
59
+ - `GET /updates`: watched tasks and merge requests (paginated by last update)
60
+ - `GET /watches/status`, `POST /watches/watch`, `POST /watches/unwatch`: watch membership for a task or MR
61
+ - `GET /boards`: boards overview
62
+ - `GET /board/create?p=<project>`: create a board (redirect)
63
+ - `GET /addproject` / `POST /addproject`: create a new repository under the project root
64
+ - `GET /projectnamevalid`: validate a proposed project name
65
+ - `GET /team`: team overview (open points vs weekly capacity)
66
+ - `GET /team/capacity` / `POST /team/capacity/submit`: edit per-user weekly story-point capacity
67
+ - `GET /settings/pygitweb`, `POST /settings/pygitweb/submit`, `POST /settings/pygitweb/plugins`, `POST /settings/pygitweb/shutdown`
68
+ - `GET /settings/pygit2`, `POST /settings/pygit2/submit`
69
+ - `GET /settings/project/{name}`, `POST /settings/project/{name}/submit`
70
+
71
+ **Auth**
72
+
73
+ - `GET /login`, `POST /login`, `GET /logout`, `POST /token`
74
+ - `GET /user`, `POST /user/keys`, `DELETE /user/keys`, `GET /users/me`
75
+ - OAuth routes under the auth router when configured in `auth.json`
76
+
77
+ **Project pages**
78
+
79
+ - `GET /project/{name}`: project dispatch (see actions table)
80
+ - `GET /project/{name}/board/`: kanban board UI
81
+ - `GET /project/{name}/search`: per-project search UI
82
+ - `GET /project/{name}/subpage/{subpage_name}`: plugin/subpage HTML
83
+ - `GET /project/{name}/board-ref-manifest`, `GET /project/{name}/summary-refs`, `GET /project/{name}/summary-ref-state`: summary/board helpers
55
84
 
56
85
  **Hook management routes**
57
86
 
58
87
  - `GET /project/{name}/hooks`: JSON `{hooks: [...samples...], bundles: [...]}` with current status (`installed`, `not_installed`, `different`) for every pygittools sample and bundle
59
- - `POST /project/{name}/hook?name=<sample-or-bundle>&op=<add|remove|check>`: install, remove, or check one sample or bundle. `name` may be a sample filename (e.g. `post-receive.notify`) or a bundle name (e.g. `update`, which expands to `post-commit.notify` + `post-receive.notify`). `add`/`remove` refuse to clobber a custom hook with different content (returns `409`)
88
+ - `POST /project/{name}/hook?name=<sample-or-bundle>&op=<add|remove|check>`: install, remove, or check one sample or bundle. `name` may be a sample filename (e.g. `post-receive.pgtemitter`) or a bundle name (e.g. `update`, which expands to `post-receive.pgtemitter`). `add`/`remove` refuse to clobber a custom hook with different content (returns `409`)
89
+
90
+ **Boards, tasks, comments, merge requests, actions**
91
+
92
+ - `GET /board/list?project=…`, `POST /board/create?project=…&name=…`, `POST /board/delete?project=…&name=…`
93
+ - `GET /tasks/list?project=…&board=…`, `POST /tasks/create`, `POST /tasks/update`, `POST /tasks/move`, `POST /tasks/archive`, `POST /tasks/delete`
94
+ - `GET /comments/list`, `POST /comments/…` (create/modify/delete)
95
+ - `POST /mr/create`, `POST /mr/ff`, `GET /mr/diff/summary`, `GET /mr/diff/patch`
96
+ - `GET /actions/list?project=…&ref=…`: list pgt/mise actions at ``ref`` via a shallow tree walk (requires `pgw.actions`; ``ref`` defaults to ``HEAD``)
97
+ - `POST /actions/run?project=…` with JSON `{name, ref, args?}`: create a temporary detached worktree (`pgw_{8 digits}`), run the action there, then remove it
98
+ - `POST /actions/run/stream?project=…` with the same JSON: same ephemeral worktree lifecycle as `/run`, SSE stream (`meta` / `chunk` / `status` / `done`)
99
+
100
+ **Smart HTTP**
101
+
102
+ - `GET /{project}/info/refs`, `POST /{project}/git-upload-pack`, `POST /{project}/git-receive-pack`
103
+
104
+ **Internal**
105
+
106
+ - `POST /_internal/notify?project=<name>`: wake long-poll subscribers (loopback only)
60
107
 
61
108
  **Actions**
62
109
 
@@ -76,19 +123,22 @@ Load the `/docs` page for a detailed view of routes (below the readme).
76
123
  | commitdiff | `h` | `GET /project/{project}?a=commitdiff&h=...` | Commit diff (unified diff rendered with [diff2html](https://github.com/rtfpessoa/diff2html)). |
77
124
  | patch | `h` | `GET /project/{project}?a=patch&h=...` | Single-commit patch (plain text). |
78
125
  | patches | `h`, `hb` | `GET /project/{project}?a=patches&h=...&hb=...` | Multi-commit patches for range `hb..h` (plain text). |
79
- | blobdiff | `h`, `hb`, `f`, `fp` | `GET /project/{project}?a=blobdiff&h=...&hb=...&f=...&fp=...` | Blob diff (two versions of a file) rendered with diff2html. |
126
+ | blobdiff | `h`, `hb`, `f`, `fp`, `callout` | `GET /project/{project}?a=blobdiff&h=...&hb=...&f=...&fp=...&callout=...` | Blob diff (two versions of a file) rendered with diff2html. Optional `callout` highlights file-side ranges (`new:L10-L12`). |
127
+
128
+ Pinned callout diffs (board/MR comments) also use `GET /diff/file-patch?project=&hb=&h=&path=&old_path=` for lazy inline Diff2Html panels.
80
129
  | blobpatch | `h`, `hb`, `f`, `fp` | `GET /project/{project}?a=blobpatch&h=...&hb=...&f=...&fp=...` | Blob diff as plain unified diff. |
81
130
  | remotes | — | `GET /project/{project}?a=remotes` | List repo remotes. |
82
131
  | object | `h` | `GET /project/{project}?a=object&h=...` | Show object by type (commit, tree, tag, or blob). |
83
132
  | blame_raw | `h`, `f` | `GET /project/{project}?a=blame_raw&h=...&f=...` | File blame as JSON: array of `{commit_id, commit_msg, commit_author, time, line_range}`. Contiguous lines from the same commit are merged. |
84
133
  | blame | `h`, `f` | `GET /project/{project}?a=blame&h=...&f=...` | File blame HTML view (syntax-highlighted source, line numbers, commit links per line range; hover shows author and date). |
85
- | blame_incremental | — | | TODO |
86
- | blame_data | — | | TODO |
87
- | rss | — | | TODO |
88
- | atom | — | | TODO |
134
+ | blame_incremental | — | | Stub (placeholder page). |
135
+ | blame_data | — | | Stub (placeholder page). |
136
+ | rss | — | | Stub (placeholder page). |
137
+ | atom | — | | Stub (placeholder page). |
138
+ | snapshot | — | `GET /project/{project}?a=snapshot` | Stub (placeholder page; accepted as a known action). |
89
139
  | search | `patterns`, `paths`, `globs`, `heading`, `sort`, `max_count`, `multiline` | `GET /project/{project}?a=search&patterns=...` | Ripgrep search (via `python-ripgrep`); returns JSON. `paths` are relative to the project tree and cannot escape it. |
90
140
  | search (page) | — | `GET /project/{project}/search` | Per-project search UI page. |
91
- | search_help | — | | TODO |
141
+ | search_help | — | | Stub (placeholder page). |
92
142
 
93
143
  **Blog, boards, and tasks**
94
144
 
@@ -125,27 +175,32 @@ Load the `/docs` page for a detailed view of routes (below the readme).
125
175
  Supported actions (`history`, `log`, `shortlog`, `heads`, `tags`) accept `updates=true` to
126
176
  subscribe to the project's change queue. The request is held for up to 30 seconds:
127
177
 
128
- - A `POST /_internal/notify?project=<name>` (typically from a server-side git hook) wakes
129
- matching subscribers, who then receive the freshly-rendered action response.
178
+ - A `POST /_internal/notify?project=<name>` (typically from a server-side git hook) dispatches
179
+ a `RepoEvent` to registered subscribers. The change-queue subscriber wakes matching
180
+ long-poll waiters, who then receive the freshly-rendered action response. Webhook and
181
+ mise subscribers run in the background so the notify response stays fast. Webhooks use
182
+ `EVENT_WEBHOOKS`. Mise tasks come from per-project `[tool.pgt.events.<task>]` triggers
183
+ (optional `refs` / `sources` filters) plus the global `EVENT_MISE_TASKS` list.
184
+ - An optional JSON body may include `ref_updates`, `source` (`http` / `ssh` / `local`), and
185
+ `actor`. An empty body remains valid (`source=local`, no ref updates).
130
186
  - If no notification arrives in 30 seconds (or the server is shutting down), the response is `200 OK` with an empty body.
131
187
  - Combine with `pf=<prefix>` to subscribe to every project under a path prefix instead of
132
188
  just the URL project (the action is still rendered for the URL project).
133
189
 
134
190
  The notify endpoint is intended for loopback use by `pygittools` post-receive hooks (see
135
- `pygittools/hook_samples/post-receive.notify`). The server enforces loopback-only access and
191
+ `pygittools/hook_samples/post-receive.pgtemitter`). The server enforces loopback-only access and
136
192
  rejects unknown projects; production deployments should still restrict it at the reverse proxy.
137
193
 
138
194
  ## Hook management
139
195
 
140
- The project summary page exposes a **Hooks** row that lists installed hooks and lets you
141
- install or remove pygittools samples, including the `update` bundle: `post-receive.notify`
142
- (feeds the change queue when refs are pushed) and `post-commit.notify` (feeds the change
143
- queue when a working clone of this repo records a local commit). Either is sufficient to
144
- wake long-poll subscribers; installing both covers server-side and client-side commit paths.
196
+ The project summary page exposes a **Hooks** row that installs or removes the notify
197
+ emitter only (`post-receive.pgtemitter` / the `update` bundle): it POSTs a `RepoEvent`
198
+ into `/_internal/notify` after refs update. Other pygittools samples remain available
199
+ via the hook management API.
145
200
 
146
201
  The same operations are available programmatically via
147
- `POST /project/{name}/hook?name=<sample-or-bundle>&op=<...>`. Bundle status is
148
- `INSTALLED` only when every member is installed, `DIFFERENT` if any member's path holds
202
+ `POST /project/{name}/hook?name=<sample-or-bundle>&op=<...>`. JSON status values are lowercase:
203
+ `installed` only when every bundle member is installed, `different` if any member's path holds
149
204
  a custom hook (the bundle then refuses to install or remove anything to preserve the
150
- custom hook), otherwise `NOT_INSTALLED`. When `PYGITWEB_AUTH` is enabled, `add` and `remove`
205
+ custom hook), otherwise `not_installed`. When `PYGITWEB_AUTH` is enabled, `add` and `remove`
151
206
  require a valid access token (`Authorization: Bearer …` from `POST /token`, or the cookie from `POST /login`); `check` is always allowed.
@@ -4,39 +4,82 @@ Gitweb reimplementation using **Python**, **FastAPI**, and **Pygit2**, ported fr
4
4
 
5
5
  ## Config
6
6
 
7
- Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`), `PYGITWEB_*`
8
- environment variables, and optionally a `.env` file in the working directory via
9
- `pydantic-settings`. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
7
+ Settings load from `~/.pygitweb/settings.json` (or `PYGITWEB_SETTINGS_CONFIG`). On first run the file is created from field defaults (environment is ignored for that initial write). When the file exists, `PYGITWEB_*` environment variables and an optional `.env` file override it for the **current process only** (with a warning) and are **not** written back. Use the settings UI or edit `settings.json` to change saved values. See `src/pygitweb/config.py` and `settings.schema.json` for the full schema. Common ones:
10
8
 
11
9
  - `PYGITWEB_PROJECTROOT` — absolute path to directory containing git repositories (default: `$HOME`)
12
10
  - `PYGITWEB_PROJECTS_LIST` — directory to scan, or path to a project-list file (default: `PROJECTROOT`)
13
11
  - `PYGITWEB_EXPORT_OK` — filename that must exist to allow export (e.g. `git-daemon-export-ok`); empty = no check
14
12
  - `PYGITWEB_SITE_NAME` — site name in titles (default: `PyGitWeb`)
15
13
  - `PYGITWEB_GIT` — path to the git executable (default: `git`)
16
- - `PYGITWEB_AUTH` — `0` / `false` / `off` disables auth; `1` / `true` / `on` enables it. If **unset or empty**, auth defaults to **on**.
14
+ - `PYGITWEB_AUTH` — `0` / `false` / `no` / `off` / `none` disables auth; `1` / `true` / `yes` / `on` enables it. If **unset or empty**, auth defaults to **on**.
17
15
  - `PYGITWEB_AUTH_CONFIG` — path to the auth JSON file (default: `~/.pygitweb/auth.json`). Generated to a reasonable default if not present.
18
- - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from the environment on first run if missing.
16
+ - `PYGITWEB_SETTINGS_CONFIG` — path to the settings JSON file (default: `~/.pygitweb/settings.json`). Created from field defaults on first run if missing.
17
+ - `PYGITWEB_CAPACITY_CONFIG` — path to the sprint capacity JSON file (default: `~/.pygitweb/capacity.json`)
18
+ - `PYGITWEB_WATCHES_CONFIG` — path to the per-user watched tasks/MRs file (default: `~/.pygitweb/watches.json`). See `watches.schema.json`.
19
19
  - `PYGITWEB_ENABLED_PLUGINS` — installed plugins to load. The settings page can change this list and reload plugins immediately (`POST /settings/pygitweb/plugins`).
20
20
  - `PYGITWEB_API_KEY_MAX_COUNT` — maximum Smart HTTP API keys each local user may hold (default: `2`).
21
21
  - `PYGITWEB_API_KEY_EXPIRY_DAYS` — lifetime of a newly issued API key, in days. `0` means the key does not expire (the default).
22
- - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie.
22
+ - Browser login: `GET /login` (optional `?next=/path`), `POST /login` with form fields `username`, `password`, `next`; sets an HttpOnly cookie with an opaque in-process session id (also accepted by protected routes via `Authorization: Bearer`). Sessions are wiped when the process exits. `GET /logout?next=/` revokes the session and clears the cookie. `POST /token` (OAuth2 password form) returns the same opaque session id as `access_token` for API clients.
23
23
  - Account and Smart HTTP keys (auth required): `GET /user` is the account page. `POST /user/keys` with JSON `{"id": "...", "readonly": false}` issues a key and returns the plaintext secret once; only its scrypt hash is stored. `readonly: true` allows fetch but not push. `DELETE /user/keys?id=<id>` revokes one key. Clone and push attempts are appended to `~/.pygitweb/smart_http.log`.
24
24
 
25
25
  ## Routes
26
26
 
27
- Load the `/docs` page for a detailed view of routes (below the readme).
27
+ Load the `/docs` page for a detailed OpenAPI view of routes.
28
28
 
29
- **No-project routes**
29
+ **Site-wide (no project)**
30
30
 
31
31
  - `GET /`: project list
32
32
  - `GET /index`: plain text project index (path, owner)
33
33
  - `GET /opml`: OPML feed list
34
- - `GET /project/{name}`: Project dispatch (See actions table)
34
+ - `GET /activity`: cross-project activity
35
+ - `GET /updates`: watched tasks and merge requests (paginated by last update)
36
+ - `GET /watches/status`, `POST /watches/watch`, `POST /watches/unwatch`: watch membership for a task or MR
37
+ - `GET /boards`: boards overview
38
+ - `GET /board/create?p=<project>`: create a board (redirect)
39
+ - `GET /addproject` / `POST /addproject`: create a new repository under the project root
40
+ - `GET /projectnamevalid`: validate a proposed project name
41
+ - `GET /team`: team overview (open points vs weekly capacity)
42
+ - `GET /team/capacity` / `POST /team/capacity/submit`: edit per-user weekly story-point capacity
43
+ - `GET /settings/pygitweb`, `POST /settings/pygitweb/submit`, `POST /settings/pygitweb/plugins`, `POST /settings/pygitweb/shutdown`
44
+ - `GET /settings/pygit2`, `POST /settings/pygit2/submit`
45
+ - `GET /settings/project/{name}`, `POST /settings/project/{name}/submit`
46
+
47
+ **Auth**
48
+
49
+ - `GET /login`, `POST /login`, `GET /logout`, `POST /token`
50
+ - `GET /user`, `POST /user/keys`, `DELETE /user/keys`, `GET /users/me`
51
+ - OAuth routes under the auth router when configured in `auth.json`
52
+
53
+ **Project pages**
54
+
55
+ - `GET /project/{name}`: project dispatch (see actions table)
56
+ - `GET /project/{name}/board/`: kanban board UI
57
+ - `GET /project/{name}/search`: per-project search UI
58
+ - `GET /project/{name}/subpage/{subpage_name}`: plugin/subpage HTML
59
+ - `GET /project/{name}/board-ref-manifest`, `GET /project/{name}/summary-refs`, `GET /project/{name}/summary-ref-state`: summary/board helpers
35
60
 
36
61
  **Hook management routes**
37
62
 
38
63
  - `GET /project/{name}/hooks`: JSON `{hooks: [...samples...], bundles: [...]}` with current status (`installed`, `not_installed`, `different`) for every pygittools sample and bundle
39
- - `POST /project/{name}/hook?name=<sample-or-bundle>&op=<add|remove|check>`: install, remove, or check one sample or bundle. `name` may be a sample filename (e.g. `post-receive.notify`) or a bundle name (e.g. `update`, which expands to `post-commit.notify` + `post-receive.notify`). `add`/`remove` refuse to clobber a custom hook with different content (returns `409`)
64
+ - `POST /project/{name}/hook?name=<sample-or-bundle>&op=<add|remove|check>`: install, remove, or check one sample or bundle. `name` may be a sample filename (e.g. `post-receive.pgtemitter`) or a bundle name (e.g. `update`, which expands to `post-receive.pgtemitter`). `add`/`remove` refuse to clobber a custom hook with different content (returns `409`)
65
+
66
+ **Boards, tasks, comments, merge requests, actions**
67
+
68
+ - `GET /board/list?project=…`, `POST /board/create?project=…&name=…`, `POST /board/delete?project=…&name=…`
69
+ - `GET /tasks/list?project=…&board=…`, `POST /tasks/create`, `POST /tasks/update`, `POST /tasks/move`, `POST /tasks/archive`, `POST /tasks/delete`
70
+ - `GET /comments/list`, `POST /comments/…` (create/modify/delete)
71
+ - `POST /mr/create`, `POST /mr/ff`, `GET /mr/diff/summary`, `GET /mr/diff/patch`
72
+ - `GET /actions/list?project=…&ref=…`: list pgt/mise actions at ``ref`` via a shallow tree walk (requires `pgw.actions`; ``ref`` defaults to ``HEAD``)
73
+ - `POST /actions/run?project=…` with JSON `{name, ref, args?}`: create a temporary detached worktree (`pgw_{8 digits}`), run the action there, then remove it
74
+ - `POST /actions/run/stream?project=…` with the same JSON: same ephemeral worktree lifecycle as `/run`, SSE stream (`meta` / `chunk` / `status` / `done`)
75
+
76
+ **Smart HTTP**
77
+
78
+ - `GET /{project}/info/refs`, `POST /{project}/git-upload-pack`, `POST /{project}/git-receive-pack`
79
+
80
+ **Internal**
81
+
82
+ - `POST /_internal/notify?project=<name>`: wake long-poll subscribers (loopback only)
40
83
 
41
84
  **Actions**
42
85
 
@@ -56,19 +99,22 @@ Load the `/docs` page for a detailed view of routes (below the readme).
56
99
  | commitdiff | `h` | `GET /project/{project}?a=commitdiff&h=...` | Commit diff (unified diff rendered with [diff2html](https://github.com/rtfpessoa/diff2html)). |
57
100
  | patch | `h` | `GET /project/{project}?a=patch&h=...` | Single-commit patch (plain text). |
58
101
  | patches | `h`, `hb` | `GET /project/{project}?a=patches&h=...&hb=...` | Multi-commit patches for range `hb..h` (plain text). |
59
- | blobdiff | `h`, `hb`, `f`, `fp` | `GET /project/{project}?a=blobdiff&h=...&hb=...&f=...&fp=...` | Blob diff (two versions of a file) rendered with diff2html. |
102
+ | blobdiff | `h`, `hb`, `f`, `fp`, `callout` | `GET /project/{project}?a=blobdiff&h=...&hb=...&f=...&fp=...&callout=...` | Blob diff (two versions of a file) rendered with diff2html. Optional `callout` highlights file-side ranges (`new:L10-L12`). |
103
+
104
+ Pinned callout diffs (board/MR comments) also use `GET /diff/file-patch?project=&hb=&h=&path=&old_path=` for lazy inline Diff2Html panels.
60
105
  | blobpatch | `h`, `hb`, `f`, `fp` | `GET /project/{project}?a=blobpatch&h=...&hb=...&f=...&fp=...` | Blob diff as plain unified diff. |
61
106
  | remotes | — | `GET /project/{project}?a=remotes` | List repo remotes. |
62
107
  | object | `h` | `GET /project/{project}?a=object&h=...` | Show object by type (commit, tree, tag, or blob). |
63
108
  | blame_raw | `h`, `f` | `GET /project/{project}?a=blame_raw&h=...&f=...` | File blame as JSON: array of `{commit_id, commit_msg, commit_author, time, line_range}`. Contiguous lines from the same commit are merged. |
64
109
  | blame | `h`, `f` | `GET /project/{project}?a=blame&h=...&f=...` | File blame HTML view (syntax-highlighted source, line numbers, commit links per line range; hover shows author and date). |
65
- | blame_incremental | — | | TODO |
66
- | blame_data | — | | TODO |
67
- | rss | — | | TODO |
68
- | atom | — | | TODO |
110
+ | blame_incremental | — | | Stub (placeholder page). |
111
+ | blame_data | — | | Stub (placeholder page). |
112
+ | rss | — | | Stub (placeholder page). |
113
+ | atom | — | | Stub (placeholder page). |
114
+ | snapshot | — | `GET /project/{project}?a=snapshot` | Stub (placeholder page; accepted as a known action). |
69
115
  | search | `patterns`, `paths`, `globs`, `heading`, `sort`, `max_count`, `multiline` | `GET /project/{project}?a=search&patterns=...` | Ripgrep search (via `python-ripgrep`); returns JSON. `paths` are relative to the project tree and cannot escape it. |
70
116
  | search (page) | — | `GET /project/{project}/search` | Per-project search UI page. |
71
- | search_help | — | | TODO |
117
+ | search_help | — | | Stub (placeholder page). |
72
118
 
73
119
  **Blog, boards, and tasks**
74
120
 
@@ -105,27 +151,32 @@ Load the `/docs` page for a detailed view of routes (below the readme).
105
151
  Supported actions (`history`, `log`, `shortlog`, `heads`, `tags`) accept `updates=true` to
106
152
  subscribe to the project's change queue. The request is held for up to 30 seconds:
107
153
 
108
- - A `POST /_internal/notify?project=<name>` (typically from a server-side git hook) wakes
109
- matching subscribers, who then receive the freshly-rendered action response.
154
+ - A `POST /_internal/notify?project=<name>` (typically from a server-side git hook) dispatches
155
+ a `RepoEvent` to registered subscribers. The change-queue subscriber wakes matching
156
+ long-poll waiters, who then receive the freshly-rendered action response. Webhook and
157
+ mise subscribers run in the background so the notify response stays fast. Webhooks use
158
+ `EVENT_WEBHOOKS`. Mise tasks come from per-project `[tool.pgt.events.<task>]` triggers
159
+ (optional `refs` / `sources` filters) plus the global `EVENT_MISE_TASKS` list.
160
+ - An optional JSON body may include `ref_updates`, `source` (`http` / `ssh` / `local`), and
161
+ `actor`. An empty body remains valid (`source=local`, no ref updates).
110
162
  - If no notification arrives in 30 seconds (or the server is shutting down), the response is `200 OK` with an empty body.
111
163
  - Combine with `pf=<prefix>` to subscribe to every project under a path prefix instead of
112
164
  just the URL project (the action is still rendered for the URL project).
113
165
 
114
166
  The notify endpoint is intended for loopback use by `pygittools` post-receive hooks (see
115
- `pygittools/hook_samples/post-receive.notify`). The server enforces loopback-only access and
167
+ `pygittools/hook_samples/post-receive.pgtemitter`). The server enforces loopback-only access and
116
168
  rejects unknown projects; production deployments should still restrict it at the reverse proxy.
117
169
 
118
170
  ## Hook management
119
171
 
120
- The project summary page exposes a **Hooks** row that lists installed hooks and lets you
121
- install or remove pygittools samples, including the `update` bundle: `post-receive.notify`
122
- (feeds the change queue when refs are pushed) and `post-commit.notify` (feeds the change
123
- queue when a working clone of this repo records a local commit). Either is sufficient to
124
- wake long-poll subscribers; installing both covers server-side and client-side commit paths.
172
+ The project summary page exposes a **Hooks** row that installs or removes the notify
173
+ emitter only (`post-receive.pgtemitter` / the `update` bundle): it POSTs a `RepoEvent`
174
+ into `/_internal/notify` after refs update. Other pygittools samples remain available
175
+ via the hook management API.
125
176
 
126
177
  The same operations are available programmatically via
127
- `POST /project/{name}/hook?name=<sample-or-bundle>&op=<...>`. Bundle status is
128
- `INSTALLED` only when every member is installed, `DIFFERENT` if any member's path holds
178
+ `POST /project/{name}/hook?name=<sample-or-bundle>&op=<...>`. JSON status values are lowercase:
179
+ `installed` only when every bundle member is installed, `different` if any member's path holds
129
180
  a custom hook (the bundle then refuses to install or remove anything to preserve the
130
- custom hook), otherwise `NOT_INSTALLED`. When `PYGITWEB_AUTH` is enabled, `add` and `remove`
181
+ custom hook), otherwise `not_installed`. When `PYGITWEB_AUTH` is enabled, `add` and `remove`
131
182
  require a valid access token (`Authorization: Bearer …` from `POST /token`, or the cookie from `POST /login`); `check` is always allowed.
@@ -1,23 +1,27 @@
1
1
  [project]
2
2
  name = "pygitweb"
3
- version = "0.3.1"
3
+ version = "0.4.0"
4
4
  description = "Gitweb reimplementation with FastAPI and Pygit2"
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  license-files = ["LICENSE"]
8
8
  requires-python = ">=3.12"
9
9
  dependencies = [
10
- "pygittools>=0.3.1",
11
- "fastapi[standard-no-fastapi-cloud-cli]>=0.104.0",
10
+ "pygittools>=0.4.0",
11
+ "fastapi[standard-no-fastapi-cloud-cli]>=0.137.0,<0.138.0",
12
12
  "uvicorn[standard]>=0.24.0",
13
- "python-multipart>=0.0.6",
13
+ "python-multipart>=0.0.31",
14
14
  "jinja2>=3.1.0",
15
15
  "orjson>=0.19.0",
16
16
  "pygit2>=1.12.0",
17
- "pydantic-settings>=2.13.0",
17
+ "pydantic-settings>=2.16.3",
18
18
  "httpx>=0.27.0",
19
19
  "python-ripgrep==0.0.9",
20
20
  "abcreg>=0.2.0",
21
+ "anyio>=4.14.2",
22
+ "certifi>=2026.10.18",
23
+ "dnspython>=2.9.2",
24
+ "starlette>=1.3.1",
21
25
  ]
22
26
 
23
27
  [tool.setuptools]
@@ -1,23 +1,28 @@
1
1
  [project]
2
2
  name = "pygitweb"
3
- version = "0.3.1"
3
+ version = "0.4.0"
4
4
  description = "Gitweb reimplementation with FastAPI and Pygit2"
5
5
  readme = "README.md"
6
6
  license = "MIT"
7
7
  license-files = ["LICENSE"]
8
8
  requires-python = ">=3.12"
9
9
  dependencies = [
10
- "pygittools>=0.3.1",
11
- "fastapi[standard-no-fastapi-cloud-cli]>=0.104.0",
10
+ "pygittools>=0.4.0",
11
+ "fastapi[standard-no-fastapi-cloud-cli]>=0.137.0,<0.138.0",
12
12
  "uvicorn[standard]>=0.24.0",
13
- "python-multipart>=0.0.6",
13
+ "python-multipart>=0.0.31",
14
14
  "jinja2>=3.1.0",
15
15
  "orjson>=0.19.0",
16
16
  "pygit2>=1.12.0",
17
- "pydantic-settings>=2.13.0",
17
+ "pydantic-settings>=2.16.3",
18
18
  "httpx>=0.27.0",
19
19
  "python-ripgrep==0.0.9",
20
20
  "abcreg>=0.2.0",
21
+ # Audit pins
22
+ "anyio>=4.14.2",
23
+ "certifi>=2026.10.18",
24
+ "dnspython>=2.9.2",
25
+ "starlette>=1.3.1"
21
26
  ]
22
27
 
23
28
  [tool.setuptools]
@@ -0,0 +1,22 @@
1
+ import os
2
+ import sys
3
+ from pathlib import Path
4
+
5
+ if "pytest" in sys.modules:
6
+ _test_auth_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-auth.json"
7
+ _test_settings_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-settings.json"
8
+ os.environ.setdefault("PYGITWEB_AUTH", "0")
9
+ os.environ.setdefault("PYGITWEB_AUTH_CONFIG", str(_test_auth_config))
10
+ os.environ.setdefault("PYGITWEB_SETTINGS_CONFIG", str(_test_settings_config))
11
+
12
+ import pygitweb.__meta__
13
+ from pygitweb.main import app as app
14
+
15
+ """
16
+ Git Repo Browser built with FastAPI + Pygit2
17
+ """
18
+ __version__ = pygitweb.__meta__.__version__
19
+ __author__ = pygitweb.__meta__.__author__
20
+ __description__ = pygitweb.__meta__.__description__
21
+ __url__ = pygitweb.__meta__.__url__
22
+ __license__ = pygitweb.__meta__.__license__
@@ -2,7 +2,7 @@
2
2
  Metadata for PyGitWeb - this is the canonical source of all information below.
3
3
  """
4
4
 
5
- __version__ = "0.3.1"
5
+ __version__ = "0.4.0"
6
6
  __author__ = "Will Bowers"
7
7
  __license__ = "MIT"
8
8
  __description__ = "FastAPI + Pygit2 Repo Browser"