Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github/release-date displaying incorrect date #6309

Closed
1 of 3 tasks
danielwerg opened this issue Mar 24, 2021 · 4 comments · Fixed by #8543
Closed
1 of 3 tasks

github/release-date displaying incorrect date #6309

danielwerg opened this issue Mar 24, 2021 · 4 comments · Fixed by #8543
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@danielwerg
Copy link

Are you experiencing an issue with...

🪲 Description

🔗 https://img.shields.io/github/release-date/danielwerg/r6api.js?label=last%20release

🔗 Latest release (March 16, 2021)

@danielwerg danielwerg added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Mar 24, 2021
@chris48s
Copy link
Member

chris48s commented Mar 24, 2021

If I request https://api.github.com/repos/danielwerg/r6api.js/releases/latest
the response says

...
  "created_at": "2020-12-01T18:54:16Z",
  "published_at": "2021-03-16T12:32:03Z",
...

Clearly we are presenting the created_at date. I'm struggling to find a clear explanation of exactly what each one means in the docs. Any idea where there is such a large discrepancy between the two in your case?

@danielwerg
Copy link
Author

Seems like created_at represents tag date and published_at is date of publishing release. Honestly I just assumed that "GitHub Release Date" would refer to published_at as a date.

Any idea where there is such a large discrepancy between the two in your case

I can't exactly remember but I'm guessing it is because I pushed this commit by accident.

@calebcartwright
Copy link
Member

Seems like created_at represents tag date and published_at is date of publishing release

Yes that's my thinking as well. GitHub can be awfully fuzzy when it comes to the distinction between tags and releases (a common source of confusion for our users), and I would imagine this API response is reflective of/analogous to "unreleased" tags being enumerated within the "Releases" view without all the release-associated metadata.

If we were starting greenfield then I actually feel like there would have been a good case to be made that we should use published_at if the intent of the badge is to reflect GitHub's "Releases", but I don't think that's a change we can make at this point in the absence of a functional time machine.

Maybe we should just add a query param with the default staying with created_at to give users the flexibility to choose?

@chris48s
Copy link
Member

It is a different issue, but this feels like it fits in the same box as #6236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants