File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,16 @@ def _poll(
2727 api_url : str ,
2828 params : typing .Dict [str , str ],
2929 last_update : str ,
30- ) -> None :
30+ ) -> str :
3131 params = {** params , "since" : last_update }
3232
3333 with requests .get (api_url , params = params ) as resp :
3434 resp .raise_for_status ()
3535 data = resp .json ()
3636 logging .info ("GITHUB: %s %s" , resp .status_code , resp .reason )
3737
38- tracker_path .write_text (_now ())
38+ last_update = _now ()
39+ tracker_path .write_text (last_update )
3940
4041 if len (data ) > 0 :
4142 # new commits.
@@ -92,6 +93,8 @@ def _poll(
9293 else :
9394 logging .info ("No new commits, going to sleep" )
9495
96+ return last_update
97+
9598
9699@click .command ()
97100@click .argument ("webhook_url" , envvar = "DAPI_TRACKER_WEBHOOK_URL" )
You can’t perform that action at this time.
0 commit comments