Best practice for repos with no version tags

I’m trying to put together a formula for a GitHub repo. The code works with no problems, but the developers don’t tag their releases with version numbers.

What should I do in this case with the version field?

If you’re making it for a personal tap it doesn’t matter. If it’s for homebrew-core it’s not allowed: https://docs.brew.sh/Acceptable-Formulae#stable-versions

To add to what Sean said: in this case, for my own tap I invent a version number based on the date of the last commit to the repository, e.g., version "2019.11.25". Better yet, ask the upstream maintainer to tag proper releases.