sourcegraph / sourcegraph-extension-api

Sourcegraph extension API: use and build extensions that enhance reading and reviewing code in your existing tools. "The extension API you wish your code host had."
44 stars 2 forks source link

feat: add context/update notification for client-stored context #21

Closed sqs closed 6 years ago

sqs commented 6 years ago

The server can send the client a context/update notification with properties. These properties are stored on the client and can be referenced in context expressions on contributions.

For example, an extension could send a context/update notification to set the property myname to alice. If any contributed command's title was Hello, ${myname}, it would evaluate to Hello, alice.

codecov[bot] commented 6 years ago

Codecov Report

Merging #21 into master will increase coverage by 0.11%. The diff coverage is 83.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   66.66%   66.78%   +0.11%     
==========================================
  Files          96       99       +3     
  Lines        3435     3510      +75     
  Branches      606      625      +19     
==========================================
+ Hits         2290     2344      +54     
- Misses       1137     1157      +20     
- Partials        8        9       +1
Impacted Files Coverage Δ
src/client/features/common.ts 84.37% <ø> (ø) :arrow_up:
src/jsonrpc2/messages.ts 100% <ø> (ø) :arrow_up:
src/protocol/contribution.ts 100% <ø> (ø) :arrow_up:
src/protocol/context.ts 100% <100%> (ø)
src/environment/context/expr/parser.ts 94.32% <100%> (-0.35%) :arrow_down:
src/environment/providers/contribution.ts 100% <100%> (ø) :arrow_up:
src/environment/registries.ts 100% <100%> (ø) :arrow_up:
src/environment/context/expr/lexer.ts 88.41% <100%> (+0.04%) :arrow_up:
src/server/features/context.ts 33.33% <33.33%> (ø)
src/environment/environment.ts 78.26% <50%> (-2.7%) :arrow_down:
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7a5bc20...9943087. Read the comment docs.

sourcegraph-bot commented 6 years ago

:tada: This PR is included in version 10.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: