Commit graph

144 commits

Author SHA1 Message Date
Drew DeVault fb3b4999fc builds: refuse to submit >4 builds at once 2020-08-21 09:34:10 -04:00
наб 0e11b08d4c Fix UI of checklist descriptions when wrapping
No difference when not wrapping

Ref: ~sircmpwn/hub.sr.ht#37
2020-08-21 09:07:56 -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
gildarts 2b98206e43 add database stamp for core.sr.ht 2020-08-11 10:48:01 -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 63b4af4cb6 hubsrht-migrate: remove (broken) core.sr.ht call 2020-07-14 09:32:19 -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
Drew DeVault 095f595161 Alpine: upgrade to 3.12 2020-06-15 13:08:10 -06:00
Michał Sidor (Michcioperz) d24e508cd4 Add support for different named READMEs 2020-05-25 10:10:57 -04:00
Eli Schwartz 030624ca8d add a build manifest for Arch Linux packaging 2020-05-25 10:07:43 -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
Eli Schwartz 23e980fc74 setup.py: use importlib.resources from python 3.7 to find core.sr.ht Makefile
importlib.resources will guarantee to find any importable module, and
check that the resource ('Makefile') can be found within it.

This lets us get rid of the current getsitepackages() hack and
environment variable fallback, which is both verbose and badly handles
some edge cases when installing modules, and instead use the recommended
way to find data files shipped with a python module.
2020-05-11 09:36:29 -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 8da6133783 Add config.example.ini 2020-05-04 10:55:26 -04:00
Denis Laxalde 30e5a12c0b Add a build manifest for Debian packaging 2020-05-01 08:28:44 -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