720 Commits

Author SHA1 Message Date
Tadeusz Sośnierz
81b0bf57fe 3.2.0 3.2.0 2023-04-04 18:18:57 +02:00
Will Hunt
c7ca2ba94d
Add support for showing GitHub issue comments (#697)
* Add support for issue/PR comments.

* changelog

* Quote message

* Truncate messages too
2023-04-04 13:28:51 +01:00
Will Hunt
7eef384563
Add support for using guid as a feed link (#700)
* Move statics above instance fields, and add new url praser

* uncomment out

* add comment

* Create 700.feature
2023-04-03 14:24:36 +00:00
Tadeusz Sośnierz
0ce06c4ea7
Allow users to import other people's go-neb services (#695)
* Allow room admins to import other people's go-neb services

This requires us to guess what these other people's MXIDs were,
so we scroll through the list of room members and make educated guesses
about which of them are Scalar+go-neb bots, and which users they were set up by.

* Relax our requirements for scraping others' go-neb connections

* Changelog

* Linting

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
2023-04-03 16:13:43 +02:00
Will Hunt
76e2b53cf0
Support GitHub push events in repo connections (#696)
* Support pushed commits on GitHub

* Add a nice way to see changes in the event content

* changelog

* Fix typing

* Fixing git freaking out
2023-03-31 09:20:06 +01:00
Will Hunt
2b5d4640c8
Ignore paths in workflows if only updating the changelog (#692)
* Add filters so jobs don't run twice for changelog changes

* one final tweak

* Final tweaks

* changelog
2023-03-29 09:15:34 +00:00
Half-Shot
e2226d6748 3.1.1 3.1.1 2023-03-28 15:58:16 +01:00
Will Hunt
77ac90180f
RSS Spam fix (#694)
* Fix spammy RSS feeds

* changelog
2023-03-28 14:57:48 +00:00
Will Hunt
33dc9eac58
Fix release script (#693)
* Fix the release script

* changelog
2023-03-28 15:44:55 +01:00
Half-Shot
64ffab4be8 3.1.0 3.1.0 2023-03-28 11:26:19 +01:00
Will Hunt
c861ce51fe
Fix grants supplying the wrong state (#672)
* Fix grants supplying the wrong state

* changelog
2023-03-28 11:25:21 +01:00
Will Hunt
44eea7f7c3
Staggered RSS feed polling (#685)
* Ensure we poll feeds equally

* Ensure we poll at least once

* Create 685.misc

* Tidy up
2023-03-28 10:13:57 +00:00
Tadeusz Sośnierz
507b014bd5
Make sure we're not treating garbage data in feed item as guids (#689)
* Make sure we're not treating garbage data in feed item as guids

Some of these would parse as `{ '$': { isPermaLink: 'false' } }` or similar,
which would then surprise us very much when assuming that it's a string stored in accountData.

* Changelog

* Exclude empty strings when looking for viable guids

Co-authored-by: Christian Paul <christianp@matrix.org>

* Hash seen feed entry guids for storing and checking

This saves a little bit of space in the common case,
and prevents bloating the storage were someone to feed us obnoxiously long guids.

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Christian Paul <christianp@matrix.org>
2023-03-28 09:06:30 +00:00
Will Hunt
74a577a97f
Ensure joined to room when checking widget API permissions. (#691)
* Add an ensureJoined to assertUserPermissions

* Ensure web component retries connection fetches

* Ensure errors are caught and logged as JSON on the widget API

* changelog

* non-linear retry timer

* lint

* Use retry

* Make getBotUserInRoom try to join the room

* Make this fn safe to handle
2023-03-27 17:56:37 +01:00
Will Hunt
037674115a
Wrap createConnectionForState/ensureGrant in a try/catch (#680)
* Fix thrown exception when the state is not granted

* changelog

* make it an error

* Typing
2023-03-24 14:39:19 +00:00
Tadeusz Sośnierz
6c4bbc7150
When setting up a FeedConnection, check if the feed loads and parses rather than just checking the Content-Type (#684)
* When setting up a FeedConnection, check if the feed loads and parses rather than just checking the Content-Type

* Don't create a new Parser each time we fetch a feed

* Create 684.bugfix

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
2023-03-24 14:22:10 +00:00
Tadeusz Sośnierz
5ccd64acd8
Undo XML parser customizations (#683)
* Undo XML parser customizations

These did more harm then good, breaking many legit feeds in weird ways.

* Undo changelog

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
2023-03-24 14:16:54 +00:00
Will Hunt
f6475a5182
Do more to shut down quickly and start RSS feeds later (#671)
* Only load RSS feeds once all connections have loaded

* Clear various timeouts

* changelog
2023-03-24 14:13:51 +00:00
Will Hunt
5d27f173a6
Add a ready probe to each listener and start the listeners immediately (#676)
* Put a ready probe on all listeners

* Start the listener early, and add ready probes to each listener

* Apply to the other two listeners
2023-03-24 14:09:09 +00:00
Will Hunt
d12a05d0fa
Add feeds failing metric (#681)
* Track failing feeds in a metric

* Update docs

* changelog
2023-03-24 13:12:50 +00:00
Will Hunt
05b23127d8
Don't hide form elements in GitHub component if we're not checking auth (#675)
* Don't check authentication if we're not requesting you to login

* changelog
2023-03-24 12:06:37 +00:00
Will Hunt
b5b86d45da
Continue even if localstorage is inaccessible (#678)
* Ignore storage failures

* changelog
2023-03-23 13:56:46 +00:00
Will Hunt
61f25fae36
Make the feed parser less strict on HTML data. (#670)
* Less strict parser

* changelog

* Instantiate parser once
2023-03-22 20:17:28 +00:00
Will Hunt
735ae2d673
Add release script (#667)
* Add release script and workflow

* remove comments

* changelog
2023-03-22 14:03:36 +00:00
Justin Carlson
dd76b9dbcd 3.0.1 3.0.1 2023-03-21 08:51:32 -04:00
Will Hunt
c6f975b390
Refactor oauth response page and show a pending state for GitHub installations (#666)
* Show a sensible message for pending GitHub installations

* Clean up grammar

* changelog

* Update Webhooks.ts
2023-03-21 10:46:08 +00:00
Will Hunt
61ede0b97a
Fix GitHub grant checker not checking the correct ID (#665)
* Remove the need for a grant key

* changelog
2023-03-20 22:38:44 +00:00
Justin Carlson
8071243696
Fix add instance link grammar (#664)
* Fix add instance link grammar

* Add changelog
2023-03-20 14:48:18 -04:00
Will Hunt
7f34d69cfa
Don't remove the oauth state on polling the status of the auth request (#663)
* Fix unused ?.

* Don't remove the state from the tokenStore when polling

* changelog
2023-03-20 17:03:37 +00:00
Half-Shot
e6f51bf2de 3.0.0 3.0.0 2023-03-17 17:29:46 +00:00
Will Hunt
6233aa19c9
Refactor hookshot to include permission grant system (#655)
* Add support for checking connection grants

* Make this less noisy

* Remove import

* Trying to generic-ize the grant system

* Implement for Figma

* More grant reformatting

* Add tests

* changelog

* Fix todo

* Refactor grants

* Add logging to grant checkers

* Ensure we provide a sender
2023-03-17 16:38:39 +00:00
Michael Weimann
46e1008942
Fix widget config detection (#657)
Co-authored-by: Will Hunt <will@half-shot.uk>
2023-03-17 14:05:04 +00:00
Half-Shot
0d0cc6b3da fix push 2023-03-17 13:57:50 +00:00
Half-Shot
0dc2512e10 only log in if we're pushing 2023-03-17 13:55:15 +00:00
Will Hunt
7faa3f031e
Run docker CI for pull requests too (#662)
* Do a docker build for pull requests too

* drop branch limit for push

* changelog
2023-03-17 13:51:24 +00:00
Tadeusz Sośnierz
7cd59f3774
Add a go-neb migrator (#647)
* Add a go-neb migrator, capable of migrating RSS/Atom feeds to hookshot (so far)

* Add forgotten file

* Fix useCallback() usage

* Gracefully handle go-neb not being configured

* Make Feed URLs not editable when they're being migrated over from go-neb

https://github.com/matrix-org/matrix-hookshot/pull/647#discussion_r1131615944

* Changelog

* Linting

* Add the ability to migrate Github repo connections from go-neb (#651)

* Add the ability to migrate Github repo connections from go-neb

* Gracefully handle the lack of go-neb migrator

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>

* Handle Scalar-style go-neb service IDs (#656)

* Add the ability to migrate Github repo connections from go-neb

* Handle Scalar-style go-neb service IDs

* Make service type in service ID match the Scalar-generated one

https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131647595

* Safeguard against undefined hardcoded service IDs

https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131646578

* Rename a variable

https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131710225

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>

* Linting

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
2023-03-17 14:25:35 +01:00
Will Hunt
b8bb51fd1f
Fix service bots not rejecting invites on incoming DMs (#659)
* Manually send a reason on a leave for now

* changelog
2023-03-14 22:35:16 +00:00
Will Hunt
55529d7128
Add support for OAuth login to GitHub via widget (including adding new installations) (#661)
* WIP

* Update vite

* Add oauth landing page

* Add API support for GitHub oauthing

* Remove console.logs

* Add support for logging and and out of GitHub

* Add bridge API methods

* Add base link styling

* Sugar syntax main get

* Update vite

* changelog

* Review changes

* Use instance to match UI

* lint

---------

Co-authored-by: Justin Carlson <justinc@element.io>
2023-03-14 10:50:46 +00:00
Will Hunt
d602c895f3
Fix hookshot showing connections as editable when the user has no permission (#660)
* Fix getConnectionsForRequest reporting canEdit=true if the user has the
default or greater PL

* changelog
2023-03-14 10:48:53 +00:00
Justin Carlson
7575f93f67
Improve widget style (#652)
* Add widget card style and background

* Add padding and header based on embed type parameter

* Add changelog

* Add loading spinner component

* Add loading spinners
2023-03-08 09:20:13 -05:00
Kim Brose
1b80bd8f40
Register namespace for sample serviceBot in registration.sample.yml (#643)
* Update service_bots.md

* Update registration.sample.yml

* Create 643.doc
2023-02-13 12:29:19 +00:00
Will Hunt
80ccb0c877
Use replace uuid package with crypto.randomUUID (#640)
* Use randomUUID over uuid

* changelog

* Fix mess
2023-02-10 11:14:21 +00:00
Half-Shot
e846f3f19b 2.7.0 2.7.0 2023-01-20 13:27:25 +00:00
Will Hunt
88273a249b
New project picker component for room configs (#624)
* Implement new Dropdown component

* Apply field styling to search too

* General improvements to GitLabClient

* Add support for storing small base64 files in the storage provider

* Refactor GitLab repo to use new connection provider

* Start trying to deduplicate code

* Begin refactor to support ConnectionSearch

* Add support for GitHub searching

* Refactor GitLab/GitHub into components

* Port Jira to ConnectionSearch

* Drop unused functions

* Hide connection list if no connections are present.

* Cleanups

* Cleanup abort controller

* changelog

* Update JIRA for search powers
2023-01-20 13:16:11 +00:00
Half-Shot
b08ca20803 2.6.1 2.6.1 2023-01-16 16:08:28 +00:00
Half-Shot
66d5abb5d8 2.6.0 2023-01-16 16:07:43 +00:00
Michael Weimann
1b51189db1
Fix generic webhook 'user is already in the room error' (#627)
* Fix generic webhook 'user is already in the room error'

* Add changelog

* Cleanup to support usecases without slamming the homeserver.

* Fix fallthrough

* Add some tests

* Add tests for intentutils

* Refactor the rest of the app

Co-authored-by: Half-Shot <will@half-shot.uk>
2023-01-16 14:58:23 +00:00
Michael Weimann
469e88f9ba
Add webhook name and room to admin info (#620)
* Add webhook name and room to admin info

* Add changelog

* Escape room Id in webhook admin message

Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-16 10:51:36 +00:00
Michael Weimann
e7a6cfcef4
Fix state update validation (#628)
* Fix state update validation

* Add changelog
2023-01-16 10:48:24 +00:00
Christian Paul
67fc55af93
Change URL protocol in the ocumentation and sample configs to HTTPS (#623)
* Config: Use variables for similar values
* Configs and Documentation: http -> https, except for localhost
2023-01-13 16:39:34 +01:00