Refined-github: Add download_count next to each release artifact

Created on 15 Aug 2017  路  12Comments  路  Source: sindresorhus/refined-github


Issuehunt badges

Show the download_count next to each artifact for a release. This information can be fetched from the API as the download_count feature of each artifact, but is not available in the UI.




IssueHunt Summary

#
#
#
#

[
<
i
m
g

s
r

c

'
h
t
t
p
s
:
/
/
a
v
a
t
a
r
s
2
.
g
i
t
h
u
b
u
s
e
r
c
o
n
t
e
n
t
.
c
o
m
/
u
/
1
4
3
2
3
3
7
0
?

v

4
'

a
l

t

'
d
o
t
c
o
n
n
o
r
'

w
i
d
t

h

2
4

h
e
i
g
h

t

2
4
>

d
o
t
c
o
n
n
o
r
]
(
h
t
t
p
s
:
/
/
i
s
s
u
e
h
u
n
t
.
i
o
/
u
/
d
o
t
c
o
n
n
o
r
)

h
a
s

b
e
e
n

r
e
w
a
r
d
e
d
.

Backers (Total: $60.00)

- #2027 Add show-asset-download-count feature

Tips

IssueHunt has been backed by the following sponsors. Become a sponsor


Rewarded on Issuehunt enhancement help wanted

All 12 comments

Sounds useful. @greg-hellings Would you be interested in doing a pull request?

I've never worked a Firefox plugin before. I'll see what I can do.

GET /repos/:owner/:repo/releases/tags/:tag returns an empty array for assets, which is weird because I see two binaries attached to this release. @bfred-it any idea? 馃

GET /repos/:owner/:repo/releases/tags/:tag returns an empty array for assets

Which repo + tag did you try this on? GET https://api.github.com/repos/adobe-fonts/source-code-pro/releases/tags/variable-fonts correctly returns the assets for me.

@yeskunall according to this SO answer and looking at the sample assets JSON object, I think assets are only the manually uploaded files with a release and not the auto-generated zip files.

Also, quoting the GitHub blog,

You can also attach binary assets (such as compiled executables,
minified scripts, documentation) to a release.

Considering the details above is a fact, we might need to re-think on whether this is a broadly used feature and/or is it worth adding the download_count for manually uploaded binaries (aka assets).. _or maybe it's just me, I haven't ever downloaded any assets._

@tanmayrajani yeah, I went through the same process, I just didn't elaborate my steps. I came to the same
conclusion, but was hoping the person who released the latest would be able to confirm it.

@jgierer12 try it for this repo. Also, the comment above should explain why we're not seeing any data returned in the assets array in my example.

Yeah, realized you tried to get the zipped/tarballed downloads. Reading the GitHub docs, it doesn't seem like there's a way to get download counts for those, unfortunately.

Well, this feature might still be useful if/when binaries are uploaded manually, but I'll leave that part to the maintainers. 馃毝

@yeskunall any android repo this would be useful

I personally don't see the use-case for wanting the download count of the automatic assets. Does anyone even download those when you can just clone the repo instead.

I do, however, really want the download count of manually uploaded assets.

@issuehunt has funded $60.00 to this issue.


@sindresorhus has rewarded $54.00 to @dotconnor. See it on IssueHunt

  • :moneybag: Total deposit: $60.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $6.00
Was this page helpful?
0 / 5 - 0 ratings