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
Add a link to a tag that is set on a commit when looking at the commit history. This makes it easier to identify new commits that haven't been released yet, or identify change ranges.
I realize you can use the pull request/diffing UI for that, but that's way more complicated than looking at the history, especially when a tag only includes a few commits. Plus you need to know the tag name in to compare, since those are not auto completed by the UI.
Need some help from other developers? Add your repositories on IssueHunt to raise funds.
IssueHunt has been backed by the following sponsors. Become a sponsor
Reacted by Sindre Sorhus, fregante, Pierre Fenoll, rburbidge, Cameron Taggart, Anton Ukhanev, Salmanul Farzy, Steven, Jeroen van Warmerdam, andrew shearer and 25 more
OK, this would be very useful, but I don't think it's really feasible at the moment as we'd need to either perform a HTTP call for every commit on the page (where each could be a huge response we need to parse) or to try to use the API with authentication which we're trying to avoid if possible.
This would be very easy for GitHub to add as they already save the tags and PRs related to a commit, but they expose it only on the commit page.
With the API we could query the repo's refs (paged) and match them to whatever commits are visible on the current page. It probably wouldn't require more than 1-2 extra HTTP requests per commit page, which is fine for me.
This is definitely a feature I'd like and use. I don't mind finally seeing API integration, we already even have a GHE API URL helper
But honestly I don't see why be strict with the API at all: it saves bandwidth, GH won't change its structure without warning (it happens if we just parse HTML pages) and it only requires a couple more clicks for the setup, which is done once.
After watching some of the GitHub satellite videos and especially the first keynote, I think it would be best to utilize the API v4 using GraphQL. GitHub's vision is to build the whole github.com on top of the GraphQL API and provide the same tools and platform their developers have to everyone. With this, most modifications to github.com which a browser extension might want to do would be possible and performant over GraphQL calls.
However, this is not fully featured yet and I'd recommend waiting or building that in a separate extension for now in order to reduce complexity and maintenance until we have a solid platform to use for many features.
@hkdobrev I have waaay to much experience with graphQL.
Must be authenticated and cannot be anonymous. (so certain things would not work without a token)
They are always changing stuff.
I helped @k0shk0sh build FastHub we spent 2 months trying to switch to V4 and we ended up reverting the whole thing.
If it was me I would wait another 4-5 months. Lately they have been adding many more typical things. IMHO it's worth the wait
@yakov116 👍 and re the authentication - of course, I think it would be worth the hassle of people needing to configure anything or approve an app or something to use the extension to its fullest extent.
This means that the only way to do this seems to be Fetch all tags page by page until they're found. The API doesn't even seem to pickup the before/after markers to limit the search to the visible commits:
Activity
hkdobrev commentedon Nov 11, 2017
Hi @freaktechnik! Thanks for the suggestion!
To clarify, you mean pages like this one, correct?
https://github.com/sindresorhus/refined-github/commits/master
freaktechnik commentedon Nov 11, 2017
Yes, and I think a commit already shows the tag as I'd suggest here, so essentially adding that info to the upper level.
Example: 03fa6b8
hkdobrev commentedon Nov 11, 2017
OK, this would be very useful, but I don't think it's really feasible at the moment as we'd need to either perform a HTTP call for every commit on the page (where each could be a huge response we need to parse) or to try to use the API with authentication which we're trying to avoid if possible.
This would be very easy for GitHub to add as they already save the tags and PRs related to a commit, but they expose it only on the commit page.
I'd suggest contacting GitHub on https://github.com/contact requesting that feature from them.
If anyone knows a good approach this, please let us know!
We can probably do that in the compare UI - suggest tags in an autocomplete.
fregante commentedon Nov 14, 2017
With the API we could query the repo's refs (paged) and match them to whatever commits are visible on the current page. It probably wouldn't require more than 1-2 extra HTTP requests per commit page, which is fine for me.
This is definitely a feature I'd like and use. I don't mind finally seeing API integration, we already even have a GHE API URL helper
fregante commentedon Nov 14, 2017
He's ok with the option if it's really needed: #741 (comment)
In this case I guess the API would be replaced by fetching https://github.com/avajs/ava/tags
But honestly I don't see why be strict with the API at all: it saves bandwidth, GH won't change its structure without warning (it happens if we just parse HTML pages) and it only requires a couple more clicks for the setup, which is done once.
hkdobrev commentedon Nov 14, 2017
After watching some of the GitHub satellite videos and especially the first keynote, I think it would be best to utilize the API v4 using GraphQL. GitHub's vision is to build the whole github.com on top of the GraphQL API and provide the same tools and platform their developers have to everyone. With this, most modifications to github.com which a browser extension might want to do would be possible and performant over GraphQL calls.
However, this is not fully featured yet and I'd recommend waiting or building that in a separate extension for now in order to reduce complexity and maintenance until we have a solid platform to use for many features.
yakov116 commentedon Nov 14, 2017
@hkdobrev I have waaay to much experience with graphQL.
I helped @k0shk0sh build FastHub we spent 2 months trying to switch to V4 and we ended up reverting the whole thing.
If it was me I would wait another 4-5 months. Lately they have been adding many more typical things. IMHO it's worth the wait
hkdobrev commentedon Nov 14, 2017
@yakov116 👍 and re the authentication - of course, I think it would be worth the hassle of people needing to configure anything or approve an app or something to use the extension to its fullest extent.
sindresorhus commentedon Nov 15, 2017
👍 I would find this very useful.
yakov116 commentedon Jul 12, 2018
fregante commentedon Jul 12, 2018
3 remaining items
fregante commentedon Mar 4, 2019
I hope this answers your question.
Similar features
Commit list: https://github.com/sindresorhus/refined-github/blob/master/source/features/mark-merge-commits-in-list.tsx
Multi-query v4 API (if required): https://github.com/sindresorhus/refined-github/blob/master/source/features/pr-branches.tsx
Affected pages
https://github.com/sindresorhus/element-ready/commits/master
Also keep in mind that some commits may have multiple tags.
For packages that use version commits this would be of dubious utility (as seen in the screenshot)
Design
IssueHuntBot commentedon Apr 11, 2019
@IssueHunt has funded $60.00 to this issue.
fregante commentedon Apr 16, 2019
I want to take this, but the API does not show which tags are on a specific commit:
https://developer.github.com/v4/object/commit/
This means that the only way to do this seems to be Fetch all tags page by page until they're found. The API doesn't even seem to pickup the
before/aftermarkers to limit the search to the visible commits:Neither v3 and v4
searchqueries include tags.obahareth commentedon Apr 20, 2019
@bfred-it When I was working on this (but I sadly stopped because I had to move) I was able to get the tags using this query:
{ repository(owner: "sindresorhus", name: "element-ready") { refs(first: 100, refPrefix: "refs/tags/") { edges { node { target { ... on Tag { name commitResourcePath } } } } } } }nameis the tag name, the response will look like this:{ "data": { "repository": { "refs": { "edges": [ { "node": { "target": { "name": "v0.1.0", "commitResourcePath": "/sindresorhus/element-ready/commit/f68100c11e5eec3ae45e9fe854691fb694af10c0" } } }, { "node": { "target": { "name": "v0.2.0", "commitResourcePath": "/sindresorhus/element-ready/commit/95f80a9e26904bd9c30774a40fb83ebed0c56af9" } } }, { "node": { "target": { "name": "v1.0.0", "commitResourcePath": "/sindresorhus/element-ready/commit/26cf4445a2460a9b1df5b336b018d471e1a10f27" } } }, { "node": { "target": { "name": "v2.0.0", "commitResourcePath": "/sindresorhus/element-ready/commit/b2d64d08f02ed5c3daa5393caf6ff4d8f25afb78" } } }, { "node": { "target": { "name": "v2.1.0", "commitResourcePath": "/sindresorhus/element-ready/commit/faf1a61170450015de9b24ea9439fae4250a9bbb" } } }, { "node": { "target": { "name": "v2.2.0", "commitResourcePath": "/sindresorhus/element-ready/commit/a8652a3facc2ad0a7717f1d773d754dc89834bb7" } } }, { "node": { "target": { "name": "v2.2.1", "commitResourcePath": "/sindresorhus/element-ready/commit/0ea70435fa5771a7f7637f3525ccf7e4e0063fb9" } } }, { "node": { "target": { "name": "v3.0.0", "commitResourcePath": "/sindresorhus/element-ready/commit/61003ded56d37ec5a28f9a42258d5b12015e7469" } } }, { "node": { "target": { "name": "v3.1.0", "commitResourcePath": "/sindresorhus/element-ready/commit/840f1e81102bdf208d0e9ecf2015ea253a64f630" } } } ] } } } }Also the
beforeandaftervalues you're using are commit hashes, they should be cursors (that you request and that get returned by the API) instead.I hope that helps.
simonkotwicz commentedon May 15, 2019
Seems like tags are only shown for commits that exist in the main/master branch (when looking at a single commit)
issuehunt-oss commentedon Aug 17, 2019
@jerone has funded $5.00 to this issue.
issuehunt-oss commentedon Oct 28, 2019
@sindresorhus has rewarded $58.50 to @dotconnor. See it on IssueHunt