File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -100,23 +100,19 @@ async fn update_landings(
100100
101101 let commits = repo. rev_walk ( [ head] ) . all ( ) ?;
102102
103- let mut landings = Vec :: new ( ) ;
104-
105103 for commit in commits {
106104 let commit = commit?;
107105
108106 let git_commit: GitCommit = commit. id . to_string ( ) . into ( ) ;
109- if let Some ( pr_number) = prs. get ( & git_commit) {
110- let landing = Landing {
111- github_pr : * pr_number ,
112- branch_id : branch . id ( ) ,
113- } ;
114-
115- landings . push ( landing ) ;
116- }
107+ let Some ( pr_number) = prs. get ( & git_commit) else {
108+ continue ;
109+ } ;
110+ let landing = Landing {
111+ github_pr : * pr_number ,
112+ branch_id : branch . id ( ) ,
113+ } ;
114+ landing . upsert ( db_connection ) . await ? ;
117115 }
118116
119- Landing :: upsert_batch ( db_connection, & landings) . await ?;
120-
121117 Ok ( ( ) )
122118}
You can’t perform that action at this time.
0 commit comments