Skip to content

Commit f88358b

Browse files
author
Gareth
authored
Merge pull request #533 from Labelbox/gj/unhide
Unhide ReadMe
2 parents 8e5f9f8 + a233216 commit f88358b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/scripts/upload_documentation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def upload_doc(path, section):
4949
response = requests.post(README_ENDPOINT, json=payload, headers=headers)
5050
response.raise_for_status()
5151
data = response.json()
52-
change_name(data['slug'], title, headers)
52+
change_name(data['slug'], title, headers, hidden=False)
5353

5454

5555
def make_sections(sections):
@@ -73,14 +73,15 @@ def make_sections(sections):
7373
section['id'] = data['id']
7474
section['slug'] = data['slug']
7575

76-
change_name(data["slug"], section['title'], headers)
76+
change_name(data["slug"], section['title'], headers, False)
7777

7878
return sections
7979

8080

81-
def change_name(slug, title, headers):
81+
def change_name(slug, title, headers, hidden=True):
8282
resp = requests.put(f'{README_DOC_ENDPOINT}/{slug}',
8383
json={
84+
"hidden": hidden,
8485
"title": title,
8586
"category": CATEGORY_ID
8687
},

0 commit comments

Comments
 (0)