Commit Graph

201 Commits

Author SHA1 Message Date
Mikael Östberg 6c91854391 Fix missing authentication in GitHubUrlReader
An oversight that probably stems from that most repositories for tech-docs are public anyway. 
Ours are not, and are inside of a GitHub Enterprise, which is how i found this tiny bug. 

I wish i knew how to mock the cross-fetch in order to inspect the Authorization header of the request to test this fix. 
I can only confirm that it works on our backstage that targets GHE.
2020-12-03 20:41:31 +01:00
github-actions[bot] 01aa774d9a Version Packages 2020-12-03 15:28:22 +00:00
Sebastian Qvarfordt b570f78e22 Use resource instead of source when building github repo tar url (#3552)
* Use resource instead of source when building github repo tar url

* Changed the right part of the url...

* Added test to make sure we include subdomains in githubs readtree

* Fixed wopsie
2020-12-03 16:24:29 +01:00
Patrik Oldsberg 974223db86 Merge pull request #3507 from backstage/rugvip/port
backend-common: allow port in config to be both a number or a string
2020-12-01 14:58:55 +01:00
blam b27077aa7b chore: set the port as number if it comes through as a string 2020-12-01 13:16:46 +01:00
Patrik Oldsberg 6123682748 backend-common: allow port in config to be both a number or a string 2020-12-01 12:07:54 +01:00
Oliver Sand 52f6438794 Make backend-commons tests work on Windows 2020-11-30 18:06:42 +01:00
github-actions[bot] 892645b815 Version Packages 2020-11-27 12:51:09 +00:00
Patrik Oldsberg b3d4e4e57a backend-common: move the frontend visibility of config to @backstage/integration 2020-11-26 22:28:38 +01:00
Fredrik Adelöw 3aa7efb3ff backend-common: add support for passing false as a CSP field value, to drop it from the defaults (#3437) 2020-11-25 10:51:35 +01:00
github-actions[bot] fefb0e18e0 Version Packages 2020-11-24 10:17:02 +00:00
Patrik Oldsberg b47dce06fc backend-common: make integrations host and urls visibile in the frontend 2020-11-23 17:20:35 +01:00
Patrik Oldsberg 61da9c0320 backend-common: make test-utils a dev dep 2020-11-23 11:25:56 +01:00
Mattias Frinnström f31d689d82 Switch to using async fs operations 2020-11-20 13:32:53 +01:00
Mattias Frinnström 3092806838 Support ZIP files without directory entries 2020-11-20 13:32:53 +01:00
Mattias Frinnström b1b6537bc3 Handle request headers correctly 2020-11-20 13:32:53 +01:00
Mattias Frinnström c08e5cbd6f Fix parameters and encode URI component 2020-11-20 13:32:53 +01:00
Mattias Frinnström a9155afb83 Some small changes 2020-11-20 13:32:53 +01:00
Mattias Frinnström 34a51a288a Expose ZipArchiveResponse through ReadTreeResponseFactory 2020-11-20 13:32:53 +01:00
Mattias Frinnström 9367dde00d Introduce ZipArchiveResponse 2020-11-20 13:32:53 +01:00
Mattias Frinnström c6cf38c6a4 Rename ArchiveResponse to TarArchiveResponse 2020-11-20 13:32:23 +01:00
github-actions[bot] bc0f47b7b7 Version Packages 2020-11-19 15:13:57 +00:00
Patrik Oldsberg 0b97a89f55 address config schema review comments 2020-11-18 11:31:19 +01:00
Patrik Oldsberg 9f6f39ce5f backend-common: integration configs aren't required 2020-11-18 11:31:17 +01:00
Patrik Oldsberg b8eba8219e config-loader: enable validation of required props in d.ts definitions + fix issues 2020-11-18 11:31:16 +01:00
Patrik Oldsberg 567ce7804a backend-common: port config schema to d.ts and fill out 2020-11-18 11:31:14 +01:00
Patrik Oldsberg 7298f8b265 config-loader: remove support for conditionally reading secrets 2020-11-18 11:31:10 +01:00
Patrik Oldsberg ddb5a38f77 backend-common,core,auth-backend: added initial config schemas 2020-11-18 11:31:08 +01:00
Fredrik Adelöw 7b37e68348 integrations: move common integration concerns to a separate package (#3295) 2020-11-16 16:15:09 +01:00
Patrik Oldsberg 484385c658 Merge pull request #3283 from backstage/rugvip/retree
backend-common: refactor readTree to only accept URL and options + add response helper
2020-11-13 10:53:53 +01:00
Patrik Oldsberg bd1cef1847 backend-common: review comments for readTree + switch archive return type to a stream 2020-11-13 00:43:20 +01:00
Patrik Oldsberg b672492e21 backend-common: make .readTree required 2020-11-12 13:59:10 +01:00
Patrik Oldsberg 6417d966bb backend-common,techdocs-backend: refactor .readTree to accept options and implement GitHub reader with response utils 2020-11-12 13:53:22 +01:00
Patrik Oldsberg e1057d9a50 backend-common: provide a ReadTreeResponseFactory instance to all ReaderFactories 2020-11-12 13:52:18 +01:00
Patrik Oldsberg 5bc30d262f backend-common: make ReadTreeResponse.dir() accept an options object instead 2020-11-12 12:31:23 +01:00
Patrik Oldsberg 73231427e1 backend-common: add top-level archive filtering to ArchiveResponse + fix files() 2020-11-12 12:27:33 +01:00
Patrik Oldsberg 1b632b5aa7 backend-common: add archive tree reading utilities 2020-11-12 12:27:33 +01:00
Patrik Oldsberg e74422b4d8 backend-common: make ReadTreeResponse.files async 2020-11-12 12:27:33 +01:00
github-actions[bot] 76a8099029 Version Packages 2020-11-12 10:52:23 +00:00
Sebastian Qvarfordt f059eaf755 readTree method on UrlReader (#2925)
* Basic implementation of readTree on github and use it in techdocs

* Added a UrlPreparer and cleaned up some minor things

* Download entire archive and filter out the wanted files in readTree

* Added test for dir output of tree reader

* Fixed formatting

* Fixed formatting

* Some cleanups and fixes

* Fix typing issues

* Fix prettier

* Fix prettier

* Removed unused dependency

* Fixed comments on PR

* Prettier

* Moved @types/fs-extra to devDeps

* Fixed another PR comment

* Added a test for getDocFilesFromRepository

* Prettier
2020-11-09 16:28:51 +01:00
Oliver Sand 33b7300ebe Capture plugin name under the /api/ prefix for http metrics (#3259) 2020-11-06 20:21:36 +01:00
github-actions[bot] 715bb76fb5 Version Packages 2020-11-03 20:50:42 +00:00
Patrik Oldsberg 8360d9f7e2 Merge pull request #3140 from backstage/rugvip/release
Release v0.1.1
2020-11-03 13:28:03 +01:00
Patrik Oldsberg af141c0766 rewrite repo location urls 2020-11-03 11:03:49 +01:00
Oliver Sand a6da3d1c06 fix: upgrade knex to 0.21.6
This reduces a overly noisy warning during tests: https://github.com/knex/knex/pull/3936
2020-10-29 20:24:49 +01:00
Patrik Oldsberg 833a652d05 v0.1.1 2020-10-28 10:22:09 +01:00
Patrik Oldsberg 754109ee61 v0.1.1-alpha.26 2020-10-27 12:00:01 +01:00
Mathias Åhsberg 15b57a1848 Remove unnecessary rawApi reading 2020-10-23 10:29:57 +02:00
Mathias Åhsberg 6579769dff Add support for reading files from Bitbucket Server. 2020-10-23 10:10:05 +02:00
Patrik Oldsberg bc9f536545 Merge pull request #2994 from spotify/rugvip/conflagrate
config-loader: switch to using --config options to load in config
2020-10-22 18:01:21 +02:00