Skip to content

Heatmap shows commits on push date instead of commit author date #36471

@fjamesprice

Description

@fjamesprice

Description

The contribution heatmap displays commits on the push date rather than the commit author date. This causes all commits pushed together to appear on the same day, even if they were authored on different days.

This is a continuation of #14051 and #11861 (both now locked).

Steps to Reproduce

  1. Create commits with backdated author timestamps:
    git commit --allow-empty --date="2025-01-20T15:00:00" -m "Commit from Jan 20"
    git commit --allow-empty --date="2025-01-22T19:30:00" -m "Commit from Jan 22"
    git commit --allow-empty --date="2025-01-24T14:15:00" -m "Commit from Jan 24"
  2. Push all commits at once
  3. Check the user's heatmap

Expected Behavior

Commits should appear on their author dates (Jan 20, 22, 24) - matching GitHub's behavior.

Actual Behavior

All commits appear on the push date (e.g., Jan 27).

Solution

PR #36469 fixes this by:

  • Adding an original_unix field to the Action model to store the commit author timestamp
  • Grouping commits by date and creating separate action records for each date
  • Updating the heatmap query to use COALESCE(NULLIF(original_unix, 0), created_unix)

The fix maintains backward compatibility - existing records continue using the push date.

Version

Tested on latest main branch (commit from January 2026)

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposal/acceptedWe have reviewed the proposal and agree that it should be implemented like that/at all.type/enhancementAn improvement of existing functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions