- Timestamp:
- 05/22/2020 05:12:41 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/pr/functions.php
r9897 r9898 44 44 } 45 45 46 $_reviews = api_request( 47 '/repos/' . $repo . '/pulls/' . intval( $pr ) . '/reviews', 48 null, 49 [ 'Accept: application/vnd.github.antiope-preview+json' ] 50 ); 51 $reviews = []; 52 foreach ( $_reviews as $r ) { 53 if ( 54 in_array( $r->state, [ 'CHANGES_REQUESTED', 'APPROVED' ] ) && 55 ! in_array( $r->user->login, $reviews[ $r->state ] ?? [], true ) 56 ) { 57 $reviews[ $r->state ][] = $r->user->login; 58 } 59 } 60 46 61 return (object) [ 47 62 'repo' => $data->base->repo->full_name, … … 55 70 'mergeable_state' => $data->mergeable_state, 56 71 'check_runs' => $check_runs, 72 'reviews' => $reviews, 57 73 'body' => $data->body, 58 74 'user' => (object) [
Note: See TracChangeset
for help on using the changeset viewer.