* 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 ?
* 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
* 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
* Add GitHub widget
Also make assorted fixes to help push this along
* Remove unused import
* Resolve new linter warnings
* Undo testing-only change
Didn't mean to commit this
* Use "org/repo" as GitHub repo names in widget
* Update src/ConnectionManager.ts
Co-authored-by: Will Hunt <will@half-shot.uk>
* Don't use null assertions
* Use block scope in switch cases
* Fix some BridgeAPI imports
* Actually validate connection state
* Return only GitHub repos with admin permissions
Co-authored-by: Will Hunt <will@half-shot.uk>
* Share code for tracking config via state events
This should prevent forgetting to add state event handlers in new or
existing connection types.
* Address review feedback
* Mark GitLabRepoConnection as an IConnection
* Remove unused imports
* Tighten typing for JiraProjectConnectionState
* Don't say nothing to no GitHub connections
Allow the message of "No GitHub bridges" to be sent.
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Changelog
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* "Github" -> "GitHub" in `list-connections`
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Add support for decoding XML for webhooks
* Ensure all endpoints use the error middleware
* Dependencies
* changelog
* Describe form data in the documentation
* Reorder
* Disallow some empty config URL settings
If these settings are meant to be unspecified, then their entire parent
sections (`widgets` & `generic`) should be unspecified.
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Convert some config URL strings to URL objects
This allows both parsing and easier crafting of relative URLs.
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Dump parsed URLs to default config
Also implement getters to return stringified URLs, instead of having to
store a URL's string representation directly.
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Fix link in AdminRoom
Signed-off-by: Damien Gaignon <damien.gaignon@gmail.com>
* Add 384.bugfix file
* Add full stop to changelog entry
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* 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>
* Get UserAgent from package.json (#359)
* Add changelog entry
* Update changelog.d/359.bugfix
Be more precise about which UserAgent it is
Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
* Rename changelog file to refer to its PR number
* Update changelog with issue number and credit
Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
* Refactor RoomConfigView slightly to reduce duplication
* Add Feed configuration widget
* Drop an unused parameter in FeedConnection
Co-authored-by: Will Hunt <will@half-shot.uk>
* Add a key to connection listing in RoomConfigView
Co-authored-by: Will Hunt <will@half-shot.uk>
* Be more explicit when checking for feeds enabledness
Co-authored-by: Will Hunt <will@half-shot.uk>
* Erase state when removing FeedConnection
* Tone down logging in FeedReader
* Strenghten validation of feed URLs
* Drop an unnecessary non-null assertion
* Allow adding labels to feeds
* Add changelog for #345
* Fix lint-found errors
* Improve feed setup widget changelog
Co-authored-by: Will Hunt <will@half-shot.uk>
* Validate feed URLs with HEAD if possible
* Don't log.error feed validation failures in SetupConnection
* Remove extra space
Co-authored-by: Will Hunt <will@half-shot.uk>
* Wrap errors from FeedConnection.provisionConnection in ApiErrors
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
* 1.6.1
* Add new error type for validation errors
* Validate state for GitHubRepo properly
* Add tests to check labels
* Also check GitLab repo
* changelog
* add mock store
* remove nullable
* Be less strict for existing state
* Improve test coverage
* Improve expect error text
* ValidationApiError now takes falsey objects and errors on them
* Remove UserTokenMockStore
* Actually commit the new tests
* Whoops we need to include github