-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have only full name in api organization model object. #21205
Comments
|
KN4CK3R, username is not available in organization api model. Where exactly should I put a username? |
This is exactly what I was looking for. Thank you. But this information is not available in the documentation. As is known, there is no "username" field among model members in the documentation. In any case, I got my answer. Thanks for your attention. I'm closing the issue. |
Which documentation are you talking about? |
I'm sorry for the late reply. |
Org and user model are the same internally, so that may be reason. I would like to say "it's the same as GitHub does" but they named the field just |
related #21205 The field `UserName` is not really usefull for an organization. This adds a second `Name` field. The [GitHub API](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) uses `name` too. `UserName` should be deprecated then.
Description
In the api models, there is no field other than the "full_name" field in the object that represents the organizations. This "full_name" field refers to the "Organization Full Name" field in the organization settings. However, the information requested in API queries is the information in the "Organization Name" field. And this information is one that cannot be retrieved with the current api model.
This causes an error in requests like "/orgs/{org}/hooks", "/orgs/{org}/members" etc if organization name and display name are different.
For example, if the organization name is Microsoft, the address of the request should be "/orgs/Microsoft/members", but since the organization's full name is Microsoft Inc, the address will be "/orgs/Microsoft%20Inc/members" and the response is as follows as an example.
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
Windows Server 2022
How are you running Gitea?
Gitea binary applicaiton on Windows server with default configurations.
Database
MySQL
The text was updated successfully, but these errors were encountered: