You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
closing-remarks shows earliest tag alphabetically, not chronologically #7208
The feature says the first tag containing the PR was pre-release
But the first tag is actually release/0.5.13; pre-release happens to be the last tag containing the PR.
Note: the pre-release tag in this repo changes over time, but the bug still happens after clearing the extension cache, so I don't suppose it's a stale result.
changed the title [-]"Shows the first Git tag a merged PR was included in" shows me the wrong tag?[/-][+]`closing-remarks` shows pre-release tags[/+]on Jan 9, 2024
Hi @fregante — I'm a little uncertain. I don't believe it's an issue of excluding or including pre-release tags.
My understanding is that the UI is supposed to show the earliest tag that included the PR in question. In my scenario, the earliest tag isn't the pre-release tag, it's the actual release tag; but the UI is showing the pre-release tag.
(Actually I think it might the same issue described in #7206, but the submitter mistakenly focused on "pre-release" vs "release" metadata, which I think are a red herring which led to the issue being closed prima facie.)
We just ask GitHub for the order, so you can change it by changing the time of creation of the tags. But the core logic remains: this pattern requires --force, so it's not something we should support
We just ask GitHub for the order, so you can change it by changing the time of creation of the tags. But the core logic remains: this pattern requires --force, so it's not something we should support
Sorry, I still didn't understand. I do want pre-release tags to be included in the results. #7206 is asking to exclude pre-releases, but I'm not asking for that. I'm just reporting that in this case the pre-release tag is not the earliest tag, but it's being reported as the earliest tag.
I think maybe the order is coming back wrong or needs to be sorted differently?
release/0.5.13 includes the PR and is earlier than pre-release
We expect the "earliest tag" to appear last on that list, because that's generally the case.
To fix this issue and to future-proof this feature, I'd be open to use the API, if it's possible. I think we went with this snippet because the API doesn't expose this information, calculating it would be expensive.
changed the title [-]`closing-remarks` doesn't show earliest tag[/-][+]`closing-remarks` doesn't show earliest tag if non-version tags exist[/+]on Jan 10, 2024
@aryairani Alphabetically, nightly < pre-release < release-* < v, so you might instead want a tag that comes afterrelease, i.e. s, t, u, v, w, ... I have a similar issue with you in #7206, where nightly precedes v.
@wookayin Oh yeah! 🤦 @fregante maybe this issue should be "closing-remarks shows earliest tag alphabetically rather than chronologically".
i.e. you could see the same problem if the versioning scheme changes (even though none of them would necessarily be non-version tags)
changed the title [-]`closing-remarks` doesn't show earliest tag if non-version tags exist[/-][+]`closing-remarks` shows earliest tag alphabetically, not chronologically[/+]on Jan 26, 2024
Ok, I guess I have my functioning workaround in place now, thanks to @wookayin's alphabet help, by calling my nightly tag trunk-build, which comes after release/* alphabetically. (I had called it my "trunk build" tag trunk briefly, but ran into conflicts with the trunk branch.)
This specific issue can stay open because I'd still want ordering, but I think this can only be done via API. The API can return the tags in order of creation.
I don't want to get into the sorting of tags out of the current HTML snippet because soon enough there will be a repo with 1.0.0 and release/2.0.0 and beta/2.0.0 and I can't figure out every combination of that.
To fix this issue and to future-proof this feature, I'd be open to use the API, if it's possible. I think we went with this snippet because the API doesn't expose this information, calculating it would be expensive.
This information is not available on the API. This can be confirmed by visiting their docs:
Activity
fregante commentedon Jan 9, 2024
closing-remarks: options to exclude pre-release tags (feature request) #7206 (comment)closing-remarks: options to exclude pre-release tags (feature request) #7206[-]"Shows the first Git tag a merged PR was included in" shows me the wrong tag?[/-][+]`closing-remarks` shows pre-release tags[/+]fregante commentedon Jan 9, 2024
Thank you @aryairani 🙏☺️
aryairani commentedon Jan 9, 2024
Hi @fregante — I'm a little uncertain. I don't believe it's an issue of excluding or including pre-release tags.
My understanding is that the UI is supposed to show the earliest tag that included the PR in question. In my scenario, the earliest tag isn't the pre-release tag, it's the actual release tag; but the UI is showing the pre-release tag.
What am I missing?
Thank you!
aryairani commentedon Jan 9, 2024
(Actually I think it might the same issue described in #7206, but the submitter mistakenly focused on "pre-release" vs "release" metadata, which I think are a red herring which led to the issue being closed prima facie.)
fregante commentedon Jan 10, 2024
We just ask GitHub for the order, so you can change it by changing the time of creation of the tags. But the core logic remains: this pattern requires
--force, so it's not something we should support[-]`closing-remarks` shows pre-release tags[/-][+]`closing-remarks` doesn't show earliest tag[/+]aryairani commentedon Jan 10, 2024
Sorry, I still didn't understand. I do want pre-release tags to be included in the results. #7206 is asking to exclude pre-releases, but I'm not asking for that. I'm just reporting that in this case the pre-release tag is not the earliest tag, but it's being reported as the earliest tag.
I think maybe the order is coming back wrong or needs to be sorted differently?
release/0.5.13includes the PR and is earlier thanpre-releaseWhere does this happen? Maybe I can help debug.
fregante commentedon Jan 10, 2024
See the firstTag updater function: https://github.com/refined-github/refined-github/blob/main/source/features/closing-remarks.tsx
I wonder if GitHub is showing the tags in an unexpected order in the dom, I thought we were using the API. Probably there isn't an equivalent API.
aryairani commentedon Jan 10, 2024
Should we reopen this bug since I don't think it's a dup of #7206?
fregante commentedon Jan 10, 2024
So it seems that GitHub lists tag in alphabetical order:
We expect the "earliest tag" to appear last on that list, because that's generally the case.
To fix this issue and to future-proof this feature, I'd be open to use the API, if it's possible. I think we went with this snippet because the API doesn't expose this information, calculating it would be expensive.
[-]`closing-remarks` doesn't show earliest tag[/-][+]`closing-remarks` doesn't show earliest tag if non-version tags exist[/+]aryairani commentedon Jan 10, 2024
As a workaround I will maybe rename my
pre-releasetonightly, which comes beforereleasein alphabetical order. 🤦 Thanks for looking into this.wookayin commentedon Jan 10, 2024
@aryairani Alphabetically,
nightly<pre-release<release-*<v, so you might instead want a tag that comes afterrelease, i.e. s, t, u, v, w, ... I have a similar issue with you in #7206, wherenightlyprecedesv.aryairani commentedon Jan 12, 2024
@wookayin Oh yeah! 🤦
@fregante maybe this issue should be "
closing-remarksshows earliest tag alphabetically rather than chronologically".i.e. you could see the same problem if the versioning scheme changes (even though none of them would necessarily be non-version tags)
[-]`closing-remarks` doesn't show earliest tag if non-version tags exist[/-][+]`closing-remarks` shows earliest tag alphabetically, not chronologically[/+]aryairani commentedon Jan 26, 2024
Ok, I guess I have my functioning workaround in place now, thanks to @wookayin's alphabet help, by calling my nightly tag
trunk-build, which comes afterrelease/*alphabetically. (I had called it my "trunk build" tagtrunkbriefly, but ran into conflicts with thetrunkbranch.)fregante commentedon Feb 2, 2024
Tags that include the word
nightlyand tags that don't have a version (minimum\d\.\dexpected) are now excluded:closing-remarks- Exclude nightly tags and non-version tags #7243This specific issue can stay open because I'd still want ordering, but I think this can only be done via API. The API can return the tags in order of creation.
I don't want to get into the sorting of tags out of the current HTML snippet because soon enough there will be a repo with
1.0.0andrelease/2.0.0andbeta/2.0.0and I can't figure out every combination of that.fregante commentedon Jun 12, 2024
This information is not available on the API. This can be confirmed by visiting their docs:
https://docs.github.com/en/graphql/reference/objects#commit
In the Commit object, there's no way to get any tag references.
If we had access to git, this would be possible via
git tag --contains the-commit-hash