Support .profile README.md in User profile#1286

Closed
opened 2023-09-01 12:02:43 +02:00 by Andre601 · 7 comments

Made this through your app, so no templates to select from :/

Forgejo (not sure about gitea) added support for having a profile readme by creating a .profile repository with a README.md file in it to display.

It would be cool if Gitnex could support displaying this profile readme when viewing a profile.

> Made this through your app, so no templates to select from :/ Forgejo (not sure about gitea) added support for having a profile readme by creating a `.profile` repository with a README.md file in it to display. It would be cool if Gitnex could support displaying this profile readme when viewing a profile.
Contributor

Can confirm: Gitea also has this feature. It was added in v1.20.0 (https://github.com/go-gitea/gitea/pull/23260).

Can confirm: Gitea also has this feature. It was added in v1.20.0 (https://github.com/go-gitea/gitea/pull/23260).
Owner

@Andre601 this definitely is possible, with:

  • if the API provide information about the repository somehow in user endpoint OR directly provide the README.md content inside an object

I would love to see an example repository for this in action and whether the API object is necessary to get that info.

@Andre601 this definitely is possible, with: - if the API provide information about the repository somehow in user endpoint OR directly provide the README.md content inside an object I would love to see an example repository for this in action and whether the API object is necessary to get that info.
Author

Looking at the API docs, there doesn't seem to be any path that would directly provide the profile readme content...
At most is there the option to get the files of a repository and then check for the readme, but this would be somewhat unoptimal.

I'll see that I can propose adding a new API route to Gitea so that it could eventually be merged into Forgejo, if Gitea decides to add it...

Looking at the API docs, there doesn't seem to be any path that would directly provide the profile readme content... At most is there the option to get the files of a repository and then check for the readme, but this would be somewhat unoptimal. I'll see that I can propose adding a new API route to Gitea so that it could eventually be merged into Forgejo, if Gitea decides to add it...
Owner

That would be great.

That would be great.
Author
https://github.com/go-gitea/gitea/issues/26879
Author

Gitea contributor suggests to just make a normal request towards {user}/.profile/raw/branch/main/README.md and if it returns 404 treat it like no readme exists.

I'm not too sure about that one tbh. Especially given that the repository may not have main or master defined as their default branches, so it would be guess work here...

Gitea contributor suggests to just make a normal request towards `{user}/.profile/raw/branch/main/README.md` and if it returns 404 treat it like no readme exists. I'm not too sure about that one tbh. Especially given that the repository may not have `main` or `master` defined as their default branches, so it would be guess work here...
Owner

Gitea contributor suggests to just make a normal request towards {user}/.profile/raw/branch/main/README.md and if it returns 404 treat it like no readme exists.

Maybe he is talking about the web. That path will work on the web version.

To make the this work in GitNex, I can make use of file content API, /repos/{owner}/{repo}/contents/{filepath}. I will check this out in detail soon.

> Gitea contributor suggests to just make a normal request towards {user}/.profile/raw/branch/main/README.md and if it returns 404 treat it like no readme exists. Maybe he is talking about the web. That path will work on the web version. To make the this work in GitNex, I can make use of file content API, `/repos/{owner}/{repo}/contents/{filepath}`. I will check this out in detail soon.
mmarif added this to the 5.2.0 milestone 2023-09-19 19:49:23 +02:00
mmarif self-assigned this 2023-09-19 19:49:30 +02:00
mmarif referenced this issue from a commit 2023-09-20 17:30:34 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gitnex/GitNex#1286
No description provided.