Description
When the user doesn't provide an explicit date
or ref
to begin searching activity, we will auto-detect a date based on the latest git tag. However, git tags don't necessarily correspond to releases (e.g., for monorepos with many many tags).
I suggest that instead, when users don't provide a starting date
or ref
, we use the latest release date rather than the latest tag date.
Implementation
To simplify this, we could use the gh
command line tool to grab the name and date of the latest github release and use that as a starting point. If gh
isn't installed, we could default to the current behavior of using git tag
.
I think the command for returning the name/date of the latest release with gh
is something like this:
gh release view -R executablebooks/mystmd --json name,publishedAt --jq '{name: .name, publishedAt: .publishedAt}'
note: this would be needed for us to use this tool with mystmd
, since that's a monorepo!