Skip to content

Commit 24caed9

Browse files
only re-enqueue in-review contributions on push
1 parent dff874d commit 24caed9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/Share/Postgres/Contributions/Queries.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ savePrecomputedNamespaceDiff (CodebaseEnv {codebaseOwner = leftCodebaseUser}, le
518518
ON CONFLICT DO NOTHING
519519
|]
520520

521-
-- | Get all contribution IDs for contributions which have a source or target branch in the
521+
-- | Get all in-review contribution IDs for contributions which have a source or target branch in the
522522
-- provided set.
523523
contributionsRelatedToBranches :: Set BranchId -> PG.Transaction e [ContributionId]
524524
contributionsRelatedToBranches branchIds = do
@@ -529,6 +529,8 @@ contributionsRelatedToBranches branchIds = do
529529
)
530530
SELECT contr.id FROM contributions contr
531531
WHERE
532-
contr.source_branch IN (SELECT branch_id FROM related_branches)
533-
OR contr.target_branch IN (SELECT branch_id FROM related_branches)
532+
(contr.source_branch IN (SELECT branch_id FROM related_branches)
533+
OR contr.target_branch IN (SELECT branch_id FROM related_branches)
534+
)
535+
AND contr.status = 'in_review'
534536
|]

0 commit comments

Comments
 (0)