Feature Request: Add support to fetch user public profile details including native Profile README
I’d like to propose adding a new feature to the GitLab API wrapper that allows fetching a GitLab user's public profile metadata along with their native profile README, if available.
Information to retrieve:
-
Public profile fields:
nameusernamebiolocationorganizationwebsite_urlavatar_urlcreated_at
-
Native Profile README contents (if present via
username/usernameproject)
Use Case:
Useful for:
- Contributor dashboards
- Dev profile viewers
- Team tooling and automation
- Community insights or public directories
Helps surface key developer information and showcase their README content for branding, skills, or introduction.
Proposed API:
profile = gl.users.get_public_profile("username")
# Example response:
{
"name": "Jane Dev",
"username": "janedev",
"bio": "Open source contributor",
"location": "Amsterdam, NL",
"organization": "DevCo",
"website_url": "https://janedev.io",
"avatar_url": "https://gitlab.com/uploads/-/system/user/avatar/456/avatar.png",
"created_at": "2019-06-01T12:00:00Z",
"profile_readme": {
"project": "janedev/janedev",
"file_path": "README.md",
"content": "# Hello, I'm Jane 👋\n\nWelcome to my profile..."
}
}
Implementation Notes:
-
Use the Users API to retrieve public metadata
-
To detect the Profile README:
- Attempt to fetch the public project at
username/username - Fetch
README.mdfrom the default branch using the Repository Files API
- Attempt to fetch the public project at
-
Ensure graceful failure if:
- The profile project does not exist
- The project is private
- The README does not exist
Optional Enhancements:
- Support returning rendered HTML (via GitLab rendering API, if accessible)
- Allow fallback to plain text or markdown
- Add flag to exclude README if only metadata is needed
Benefits:
- Provides a complete snapshot of a GitLab user’s public presence
- Enables richer automation and profile display tools