test_class.file: dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtilTest.java
test_class.identifier: GitHubUtilTest
test_case.body: @Test
      public void testRepoHasBranchFalseIfNoBranchReturned() throws IOException {
          GitHubUtil gitHubUtil = mock(GitHubUtil.class);
          when(gitHubUtil.repoHasBranch(any(), any())).thenCallRealMethod();
          GHRepository repo = mock(GHRepository.class);
          String branchName = "some-branch";
  
          when(repo.getBranch(branchName)).thenReturn(null);
          assertFalse(gitHubUtil.repoHasBranch(repo, branchName));
      }
test_case.class_method_signature: GitHubUtilTest.testRepoHasBranchFalseIfNoBranchReturned()
test_case.full_signature: @Test public void testRepoHasBranchFalseIfNoBranchReturned()
test_case.identifier: testRepoHasBranchFalseIfNoBranchReturned
test_case.invocations: mock thenCallRealMethod when repoHasBranch any any mock thenReturn when getBranch assertFalse repoHasBranch
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRepoHasBranchFalseIfNoBranchReturned()
focal_class.declarator: log = LoggerFactory.getLogger(GitHubUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(GitHubUtil.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: NO_BRANCH_WARN_FORMAT = "Couldn't find branch `%s` in repo `%s`. Waiting a second..."
focal_class.modifier: public static final
focal_class.original_string: public static final String NO_BRANCH_WARN_FORMAT = "Couldn't find branch `%s` in repo `%s`. Waiting a second...";
focal_class.type: String
focal_class.var_name: NO_BRANCH_WARN_FORMAT
focal_class.declarator: github
focal_class.modifier: private final
focal_class.original_string: private final GitHub github;
focal_class.type: GitHub
focal_class.var_name: github
focal_class.file: dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/GitHubUtil.java
focal_class.identifier: GitHubUtil
focal_class.class_method_signature: GitHubUtil.GitHubUtil(GitHub gitHub)
focal_class.full_signature: public  GitHubUtil(GitHub gitHub)
focal_class.identifier: GitHubUtil
focal_class.modifiers: public
focal_class.parameters: (GitHub gitHub)
focal_class.signature:  GitHubUtil(GitHub gitHub)
focal_class.class_method_signature: GitHubUtil.getGithub()
focal_class.full_signature: public GitHub getGithub()
focal_class.identifier: getGithub
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GitHub
focal_class.signature: GitHub getGithub()
focal_class.class_method_signature: GitHubUtil.getRepo(String repo)
focal_class.full_signature: public GHRepository getRepo(String repo)
focal_class.identifier: getRepo
focal_class.modifiers: public
focal_class.parameters: (String repo)
focal_class.return: GHRepository
focal_class.signature: GHRepository getRepo(String repo)
focal_class.class_method_signature: GitHubUtil.createPublicRepo(String repoName)
focal_class.full_signature: public GHRepository createPublicRepo(String repoName)
focal_class.identifier: createPublicRepo
focal_class.modifiers: public
focal_class.parameters: (String repoName)
focal_class.return: GHRepository
focal_class.signature: GHRepository createPublicRepo(String repoName)
focal_class.class_method_signature: GitHubUtil.getMyself()
focal_class.full_signature: public GHMyself getMyself()
focal_class.identifier: getMyself
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GHMyself
focal_class.signature: GHMyself getMyself()
focal_class.class_method_signature: GitHubUtil.startSearch()
focal_class.full_signature: public GHContentSearchBuilder startSearch()
focal_class.identifier: startSearch
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GHContentSearchBuilder
focal_class.signature: GHContentSearchBuilder startSearch()
focal_class.class_method_signature: GitHubUtil.createFork(GHRepository repo)
focal_class.full_signature: public GHRepository createFork(GHRepository repo)
focal_class.identifier: createFork
focal_class.modifiers: public
focal_class.parameters: (GHRepository repo)
focal_class.return: GHRepository
focal_class.signature: GHRepository createFork(GHRepository repo)
focal_class.class_method_signature: GitHubUtil.safeDeleteRepo(GHRepository repo)
focal_class.full_signature: public void safeDeleteRepo(GHRepository repo)
focal_class.identifier: safeDeleteRepo
focal_class.modifiers: public
focal_class.parameters: (GHRepository repo)
focal_class.return: void
focal_class.signature: void safeDeleteRepo(GHRepository repo)
focal_class.class_method_signature: GitHubUtil.createPullReq(GHRepository origRepo, String branch,
                                   GHRepository forkRepo, String title, String body)
focal_class.full_signature: public int createPullReq(GHRepository origRepo, String branch,
                                   GHRepository forkRepo, String title, String body)
focal_class.identifier: createPullReq
focal_class.modifiers: public
focal_class.parameters: (GHRepository origRepo, String branch,
                                   GHRepository forkRepo, String title, String body)
focal_class.return: int
focal_class.signature: int createPullReq(GHRepository origRepo, String branch,
                                   GHRepository forkRepo, String title, String body)
focal_class.class_method_signature: GitHubUtil.tryRetrievingBranch(GHRepository repo, String branchName)
focal_class.full_signature: protected GHBranch tryRetrievingBranch(GHRepository repo, String branchName)
focal_class.identifier: tryRetrievingBranch
focal_class.modifiers: protected
focal_class.parameters: (GHRepository repo, String branchName)
focal_class.return: GHBranch
focal_class.signature: GHBranch tryRetrievingBranch(GHRepository repo, String branchName)
focal_class.class_method_signature: GitHubUtil.tryRetrievingRepository(String repoName)
focal_class.full_signature: public GHRepository tryRetrievingRepository(String repoName)
focal_class.identifier: tryRetrievingRepository
focal_class.modifiers: public
focal_class.parameters: (String repoName)
focal_class.return: GHRepository
focal_class.signature: GHRepository tryRetrievingRepository(String repoName)
focal_class.class_method_signature: GitHubUtil.tryRetrievingContent(GHRepository repo, String path, String branch)
focal_class.full_signature: public GHContent tryRetrievingContent(GHRepository repo, String path, String branch)
focal_class.identifier: tryRetrievingContent
focal_class.modifiers: public
focal_class.parameters: (GHRepository repo, String path, String branch)
focal_class.return: GHContent
focal_class.signature: GHContent tryRetrievingContent(GHRepository repo, String path, String branch)
focal_class.class_method_signature: GitHubUtil.getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                   GHMyself currentUser)
focal_class.full_signature: public List<GHRepository> getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                   GHMyself currentUser)
focal_class.identifier: getGHRepositories
focal_class.modifiers: public
focal_class.parameters: (Multimap<String, String> pathToDockerfileInParentRepo,
                                                   GHMyself currentUser)
focal_class.return: List<GHRepository>
focal_class.signature: List<GHRepository> getGHRepositories(Multimap<String, String> pathToDockerfileInParentRepo,
                                                   GHMyself currentUser)
focal_class.class_method_signature: GitHubUtil.waitFor(long millis)
focal_class.full_signature: protected void waitFor(long millis)
focal_class.identifier: waitFor
focal_class.modifiers: protected
focal_class.parameters: (long millis)
focal_class.return: void
focal_class.signature: void waitFor(long millis)
focal_class.class_method_signature: GitHubUtil.repoHasBranch(GHRepository repo, String branchName)
focal_class.full_signature: public boolean repoHasBranch(GHRepository repo, String branchName)
focal_class.identifier: repoHasBranch
focal_class.modifiers: public
focal_class.parameters: (GHRepository repo, String branchName)
focal_class.return: boolean
focal_class.signature: boolean repoHasBranch(GHRepository repo, String branchName)
focal_class.class_method_signature: GitHubUtil.getReposForUserAtCurrentInstant(GHMyself user)
focal_class.full_signature: public Map<String, GHRepository> getReposForUserAtCurrentInstant(GHMyself user)
focal_class.identifier: getReposForUserAtCurrentInstant
focal_class.modifiers: public
focal_class.parameters: (GHMyself user)
focal_class.return: Map<String, GHRepository>
focal_class.signature: Map<String, GHRepository> getReposForUserAtCurrentInstant(GHMyself user)
focal_method.body: public boolean repoHasBranch(GHRepository repo, String branchName) throws IOException {
          try {
              GHBranch branch = repo.getBranch(branchName);
              return branch != null;
          } catch (GHFileNotFoundException exception) {
              return false;
          }
      }
focal_method.class_method_signature: GitHubUtil.repoHasBranch(GHRepository repo, String branchName)
focal_method.full_signature: public boolean repoHasBranch(GHRepository repo, String branchName)
focal_method.identifier: repoHasBranch
focal_method.invocations: getBranch
focal_method.modifiers: public
focal_method.parameters: (GHRepository repo, String branchName)
focal_method.return: boolean
focal_method.signature: boolean repoHasBranch(GHRepository repo, String branchName)