File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 11
22
33import React from 'react' ;
4- import { render , screen , fireEvent } from '@testing-library/react' ;
4+ import { render , screen } from '@testing-library/react' ;
55import userEvent from '@testing-library/user-event' ;
66import PullRequestViewer from './PullRequestViewer' ;
77
Original file line number Diff line number Diff line change 11
22
3-
43import React , { useState , useEffect } from 'react' ;
54import { Octokit } from '@octokit/rest' ;
65import Select from 'react-select' ;
@@ -52,7 +51,7 @@ const PullRequestViewer: React.FC = () => {
5251 org : GITHUB_ORG ,
5352 type : 'all' ,
5453 } ) ;
55- const repoOptions = response . data . map ( repo => ( {
54+ const repoOptions = response . data . map ( ( repo ) => ( {
5655 value : repo . name ,
5756 label : repo . name ,
5857 } ) ) ;
@@ -68,7 +67,7 @@ const PullRequestViewer: React.FC = () => {
6867 const fetchPullRequests = async ( ) => {
6968 if ( selectedRepo ) {
7069 try {
71- let allPullRequests : PullRequest [ ] = [ ] ;
70+ const allPullRequests : PullRequest [ ] = [ ] ;
7271 let page = 1 ;
7372 let hasNextPage = true ;
7473
@@ -78,10 +77,10 @@ const PullRequestViewer: React.FC = () => {
7877 repo : selectedRepo . value ,
7978 state : 'open' ,
8079 per_page : 100 ,
81- page : page ,
80+ page,
8281 } ) ;
8382
84- allPullRequests = [ ... allPullRequests , ... response . data ] ;
83+ allPullRequests . push ( ... response . data ) ;
8584
8685 if ( response . data . length < 100 ) {
8786 hasNextPage = false ;
You can’t perform that action at this time.
0 commit comments