Skip to content

Commit 724fb5f

Browse files
committed
Fix ordering of the merge queue
1 parent 2e87a82 commit 724fb5f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.sqlx/query-92d160378de8ed75192f25e393d1eceee06cd95b22cc6efe813e5d1c9812ee14.json renamed to .sqlx/query-5c3c81357e7329a9db4b2bf05c2615433b4a61c43f26f2ae39e68d02d609bf90.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/database/operations.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,13 +1007,14 @@ pub(crate) async fn get_merge_queue_prs(
10071007
AND pr.status = 'open'
10081008
AND pr.approved_by IS NOT NULL
10091009
AND pr.mergeable_state = 'mergeable'
1010-
AND
1010+
AND (
10111011
-- We ALWAYS need to return pending and successful PRs, regardless of tree state
10121012
auto_build.status IN ('pending', 'success') OR (
10131013
-- For PRs without a build status, we check if they pass the tree state
10141014
-- priority check, if the tree is closed
10151015
auto_build.status IS NULL AND ($2::int IS NULL OR pr.priority >= $2)
10161016
)
1017+
)
10171018
"#,
10181019
repo as &GithubRepoName,
10191020
tree_priority

0 commit comments

Comments
 (0)