Commit Graph

232 Commits

Author SHA1 Message Date
Drew DeVault fb3b4999fc builds: refuse to submit >4 builds at once 2020-08-21 09:34:10 -04:00
Gregory Anders 10453628e7 Fix typo in error message 2020-08-20 12:37:36 -04:00
наб 39eafa9bbf Show helpful error on Mercurial clones as well
Unfortunately "hg clone" seems to have issues with the redirect to the
version with the trailing slash, but it's better than the raw HTML dump
from before

-- >8 --
nabijaczleweli@tarta:~/uwu$ hg clone http://127.0.0.1:5014/~nabijaczleweli/projeq wellb
abort: HTTP Error 308: PERMANENT REDIRECT
nabijaczleweli@tarta:~/uwu$ hg clone http://127.0.0.1:5014/~nabijaczleweli/projeq/ wellb
abort: 'http://127.0.0.1:5014/~nabijaczleweli/projeq/' does not appear to be an hg repository:
---%<--- (text/plain; charset=utf-8)

You have tried to clone a project from sourcehat, but you probably meant to
clone a specific hg repository for this project instead. A single project on
sourcehat often has more than one hg repository.

You can visit the following URL:

  http://127.0.0.1:5014/~nabijaczleweli/projeq/sources

To the browse source repositories for this project.

---%<---
!
nabijaczleweli@tarta:~/uwu$
-- >8 --
2020-08-20 12:37:35 -04:00
наб b2f59c803b Return an error when trying to clone a project
-- >8 --
nabijaczleweli@tarta:~/uwu/git$ strace -f -o ss git clone http://127.0.0.1:5014/~nabijaczleweli/projeq
Cloning into 'projeq'...
fatal: remote error:

This is a sourcehat project, which amalgamates multiple source repositories,
issue trackers, and mailing lists.

You can visit
  http://127.0.0.1:5014/~nabijaczleweli/projeq/sources
to pick a specific source.

nabijaczleweli@tarta:~/uwu/git$
-- >8 --

Returning a non-ERR here and going down to a pack is possible
(confer https://twitter.com/nabijaczleweli/status/1296062752516079617)
but errors later down the line are either more verbose and hint at
implementation errors, or leave repositories in a sticky state.

Ref: ~sircmpwn/hub.sr.ht#49
2020-08-20 10:21:26 -04:00
наб 4d009f9c9a Use format-agnostic README nomenclature instead of hinting at README.md
Also fixes "Head's up!" – the heads are to be up, rather than some head
being up excitingly

Fixes d24e508cd4
2020-08-18 10:12:44 -04:00
наб dff8093560 Use default branch for querying README blobs
GETting "{_gitsrht}/api/repos/{repo_name}/refdb/HEAD" would also have
worked, but it's hardly necessary

Ref: ~sircmpwn/hub.sr.ht#50
2020-08-18 10:12:43 -04:00
Drew DeVault de106cf291 Improvements to home page feature list 2020-08-14 10:28:15 -04:00
наб 96c0147db1 List the featured projects on the anonymous index page
This improves discovery by not making the hub feels like it requires an
account just to browse

Ref: ~sircmpwn/hub.sr.ht#42
2020-08-14 10:22:19 -04:00
Drew DeVault 981622c92f Add page listing all featured projects 2020-08-01 12:34:32 -04:00
Drew DeVault b72c7c7feb Run build submissions in a job group 2020-07-23 12:58:38 -04:00
Drew DeVault 7b76b9d5eb Add confirmation page for project deletion 2020-07-20 10:04:29 -04:00
Drew DeVault 5c742bcfe3 build submission: respect reply-to header 2020-07-16 10:05:15 -04:00
Drew DeVault e86c126220 Fix title on manage trackers page 2020-07-14 08:05:34 -04:00
Drew DeVault 33ea654ac3 Support multiple manifests 2020-07-13 16:31:44 -04:00
Drew DeVault 581af620f0 Rig up build status to lists.sr.ht tool status 2020-07-13 16:14:59 -04:00
Drew DeVault 8f14fd4776 Gracefully handle missing patch prefix 2020-07-13 14:16:19 -04:00
Drew DeVault 271e6350b0 build submission: handle missing repo 2020-07-13 13:39:26 -04:00
Drew DeVault a1c9c80b29 Submit patches to builds.sr.ht 2020-07-13 13:30:28 -04:00
Drew DeVault a83d6a2cfd Copy visibility of project to new repos 2020-07-11 10:33:42 -04:00
Drew DeVault a9fa9ef580 Fix notice for users with zero projects 2020-07-09 18:13:00 -04:00
Drew DeVault 1e3e641abc projects.py: import session from flask 2020-07-09 12:29:16 -04:00
ARaspiK 54e1c5169a Replace misaka (hoedown) with mistletoe
It looked like using hoedown (through misaka), which is very
unmaintained, was leading to a lot of issues (see [0]). This replaces
misaka by mistletoe [1], without losing any functionality (I hope).

This affects the call to 'markdown()', removing the now-redundant
argument for the tag whitelist.

[0]: https://todo.sr.ht/~sircmpwn/sr.ht/20
[1]: https://github.com/miyuchina/mistletoe
2020-07-09 11:47:04 -04:00
Drew DeVault 3c6f828df2 Fix project deletion
SQLAlchemy's internal cascade handling is the most miserable, broken
piece of shit I have ever had the displeasure of using. So we circumvent
it entirely and let the SQL server do the right thing.

A word of advice: don't use SQLAlchemy for new projects.
2020-07-09 09:56:20 -04:00
Drew DeVault 47d6ec09a1 Implement mailing list removal 2020-07-08 12:19:54 -04:00
Drew DeVault 1880cef710 Remove non-null constraint from repo description 2020-06-18 09:47:59 -04:00
Michał Sidor (Michcioperz) d24e508cd4 Add support for different named READMEs 2020-05-25 10:10:57 -04:00
Drew DeVault 0aeb98fab8 project summary: correct hg readme URLs 2020-05-18 09:38:26 -04:00
Drew DeVault d277771ca8 profile: remove redundant link 2020-05-11 09:54:25 -04:00
Drew DeVault 8f238adc82 Improve UI on project checklist 2020-05-08 11:17:58 -04:00
Alex Bierwagen 74c9124619 add user's name to placeholder in "projects.html" template 2020-05-06 10:28:10 -04:00
Drew DeVault a34ed9df1b services: consider 404 a successful deletion 2020-05-04 12:00:06 -04:00
Drew DeVault f6861ae2f5 webhooks: correct lists.sr.ht sender URL 2020-05-04 11:55:14 -04:00
Drew DeVault 1b21391014 Swallow errors when unensuring webhooks 2020-05-04 11:20:23 -04:00
Drew DeVault 546f0e47be webhooks: return response from unimplemented path 2020-05-04 11:08:08 -04:00
Drew DeVault 5fc74fec4c Remove length limit on resource descriptions
The upstream services are the authority on these
2020-04-30 15:37:26 -04:00
Drew DeVault 9765707eb7 Fix visibility updates in project settings 2020-04-30 14:02:08 -04:00
Drew DeVault b821833d07 index search tools: d-none by default 2020-04-30 13:16:11 -04:00
Drew DeVault 9362b96441 project-index: hide search tools on xs 2020-04-30 13:13:58 -04:00
Drew DeVault 5151bb11ba Improve layout of resource lists 2020-04-30 12:18:32 -04:00
Drew DeVault 86f3f3351b Better webhook validation 2020-04-30 11:02:33 -04:00
Drew DeVault e8d313356c webhooks: verify payload signature 2020-04-30 10:27:09 -04:00
Drew DeVault a32c72e135 Revert "Fix circular dependency on project deletion"
This reverts commit 8aa3a33e9b.
2020-04-30 10:11:00 -04:00
Drew DeVault 8aa3a33e9b Fix circular dependency on project deletion 2020-04-30 10:04:14 -04:00
Drew DeVault f947f831ab Repo description is required 2020-04-30 09:59:51 -04:00
Drew DeVault 81369a172c Improve user profiles for users with little activity 2020-04-30 09:58:42 -04:00
Drew DeVault 08620422f2 Improve appearance of featured projects 2020-04-30 09:42:52 -04:00
Drew DeVault b90812f934 Fix URLs for embedded images in project summaries 2020-04-30 08:46:07 -04:00
Drew DeVault 34e5c1c7c1 project-index: hide form on mobile 2020-04-30 08:22:19 -04:00
Drew DeVault 5f1523bdfb Same fix for git repos 2020-04-29 13:59:57 -04:00
Drew DeVault 688195adb4 Fix Hg repository creation visibility assignment 2020-04-29 13:55:04 -04:00
Drew DeVault d53f622d54 Mailing lists: use unmodified name for desc lookup 2020-04-29 13:36:23 -04:00
Drew DeVault 43b3a612e6 tracker.py: import Visibility 2020-04-29 13:34:57 -04:00
Drew DeVault 99f5564750 Fix invalid mailing list names 2020-04-29 13:34:06 -04:00
Drew DeVault 7468d5ce0b Project summary: clarify messaging on README prompt 2020-04-29 13:30:24 -04:00
Drew DeVault 7d1cb671f3 Better handling of private or unlisted resources 2020-04-29 13:25:49 -04:00
Drew DeVault 8f5a77e19b Update language on new-user-dashboard.html 2020-04-29 12:26:18 -04:00
Drew DeVault caa317cf5e Update projects on git commit events 2020-04-29 12:23:31 -04:00
Drew DeVault 841af67399 project summary: change wording of checklist dismissal 2020-04-29 12:22:28 -04:00
Drew DeVault 4028656cd2 Correct syntax error
God dammit
2020-04-29 12:11:53 -04:00
Drew DeVault b5ddb82dd0 Fix validation errors on new list 2020-04-29 12:07:34 -04:00
Drew DeVault 8bafcc57c6 mailing lists: raise exception on create failure 2020-04-29 11:56:20 -04:00
Drew DeVault 806f497867 Featured projects: remove user profile link 2020-04-29 11:11:31 -04:00
Drew DeVault 926ddb77d3 Filter project index to checklist-complete 2020-04-29 11:02:58 -04:00
Drew DeVault 216ca85b16 Allow trailing slashes on some routes 2020-04-29 10:46:05 -04:00
Drew DeVault 07251c0336 trackers: do not require write access to view 2020-04-29 10:36:59 -04:00
Drew DeVault 313209a06e webhooks: handle lack of new refs on git push 2020-04-29 10:34:03 -04:00
Drew DeVault 0d196d8602 profile: fix route to user projects 2020-04-29 10:30:15 -04:00
Drew DeVault 05e62eb6a3 project-summary: make dismiss button more obvious 2020-04-29 10:25:48 -04:00
Drew DeVault 4186fe21d5 Add margin to headers in project summaries 2020-04-29 10:20:16 -04:00
Drew DeVault 15280eb32f Don't require login to view resource lists 2020-04-29 10:18:14 -04:00
Drew DeVault 4a13fa65af users: import abort 2020-04-29 10:15:59 -04:00
Drew DeVault 6db3801dc3 project-summary: improve setup incomplete message 2020-04-29 10:13:54 -04:00
Drew DeVault c83da0edb3 Hide new project checklist for non-owners 2020-04-29 10:12:21 -04:00
Drew DeVault 97a05152fc user profile: fix query error 2020-04-29 10:09:51 -04:00
Drew DeVault b5af713dcc projects.py: fix visibility import 2020-04-29 10:07:47 -04:00
Drew DeVault a15ff75966 services.py: correct hg user webhook location 2020-04-29 10:05:03 -04:00
Drew DeVault ef585b6e3f Prevent user from adding duplicate resources 2020-04-29 09:59:53 -04:00
Drew DeVault 3123e9abe4 Same thing, but properly 2020-04-29 09:49:56 -04:00
Drew DeVault de525f28b7 project summary: fix closing tag on readme list 2020-04-29 09:47:02 -04:00
Drew DeVault f29b90b8fa projects.create_POST: validate name matches regex 2020-04-29 08:41:17 -04:00
Drew DeVault 102fca490c Implement featured projects 2020-04-28 14:08:56 -04:00
Drew DeVault 19c9a87682 Add title tags to all pages 2020-04-28 13:39:46 -04:00
Drew DeVault 9d9c899d91 User projects list: rig up search 2020-04-28 12:01:33 -04:00
Drew DeVault 4d68b7d9d8 Project index: rig up search 2020-04-28 12:00:15 -04:00
Drew DeVault 777db28c6d Initial pass on public project index 2020-04-28 11:12:39 -04:00
Drew DeVault 55d590a4c4 Add user profile page and projects list 2020-04-28 09:53:14 -04:00
Drew DeVault dfaf5bceb5 Improve dashboard layout 2020-04-27 12:43:08 -04:00
Drew DeVault a3fd75170b Add logged-in user dashboard page 2020-04-27 11:57:50 -04:00
Drew DeVault 15a3556c64 Rig up mailing list webhooks 2020-04-23 13:52:03 -04:00
Drew DeVault 83d9141023 Implement ticket comment events 2020-04-23 12:08:29 -04:00
Drew DeVault 7c3bb9fc0f Add events for todo.sr.ht tickets 2020-04-23 11:33:08 -04:00
Drew DeVault 8cafac751f Implement commit events 2020-04-20 17:12:23 -04:00
Drew DeVault 3d11d5dfe4 Flesh out webhooks somewhat
This handles deletion of the remote resource
2020-04-08 14:33:16 -04:00
Drew DeVault e0326ac0e2 Refactor webhooks to be more discrete 2020-04-06 16:19:07 -04:00
Drew DeVault 89a2e3ac9f Rig up Mercurial support 2020-04-06 13:21:13 -04:00
Drew DeVault ab1cb8e381 Implement mailing lists from templates 2020-04-02 13:53:23 -04:00
Drew DeVault c2b3216250 Implement ticket tracker creation 2020-04-02 13:41:46 -04:00
Drew DeVault e3cae053b9 Resource addition: fix searching and creation 2020-04-02 13:38:28 -04:00
Drew DeVault af43379a80 Implement project deletion
And fix all of the cascades on the database relationships

Fuck SQLAlchemy
L
2020-04-02 13:14:35 -04:00
Drew DeVault 2ec9808304 Add project config page 2020-04-02 12:55:05 -04:00
Drew DeVault cbc4326657 Implement dismissal of new project checklist 2020-04-02 11:48:41 -04:00
Drew DeVault 6456c0a7bf Implement tracker management 2020-04-02 10:26:04 -04:00
Drew DeVault c866a9f4ed Add tracker listing 2020-04-02 10:18:04 -04:00
Drew DeVault fc586256cb Implement tracker update webhook 2020-04-02 10:13:01 -04:00
Drew DeVault 8f015eb153 Add project checklist completion text 2020-04-02 09:36:27 -04:00
Drew DeVault ae7768cc70 Implement bug tracker addition 2020-04-02 09:24:29 -04:00
Drew DeVault b98a88e47f Stub out todo.sr.ht support 2020-04-01 18:51:14 -04:00
Drew DeVault adaabb8031 Show friendlier error on failure to fetch README.md 2020-04-01 18:26:52 -04:00
Drew DeVault 929af677f1 Git is stylized as "Git" 2020-04-01 15:51:51 -04:00
Drew DeVault e06664349e Expand description input for mailing lists 2020-04-01 15:49:15 -04:00
Drew DeVault 4ae2c4ab20 Improve wording of deletion page 2020-04-01 15:34:43 -04:00
Drew DeVault 81df974ae8 Remove obsolete TODO 2020-04-01 15:18:02 -04:00
Drew DeVault 03f858a9bf Implement project event feed 2020-04-01 15:16:20 -04:00
Drew DeVault 665d0ca21f Implement genuine event list on summary page 2020-04-01 15:03:52 -04:00
Drew DeVault 6115640e84 Implement mailing list removal 2020-04-01 14:50:42 -04:00
Drew DeVault 6e3810a76c Implement repository removal/deletion 2020-04-01 14:47:54 -04:00
Drew DeVault d9b06b8092 Generalize resource list templates 2020-04-01 14:00:48 -04:00
Drew DeVault 163ca0f629 Reorganize templates 2020-04-01 13:40:54 -04:00
Drew DeVault 6300a914e4 Rename top-level routes for resource lists 2020-04-01 13:36:13 -04:00
Drew DeVault 09e18897b6 Move mailing list routes to separate blueprint 2020-04-01 13:35:25 -04:00
Drew DeVault 3b7b28a5cf Move sources routes to separate blueprint 2020-04-01 13:30:57 -04:00
Drew DeVault b6b673e4d7 Add search & manage page for mailing lists 2020-04-01 09:05:17 -04:00
Drew DeVault 1ba020a264 Add "manage sources" page 2020-04-01 08:58:48 -04:00
Drew DeVault 57719e8391 add list: correct typo in search field name 2020-03-31 16:09:47 -04:00
Drew DeVault a005c28fdf Flesh out webhooks a bit more 2020-03-31 16:09:33 -04:00
Drew DeVault 88af4176a7 Implement creating new mailing lists 2020-03-31 15:08:00 -04:00
Drew DeVault c47f6ff49a Rig up git repo creation, webhooks 2020-03-31 11:40:55 -04:00
Drew DeVault 74d8068b44 Add event tracking 2020-03-25 19:17:53 -04:00
Drew DeVault f0f753bfd3 Add basic mailing lists support 2020-03-25 11:18:18 -04:00
Drew DeVault 2aedc53e7f Add page listing source repos for project 2020-03-24 12:14:02 -04:00
Drew DeVault f8a9b84bc5 Implement fetching readme from git repos 2020-03-24 11:22:55 -04:00
Drew DeVault a50a47f7e6 Initial commit 2020-03-24 10:26:15 -04:00