Skip to content

Commit

Permalink
Update sync_version_to_contentful.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaojing1987 authored Dec 2, 2023
1 parent a3e9a93 commit 70e55ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/sync_version_to_contentful.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Content-Type": "application/vnd.contentful.management.v1+json"
}

def update_contentful(product_name, editions):
def update_contentful(product_name):
# 获取 Contentful 中的 Product entry
response = requests.get(
f"{CONTENTFUL_MANAGEMENT_API}/spaces/{SPACE_ID}/environments/master/entries?content_type=product&fields.key={product_name}",
Expand All @@ -24,3 +24,5 @@ def update_contentful(product_name, editions):
entries = response.json()
# 打印返回的数据
print(json.dumps(entries, indent=2))

update_contentful("wordpress")

0 comments on commit 70e55ce

Please sign in to comment.