680 Commits

Author SHA1 Message Date
Andrew Ferrazzutti
f7bb20a639
Allow multiple Jira connections; stop prefix clash (#540)
* Allow multiple Jira connections; stop prefix clash

Fixes #533
Mitigates #421

* Follow review suggestions

- Set a status code for the ApiError on command prefix conflict
- Make `conflictsWithCommandPrefix` an optional method
2022-10-21 09:25:07 -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
0622d0717f
Create triage-incoming.yml 2022-10-20 12:11:11 +01:00
Will Hunt
3b2dff5d42
Don't crash the bridge on state update failure (#537) 2022-10-18 22:55:31 +01:00
Will Hunt
45d82c7a31
Remove debug steps 2022-10-17 22:29:41 +01:00
Andrew Ferrazzutti
c0efb91c9a
Fix Docker builds hanging/OOMing (#535)
* Add network timeouts to Docker builds

* Split cargo build out

* Put cargo in the right place

* debug usage

* install time

* Fix docker build OOMing in CI for arm64 builds

Yoinked from synapse:
- https://github.com/matrix-org/synapse/pull/14173
- 424d1d28cc

* Update changelog

Co-authored-by: Half-Shot <will@half-shot.uk>
2022-10-17 13:09:15 -04:00
Will Hunt
fdcb5a27cb
Improvements to GitHub auth (#523)
* Always report auth errors

* Raise OAuth errors

* Tweaks

* a newline

* changelog

* changes
2022-10-17 15:19:13 +01:00
Will Hunt
107b6c0c2f
Add documentation for workflow run 2022-10-10 14:11:20 +01:00
Will Hunt
3263565cac
Add checkboxes for workflow run statues in UI (#524)
* Add a note to use `help`

* Add event checkboxes for the workflow run hooks

* Create 524.bugfix

* Fix padding issue

* Fix a specific error edge case
2022-10-10 10:40:58 +00:00
Will Hunt
0865535c3c
Add a note to use help (#522) 2022-10-07 10:06:45 +00:00
Will Hunt
b8cc1f962f
Add support for GitHub workflow run completion events (#520)
* Add support for workflow run completions

* Create 520.feature
2022-10-07 10:35:05 +01:00
Will Hunt
db3caeae03 Use matrix-appservice-bridge logging (#488)
* Use matrix-appservice-bridge logger

* Update to be in line with bridge sdk

* Update packages

* changelog

* nits
2022-10-06 09:30:31 +01:00
Andrew Ferrazzutti
14747bb92e 2.3.0 2.3.0 2022-10-05 04:13:12 -04:00
Andrew Ferrazzutti
3ec5bac5f9
Let GitHub widget support "issue.labeled" (#519)
The bridge supports it, but schema validation didn't think so
2022-10-05 03:59:23 -04:00
Andrew Ferrazzutti
d570dc8a3a
Send bot notice on GitHub OAuth success (#512)
* Send bot notice on GitHub OAuth success

i.e. the same as is done for Jira

* Nitpick: don't backtick plain string message
2022-10-04 18:05:17 -04:00
Andrew Ferrazzutti
31aa5e90ad
Don't send empty query string in widget API reqs (#518) 2022-10-04 18:04:28 -04:00
Andrew Ferrazzutti
4d3567b05a
Add label to GitLab widget's comment body toggle (#517)
* Add label to GitLab widget's comment body toggle

Also ensure that the label is part of the click region

* Add changelog

Copied from #500's changelog
2022-10-04 18:02:21 -04:00
Andrew Ferrazzutti
c29c67fc2b
Fix command prefix field in widgets (#515)
* Read-your-writes consistency on connection update

Allow updates to connections made via config widgets to be reflected
immediately upon save in the widget UI.

* Use HTML elements as `ref`s in widgets

Fixes #422

* Add changelog

* Let widgets use new connection config on save

After a connection config is updated, but before a widget requests the
latest config from the bridge, make the widget display the just-saved
config instead of what the config was before being updated.

* Use input placeholder as prefix default

Otherwise, leaving the prefix field blank would apply no prefix, and
violate prefix length requirements.
2022-10-04 17:19:21 -04:00
Andrew Ferrazzutti
3ca61b9e02
Reorganize the GitHub config widget (#508)
- Group repos by org
- Paginate repo requests
- Remove redundant label next to chosen repo
- Remove redundant repo field below connected repo
- Include repos that user has doesn't have admin permissions for, to
  achieve parity with results from provisioning API
2022-10-03 10:43:16 -04:00
Andrew Ferrazzutti
50fa037d9a
Fix Jira widget request loop for logged-out users (#507)
* Fix Jira widget request loop for logged-out users

* Add changelog file

(copied from #502)
2022-10-03 10:30:11 -04: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
Andrew Ferrazzutti
80a26283e9
Make various typechecking improvements (#505)
* Make various typechecking improvements

* Use `Record<never, never>` to cover `{}`
2022-09-30 13:50:38 -04:00
Andrew Ferrazzutti
911a73abba
Move web tsconfig to let TS language server work (#506)
* Move `web` tsconfig to let TS language server work

* Assign typing to images

This removes type errors on imported images.
2022-09-30 12:35:53 -04:00
Andrew Ferrazzutti
24a653f11d
Improve some command formatting (#504)
* Improve formatting of command help

- Ensure args included in monospace formatting
- Show required args as `<arg>`
- Show optional args as `[arg]`

* Don't print undefined username with Jira `whoami`

* Fix typo in `feed remove` description

* Add changelog

* Relabel changes as a bugfix
2022-09-30 12:16:44 -04:00
Andrew Ferrazzutti
0111f4bfa3
Add Jira widget (#502)
* Add Jira widget

* Jira widget UI for no login vs no instances

* Update changelog wording
2022-09-30 11:52:31 -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
dependabot[bot]
426f971cb9
Bump vm2 from 3.9.6 to 3.9.11 (#498)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.6 to 3.9.11.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.6...3.9.11)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-29 14:18:03 +01:00
Will Hunt
f9e3554e0e
Add support for creating confidential issues in GitLab (#496)
* Confidential issue

* changelog

* Dedupe a bit
2022-09-28 11:55:36 +01:00
Will Hunt
01750bf6f2
Send a notice when the setup widget cannot be created (#491)
* Check permissions when setting up a widget

* changelog
2022-09-28 11:55:12 +01:00
Half-Shot
6a5fd81241 changelog update 2022-09-20 16:24:02 +01:00
Half-Shot
2a093562ce 2.2.0 2.2.0 2022-09-16 14:30:57 +01:00
Will Hunt
5ee267f013
Update codemirror, remove opensans (#489)
* Update codemirror, remove opensans

* changelog

* Remove our one usage of sans

* Update JS dependency too
2022-09-16 13:23:43 +00:00
Will Hunt
a179ae6732
Rename 484.bugfix to 484.feature 2022-09-15 18:15:27 +01:00
Will Hunt
5184506438
Merge GitLab MR approvals and comments into one message (#484)
* Merge approvals and comments as one comment

* Drop comment after sending

* changelog

* fix boolean

* Consistent logging
2022-09-15 18:14:42 +01:00
Will Hunt
d85f2fd540
Add Logger tests (#478)
* More json logger safety

* Don't log undefined

* typo

* Split out the static logger to it's own class for testing

* Refactor logger usage slightly

* Add a test for the logger wrapper

* changelog

* Update LogWrapper.ts

* Drop ?
2022-09-14 11:26:34 +00:00
Will Hunt
e8159579b2
Fix figma not working on startup (#481)
* Fix figma startup requests failing

* log the ID

* fix 404

* Ensure we always send teamId as a string

* changelog
2022-09-12 13:38:45 +01:00
Will Hunt
23eae91737
Support notifying when a GitLab MR is ready for review (#480)
* Support ready for review GitLab

* Create 480.feature

* Change event name

* Fix name

* Fix typo
2022-09-12 11:51:04 +01:00
Will Hunt
cbc7718808
Move noisy log line to debug (#473)
* Move noisy log level to debug

I think I meant to actually set this to debug before :/

* Create 473.bugfix
2022-09-09 09:31:25 +01:00
Half-Shot
1e44e52179 2.1.2 2.1.2 2022-09-03 03:08:13 +01:00
Will Hunt
79f28f3ae0
Fix feed.success crashing the process due to a typing issue (#469)
* Fix feed.sucess

* changelog

* Stop being lazy and use an interface
2022-09-02 14:46:20 +00:00
Half-Shot
e0dadd4ad3 2.1.1 2.1.1 2022-09-02 14:18:19 +01:00
Will Hunt
944bbe77ff
Logging fixes (#467)
* Log fatal to console if we haven't configured logging

* Move token store load up

* Fix logging typo

* Fix everything logging at debug

* changelog

* Make private
2022-09-02 13:17:36 +00:00
Half-Shot
9d7e6adcd4 2.1.0 2.1.0 2022-09-02 11:41:54 +01:00
Will Hunt
311ac9f168
Start tracking coverage (#351)
* Start tracking coverage

* coverage test
2022-09-01 15:01:08 +00:00
Will Hunt
33becc47ee
Update ioredis & block on startup if we couldn't connect (#462)
* Update ioredis & block on startup if we couldn't connect

* changelog
2022-09-01 11:15:27 +01:00
Will Hunt
6ae2ebe495
Fix GitHub/Jira/GitLab login not checking for permissions early enough (#461)
* Ensure login commands have appropirate permissions levels

* Also fix GitLab

* changelog
2022-09-01 11:08:21 +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
08727e43e2
Don't use onRoomJoin to detect non-AS joins (#464)
* Don't use onRoomJoin to detect non-AS joins

* changelog
2022-09-01 11:04:03 +01:00
Will Hunt
63ab457b45
Refactor feed errors and error presentation (#459)
* Add support for setting a global feed timeout

* Track failures, and don't show the first non-serious error

* Tidy up error reporting

* Make a prettier error pane

* Use the prettier event pane

* Show failed feed attempts in the widget

* Ensure we catch connection resets

* Add styling file

* Ensure we only track one result per fetch

* changelog

* Refactor to use better status codes

* Make feed results cheaper

* splice
2022-08-31 14:01:43 +01:00