Add Code search
Gitea has had code search for a while, it was just 1.13 that introduced being able to use ES. Codesearch is not available in any form on try.gitea.io as people love to push giant repos to it and eat up all our disk space (hence the notice that repos may disappear at any time), and having codesearch would only increase the resources needed.
I see it as running side-by-side, however to make integration easier I could send a customization PR to codeberg that would swap out the standard code search text box with it opening up results in sourcegraph, and also add a button for something like "open this repo in sourcegraph".
Whichever way is decided (enabling code search via bleve, es, or connecting to a sourcegraph install) will add additional effort for the infra team though, so while one way may be better in terms of accuracy and usability, we should also take into account those managing the infra so as not to cause burnout.
It would be great to have this feature! It would significantly boost productivity on codeberg for me. I am happy with whatever works best for the devs.
why not just test it with codeberg's test instance and look ow mouch each take?
Running such tests (in a dedicated VM for isolation) is high on the todo list.
EDIT: Please don't use this for viewing non-unique exports like
HEAD because each tarball is cached on the dezip side using URL as key!
So instead of my teddit example here is another one using
lemmy-js-client (teddit doesn't have any tagged releases yet):
Also in order to remove tarball from the dezip server use the following URL form:
While this by no means replaces proper builtin search functionality, it is a useful shortcut that can be utilized until we get there: https://dezip.org
Reading their mission statement makes me think that searching Codeberg/Gitea autogenerated tarball exports might be an ideal service use case:
discomfort with the centralization of software development into sites like github and gitlab. convenient source code browsing shouldn't be coupled so tightly to repository hosting services.
For example, this is how one could use dezip to search teddit's source code:
Hit F after landing there or just click on magnifying glass icon in the upper right corner.
They don't say anything about usage limits but I would assume fair share usage policy is implied 😉
EDIT: Please don't use this per reasons explained above. Leaving original content below for sake of transparency.
I'm sure it can be improved a lot but I believe it is a good start 😉
Here is a quick n dirty bookmarklet I just made:
This is great. Thank you for stopping by.
I am not sure how far the research into Codeberg own search feature is at this point, when new Codeberg server hardware is being burned in and configured.
The line anchors are very useful. This is compatible with Gitea deep links, so simply by replacing the base url, one can make the link go from dezip back to the repo:
We are experimenting with opensearch (elasticsearch fork). It is enabled on codeberg-test.org.
gitea somehow only indexes some repos, which seems like an upstream bug to me.
The (outdated) Gadgetbridge repo on codeberg-test.org has an index and can be searched.
This is awesome! Yes, some repos work, some don't
Also, gitea's work on indexing wiki seems to have stalled, but even code search would be a huge improvement.
Deleting a branch is permanent. It CANNOT be undone. Continue?