Pull request preview URLs (#625)

* Dynamic link to HEAD of a given PR

* Display pr name and link in notification console

* Pass along query string to Explorer

This means you can write a URL like:

https://cosmos-explorer-preview.azurewebsites.net/pull/123?feature.enableFoo=true

and when Explorer loads it'll have enableFoo set to true in the features
object.
This commit is contained in:
Jordi Bunster
2021-04-12 13:10:31 -07:00
committed by GitHub
parent 662c03580a
commit 88f5e7485a
5 changed files with 712 additions and 11 deletions

View File

@@ -19,6 +19,7 @@ export type Features = {
readonly notebookServerUrl?: string;
readonly sandboxNotebookOutputs: boolean;
readonly selfServeType?: string;
readonly pr?: string;
readonly showMinRUSurvey: boolean;
readonly ttl90Days: boolean;
};
@@ -57,6 +58,7 @@ export function extractFeatures(given = new URLSearchParams()): Features {
notebookServerUrl: get("notebookserverurl"),
sandboxNotebookOutputs: "true" === get("sandboxnotebookoutputs"),
selfServeType: get("selfservetype"),
pr: get("pr"),
showMinRUSurvey: "true" === get("showminrusurvey"),
ttl90Days: "true" === get("ttl90days"),
};