Skip to content

Conversation

@MalachiCunliffe
Copy link
Contributor

@MalachiCunliffe MalachiCunliffe commented Jun 1, 2023

Summary of changes

Changed the sorting of tags for the branch context to be based on the latest committed tag rather than the latest 'v' tag. This is to solve an issue where we had older v tags before we migrated to no v.

Without this change the last v tag is selected rather than the last tag which was causing an error.

Prior sorting for branch context :
Screenshot 2023-06-01 at 1 18 41 PM

Proposed change in this PR:
Screenshot 2023-06-01 at 1 19 18 PM

Breaking Changes

Not a breaking change

How changes have been tested

  • Tested in my repos and works as intended, the latest tag is at the top of the list rather than the latest "v" tag

List any unknowns

  • Why was there a sort on the 'v' rather than just latest tag as that was causing a failure on our repo that had older v tags before moving to no v

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jun 2, 2023

Spot on!

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jun 2, 2023

Ill run some tests while looks good unsure if this is the desired behaviour when you have 0.0.5 and then start the counter from v0.0.1 it should be a v0.0.6 unless one explicitly mix custom tags with semver bumps.

Maybe we could consider this a feature flag instead of direct change. Cc @sammcj any thoughts?

@MalachiCunliffe
Copy link
Contributor Author

MalachiCunliffe commented Jun 5, 2023

I think sorting for the latest tag makes sense rather than specifically for tags that have a 'v' with --sort=-v:refname.

Since the action has the WITH_V input to cater for both v and no v tags we should make the sort look for the latest and then based on the WITH_V the correct next tag will be created based on the most recent tag.

This solves a problem for us and handles the case where there are old v tags hanging around but now we want to use this action and not use a v for the future tags

@MalachiCunliffe
Copy link
Contributor Author

Are we good to go with this change ? @sbe-arg @sammcj

@sbe-arg
Copy link
Collaborator

sbe-arg commented Jun 9, 2023

Yes ill merge on Monday if thats okay I was waiting for @sammcj to comment but we can go ahead I reckon.

@sbe-arg sbe-arg merged commit 698f1bb into anothrNick:master Jun 12, 2023
This was referenced Jun 13, 2023
This was referenced May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants