feat(aio): use shorter URLs for previews

Use the 7 first characters of the 40-chars long SHAs for shorter/cleaner URLs.
The collision probability is extremely low (since all SHAs are further
"namespaced" under the corresponding PR). In case of a collision, the second PR
will not be deployed, in order to avoid overwriting the original build.

(This is a design decision to keep the implementation simple. It can be changed
later if necessary.)
This commit is contained in:
Georgios Kalpakas
2017-06-25 22:13:03 +03:00
committed by Matias Niemelä
parent 3c4eef99be
commit 4268c82898
9 changed files with 161 additions and 50 deletions

View File

@ -1,2 +1,3 @@
// Constants
export const HIDDEN_DIR_PREFIX = 'hidden--';
export const SHORT_SHA_LEN = 7;