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

Badge request: GitHub last-commit variant based on "committer" timestamp #6236

Closed
1 of 3 tasks
pukkandan opened this issue Mar 2, 2021 · 2 comments · Fixed by #8537
Closed
1 of 3 tasks

Badge request: GitHub last-commit variant based on "committer" timestamp #6236

pukkandan opened this issue Mar 2, 2021 · 2 comments · Fixed by #8537
Labels
good first issue New contributors, join in! service-badge New or updated service badge

Comments

@pukkandan
Copy link

Are you experiencing an issue with...

🪲 Description

Some commits can have a different "commit created" date and "committed date". This is especially seen when cherry-picking. In this case, the last commit badge shows the date of commit creation rather than the "committed date".
image

I don't know if this is intended behaviour - hence why I am opening this as a bug report. If this is indeed how it is expected to work, please consider this as a feature request to add a badge of the latter

🔗 https://img.shields.io/github/last-commit/yt-dlp/yt-dlp/master

Last Commit
Since the badge will change as soon as I push a new commit, I am also attaching a screenshot of how it looks like as of yt-dlp/yt-dlp@097b056
image

@pukkandan pukkandan added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Mar 2, 2021
@pukkandan
Copy link
Author

I'm sure I opened this as a bug report. No idea how it got tagged as question

@chris48s
Copy link
Member

chris48s commented Mar 2, 2021

You're right that this badge looks at the "author" timestamp rather than the "committer" timestamp. It has been like that since the badge was added in 2017 so we wouldn't make that behaviour change to the existing badge now.
We could accept a PR for a second variant that shows the "committer" date instead if someone is interested in working on it.

return this.constructor.render({ commitDate: body[0].commit.author.date })

@chris48s chris48s added good first issue New contributors, join in! service-badge New or updated service badge and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Mar 2, 2021
@chris48s chris48s changed the title last-commit badge shows wrong date in cherrypicked commits badge request: github last-commit variant based on "committer" timestamp Mar 2, 2021
@paulmelnikow paulmelnikow changed the title badge request: github last-commit variant based on "committer" timestamp Badge request: github last-commit variant based on "committer" timestamp Jul 9, 2021
@paulmelnikow paulmelnikow changed the title Badge request: github last-commit variant based on "committer" timestamp Badge request: GitHub last-commit variant based on "committer" timestamp Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue New contributors, join in! service-badge New or updated service badge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants