@@ -6,7 +6,11 @@ import fs, { PathLike } from "node:fs";
66import os from "node:os" ;
77import path from "node:path" ;
88import { GitClient } from "../infrastructure/git" ;
9- import { GitHubApp , GitHubClient } from "../infrastructure/github" ;
9+ import {
10+ GitHubApp ,
11+ GitHubClient ,
12+ User as GitHubUser ,
13+ } from "../infrastructure/github" ;
1014import {
1115 fakeMetadataFile ,
1216 fakeModuleFile ,
@@ -26,7 +30,7 @@ import { ModuleFile } from "./module-file";
2630import { ReleaseArchive } from "./release-archive" ;
2731import { Repository } from "./repository" ;
2832import { RulesetRepository } from "./ruleset-repository" ;
29- import { User } from "./user" ;
33+ import { User , UserService } from "./user" ;
3034
3135let createEntryService : CreateEntryService ;
3236let mockGitClient : Mocked < GitClient > ;
@@ -942,16 +946,18 @@ describe("commitEntryToNewBranch", () => {
942946 const tag = "v1.2.3" ;
943947 const rulesetRepo = await RulesetRepository . create ( "repo" , "owner" , tag ) ;
944948 const bcrRepo = CANONICAL_BCR ;
945- const releaser = GitHubClient . GITHUB_ACTIONS_BOT ;
946- const botUser : User = {
949+ const releaser = UserService . fromGitHubUser (
950+ GitHubClient . GITHUB_ACTIONS_BOT
951+ ) ;
952+ const botUser : Partial < GitHubUser > = {
947953 name : "publish-to-bcr" ,
948- username : "publish-to-bcr[bot]" ,
954+ login : "publish-to-bcr[bot]" ,
949955 email : `12345+"publish-to-bcr[bot]@users.noreply.github.com` ,
950956 } ;
951957 const botApp = { slug : "publish-to-bcr" } as GitHubApp ;
952958
953959 mockBcrGitHubClient . getApp . mockResolvedValue ( botApp ) ;
954- mockBcrGitHubClient . getBotAppUser . mockResolvedValue ( botUser ) ;
960+ mockBcrGitHubClient . getBotAppUser . mockResolvedValue ( botUser as GitHubUser ) ;
955961
956962 await createEntryService . commitEntryToNewBranch (
957963 rulesetRepo ,
@@ -1105,7 +1111,7 @@ describe("pushEntryToFork", () => {
11051111 ) ;
11061112 expect (
11071113 mockBcrForkGitHubClient . getAuthenticatedRemoteUrl
1108- ) . toHaveBeenCalledWith ( bcrForkRepo ) ;
1114+ ) . toHaveBeenCalledWith ( bcrForkRepo . owner , bcrForkRepo . name ) ;
11091115 } ) ;
11101116
11111117 test ( "adds a remote with the authenticated url for the fork to the local bcr repo" , async ( ) => {
0 commit comments