I’m working on a post-receive server hook that will add to my issue tracker (Redmine) the commits made.
One of the things I want to provide is a link to the commit on Gitea. Although the url can be constructed, I’m wondering if there is an existing Gitea API call that could convert a hash to a valid URL in a safe and consistent manner, or alternatively a way to create a valid URL from only the hash.
EDIT: I see that there are some environment variables set by Gitea on execution of the the hook, so perhaps it could be provided there?
(I understand that hashes aren’t guaranteed to be unique across repos but perhaps there’s a mitigation for this - the API can return a list for example).