11import fs from 'fs' ;
22import nock from 'nock' ;
3- import { OctokitOptions } from '@octokit/core/dist-types/types' ;
43import { Inputs } from '../src/context' ;
54import { Labeler , LabelStatus } from '../src/labeler' ;
65
@@ -75,11 +74,6 @@ const cases = [
7574
7675const orginalGitHubRepo = process . env . GITHUB_REPOSITORY ;
7776
78- const octokitOptions = {
79- retry : { enabled : false } ,
80- throttle : { enabled : false }
81- } as OctokitOptions ;
82-
8377describe ( 'run' , ( ) => {
8478 beforeAll ( ( ) => {
8579 process . env . GITHUB_REPOSITORY = 'crazy-max/ghaction-github-labeler' ;
@@ -101,7 +95,7 @@ describe('run', () => {
10195 . get ( `/repos/crazy-max/ghaction-github-labeler/contents/${ encodeURIComponent ( input . yamlFile as string ) } ` )
10296 . reply ( 200 , configFixture ( input . yamlFile as string ) ) ;
10397
104- const labeler = new Labeler ( input , octokitOptions ) ;
98+ const labeler = new Labeler ( input ) ;
10599 await labeler . printRepoLabels ( ) ;
106100 console . log (
107101 ( await labeler . labels ) . map ( label => {
@@ -172,7 +166,7 @@ describe('run', () => {
172166 . get ( `/repos/crazy-max/ghaction-github-labeler/contents/${ encodeURIComponent ( '.res/labels.merge1.yml' ) } ` )
173167 . reply ( 200 , configFixture ( '.res/labels.merge1.yml' ) ) ;
174168
175- const labeler = new Labeler ( input , octokitOptions ) ;
169+ const labeler = new Labeler ( input ) ;
176170 const fileLabels = await labeler . fileLabels ;
177171 expect ( fileLabels . length ) . toBe ( 16 ) ;
178172 expect ( fileLabels [ 15 ] ) . toEqual ( expect . objectContaining ( { name : ':unicorn: Special' } ) ) ;
0 commit comments