Small fix needed to enable GHES
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Inspect 90_build_lib.ipynb and the build_lib.py generation path that produces metadata.py and the documentation. Reproduce the GHES 3.3 entry for enterprise-admin.suspend_user, then verify that the generated Python method and docs use an underscore instead of a hyphen and that the API call is usable.
Written by the indexing model from the issue text.
Description
Hi
I have been generating the lib and doc with the Open API description for GHES 3.3.
All is fine except a small thing impacting pure GHES enterprise capabilities:
build_lib.py generates the metadata.py with for example
('/users/{username}/suspended', 'put', 'enterprise-admin/suspend-user', 'Suspend a user', 'enterprise-server@3.3/rest/reference/enterprise-admin#suspend-a-user', [], [['reason', str]], ''),
which is converted in doc as
- enterprise-admin.suspend_user(username, reason): Suspend a user
The problem is with the minus in enterprise-admin. In Python a method cannot have a minus in its name.
When I replace with enterprise_admin everything is fine and I can call the API.
Then I think a specific replacement of - by _ should be added to https://github.com/fastai/ghapi/blob/master/90_build_lib.ipynb
- Dominant language
- Python
- Stars
- 687
- Forks
- 69
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AnswerDotAI/ghapi
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AnswerDotAI/ghapi#158 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
AnswerDotAI/ghapi#208 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
AnswerDotAI/ghapi#201 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
AnswerDotAI/ghapi#186 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
AnswerDotAI/ghapi#185 · 1 comment · 1 reaction ·
All issues in AnswerDotAI/ghapi
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100