File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ def main():
7777 for d in discussions :
7878 number = d ['number' ]
7979 labels = [label ['name' ] for label in d .get ('labels' , [])]
80- last_updated = datetime .strptime (d ['updated_at' ], "%Y-%m-%dT%H:%M:%SZ" )
80+ last_updated = datetime .strptime (d ['updated_at' ], "%Y-%m-%dT%H:%M:%SZ" ). replace ( tzinfo = UTC )
8181 comments = get_comments (number )
8282 stale_comment = next ((c for c in comments if STALE_COMMENT in c ['body' ]), None )
8383
@@ -89,10 +89,10 @@ def main():
8989
9090 # Close and lock after 14 days of being stale
9191 if STALE_LABEL in labels and stale_comment :
92- stale_time = datetime .strptime (stale_comment ['created_at' ], "%Y-%m-%dT%H:%M:%SZ" )
92+ stale_time = datetime .strptime (stale_comment ['created_at' ], "%Y-%m-%dT%H:%M:%SZ" ). replace ( tzinfo = UTC )
9393 if (now - stale_time ).days >= TIME_TIL_CLOSE :
9494 # Check for any comments after stale comment
95- recent_comments = [c for c in comments if datetime .strptime (c ['created_at' ], "%Y-%m-%dT%H:%M:%SZ" ) > stale_time ]
95+ recent_comments = [c for c in comments if datetime .strptime (c ['created_at' ], "%Y-%m-%dT%H:%M:%SZ" ). replace ( tzinfo = UTC ) > stale_time ]
9696 if not recent_comments :
9797 close_and_lock (number )
9898
You can’t perform that action at this time.
0 commit comments