File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,11 +42,13 @@ def run_once(self) -> None:
4242
4343 identity_mappings = _resolve_identity_mappings (self .storage , self .config .identity_mappings )
4444
45- cursor = self .storage .get_cursor ("github" ) or period_start
46- contributions = list (self .github_reader .list_contributions (cursor ))
45+ prior_cursor = self .storage .get_cursor ("github" ) or period_start
46+ contributions = list (self .github_reader .list_contributions (prior_cursor ))
4747 stored = self .storage .record_contributions (contributions )
48- last_seen = max ((event .created_at for event in contributions ), default = period_end )
49- self .storage .set_cursor ("github" , last_seen )
48+ if contributions :
49+ new_cursor = max (event .created_at for event in contributions )
50+ if new_cursor > prior_cursor :
51+ self .storage .set_cursor ("github" , new_cursor )
5052 logger .info ("Stored GitHub contributions" , extra = {"count" : stored })
5153
5254 quality_adjustments = None
You can’t perform that action at this time.
0 commit comments