Skip to content

--tag-callback only executes on annotated tags, not lightweight tags #591

Closed
@13steinj

Description

@13steinj

Context on annotated vs lightweight tags.

So, the fuller story here goes:

  • We use GitHub Enterprise internally
  • We use tags that start with v to indicate a release. For example, v1.2.3. Sometimes v1.2.3.4 depending on the use case. Can have as many parts as one wants. Can also have a suffix, as well as a numerical one. E.g. v.1.2.3-suffix is less than v1.2.4-suffix and both of these are incommensurable with
  • Our CI system interacts with GHES via the API to make releases, which makes tags when they don't exist.
    • Apparently, any time this happens / is done on the GHES web UI, it's a lightweight tag. GitHub doesn't care about the above link. ¯\_(ツ)_/¯
  • I want to rename all the tags to have a suffix, since I'm merging repos, and I want to reference the old tag at least if the tag is a "full" (e.g. annotated) tag.
    • I can't use --tag-rename since that only does prefixes (maybe I should do another feature request that expands --tag-rename to a full callback, so one can just f-string rather than be limited to prefixes and suffixes)?
    • I can't use --tag-callback because it only acts upon annotated tags.
      • Even on the annotated tags, changing the ref here only creates a new tag.
    • It would be nice, but not a "dealbreaker", to be able to reference the tag information in --commit-callback if it exists, and add that information to the commit, in the case of lightweight and/or annotated tags (if annotated, would be nice to be able to access more than just the tag-ref-name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions