Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Check if manual tag release issue already exists before creating a new one #252

Closed
galargh opened this issue Dec 15, 2021 · 4 comments
Closed

Comments

@galargh
Copy link
Contributor

galargh commented Dec 15, 2021

It is possible for multiple tag push events to be created for the same tag. In such case we would want a single issue to be created rather than an issue per tag push.

An example of command set that could be run to create multiple tag push events for the same tag:

git tag t2
git push --tags
git tag --delete t2
git push --delete t2
git tag t2
git push --tags

An example where multiple issues were created for the same tag:

@mvdan
Copy link
Contributor

mvdan commented Dec 15, 2021

If we want to only deduplicate when the tag is precisely the same, then the filed issue could also contain the full git commit hash - that way, the search query to check for a duplicate could include the full commit hash too.

@galargh
Copy link
Contributor Author

galargh commented Dec 15, 2021

I think in case of force pushes for tags(which is when the tag would be the same but the commit might differ), we'd still want a single issue. If we decide to include git commit hash in the issue somewhere, maybe we could update it after such push?

@marten-seemann
Copy link
Contributor

Updating an issue should not be problem, there’s even an option for that in the GitHub Action we use: https://github.com/JasonEtco/create-an-issue#inputs.

I think in case of force pushes for tags(which is when the tag would be the same but the commit might differ), we'd still want a single issue.

I’m not sure if this is a situation we need to handle gracefully though. You shouldn’t push tags in the first place, and you really, really, really shouldn’t force-push a tag: This tag will probably have been picked up by the Go module proxy, and by force-pushing the tag you’re now creating an inconsistency between the code in Git and what the module proxy considers the valid tag. This is almost guaranteed to come and bite you.
Maybe we might event want to do the exact opposite: detect and call out tag force-pushes explicitely.

@galargh
Copy link
Contributor Author

galargh commented Aug 28, 2023

This issue was transferred to ipdxco/unified-github-workflows#39 in preparation for archiving of this repository.

@galargh galargh closed this as completed Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants