98 Commits

Author SHA1 Message Date
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
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
Justin Carlson
9a7839ce42
Implement separate bot users per service (#573)
* Add service bots config

* Add joined rooms manager and keep track of joined rooms

* Add bot users manager and ensure registration and profiles

* Improve joined rooms manager and set up already joined rooms

* Handle invites with service bots

* Handle messages with service bots

* Use service bots for connections

* Use service bots in widget and provisioning APIs

* Use service bots in setup connections

* Use service bots for feed connections

* Handle admin rooms for service bots

* Fix confused event type and service type in provisioning and widget APIs

* Fix generic webhooks service name

* Fix enabled services config

* Handle power level change

* Create widgets with service scope

* Use service bots for gitlab repo connections

* Use service bots for gitlab issue connections

* Use service bots for generic webhook connections

* Use service bots for figma file connections

* Use service bots when verifying state events

* Use service bots for github repo connections

* Use service bots for github discussion connections

* Use service bots for github discussion space connections

* Use service bots for github project connections

* Use service bots for github issue connections

* Use service bots for github user space connections

* Use service bots for jira connections

* Make sure ghost users are invited for gitlab issue comments

* Configure one service per service bot

* Add changelog

* Update tests

* Fix up following rebase

* Fix comment

* Use getter for enabled services

* Ensure homeserver can be reached before registering bots

* Add intent getter on bot user

* Update config comment

* Merge joined rooms manager with bot users manager

* Remove unused localpart from bot user class

* Refactor to pass in bot users manager

* Improve priority sort function

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

* Fix priority sort

Higher priority should come first

* Add debug log when invites are rejected

* Use different state key for scoped setup widgets

* Use different subtitles to differentiate service bots setup widgets

* Refactor bot user setup into bot users manager

* Refactor to reduce duplication in widget API

* Consistent room ID and intent args order

* Add docs and update changelog

* Add overrideUserId deprecation warning

* Add service bots link

Co-authored-by: Christian Paul <christianp@matrix.org>
Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 15:32:09 +00:00
Will Hunt
1e8a112a28
Drop ignoreHooks configuration. (#592)
* Refactor HookFilter to only support enabledEvents (and add a function to convert)

* Convert connections to deprecate ignoreHooks

* Update documentation

* Split out EventHookCheckbox

* Refactor frontend to support enableHooks only mode

* drop old field name

* changelog

* Fix enabledHooks for widgets

* Fixes across the board

* Update test description

* Cleanup

* Fix HookFilter

* Fixup checkboxes

* Cleanup
2023-01-10 17:08:50 +00:00
Will Hunt
abe4fefda4
Mark encryption as experimental (#610)
* Update config to mark encryption support as experimental

* Mention encryption as experimental in docs

* changelog

* Hide empty values from config

* transmuate snakes into camels
2023-01-05 16:25:48 +00:00
Kim Brose
ad6076cbb4
Clarify GitLab setup docs (#350)
* Update gitlab.md

* Create 350.doc

* Update gitlab_project.md
2023-01-02 17:02:59 +01:00
Will Hunt
c962f17a91
Add support for native e2ee (#299)
* Add support for native e2ee

* Various temps to coax it into working

* Formatting nitpicks

* Include stable registration config key for msc2409

* Update default config with encryption options

* Manage admin rooms with bot-sdk DMs

This also enables encryption for new admin rooms when appropriate.

* Update config comments for encryption settings

- Add comment to clarify Redis (the `queue` section) must be configured
  in order for encryption to work
- Mention that the `encryption` section is optional, and omitting it
  will disable encryption support

* Update docs for encryption support

* Add changelog

* Add to docs some notes about encryption state

* Move all post-join logic to onRoomJoin

* Block post-join actions on crypto setup

Requires https://github.com/turt2live/matrix-bot-sdk/pull/269

* Fix linter error

* Update encryption docs and changelog

- Mention that worker mode isn't supported with encryption yet
- Mention removal of Pantalaimon-based encryption

* Update worker docs with encryption config notice

* Share main appservice config with feed bots

This is required to safely enable encryption for the bots that post
GenericHook messages.

* Make slight clarification for queue config

* Minor fixes

* Block post-join actions on feed bot crypto setup

Same as a9e6e11d but for the sub-bots that post GenericHook messages.

* Get joined rooms from intent instead of bot

This refreshes the list of known rooms for crypto events.

* Use Element fork of bot-sdk for crypto fixes

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2022-12-09 10:25:36 -05:00
Will Hunt
b6ae8f9106
Split out GitHub release events into created and drafted (#582)
* Support published events

* Changelog

* Improve comments

* Add frontend support

* Change func names
2022-12-08 02:48:56 +00:00
Will Hunt
7d74f1b1a8
Support filtering workflow run on workflow names (#588)
* Filter workflow events on specific workflow names

* Document new key

* changelog

* Change to a allow/deny list as per feedback
2022-12-08 01:52:51 +00:00
Christian Paul
80010f7b9b
Misspelling: to setup -> to set up (#572)
* Typo: to setup -> to set up

* Add newsfile
2022-11-21 18:38:50 +01:00
Andrew Ferrazzutti
db8221b60a
Allow GitLab connections without hook permissions (#567)
* Allow GitLab connections without hook permissions

Warn instead of fail when connecting a GitLab project that Hookshot
cannot provision a webhook for.

* Mention manual "Secret token" for GitLab webhooks

* Refactor warning pane into a separate component

* Recolour warning pane for better contrast
2022-11-08 10:19:41 -05:00
Andrew Ferrazzutti
7fc0b5b8ed
Update some doc links & formatting (#568) 2022-11-07 09:19:46 -05:00
Will Hunt
0c9bbf6410 Disable GitHub workflow events by default (#528)
* Add a HookFilter class

* Use the HookFilter class

* Support default hooks in the web UI

* Update documentation

* changelog

* Allow all GitLab events by default

* bits of cleanup
2022-10-21 11:30:16 -04:00
Andrew Ferrazzutti
505c083f5f
Add support for Jira version events (#534)
- Support version created/updated/released events
- Look up project ID if missing when subscribing to version events
- Properly format version event notices
- Prioritize project URL over ID in debug strings
2022-10-21 09:24:35 -04:00
Andrew Ferrazzutti
d82e0d7d91
Fix & refactor Jira issue event handling (#543)
- Refactor Jira event handling to be more like GitHub & GitLab
- Fix silently-ignored Jira events due to expecting wrong type strings
- Update UI for Jira events
2022-10-21 09:16:00 -04:00
Will Hunt
107b6c0c2f
Add documentation for workflow run 2022-10-10 14:11:20 +01:00
Andrew Ferrazzutti
fa85dc070b
Add commands to remove/list Jira connections (#503)
* Add commands to remove/list Jira connections

* Add docs page for Jira connections

* Clarify "instance" and webhook reqs in Jira docs

- Jira has "instances" instead of "organizations", so use the former term
- Don't suggest that webhook support can work for multiple instances
- Mention that webhooks require special access
- Make some minor grammar changes
2022-10-03 09:54:14 -04:00
Will Hunt
4c33c60d7a
Support GitLab MR comment bodies (optionally) (#500)
* Add backend support

* Add frontend support

* Update docs

* changelog

* Update src/Connections/GitlabRepo.ts

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

* Update docs/usage/room_configuration/gitlab_project.md

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

* Tweak functions

Co-authored-by: Christian Paul <christianp@matrix.org>
2022-09-30 16:33:09 +01:00
Will Hunt
a3046114d0
Useful JSON logger formatting (#463)
* Refactor log wrapper to support richer json errors

* Make webhook events less noisy

* Document new log format
2022-09-01 11:07:58 +01:00
Will Hunt
563603ff76
Ensure that user permissions are wrapped in quotes in docs (#453)
* Ensure that user permissions are wrapped in quotes in docs

Fixes #452

* Create 453.docs

* Update setup.md

* Rename 453.docs to 453.doc

* Update changelog.d/453.doc

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

Co-authored-by: Christian Paul <christianp@matrix.org>
2022-08-24 11:53:14 +01:00
Will Hunt
00927175a2
Update matrix-bot-sdk to 0.6.0 (#417)
* Update matrix-bot-sdk to 0.6.0

* changelog

* More package updates

* Don't need to copy bindings anymore

* Expliclty require Node 16

* Drop node 14 test

* fix rust bindings fetch

* Update .github/workflows/main.yml

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>

* Update main.yml

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
2022-08-12 10:59:24 +01:00
Kim Brose
a79309071d
add Grafana dashboard (#407)
* add Grafana dashboard

* Create 407.misc

* Move hookshot-dashboard.json to contrib/

* Add Grafana dashboard to docs/metrics.md

* Update 407.misc

* Fix link to hookshot-dashboard.json

Co-authored-by: Will Hunt <will@half-shot.uk>

* Update hookshot-dashboard.json

* Update metrics.md

* Update hookshot-dashboard.json

- add generic event pushes
- add http requests
- shuffle some panels around

* update docs correctly as per review

* Update contrib/hookshot-dashboard.json

Co-authored-by: Will Hunt <will@half-shot.uk>
2022-08-11 17:09:33 +01:00
Frank Lanitz
e375a3965e
Add deeplink for registration.sample.yml to setup documentation (#374)
This hopefully make it easier to reach for users while reading the documentation.

Signed-off-by: Frank Lanitz <fl@flyingcircus.io>
2022-07-15 13:08:00 +00:00
Andrew Ferrazzutti
3dcb6e857a
Mention github login and github status in docs (#415)
* Mention `github status` in docs

instead of `github hastoken`, which was renamed.

Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>

* Document `github login`

Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
2022-07-14 10:57:19 -04:00
Will Hunt
7796f104cb
Add XML parser for generic webhook payloads (#410)
* Add support for decoding XML for webhooks

* Ensure all endpoints use the error middleware

* Dependencies

* changelog

* Describe form data in the documentation

* Reorder
2022-07-13 16:14:21 +01:00
Andrew Ferrazzutti
b491ad1e07
Fix typos in docs (#401)
* Fix typos in docs

* changelog
2022-07-11 09:37:06 -04:00
Will Hunt
b674fff486
Disable GET for webhooks (unless configured) (#397)
* Disable GET for webhooks (unless configured)

* Docs

* newsfile

* Update Config.ts
2022-07-07 21:52:59 +00:00
Will Hunt
42f02b1445
Add a warning when no action is given for GitLab (#398)
* Add a warning when no action is given for GitLab

* Add notice about webhooks being crap

* changelog
2022-07-07 17:47:27 +01:00
Will Hunt
ff1079aa3b
Fix floating values breaking generic webhooks (#396)
* Convert floats to strings for generic webhook payloads

* document the change

* Create 396.bugfix
2022-07-07 17:44:11 +01:00
Kim Brose
8f2015b605
Update webhooks.md (#381)
* Update webhooks.md

* Create 381.doc

* Capitalize Markdown

Co-authored-by: Christian Paul <christian@chrpaul.de>

Co-authored-by: Christian Paul <christian@chrpaul.de>
2022-06-27 09:49:18 +01:00
Tadeusz Sośnierz
86b9a83b97
Add Admin command from listing and disconnecting connections (#367)
* Add Admin command from listing and disconnecting connections

(Only lists Github for now).

* Require connectionManager permissions to manipulate connections

Gives connection management its own config section and switches
AdminRoom categories to be enums.

* Fail more descriptively if connectionManager is not up in time for adminRoom

* Fix Github API URLs (#366)

* Fix Github API URLs

* Add changelog entry

* Fixes

* Tidyup

Co-authored-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>

* Fix URLs *again*

* Block private repos from being publically bridged

* Ensure check looks at service type

* Finish up deleting connections impl

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
2022-06-08 15:50:09 +00:00
Will Hunt
ee2fd5bbcc
Add contributing file (#134)
* Add contributing file

* Rewrite and point at matrix-appservice-bridge

* Add documentation

* Ensure we install matrix-appservice-bridge when building docs

* Also install for release

* changelog

* add contrib file

* Remove artifact step, it doesn't render so nicely

* Update README.md
2022-06-08 15:30:46 +00:00
Will Hunt
21b6d79c3f
Support GitHub Enterprise (#364)
* Support GitHub Enterprise

* Add default config

* Fixes

* Hide enterprise key
2022-05-25 11:07:07 +01:00
Will Hunt
efb5f49bb8
Use https over git for install instructions (#355)
* Use https over git for install instructions

* Create 355.doc
2022-05-25 10:47:46 +01:00
Kim Brose
e9c6afdc44
Fix spacing of non-emoji icons in the docs navbar (#341)
* Fix spacing of non-emoji icons in the docs navbar

* Create 341.docs

* towncrier being picky
2022-05-09 14:54:15 +01:00
Will Hunt
bc29b78442
Allow overriding the results of an openID lookup for widgets for local development. (#326)
* Revert "Withdraw openid overrides change for this PR"

This reverts commit 561fb20471107827a5304eb3d4c4254bb215ae8d.

* Drop setting from sample config

* changelog

* Clarify config
2022-05-09 12:16:27 +01:00
Will Hunt
f56545bf7c
Add setup command for GitLab (#321)
* Cleanup gitlab auth command

* Add support for the `!hookshot gitlab project` command

* Improve docs

* changelog

* add new page

* Wording

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>

* Remove useless comment

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
2022-04-26 16:04:24 +01:00
Tadeusz Sośnierz
0ac4d84aa7 Implement listing and removing feeds from a room 2022-04-25 15:17:15 +02:00
Tadeusz Sośnierz
113cb2ee67 Flesh out feed setup docs 2022-04-25 15:17:15 +02:00
Will Hunt
c1ff3911f0
whoops 2022-04-25 13:33:10 +01:00
Half-Shot
cbb05df423 Remove done 2022-04-22 18:55:57 +01:00
Half-Shot
d5498f99f2 fix metric name 2022-04-22 18:54:42 +01:00
Half-Shot
0472db14e9 icon 2022-04-22 18:53:12 +01:00
Half-Shot
d76713f4f3 Add some metrics 2022-04-22 18:53:01 +01:00
Half-Shot
9db37e4dc3 Add skeleton docs 2022-04-22 18:48:39 +01:00
Will Hunt
bd58714c66
Improve metrics coverage (#312)
* Actually register the SDK metrics

* Add some useful metrics

* Update docs

* changelog
2022-04-19 11:24:59 +00:00
Will Hunt
7732a943de
Add figma to setup.md 2022-04-15 09:54:32 +01:00
Will Hunt
e1b5f989b9
Fail to start when widgets are configured without a listener (#298)
* Add note about listener configuration in widgets.md

* Add errors to check when widgets are not fully configured

* changelog

* Include widget listener in default config
2022-04-11 18:39:42 +01:00
Will Hunt
1ab442107c
Automatically add new labels to newly created issues (#292)
* Automatically add new labels to newly created issues

* changelog
2022-04-11 17:25:26 +01:00
Kim Brose
e8d2003868
Fix typos (#286)
* Fix typos

* Create 286.doc
2022-04-11 17:08:40 +01:00