mirror of
https://github.com/tiennm99/ghstats.git
synced 2026-09-04 08:19:33 +00:00
feat(card): configurable start of week (#25)
* feat(card): configurable start of week for heatmap + weekday cards New -start-of-week CLI flag (and start_of_week action input) rotates the contribution-heatmap rows and the productive-weekday bars so users whose calendars start on Monday (or any other day) get matching output. Default stays Sunday to preserve existing renders. * docs: note start-of-week in design-guidelines, codebase-summary, deployment-guide - design-guidelines: heatmap row order + productive-weekday bar order now derive from Profile.WeekStart - codebase-summary: list new weekday_start_test.go cases + TestParseWeekday - deployment-guide: mention start_of_week as an optional action input in the workflow template
This commit is contained in:
@@ -83,6 +83,13 @@ type Profile struct {
|
||||
// display on time-based cards (e.g. "UTC+7.00" for Asia/Saigon). Filled
|
||||
// by the CLI after loading -tz.
|
||||
UTCOffsetLabel string
|
||||
|
||||
// WeekStart is the weekday used as row 0 on the heatmap and the first
|
||||
// bar on the productive-weekday chart. Defaults to time.Sunday to match
|
||||
// GitHub's own contribution calendar; -start-of-week on the CLI can flip
|
||||
// it to time.Monday (or any other weekday) without touching the data —
|
||||
// only the presentation order changes.
|
||||
WeekStart time.Weekday
|
||||
}
|
||||
|
||||
// DailyContribution is a single day in the contributions calendar.
|
||||
|
||||
Reference in New Issue
Block a user