Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: atomist/automation-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8edd3ec51b9c7790b71ffac553db03889a557767
Choose a base ref
...
head repository: atomist/automation-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8eaf062fca240e5980fc029e03bed7e4587537e4
Choose a head ref
Loading
Showing with 60,499 additions and 116,011 deletions.
  1. +1 −0 .gitignore
  2. +223 −1 CHANGELOG.md
  3. +38 −0 SECURITY.md
  4. +12 −6 bin/command.ts
  5. +2 −0 bin/git-info.ts
  6. +74 −39 bin/gql-gen.ts
  7. +108 −0 bin/start-dev.ts
  8. +22 −33 bin/start.ts
  9. +98 −11 index.ts
  10. +541 −265 legal/THIRD_PARTY.md
  11. +6 −2 lib/SmartParameters.ts
  12. +1 −1 lib/action/actionOps.ts
  13. +37 −10 lib/automationClient.ts
  14. +314 −92 lib/configuration.ts
  15. +14 −4 lib/decorators.ts
  16. +2 −2 lib/globals.ts
  17. +48 −21 lib/graph/ApolloGraphClient.ts
  18. +28 −26 lib/graph/ApolloGraphClientFactory.ts
  19. +2 −2 lib/graph/graphQL.ts
  20. +47,182 −109,805 lib/graph/schema.json
  21. +35 −23 lib/internal/env/applicationEvent.ts
  22. +9 −9 lib/internal/event/InMemoryEventStore.ts
  23. +17 −25 lib/internal/graph/graphQL.ts
  24. +1 −1 lib/internal/invoker/Payload.ts
  25. +1 −1 lib/internal/invoker/disposable.ts
  26. +5 −0 lib/internal/message/ConsoleMessageClient.ts
  27. +9 −1 lib/internal/message/DebugMessageClient.ts
  28. +21 −21 lib/internal/metadata/decoratorSupport.ts
  29. +37 −3 lib/internal/metadata/metadataReading.ts
  30. +11 −6 lib/internal/parameterPopulation.ts
  31. +73 −56 lib/internal/transport/AbstractRequestProcessor.ts
  32. +20 −2 lib/internal/transport/RequestProcessor.ts
  33. +391 −100 lib/internal/transport/cluster/ClusterMasterRequestProcessor.ts
  34. +101 −60 lib/internal/transport/cluster/ClusterWorkerRequestProcessor.ts
  35. +5 −4 lib/internal/transport/cluster/messages.ts
  36. +25 −10 lib/internal/transport/express/ExpressRequestProcessor.ts
  37. +18 −10 lib/internal/transport/express/ExpressServer.ts
  38. +13 −13 lib/internal/transport/showStartupMessages.ts
  39. +35 −16 lib/internal/transport/websocket/DefaultWebSocketRequestProcessor.ts
  40. +44 −61 lib/internal/transport/websocket/WebSocketClient.ts
  41. +113 −0 lib/internal/transport/websocket/WebSocketLifecycle.ts
  42. +68 −24 lib/internal/transport/websocket/WebSocketMessageClient.ts
  43. +3 −0 lib/internal/transport/websocket/WebSocketRequestProcessor.ts
  44. +11 −8 lib/internal/transport/websocket/payloads.ts
  45. +3 −3 lib/internal/util/memory.ts
  46. +70 −0 lib/internal/util/poll.ts
  47. +97 −22 lib/internal/util/shutdown.ts
  48. +17 −3 lib/internal/util/string.ts
  49. +30 −6 lib/metadata/automationMetadata.ts
  50. +7 −7 lib/metadata/parameterUtils.ts
  51. +23 −13 lib/onCommand.ts
  52. +4 −4 lib/onEvent.ts
  53. +1 −0 lib/operations/CommandDetails.ts
  54. +25 −19 lib/operations/common/AbstractRemoteRepoRef.ts
  55. +82 −41 lib/operations/common/BitBucketRepoRef.ts
  56. +129 −127 lib/operations/common/BitBucketServerRepoRef.ts
  57. +70 −29 lib/operations/common/GitHubRepoRef.ts
  58. +13 −0 lib/operations/common/GitlabPrivateTokenCredentials.ts
  59. +176 −0 lib/operations/common/GitlabRepoRef.ts
  60. +16 −6 lib/operations/common/RepoId.ts
  61. +33 −0 lib/operations/common/gitlabRepoLoader.ts
  62. +5 −1 lib/operations/common/params/AlwaysAskRepoParameters.ts
  63. +9 −3 lib/operations/common/params/GitHubFallbackReposParameters.ts
  64. +13 −14 lib/operations/common/params/GitHubTargetsParams.ts
  65. +87 −0 lib/operations/common/params/GitlabTargetsParams.ts
  66. +8 −2 lib/operations/common/params/MappedRepoParameters.ts
  67. +2 −0 lib/operations/common/params/TargetsParams.ts
  68. +23 −24 lib/operations/common/repoUtils.ts
  69. +10 −2 lib/operations/edit/editAll.ts
  70. +24 −7 lib/operations/edit/editModes.ts
  71. +1 −15 lib/operations/generate/BaseSeedDrivenGeneratorParameters.ts
  72. +0 −3 lib/operations/generate/GitHubRepoCreationParameters.ts
  73. +46 −0 lib/operations/generate/GitlabRepoCreationParameters.ts
  74. +2 −4 lib/operations/generate/NewRepoCreationParameters.ts
  75. +0 −2 lib/operations/generate/RepoCreationParameters.ts
  76. +0 −2 lib/operations/generate/SeedDrivenGeneratorParameters.ts
  77. +16 −5 lib/operations/generate/generatorUtils.ts
  78. +9 −3 lib/operations/generate/remoteGitProjectPersister.ts
  79. +0 −69 lib/operations/generate/support/addAtomistWebhook.ts
  80. +43 −0 lib/operations/review/ReviewResult.ts
  81. +9 −4 lib/operations/support/editorUtils.ts
  82. +7 −3 lib/project/File.ts
  83. +1 −1 lib/project/diff/DifferenceEngine.ts
  84. +31 −4 lib/project/fingerprint/Fingerprint.ts
  85. +33 −30 lib/project/git/GitCommandGitProject.ts
  86. +2 −1 lib/project/git/GitProject.ts
  87. +8 −15 lib/project/git/gitStatus.ts
  88. +13 −11 lib/project/local/NodeFsLocalFile.ts
  89. +1 −1 lib/project/local/NodeFsLocalProject.ts
  90. +7 −3 lib/project/mem/InMemoryFile.ts
  91. +5 −1 lib/project/mem/InMemoryProject.ts
  92. +5 −3 lib/project/support/AbstractFile.ts
  93. +8 −13 lib/project/util/jsonUtils.ts
  94. +17 −14 lib/project/util/parseUtils.ts
  95. +20 −0 lib/project/util/projectUtils.ts
  96. +8 −8 lib/scan.ts
  97. +4 −4 lib/secured.ts
  98. +2 −1 lib/server/AbstractAutomationServer.ts
  99. +23 −0 lib/server/AutomationEventListener.ts
  100. +18 −11 lib/server/BuildableAutomationServer.ts
  101. +9 −0 lib/spi/clone/DirectoryManager.ts
  102. +2 −2 lib/spi/clone/StableDirectoryManager.ts
  103. +1 −1 lib/spi/clone/tmpDirectoryManager.ts
  104. +23 −0 lib/spi/graph/GraphClientFactory.ts
  105. +7 −11 lib/spi/http/axiosHttpClient.ts
  106. +21 −42 lib/spi/http/curlHttpClient.ts
  107. +14 −3 lib/spi/http/httpClient.ts
  108. +37 −0 lib/spi/http/wsClient.ts
  109. +58 −16 lib/spi/message/MessageClient.ts
  110. +16 −6 lib/spi/message/MessageClientSupport.ts
  111. +157 −86 lib/{util → spi/statsd}/statsd.ts
  112. +142 −0 lib/spi/statsd/statsdClient.ts
  113. +6 −2 lib/tree/ast/FileHits.ts
  114. +10 −0 lib/tree/ast/FileParser.ts
  115. +1 −1 lib/tree/ast/FileParserRegistry.ts
  116. +192 −27 lib/tree/ast/astUtils.ts
  117. +20 −0 lib/tree/ast/matchTesters.ts
  118. +30 −17 lib/tree/ast/microgrammar/MicrogrammarBasedFileParser.ts
  119. +100 −0 lib/tree/ast/regex/RegexFileParser.ts
  120. +2 −2 lib/tree/ast/typescript/TypeScriptFileParser.ts
  121. +3 −0 lib/typings/global-fetch.d.ts
  122. +301 −0 lib/util/child_process.ts
  123. +1 −4 lib/util/constructionUtils.ts
  124. +14 −0 lib/util/error.ts
  125. +7 −1 lib/util/exec.ts
  126. +60 −64 lib/util/gitHub.ts
  127. +22 −0 lib/util/http.ts
  128. +98 −67 lib/util/logger.ts
  129. +39 −0 lib/util/pool.ts
  130. +37 −0 lib/util/redact.ts
  131. +14 −5 lib/util/retry.ts
  132. +24 −20 lib/util/spawn.ts
  133. +5,104 −3,449 package-lock.json
  134. +113 −109 package.json
  135. +3 −0 test/.atomist/client.config-production.json
  136. +13 −11 test/action/actionChaining.test.ts
  137. +36 −39 test/api/ApolloGraphClient.test.ts
  138. +6 −0 test/api/GitProjectRemote.test.ts
  139. +8 −17 test/api/apiUtils.ts
  140. +13 −0 test/api/editorUtilsWithGitHubPullRequest.test.ts
  141. +17 −7 test/api/generatorEndToEnd.test.ts
  142. +22 −42 test/api/gitHub.test.ts
  143. +6 −0 test/asyncConfig.ts
  144. +0 −1 test/atomistWebhook.test.ts
  145. +2 −2 test/benchmark/{GeneratorBenchmark.ts → generator.benchmark.ts}
  146. +12 −32 test/bitbucket-api/BitBucketGit.test.ts
  147. +42 −0 test/bitbucket-api/BitBucketHelpers.ts
  148. +9 −4 test/bitbucket-api/generatorEndToEnd.test.ts
  149. +11 −29 test/command/HelloWorld.ts
  150. +3 −3 test/command/Message.test.ts
  151. +139 −26 test/configuration.test.ts
  152. +12 −5 test/credentials.ts
  153. +3 −41 test/graph/GraphQL.test.ts
  154. +5 −6 test/internal/env/gitInfo.test.ts
  155. +0 −1 test/internal/invoker/AbstractScriptedFlushable.test.ts
  156. +1 −2 test/internal/invoker/BuildableAutomationServer.test.ts
  157. +1 −1 test/internal/invoker/TestHandlers.ts
  158. +4 −5 test/internal/invoker/disposable.test.ts
  159. +0 −1 test/internal/invoker/functionStyleCommandHandler.test.ts
  160. +2 −1 test/internal/metadata/addAtomistSpringAgent.ts
  161. +2 −3 test/internal/metadata/classStyleMetadataReading.test.ts
  162. +0 −1 test/internal/metadata/classWithExternalParametersMetadataReading.test.ts
  163. +0 −1 test/internal/metadata/eventMetadataReading.test.ts
  164. +1 −1 test/internal/metadata/functionStyleMetadataReading.test.ts
  165. +11 −13 test/internal/transport/AbstractRequestProcessor.test.ts
  166. +25 −6 test/internal/transport/websocket/DefaultWebSocketTransportEventHandler.test.ts
  167. +21 −23 test/internal/transport/websocket/WebSocketMessageClient.test.ts
  168. +0 −1 test/internal/transport/websocket/payloads.test.ts
  169. +0 −1 test/internal/util/health.test.ts
  170. +0 −1 test/internal/util/string.test.ts
  171. +40 −6 ...itbucketserver-api/BitBucketServerGit.test.ts → operations/common/BitBucketServerRepoRef.test.ts}
  172. +48 −3 test/operations/common/GitHubRepoRef.test.ts
  173. +2 −1 test/operations/common/fromProjectList.test.ts
  174. +0 −1 test/operations/common/params/GitHubParams.test.ts
  175. +0 −1 test/operations/common/repoUtils.test.ts
  176. +0 −1 test/operations/edit/LocalEditor.test.ts
  177. +1 −1 test/operations/edit/VerifyEditMode.ts
  178. +0 −1 test/operations/edit/editAll.test.ts
  179. +0 −1 test/operations/edit/editOne.test.ts
  180. +1 −2 test/operations/edit/editorHandler.test.ts
  181. +0 −1 test/operations/edit/projectEditorsOps.test.ts
  182. +25 −12 test/operations/generate/generatorUtils.test.ts
  183. +285 −0 test/operations/review/ReviewResult.test.ts
  184. +0 −1 test/operations/review/reviewerHandler.test.ts
  185. +8 −8 test/operations/support/editorUtils.test.ts
  186. +0 −1 test/operations/tagger/tagger.test.ts
  187. +28 −20 test/project/git/CachedGitClone.test.ts
  188. +33 −2 test/project/git/GitCommandGitProject.test.ts
  189. +61 −98 test/project/git/GitProject.test.ts
  190. +14 −14 test/project/git/GitStatus.test.ts
  191. +1 −2 test/project/git/LockfileLibrary.test.ts
  192. +0 −1 test/project/local/AbstractFile.test.ts
  193. +2 −4 test/project/local/NodeFsLocalFile.test.ts
  194. +10 −10 test/project/local/NodeFsLocalProject.test.ts
  195. +100 −109 test/project/mem/InMemoryProject.test.ts
  196. +0 −1 test/project/util/diagnosticUtils.test.ts
  197. +0 −1 test/project/util/jsonUtils.test.ts
  198. +0 −1 test/project/util/parseUtils.test.ts
  199. +49 −1 test/project/util/projectUtils.test.ts
  200. +0 −1 test/project/util/sourceLocationUtils.test.ts
  201. +0 −1 test/scan.test.ts
  202. +8 −13 test/spi/clone/TmpDirectoryManager.test.ts
  203. +0 −1 test/spi/http/axiosHttpClient.test.ts
  204. +0 −1 test/spi/http/curlHttpClient.test.ts
  205. +0 −1 test/spi/message/MessageClient.test.ts
  206. +125 −0 test/spi/statsd/statsd.test.ts
  207. +0 −1 test/tree/ast/FileParserRegistry.test.ts
  208. +239 −3 test/tree/ast/astUtils.test.ts
  209. +15 −14 test/tree/ast/microgrammar/MicrogrammarBasedFileParser.test.ts
  210. +223 −37 test/tree/ast/microgrammar/microgrammars.test.ts
  211. +97 −0 test/tree/ast/regex/RegexFileParser.test.ts
  212. +0 −1 test/tree/ast/typescript/TypeScriptFileParser.test.ts
  213. +1 −1 test/tree/ast/typescript/conversionTests.ts
  214. +0 −1 test/tree/ast/typescript/javaScriptFileParserProject.test.ts
  215. +0 −1 test/tree/ast/typescript/typeScriptFileParserProject.test.ts
  216. +254 −0 test/util/child_process.test.ts
  217. +2 −0 test/util/exec.test.ts
  218. +64 −0 test/util/pool.test.ts
  219. +280 −0 test/util/redact.test.ts
  220. +2 −3 test/util/safeStringify.test.ts
  221. +3 −1 test/util/spawn.test.ts
  222. +0 −1 test/util/toFactory.test.ts
  223. +2 −1 tsconfig.json
  224. +226 −23 tslint.json
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
.npmrc
node_modules/
*.d.ts
*.d.ts.map
*.js
*.js.map
*.log
224 changes: 223 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,229 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/atomist/automation-client-ts/compare/1.0.0-RC.1...HEAD)
## [Unreleased](https://github.com/atomist/automation-client-ts/compare/1.6.2...HEAD)

### Added

- Add a clone option to shallowly fetch all branches. [#572](https://github.com/atomist/automation-client/issues/572)
- Add support for GitHub App tokens. [b58833a](https://github.com/atomist/automation-client/commit/b58833a4a91fab2cdd9bd5cdc8cc74da634359e4)
- Export isRemoteRepoRef. [#578](https://github.com/atomist/automation-client/issues/578)
- Add support for code reloading without restart. [#597](https://github.com/atomist/automation-client/issues/597)

### Changed

- Modify GitHub token pattern to match on app tokens. [#593](https://github.com/atomist/automation-client/issues/593)
- Upgrade to graphql-codegen version 1.7.1. [#595](https://github.com/atomist/automation-client/issues/595)

### Fixed

- `promptFor` not sending continuation message in cluster mode. [#592](https://github.com/atomist/automation-client/issues/592)
- Fix threaded messages for responses. [b782039](https://github.com/atomist/automation-client/commit/b7820393301f3707dfb21b0b323fc1c3a944864e)

## [1.6.2](https://github.com/atomist/automation-client-ts/compare/1.6.1...1.6.2) - 2019-07-11

### Added

- Add support for configuration profiles. [144fb03](https://github.com/atomist/automation-client/commit/144fb033b98292784cae30317fc0ba72dfe74dbb)
- Update lodash, lodash.merge and lodash.template to fix security vulnerability. [dcf21d8](https://github.com/atomist/automation-client/commit/dcf21d8d8ade37f192231f9d5bee28131c110c8a)

## [1.6.1](https://github.com/atomist/automation-client-ts/compare/1.6.0...1.6.1) - 2019-07-08

### Added

- Add x-request-id to apollo requests. [caef74a](https://github.com/atomist/automation-client-ts/compare/2015a1ef062c4c5d3954b002d46e101da643b7e8...caef74a92e47207849d76c88d7c0a4c95b67f5bd)

### Fixed

- Use major version for durable registrations. [46a9200](https://github.com/atomist/automation-client/commit/46a920020ed613c7a7a6c24e995d946e4abc2754)

## [1.6.0](https://github.com/atomist/automation-client-ts/compare/1.5.3...1.6.0) - 2019-07-04

### Added

- Add statsd metric to indicate WS backoff. [d0701de](https://github.com/atomist/automation-client/commit/d0701de2fecb730e1ca659913acac771c4ec3b0b)

## [1.5.3](https://github.com/atomist/automation-client-ts/compare/1.5.2...1.5.3) - 2019-06-04

### Changed

- Allow configuration to be a `Promise<Configuration>`. [#564](https://github.com/atomist/automation-client/issues/564)
- Rework github helpers to not use axios. [7d854b6](https://github.com/atomist/automation-client/commit/7d854b6ef8a931308d93618941963feb432c81c7)

### Deprecated

- Deprecate `atomist://github/default_repo_visibility` mapped parameter. [#559](https://github.com/atomist/automation-client/issues/559)

## [1.5.2](https://github.com/atomist/automation-client-ts/compare/1.5.1...1.5.2) - 2019-05-30

### Fixed

- Ensure query params are passed when retrieving default reviewers. [#556](https://github.com/atomist/automation-client/issues/556)
- Improve behavior when immediate shutdown requested. [7055ec1](https://github.com/atomist/automation-client/commit/7055ec155f9f1aefd0254fc64509543495538391)

## [1.5.1](https://github.com/atomist/automation-client-ts/compare/1.5.0...1.5.1) - 2019-05-29

### Changed

- Update to graphql-codegen 0.18.2. [a9101f8](https://github.com/atomist/automation-client/commit/a9101f8eff0f4c02a087cbec8ffc602e4292735f)

### Fixed

- Allow for normal exit with async hooks. [#553](https://github.com/atomist/automation-client/issues/553)

## [1.5.0](https://github.com/atomist/automation-client-ts/compare/1.4.0...1.5.0) - 2019-05-27

### Added

- Support sending response messages back into a thread. [dc005f2](https://github.com/atomist/automation-client/commit/dc005f2237b650d2f96ea5206db9a31b7453b1c9)
- Redact outgoing messages. [#527](https://github.com/atomist/automation-client/issues/527)
- Expose integration point for different statsd client libraries. [#533](https://github.com/atomist/automation-client/issues/533)
- Improvements to message sending protocol. [#546](https://github.com/atomist/automation-client/issues/546)
- Add default reviewer mechanism for BitBucket. [#542](https://github.com/atomist/automation-client/issues/542)

### Changed

- Consolidate and make test running smarter. [#517](https://github.com/atomist/automation-client/issues/517)
- MsgIds should not contain spaces. [#539](https://github.com/atomist/automation-client/issues/539)

### Removed

- Remove remoteRepoFrom. [#522](https://github.com/atomist/automation-client/issues/522)

### Fixed

- Safely serialze response data from workers. [d827034](https://github.com/atomist/automation-client/commit/d827034a22f091b9136ae6385ff23ca86d2d7737)
- Messages should not be sent to "null" users. [#530](https://github.com/atomist/automation-client/issues/530)
- configurationValue does not allow the use of a falsey default value. [#534](https://github.com/atomist/automation-client/issues/534)
- Send valid statsd metrics. [#532](https://github.com/atomist/automation-client/issues/532)
- edit-all fails if a branch already exists on one repo. [#168](https://github.com/atomist/automation-client/issues/168)
- Rework cluster shutdown. [#549](https://github.com/atomist/automation-client/issues/549)
- Improve cluster shutdown behavior. [#550](https://github.com/atomist/automation-client/issues/550)

## [1.4.0](https://github.com/atomist/automation-client-ts/compare/1.3.0...1.4.0) - 2019-04-15

### Added

- Maintain internal priority queue of command/event invocations [#512](https://github.com/atomist/automation-client/issues/512)
- BitBucketServerRepoRef support cloning from specific branch. [#482](https://github.com/atomist/automation-client/issues/482)
- Support web user_agent in source of incoming command request. [#498](https://github.com/atomist/automation-client/issues/498)
- Identity tokens in CommandHandlerRequest maps. [#497](https://github.com/atomist/automation-client/issues/497)
- Create single interface for creating RemoteRepoRef. [#513](https://github.com/atomist/automation-client/issues/513)

### Changed

- Clearer description for generated repo name. [#493](https://github.com/atomist/automation-client/issues/493)
- Hide secrets in messages. [ae43b4f](https://github.com/atomist/automation-client/commit/ae43b4ff21e11cd6493b8acac657a440904baf7c)

### Deprecated

- Session ID being used as Bearer in Authorization header. [#491](https://github.com/atomist/automation-client/issues/491)

### Fixed

- Handle empty parameter list on incoming command. [#490](https://github.com/atomist/automation-client/issues/490)

## [1.3.0](https://github.com/atomist/automation-client-ts/compare/1.2.0...1.3.0) - 2019-03-14

### Added

- Provide a dummy id to InMemoryProject. [#438](https://github.com/atomist/automation-client/issues/438)
- Allow boolean and number parameters types in command requests. [#446](https://github.com/atomist/automation-client/issues/446)
- Set WebSocketLifecycle on configuration. [6c009bf](https://github.com/atomist/automation-client/commit/6c009bf30f89b3685c208636337d6810338f917e)
- Provide a way to globally modify chat messages. [#470](https://github.com/atomist/automation-client/issues/470)
- Add getContentBuffer method to File. [#476](https://github.com/atomist/automation-client/issues/476)
- Test failure case in doWithFiles. [#471](https://github.com/atomist/automation-client/issues/471)
- Allow configurationValue without path. [128f8e4](https://github.com/atomist/automation-client/commit/128f8e49081574e5709298fe10b23fa244bc0a0a)
- Add Namespace support for Gitlab. [#477](https://github.com/atomist/automation-client/issues/477)

### Changed

- Allow matchIterator to be used to change matches. [#442](https://github.com/atomist/automation-client/issues/442)
- Various fixes to better support targeting in command handlers. [#441](https://github.com/atomist/automation-client/issues/441)
- Add support for latest Chooser API contract. [17549fd](https://github.com/atomist/automation-client/commit/17549fdb9ba12b707898e8cfb49e1f1ba61c5d37)
- Update failure logging for failed repo creations. [#461](https://github.com/atomist/automation-client/issues/461)
- Fall through to no creds for cloneUrl. [b31ba59](https://github.com/atomist/automation-client/commit/b31ba59eca489d9bfea5528046ed52800f6a7bc5)
- Remove axios usage and use HttpClientFactory. [#464](https://github.com/atomist/automation-client/issues/464)
- Update dependencies. [d68fef3](https://github.com/atomist/automation-client/commit/d68fef3d64974677d7ac4b7f1d957b24c65f6a26)
- Update all deps including graphql-code-generator. [#474](https://github.com/atomist/automation-client/issues/474)

### Deprecated

- Add support for latest Chooser API contract. [17549fd](https://github.com/atomist/automation-client/commit/17549fdb9ba12b707898e8cfb49e1f1ba61c5d37)
- Deprecated Chooser type. [60739fc](https://github.com/atomist/automation-client/commit/60739fccd95f0cb8515cf1aea9214daa015de491)

### Removed

- Remove addAtomistWebhook from see generator params. [4ebe315](https://github.com/atomist/automation-client/commit/4ebe315eda8555dcaad43e910a8ac903c90677f3)

### Fixed

- Errors in machine function can get swallowed and ignored . [#449](https://github.com/atomist/automation-client/issues/449)
- Do not swallow exceptions thrown by transforms in generators. [#465](https://github.com/atomist/automation-client/issues/465)
- Fix typo that crashed it. [#475](https://github.com/atomist/automation-client/issues/475)
- WebSocket can be destroyed before message sent. [#483](https://github.com/atomist/automation-client/issues/483)
- Disable TSLint on generated types. [#485](https://github.com/atomist/automation-client/issues/485)

## [1.2.0](https://github.com/atomist/automation-client-ts/compare/1.1.0...1.2.0) - 2018-12-27

### Added

- Add thread_ts to MessageOptions to address threads. [49b9be7](https://github.com/atomist/automation-client/commit/49b9be713fa6395d16892787958c4f1cf6a444d4)
- Disable graphql-tag fragment warning. [#419](https://github.com/atomist/automation-client/issues/419)
- Allow to print out configuration sources during startup. [a255171](https://github.com/atomist/automation-client/commit/a255171da3b88a2bd4422672422f5ad228183bbb)
- Add HEAD method to HttpClient. [32fbc96](https://github.com/atomist/automation-client/commit/32fbc9654178c8f3425e95ccc07228d8e1f2227b)
- Gracefully queue messages when the WS disconnects. [#426](https://github.com/atomist/automation-client/issues/426)
- Introduce `targets.branch` and fix `project.id` to point to correct project. [#434](https://github.com/atomist/automation-client/issues/434)
- Stronger typing for parameters. [#437](https://github.com/atomist/automation-client/issues/437)

### Changed

- Tighten typing on menuForCommand and buttonForCommand. [de3b582](https://github.com/atomist/automation-client/commit/de3b5821e69aee02952487aec63759d4ec7faffd)
- Update registration timeout to 30s. [65d9ba9](https://github.com/atomist/automation-client/commit/65d9ba9fe353c6c4609c35a1cb455bb9f31e26dc)

### Fixed

- Boolean parameter types are not supported. [#423](https://github.com/atomist/automation-client/issues/423)
- Introduce `targets.branch` and fix `project.id` to point to correct project. [#434](https://github.com/atomist/automation-client/issues/434)
- Fix defaulting of targetBranch when raising PR. [6c80f10](https://github.com/atomist/automation-client/commit/6c80f10c5656b8b9d1c838808d65d20020297e54)
- Logging setting can cause startup hangs. [#435](https://github.com/atomist/automation-client/issues/435)

## [1.1.0](https://github.com/atomist/automation-client-ts/compare/1.0.1...1.1.0) - 2018-12-08

### Added

- Add review comment sorter. [#402](https://github.com/atomist/automation-client/issues/402)
- Add gc stats onto statsd. [7639432](https://github.com/atomist/automation-client/commit/7639432a321e8add351f24539b8a5c0b6434d9d7)
- Add initial Gitlab support. [#399](https://github.com/atomist/automation-client/issues/399)
- Add low-level child_process promise functions. [#406](https://github.com/atomist/automation-client/issues/406)
- Add autoSubmit to CommandDetails. [ee0e474](https://github.com/atomist/automation-client/commit/ee0e474a0fede4142fb1c62509ebacccf716b289)
- Add auth endpoints to configuration. [1680df8](https://github.com/atomist/automation-client/commit/1680df8c434ffff350b3cb4a62a9c985e9dbf282)
- Add `GraphClientFactory`. [#410](https://github.com/atomist/automation-client/issues/410)
- Introduce Commit editMode and allow PR to specify base. [#414](https://github.com/atomist/automation-client/issues/414)
- Introduce promise pool to limit number of concurrent executions. [#417](https://github.com/atomist/automation-client/issues/417)

### Changed

- Update to latest graphql-code-generator. [#401](https://github.com/atomist/automation-client/issues/401)
- Extract creation of HTTP and WS clients for registration to proper factories. [#409](https://github.com/atomist/automation-client/issues/409)
- Introduce Commit editMode and allow PR to specify base. [#414](https://github.com/atomist/automation-client/issues/414)
- Chunk editAll operations. [#416](https://github.com/atomist/automation-client/issues/416)

### Deprecated

- Mark existing spawn and exec functions and interfaces as deprecated. [#406](https://github.com/atomist/automation-client/issues/406)

### Fixed

- Namespace our in process messages. [d0cf724](https://github.com/atomist/automation-client/commit/d0cf724245cd60dddb15de115a2f809481815297)

## [1.0.1](https://github.com/atomist/automation-client-ts/compare/1.0.0-RC.2...1.0.1) - 2018-11-09

### Added

- Fingerprint api docs added. [#396](https://github.com/atomist/automation-client/issues/396)

## [1.0.0-RC.2](https://github.com/atomist/automation-client-ts/compare/1.0.0-RC.1...1.0.0-RC.2) - 2018-10-30

### Changed

38 changes: 38 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Atomist Open Source Security Policies and Procedures

This document outlines security procedures and general policies for the
Atomist Open Source projects as found on https://github.com/atomist.

* [Reporting a Vulnerability](#reporting-a-vulnerability)
* [Disclosure Policy](#disclosure-policy)

## Reporting a Vulnerability

The Atomist OSS team and community take all security vulnerabilities
seriously. Thank you for improving the security of our open source
software. We appreciate your efforts and responsible disclosure and will
make every effort to acknowledge your contributions.

Report security vulnerabilities by emailing the Atomist security team at:

security@atomist.com

The lead maintainer will acknowledge your email within 24 hours, and will
send a more detailed response within 48 hours indicating the next steps in
handling your report. After the initial reply to your report, the security
team will endeavor to keep you informed of the progress towards a fix and
full announcement, and may ask for additional information or guidance.

Report security vulnerabilities in third-party modules to the person or
team maintaining the module.

## Disclosure Policy

When the security team receives a security bug report, they will assign it
to a primary handler. This person will coordinate the fix and release
process, involving the following steps:

* Confirm the problem and determine the affected versions.
* Audit code to find any potential similar problems.
* Prepare fixes for all releases still under maintenance. These fixes
will be released as fast as possible to NPM.
18 changes: 12 additions & 6 deletions bin/command.ts
Original file line number Diff line number Diff line change
@@ -20,13 +20,19 @@ import { guid } from "../lib/internal/util/string";
import { enableDefaultScanning } from "../lib/scan";
import { AutomationServer } from "../lib/server/AutomationServer";

main();
/* tslint:disable:no-console */

main()
.catch((err: Error) => {
console.error(`Unhandled exception: ${err.message}`);
process.exit(101);
});

/**
* Parse command line CommandInvocation argument, set up, and call the
* command handler. This method will not return.
*/
async function main() {
async function main(): Promise<void> {
if (!process.argv[2]) {
console.error(`[ERROR] Missing command, you must supply the CommandInvocation on the command line`);
process.exit(3);
@@ -69,7 +75,7 @@ function createHandlerContext(config: Configuration): HandlerContext {
* @param ci command and its parameters
* @param ctx suitable execution context
*/
async function invokeOnConsole(automationServer: AutomationServer, ci: CommandInvocation, ctx: HandlerContext) {
async function invokeOnConsole(automationServer: AutomationServer, ci: CommandInvocation, ctx: HandlerContext): Promise<void> {

// Set up the parameter, mappend parameters and secrets
const handler = automationServer.automations.commands.find(c => c.name === ci.name);
@@ -87,7 +93,7 @@ async function invokeOnConsole(automationServer: AutomationServer, ci: CommandIn
secrets: ci.args ? ci.args.filter(a => handler.secrets.some(p => p.name === a.name))
.map(a => {
const s = handler.secrets.find(p => p.name === a.name);
return { uri: s.uri, value: a.value };
return { uri: s.uri, value: String(a.value) };
}) : undefined,
};

@@ -99,9 +105,9 @@ async function invokeOnConsole(automationServer: AutomationServer, ci: CommandIn
}
try {
const result = await automationServer.invokeCommand(invocation, ctx);
console.log(`Command succeeded: ${stringify(result, null, 2)}`);
console.log(`Command succeeded: ${stringify(result, undefined, 2)}`);
} catch (e) {
console.error(`[ERROR] Command failed: ${stringify(e, null, 2)}`);
console.error(`[ERROR] Command failed: ${stringify(e, undefined, 2)}`);
process.exit(1);
}
process.exit(0);
2 changes: 2 additions & 0 deletions bin/git-info.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ import * as fs from "fs-extra";
import * as path from "path";
import { obtainGitInfo } from "../lib/internal/env/gitInfo";

/* tslint:disable:no-console */

/**
* Generate git-info.json for automation client.
*/
Loading