Pin source links to immutable revision
This commit is contained in:
parent
e8830e846a
commit
6e647fed4b
1 changed files with 2 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ import os
|
|||
from importlib.resources import files
|
||||
|
||||
REPOSITORY = "https://git.snw.su/snw/FletAppDemo"
|
||||
DEFAULT_REVISION = "e8830e846a40a6b4484b4c07d7ec752ca0faca87"
|
||||
|
||||
|
||||
def _manifest() -> dict[str, dict[str, str | int]]:
|
||||
|
|
@ -15,6 +16,5 @@ SOURCE_MANIFEST = _manifest()
|
|||
|
||||
def source_url(example_id: str) -> str:
|
||||
anchor = SOURCE_MANIFEST[example_id]
|
||||
revision = os.getenv("FLET_GALLERY_REVISION", "main")
|
||||
revision = os.getenv("FLET_GALLERY_REVISION", DEFAULT_REVISION)
|
||||
return f"{REPOSITORY}/src/commit/{revision}/{anchor['path']}#L{anchor['line']}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue