Skip to content

Commit fee4621

Browse files
Grace Chongi80and
authored andcommitted
DOP-2986: Include branch name in manifest file
1 parent f023af8 commit fee4621

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

snooty/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ def __init__(self, zip: zipfile.ZipFile) -> None:
294294
self.diagnostics: Dict[FileId, List[Diagnostic]] = defaultdict(list)
295295
self.assets_written: Set[str] = set()
296296

297-
def on_config(self, config: ProjectConfig) -> None:
297+
def on_config(self, config: ProjectConfig, branch: str) -> None:
298298
self.metadata["project"] = config.name
299+
self.metadata["branch"] = branch
299300

300301
def on_diagnostics(self, path: FileId, diagnostics: List[Diagnostic]) -> None:
301302
if not diagnostics:

snooty/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ def get_giza_category(path: PurePath) -> str:
11811181

11821182

11831183
class ProjectBackend:
1184-
def on_config(self, config: ProjectConfig) -> None:
1184+
def on_config(self, config: ProjectConfig, branch: str) -> None:
11851185
pass
11861186

11871187
def on_progress(self, progress: int, total: int, message: str) -> None:
@@ -1484,7 +1484,7 @@ def __init__(
14841484

14851485
self.asset_dg: "networkx.DiGraph[FileId]" = networkx.DiGraph()
14861486
self.expensive_operation_cache: Cache[FileId] = Cache()
1487-
self.backend.on_config(self.config)
1487+
self.backend.on_config(self.config, branch)
14881488

14891489
def get_full_path(self, fileid: FileId) -> Path:
14901490
return self.config.source_path.joinpath(fileid)

0 commit comments

Comments
 (0)