Title: Unable to initialize repo with readme when creating project on behalf of user · Issue #2869 · python-gitlab/python-gitlab · GitHub
Open Graph Title: Unable to initialize repo with readme when creating project on behalf of user · Issue #2869 · python-gitlab/python-gitlab
X Title: Unable to initialize repo with readme when creating project on behalf of user · Issue #2869 · python-gitlab/python-gitlab
Description: Description of the problem, including code/CLI snippet When creating a project on behalf of user u as an admin, initialize_with_readme is ignored In [32]: init_with_readme = True In [33]: ...: project_data = { ...: "name": project_name, ...
Open Graph Description: Description of the problem, including code/CLI snippet When creating a project on behalf of user u as an admin, initialize_with_readme is ignored In [32]: init_with_readme = True In [33]: ...: proj...
X Description: Description of the problem, including code/CLI snippet When creating a project on behalf of user u as an admin, initialize_with_readme is ignored In [32]: init_with_readme = True In [33]: ...: proj...
Opengraph URL: https://github.com/python-gitlab/python-gitlab/issues/2869
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to initialize repo with readme when creating project on behalf of user","articleBody":"## Description of the problem, including code/CLI snippet\r\n\r\nWhen creating a project on behalf of user `u` as an admin, `initialize_with_readme` is ignored\r\n```python\r\nIn [32]: init_with_readme = True\r\n\r\nIn [33]: \r\n ...: project_data = {\r\n ...: \"name\": project_name,\r\n ...: \"namespace_id\": group_id,\r\n ...: \"initialize_with_readme\": init_with_readme,\r\n ...: \"visibility\": \"internal\",\r\n ...: }\r\n\r\nIn [34]: r = u.projects.create(project_data)\r\n\r\nIn [35]: r.visibility\r\nOut[35]: 'internal'\r\n```\r\n\r\nI think this might be because the attr is not declared in [users.py](https://github.com/python-gitlab/python-gitlab/blob/12d195a35a1bd14947fbd6688a8ad1bd3fc21617/gitlab/v4/objects/users.py#L608) like it is in [projects.py](https://github.com/python-gitlab/python-gitlab/blob/12d195a35a1bd14947fbd6688a8ad1bd3fc21617/gitlab/v4/objects/projects.py#L617)?\r\n\r\nLooks like an extension of https://github.com/python-gitlab/python-gitlab/issues/765 in a different object?\r\n\r\n## Expected Behavior\r\n\r\nRepo is initialized with a default readme\r\n\r\n## Actual Behavior\r\n\r\nRepo is not initialized\r\n\r\n## Specifications\r\n\r\n - python-gitlab version: tested on 3.12.0\r\n - API version you are using (v3/v4): v4\r\n - Gitlab server version (or gitlab.com): [v16.10.4-ee](https://gitlab.com/gitlab-org/gitlab/-/tags/v16.10.4-ee)\r\n","author":{"url":"https://github.com/connelldave","@type":"Person","name":"connelldave"},"datePublished":"2024-05-16T11:50:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2869/python-gitlab/issues/2869"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2016d4d0-4f51-7b3e-c0c4-7c380ad8bef6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C62A:FF0D0:2376C1C:30E9AD4:6973A525 |
| html-safe-nonce | 7fb75e40a9754517b8d327d2935aa443a698ce63995cf6e3eda133ee8d053586 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjJBOkZGMEQwOjIzNzZDMUM6MzBFOUFENDo2OTczQTUyNSIsInZpc2l0b3JfaWQiOiI2NjMyNzg4NTYzMjk0NjU5ODc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3e0c715c508e5c2a7b3139a96847c7b6021522ead65d27908871e1e978ff753b |
| hovercard-subject-tag | issue:2300190462 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-gitlab/python-gitlab/2869/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3f29abae92138d98bd1a97e61100794ebed54d1a4b825aacd5170de015ffe742/python-gitlab/python-gitlab/issues/2869 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3f29abae92138d98bd1a97e61100794ebed54d1a4b825aacd5170de015ffe742/python-gitlab/python-gitlab/issues/2869 |
| og:image:alt | Description of the problem, including code/CLI snippet When creating a project on behalf of user u as an admin, initialize_with_readme is ignored In [32]: init_with_readme = True In [33]: ...: proj... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | connelldave |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3e9aa9d0c22a21b13b378b4acd09f5dd4876a884425aacd32a9f473b84c8762d |
| turbo-cache-control | no-preview |
| go-import | github.com/python-gitlab/python-gitlab git https://github.com/python-gitlab/python-gitlab.git |
| octolytics-dimension-user_id | 28886265 |
| octolytics-dimension-user_login | python-gitlab |
| octolytics-dimension-repository_id | 8077625 |
| octolytics-dimension-repository_nwo | python-gitlab/python-gitlab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8077625 |
| octolytics-dimension-repository_network_root_nwo | python-gitlab/python-gitlab |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ae4dbd3ac4179af799d71b75a60b0075ccccc5f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width