about summary refs log tree commit diff
path: root/web/panettone/src
AgeCommit message (Collapse)AuthorFilesLines
2024-04-19 r/7963 feat(web/panettone): Create users tableAspen Smith3-2/+41
Create a (currently unused) table to store information about users. I'll be manually migrating over all the information about users into this table, then will make a subsequent CL to make the rest of the tables foreign-key into this table Change-Id: I1b1c4b50c4a61326df3382809f701947a2caf536 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11411 Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2024-03-31 r/7834 fix(web/panettone): Hotfixes for full text search changeAspen Smith2-4/+6
- Actually define *static-dir* at build time, to get the search.png in the search box - Better logging for migration running at startup time - Fix and-where to properly exclude nil clauses - fix looking up build-time vars in the :build package Change-Id: Ia2ef3b2715d4c2efb62bbb2c72084f0f0ad09562 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11325 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2024-03-31 r/7829 chore(web/panettone): Make it easier to override oauth settingsAspen Smith1-4/+12
For local dev, it's nice to be able to set the oauth variables by hand before starting the server - in that case, we don't want to override them with the defaults. Change-Id: I530518b4d58df1edf55ce062cf7ff3290784a3ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/11259 Autosubmit: aspen <root@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2024-03-31 r/7828 feat(web/panettone): Support full-text search of issuesAspen Smith7-36/+126
Support basic full text search of issues using postgresql's built-in text search. There's a new column on the issues table called `tsv`, which contains a tsvector of the title concatenated with the description, and a new search form on both the index and closed issues page which allows searching that tsvector with a user-supplied query. Results are ranked according to that text query in the case of a search. This works fine for now, but next up I'd also like to highlight the results according to the bits that matched the user's query. Change-Id: I25170bedbbbcdc3ed29a047962e9fcfe280d763a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11258 Autosubmit: aspen <root@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2024-03-31 r/7826 feat(web/panettone): Add a system for database migrationsAspen Smith4-36/+218
Add a system for writing, running, and tracking database migrations (changes to the database schema) over time, inspired by but significantly simpler than postmodern-passenger-pigeon. Migrations can be generated by running (PANETTONE.MODEL:GENERATE-MIGRATION "name"), and are numerically ordered lisp files that define (at least) a function called UP, which runs the migration. The migrations that have been run against the database are tracked in the `migrations` table, and when the `(PANETTONE.MODEL:MIGRATE)` function is called (as it is on startup), all migrations that have not yet been run are run within a transaction. This includes one migration `1-init-schema.lisp`, which migrates the database (idempotently) to the current state of the schema. Change-Id: Id243a47763abea649784b12f25a6d05c2267381c Reviewed-on: https://cl.tvl.fyi/c/depot/+/11253 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-05-28 r/4184 feat(web/panettone): Redirect to created issue after creation.Griffin Smith1-1/+2
Fixes: b/54 Change-Id: I5ae6c8aa2a4448554a8ba4cb41185ada1ecf8cb0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5784 Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-05-28 r/4183 fix(panettone): Correctly extract user emailVincent Ambo1-1/+1
Change-Id: I30c83f93006eed63c20440faf7118c8d22c1a239 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5783 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-05-28 r/4182 fix(web/panettone): Don't add extra padding when already paddedGriffin Smith3-8/+10
Because of math being upsetting, we were adding 4 padding characters to an already-properly-padded base64 string, which broke tazjin. This also breaks this function out into panettone.util, and adds a test for it. Change-Id: I7bc8a440ad9d0917272dd9f2e341081ea14693da Reviewed-on: https://cl.tvl.fyi/c/depot/+/5782 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-05-28 r/4181 fix(web/panettone): Properly handle un-padded base64 in jwtsGriffin Smith1-1/+13
The JWT spec apparently specifies that base64 strings in jwts aren't to be padded - but the common lisp base64 library doesn't know how to decode unpadded base64 (it signals a condition in that case). This adds the extra padding characters (a number of `=` characters such that the length of the string is a multiple of 4) using some FORMAT wizardry (?). Change-Id: Ic6b66f05db2699bf1f93f870f5dd614c37eccc2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/5781 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: grfn <grfn@gws.fyi>
2022-05-28 r/4180 feat(web/panettone): Implement OAuth2-based authenticationVincent Ambo3-164/+119
Instead of directly connecting to LDAP and attempting to bind usernames/password, authenticate users through an OAuth2 flow to Keycloak. This has the advantage of reusing the same SSO we already have for Gerrit, Buildkite, ... However, much of panettone's functionality makes assumptions about LDAP being used. As a result there are some warts introduced by this (for now): * Since LDAP DNs are used as primary keys for users, we have to construct fake DNs based on LDAP usernames It might be sensible to migrate this to the UUIDs used by Keycloak eventually. * LDAP is part of the serving path for issues (for fetching user information), however panettone no longer has a way to fetch arbitrary user information unless it is persisted in its database. To work around this, we construct a "fake" user based only on its DN (i.e. only the username is going to be "correct") and use that to serve issues. * Email notifications no longer work (panettone can not access email addresses) Some of these need to be worked around by persisting some of that information in the panettone database instead, as we don't want to give the service the ability to access arbitrary user information anymore. We can probably do this with the user settings feature that already exists and populate it on launch, but as of this commit email and displayName functionality is simply broken. Change-Id: Id32bf5e09d67f0f1e883024c6e013eb342f03b05 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5772 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-05-28 r/4178 fix(web/panettone): Only send emails if the email is knownVincent Ambo2-3/+4
Upcoming changes to the authentication model may mean that user objects do not have an email address attached. Change-Id: I4fddb810f723c790d243f779714ca7f189a02aeb Reviewed-on: https://cl.tvl.fyi/c/depot/+/5770 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-04-14 r/3946 fix(web/panettone): Dont double up on bordersGriffin Smith1-7/+8
Don't render the <ol class="issue-history"> when we have nothing to put in it, which is the case when there's no issue history and the user is not logged in. This avoids an awkward-looking double bottom border on issues with no comments for unauthenticated users. Change-Id: I1c6aac40e4ba93e9428a0da589c67582b1589c17 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5445 Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-02-13 r/3814 refactor(web/panettone): Use postmodern connection poolsVincent Ambo3-60/+61
Instead of managing Postgres connections on our own, use the `with-connection` postmodern function with pooling enabled as a route decorator. This should resolve at least some of the issues from b/113 with leaking connections, and an unreported issue with connections being reused while transactions are in progress. Change-Id: I1ed68667a3240900de1ae69df37d2d3018caf204 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5198 Tested-by: BuildkiteCI Reviewed-by: eta <tvl@eta.st> Autosubmit: tazjin <tazjin@tvl.su>
2022-02-07 r/3777 fix(web/panettone): unbind LDAP connections after authVincent Ambo1-10/+10
unbind & close the stream of newly created LDAP connections after auth, which might prevent some of the resource leaking we've got going on i did actually verify in sly that this still works. yay. Change-Id: I92c8ca20de642585ae4c24aa455d051ee6e44a87 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5193 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-02-04 r/3768 chore: clean up some obsolete TODOssterni1-3/+0
* //3p/nix: probably not worth investing time into this anymore * //users/sterni/emacs: The emoji problem disappeared by itself with a newer emacs version, however a different one remains… * //web/panettone: If we ever want to change the behavior, we should just decide the behavior statically instead of using conditions and restarts, as we only call it in one place, so making different decisions depending on call sites is not really a use case we have. Change-Id: Iff9d439ce356db41ce34d690fb7b6a01822022fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/5223 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: sterni <sternenseemann@systemli.org>
2022-01-13 r/3591 fix(web/panettone): make (who:html-mode) sticksterni1-1/+2
(who:html-mode) needs to be set at macro expansion time to properly take effect which wasn't the case before, but is ensured now by :compile-toplevel. :load-toplevel ensures that who inside the repl will behave the same. Since the :html5 behavior is now actually used, we need to adjust some of the test cases to account for the different :html5 escaping mode. Change-Id: I4dfe1d2db38da6a2486fde86596f7e5f50ed8b9f Reviewed-on: https://cl.tvl.fyi/c/depot/+/4885 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2021-12-16 r/3269 fix(panettone): Fix export of issue status to SQLGriffin Smith1-1/+6
Postmodern changed[0] how users customize the way lisp values get exported to SQL - now, in addition to defining methods of `cl-postgres:to-sql-string`, we have to pass `:col-export` and `:col-import` args to the field itself in the dao class. I'm not *entirely* sure why both are necessary, but without both this doesn't work. [0]: https://github.com/marijnh/Postmodern/blob/v1.33.1/CHANGELOG.md#changelog-v-1331 Change-Id: Iae8fb63c34fb6c79b9dfa350129032aab5cd2233 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4383 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: grfn <grfn@gws.fyi>
2021-10-20 r/2984 feat(web/panettone): support dark modeSmitty1-45/+41
When the system is set to dark mode, this is detected through prefers-color-scheme and the color scheme is adjusted accordingly. This fixes #18. The colors are set using CSS variables on the body that are overrridden based on the current color scheme. Change-Id: Id2f95dee4d6968e1b62ce37534f623e489fabde4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3722 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 r/2618 chore: Replace remaining mentions of ##tvl[-dev] with #tvlVincent Ambo1-3/+3
... and fix the capitalisation of hackint Change-Id: I800aef75152d2dc77a33876888e36530143e9d3e Reviewed-on: https://cl.tvl.fyi/c/depot/+/3148 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 r/2615 fix(panettone): Don't display the full before/after of issue bodiesGriffin Smith1-15/+18
Issue bodies tend to be very long, so displaying the full diff whenever the issue is updated takes up a lot of visual room and is very hard to read. Specifically for this field, this changes the display to only show "updated the body of this issue", hiding the previous and new values. At some point in the future, I'd love to have some CSS fun with active anchor links to have an "expanded" view that *does* display the previous and new value, but for now this should be fine - the data isn't gone, after all! Fixes: b/111 Change-Id: I0188540188729142e0b9205ff5cc9ea576c4edb6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3142 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 r/2614 fix(panettone): Fix username display on issue eventsGriffin Smith1-2/+3
7aebba7, which added anchor links to comments, also incorrectly added only the *key* for the `:id` attribute to the `li` element for issue *events*, swallowing up the next form (which happened to be the username) as the value. this adds a *proper* value for the `:id` attribute, bringing back the actual display of the username. Fixes: b/97 Change-Id: I33ee628ddfd4a291e069980512fcc5f74014aac4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3141 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-05-23 r/2613 fix(panettone): Fix handling of issue-not-foundGriffin Smith2-3/+3
The accessor function to get the ID of the `model:issue-not-found` condition is `not-found-id`, not `id`! Also, add a missing space to the title. Fixes: b/127 Change-Id: I91c71feaf1fe877e6a14453a9e75cf27d56fee31 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3140 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2021-04-30 r/2553 revert: "feat(web/panettone): Allow requesting JSON"grfn2-41/+4
This reverts commit 77c09076eccf343e7f14ed389719c0866de3d649. Reason for revert: It doesn't work - attempting to request any of the pages now gives: [ERROR]] No keys match in SWITCH. Testing against "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" with EQUAL. Change-Id: Ic4c795fd2a971003a6823a3b68ddee9a03b9f7c9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3061 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2021-04-22 r/2534 feat(web/panettone): Allow requesting JSONGriffin Smith2-4/+41
Allow specifying an `Accept: application/json` header to the index and show issue routes, to request that those pages be returned as JSON. Change-Id: Ic225139fc9e7fdce0da98984df4ca987685dafe0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3043 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-12 r/2485 refactor(users/glittershark): Rename to grfnGriffin Smith2-2/+2
Rename my //users directory and all places that refer to glittershark to grfn, including nix references and documentation. This may require some extra attention inside of gerrit's database after it lands to allow me to actually push things. Change-Id: I4728b7ec2c60024392c1c1fa6e0d4a59b3e266fa Reviewed-on: https://cl.tvl.fyi/c/depot/+/2933 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-11 r/2478 feat(panettone): don't use `_` for em in inline markdownsterni1-1/+0
Since we are still using third_party, underscores are kind of common in issue titles and are probably often forgotten to escape. Let's just support `*` for emphasized text in titles for now. Change-Id: I305bcf4d4c59123bba4ce816a6da2ee8b022c34e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2926 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-10 r/2459 fix(panettone): always use displayname in subjectssterni1-2/+2
Emails for (re)opening and closing where send out with the user's DN in the subject which is probably not what we want. Using displayname-if-known is probably not necessary as there is not really a case where (not *user*) wouldn't justify a 500 in this context. Change-Id: Id12d3d9619f42eb5337c2d3482b7c1646b5d6a81 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2911 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-04-06 r/2449 fix(panettone): set external-format for stream from cheddarsterni1-1/+1
drakma ignores the :external-format-in parameter if :want-stream is t: > If want-stream is true, the message body is NOT read and instead > the (open) socket stream is returned as the first return value. > If the sixth value of HTTP-REQUEST is true, the stream should be > closed (and not be re-used) after the body has been read. The > stream returned is a flexi-stream with a chunked stream as its > underlying stream. If you want to read binary data from this > stream, read from the underlying stream which you can get with > FLEXI-STREAM-STREAM. Since it doesn't return a plain CL stream which would just work with SBCL, we need to set the external format on the resulting flexi-stream. Fixes b/107. Change-Id: I6e3178123c0927ef21fabf8118d9d357c8afbd42 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2869 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi>
2021-04-06 r/2448 refactor(panettone): remove code duplication in render-markdownsterni1-20/+13
Move the common part (encoding/decoding json and connecting to cheddar) into request-markdown-from-cheddar. The two render-markdown implementations are now only thin wrappers around that function. Change-Id: I81bb34b684af44228dcad02fca541082e6d060ce Reviewed-on: https://cl.tvl.fyi/c/depot/+/2868 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2021-04-04 r/2431 feat(panettone): Add some more info to emailsGriffin Smith1-12/+22
Add a little bit more information to issue notification emails, including the IDs of issues and links to the issues themselves. Change-Id: Ia54209f936a37c6dbdb60ebff5bb8c1034cffc9a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2809 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2430 feat(panettone): Send notifications when issues are reopenedGriffin Smith1-0/+15
Send notifications both to IRC and email when issues are reopened after being closed Change-Id: I3a63419c6547ac28eeaafbe212a2a01a5fc2b5af Reviewed-on: https://cl.tvl.fyi/c/depot/+/2808 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2429 feat(panettone): Send emails when issues are closedGriffin Smith3-18/+42
Send notification emails to the same group of users who receive notifications on issue comments when issues are marked as closed. This also takes the opportunity to generalize issue notification emails a bit, and lay the groundwork for (but not implement) explicit issue subscriber lists. Change-Id: Ie2572ed3ad0207d415b4c362438f772925e7a2c5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2807 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2428 feat(panettone): Add a settings pageGriffin Smith4-6/+70
Add a user settings page, with a single checkbox that allows disabling receiving all email notifications. Change-Id: Ibef2a497cd59f93b695ff8b9cd36047e514e00c2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2806 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2427 feat(panettone): Send email notifications for commentsGriffin Smith3-2/+45
When a user posts a comment on an issue, send email notifications (respecting the enable-email-notifications setting) to the author of that issue and all the other users who have commented on that issue. Since the oauth & gmail API stuff that the relay does is slow, this happens in a background thread. Change-Id: Ic00c265deab1030d9ba64c29c9f56314dd179141 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2805 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2426 feat(panettone): Add functions to send email notificationsGriffin Smith3-0/+63
Add a new package to panettone, :panettone.email with functions to send email notifications to users through the SMTP relay on whitby, respecting the value of `enable_email_notifications` on the user_settings table. Change-Id: Ia4ec65965abda06f1fadb178143d66bb8eae6482 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2804 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-04-04 r/2425 feat(panettone): Add a user settings tableGriffin Smith2-1/+33
Add a new user-settings table and dao class, with a flag that allows an individual user to disable receiving email notifications Change-Id: I537bfca74490941934c0adc7328bcd6ed5c9c0b9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2803 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <mail@tazj.in>
2021-03-28 r/2355 feat(web/panettone): Noping issue authors' usernamesGriffin Smith3-3/+15
When sending irc notifications, insert a zero-width space after the first character of the username of the author of issues, to prevent that user from receiving a ping. Fixes: b/95 Change-Id: Ibcacb45129b2cb99b587744eb61f4f1dbc0060d6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2693 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2021-01-29 r/2152 fix(panettone): handle missing DNs when looking up displaynamessterni2-13/+21
* Fix find-user-by-dn raising an error condition if the search returns no results, return nil instead. * Adopt strategy of defaulting to “someone” as displayname if lookup fails for all usage of displaynames in panettone. I've tested this change for issues and comments created by missing users. Adjusting the displayname seems to fix all 500 being created by missing users both logged out and logged in. Change-Id: I0a84eb0631c4a49f1664bed6d03afa60dce6eb47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2448 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2021-01-25 r/2144 feat(panettone): render a subset of markdown in issue subjectssterni3-3/+140
This is achieved by implementing a simple markdown renderer in CL which has the following limitations: * Only supports inline `code`, *emphasize 1*, _emphasize 2_ and ~~strikethrough~~. * Does not support nested markup. This allows for a relatively simple renderer which doesn't need to parse markdown into a in-memory data structure first. The rendered result is directly written to a stream to integrate well with cl-who which is also reused for rendering tags and xml-escaping strings. Fixes #90. Change-Id: Ice88ed770b1fab6365f3b93e8663e25077befa0b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2389 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in>
2021-01-25 r/2143 fix(panettone): escape value attr of inputs if dynamic contentsterni1-2/+3
I checked all :value attributes in panettone.lisp and wrapped them with who:escape-string if its value comes from user-influenced places. Static values or values from panettone internals are left as is. I did not do a comprehensive check for other places where something similar could happen though. Fixes #92. Change-Id: I134acc0d2f025f173588b37c19a93589365e879b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2401 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-11-27 r/1928 fix(panettone): only scroll if content is too wideAlyssa Ross1-1/+1
Guessing Griffin uses a Mac with invisible scroll bars. ;-) Change-Id: I1771f941f149d5ab5816e67861b6bcd91001e652 Cc: Griffin Smith <grfn@gws.fyi> Reviewed-on: https://cl.tvl.fyi/c/depot/+/2163 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-11-22 r/1904 fix(panettone): Prefix all IRC messages with a ZWSPGriffin Smith1-1/+4
Prefix all IRC notifications from panettone with a unicode zero-width-space so that they don't get picked up by other IRC bots (notably bslsk05). Change-Id: I350fd1b6d2145e496c22a8f56ba3530fc9f1a978 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2127 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: tazjin <mail@tazj.in>
2020-11-22 r/1903 feat(panettone): Send notifications when issues are closedGriffin Smith1-5/+14
Send an irc notification when issues are marked closed, in a similar format to the notifications sent when new issues are created. Change-Id: I2fdde33f0dedc223a5c2265eed778161938f8e9a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2126 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-11-22 r/1896 feat(panettone): Bring back + fix irccat issue creation announcementGriffin Smith3-6/+42
This reverts commit e1067b1497b3dea0c37ae51bba21f42f1e7d35b5. The original issue here was misusing ISSUE-ID instead of ID, but also the associated username for the message should've been CN instead of DN Change-Id: I1629c0cb7597ff2ee2867f27870378eecdafe126 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2125 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
2020-11-19 r/1884 revert(panettone): announce newly created issues using irccatglittershark3-37/+4
This reverts commit 2e2bdf9c6ce1cd66ba5cfe1a42786a6f486b7969. Reason for revert: this is not working, and is resulting in newly created issues just showing a blank page (b/74) Change-Id: I3f06afc52d6c5289269402fc75bb32ad9c376bf4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2082 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-11-08 r/1877 feat(panettone): announce newly created issues using irccateta3-4/+37
- The new PANETTONE.IRC package contains the SEND-IRC-NOTIFICATION function, which opens a new TCP socket to irccat (if it's running and configured) in order to announce the creation of new issues. - The IRCCATHOST and IRCCATPORT environment variables must be set for this to work. - Additionally, the ISSUECHANNEL environment variable may be used to direct announcements at a given channel (otherwise it'll just use the first one). Change-Id: I429a66f24d0f80ed10db173d6af7105fb1d3d023 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2077 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-09-14 r/1790 fix(panettone): Make pre blocks overflow-x scrollGriffin Smith1-1/+3
This prevents wide code blocks from displaying over the container element. Fixes: b/53 Change-Id: I44cb5ff4eddf4c01bb706069a68618382b0dc7ba Reviewed-on: https://cl.tvl.fyi/c/depot/+/1934 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-08-31 r/1746 fix(panettone): Automatically reconnect to ldapGriffin Smith3-17/+55
Wrap all ldap access in a macro that automatically reconnects and retries operations that fail due to a connection error, to handle the case where the ldap server restarts while we still have an open connection. Fixes: #44 Change-Id: I4859cf509106e480f97fed17e7f08e0eea909352 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1871 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
2020-08-29 r/1737 feat(panettone): Add nav to the top of the page as wellGriffin Smith2-24/+32
The absence of the navbar containing the "all issues" and "log out" links from the top of the page has been a common complaint - initially I disagreed, but after some time thinking about it I've come around. This adds the same nav - with the "All Issues" link and the "Log Out" link - to the top of every page, and also fixes a bug where query params would prevent the "All Issues" link from being hidden on the "All Issues" page, which looked especially weird when they were right next to each other. Change-Id: I1d07175fa07aee057ddd140a6864d01342fbb7ef Reviewed-on: https://cl.tvl.fyi/c/depot/+/1868 Reviewed-by: kanepyork <rikingcoding@gmail.com> Tested-by: BuildkiteCI
2020-08-29 r/1734 feat(panettone): Add styling for blockquotesGriffin Smith1-0/+7
Style blockquotes (which show up in rendered markdown) similarly to how github does, by rendering a 5px-wide margin to the left with some padding. Fixes: #48 Change-Id: I79aa3b6cda5d928885c2cc36f504009232252c17 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1869 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>