Are there plans to add a :git/branch
key for Git libs in deps.edn
that works like :git/tag
? In other words, Git refs (:git/branch
or :git/tag
) have to be paired with a Git SHA (:git/sha
) to lock to a specific commit as Git refs can be updated to point to different commits.
For example:
{:deps {owner/repo {:git/url "https://github.com/owner/repo.git"
:git/branch "1.x"
:git/sha "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"}}}
The purpose is to support projects using major version branch workflows as compared to tag + release workflows.
Major version branch workflows may be used for things like private polyrepo projects (e.g. a web service where the API specs/model, backend, and infrastructure-as-code templates are split) that don't need the additional overhead that comes with using tags + releases.
Auto-update tools like Renovate or Dependabot can use the Git ref key in a deps.edn
Git lib to update its locked :git/sha
.
For tag + release workflows, this may be some heuristic like semantic versioning.
For major version branch workflows, the auto-update tool needs to use something like :git/branch
to:
- Tie break between a given Git SHA's descendants if there's multiple.
- Ignore PR branches on the tip of a given branch (e.g. ignore a PR branch that's a descendant of the tip of the
main
branch).