@@ -72,24 +72,27 @@ const cases = [
7272 ]
7373] ;
7474
75+ const orginalGitHubRepo = process . env . GITHUB_REPOSITORY
76+
7577describe ( 'run' , ( ) => {
7678 beforeAll ( ( ) => {
79+ process . env . GITHUB_REPOSITORY = 'crazy-max/ghaction-github-labeler' ;
7780 nock . disableNetConnect ( ) ;
7881 // nock.recorder.rec();
7982 } ) ;
8083 afterAll ( ( ) => {
84+ process . env . GITHUB_REPOSITORY = orginalGitHubRepo ;
8185 // nock.restore()
8286 nock . cleanAll ( ) ;
8387 nock . enableNetConnect ( ) ;
8488 } ) ;
8589 test . each ( cases ) ( 'given %p' , async ( name , inputs , expected ) => {
86- process . env . GITHUB_REPOSITORY = 'crazy-max/ghaction-github-labeler' ;
8790 const input = inputs as Inputs ;
8891
8992 nock ( 'https://api.github.com' ) . get ( '/repos/crazy-max/ghaction-github-labeler/labels' ) . reply ( 200 , labelsFixture ( ) ) ;
9093
9194 nock ( 'https://api.github.com' )
92- . get ( `/repos/jetersen /ghaction-github-labeler/contents/${ encodeURIComponent ( input . yamlFile as string ) } ` )
95+ . get ( `/repos/crazy-max /ghaction-github-labeler/contents/${ encodeURIComponent ( input . yamlFile as string ) } ` )
9396 . reply ( 200 , configFixture ( input . yamlFile as string ) ) ;
9497
9598 const labeler = new Labeler ( input ) ;
@@ -146,7 +149,6 @@ describe('run', () => {
146149 expect ( ( ) => labeler . run ( ) ) . not . toThrow ( ) ;
147150 } ) ;
148151 it ( 'merge' , async ( ) => {
149- process . env . GITHUB_REPOSITORY = 'crazy-max/ghaction-github-labeler' ;
150152 const input = < Inputs > {
151153 githubToken : process . env . GITHUB_TOKEN || 'test' ,
152154 yamlFile : '.res/labels.merge2.yml' ,
0 commit comments