File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -416,6 +416,12 @@ impl PullRequestModel {
416416 } ,
417417 }
418418 }
419+
420+ /// Determines if this PR can be included in a rollup.
421+ /// A PR is rollupable if it has been approved and rollup is not `RollupMode::Never`
422+ pub fn is_rollupable ( & self ) -> bool {
423+ self . is_approved ( ) && !matches ! ( self . rollup, Some ( RollupMode :: Never ) )
424+ }
419425}
420426
421427/// Describes whether a workflow is a Github Actions workflow or if it's a job from some external
Original file line number Diff line number Diff line change 109109
110110 < tbody >
111111 {% for pr in prs %}
112- < tr >
112+ < tr data-rollupable =" {{ pr.is_rollupable() }} " >
113113 < td class ="select-checkbox "> </ td >
114114 < td >
115115 < a href ="{{ repo_url }}/pull/{{ pr.number }} "> {{ pr.number.0 }}</ a >
218218 selector : "td.select-checkbox" ,
219219 headerCheckbox : true ,
220220 selectable : ( rowData , tr , index ) => {
221- let table = $ ( "#table" ) . DataTable ( ) ;
222- let approvedByIndex = table . column ( "approved_by:name" ) . index ( ) ;
223- return ! ! ( rowData && rowData [ approvedByIndex ] && rowData [ approvedByIndex ] . trim ( ) !== "" ) ;
221+ return tr && tr . dataset && tr . dataset . rollupable === "true" ;
224222 }
225223 }
226224 } ;
You can’t perform that action at this time.
0 commit comments