Skip to content

Commit 712a95f

Browse files
committed
do not use the filename to decide if a file is to be commited
1 parent 868c511 commit 712a95f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

middleware/main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,10 @@ async def main():
329329
transform_publisso_to_publisso_schemaorg()
330330
if sitemap["name"] == "openagrar":
331331
extract_thunen_from_openagrar_metadata()
332-
if git_repo and not path.name.endswith("_native.json"):
333-
# if a git repo is set, we commit all files except those ending in _native.json
332+
commit = sitemap.get("commit", True)
333+
if git_repo and commit:
334+
# if a git repo is set, commit all files except those that are explicitly
335+
# excluded
334336
commit_to_git(scraper_config.url, git_repo, path, starttime)
335337

336338
if git_repo:

0 commit comments

Comments
 (0)