From 550599d03b5527824a2177109901aa2c7f432f53 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 26 Feb 2023 00:15:25 +0000 Subject: [PATCH] utils/github: Switch `check_fork_exists` to `fork_exists?` - It's Ruby style convention that methods that return only booleans end with a question mark. --- Library/Homebrew/utils/github.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index 3137393e6d..aa4cfc2c37 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -147,7 +147,7 @@ module GitHub API.open_rest(url, data: data, scopes: scopes) end - def check_fork_exists(repo, org: nil) + def fork_exists?(repo, org: nil) _, reponame = repo.split("/") username = org || API.open_rest(url_to("user")) { |json| json["login"] } @@ -555,7 +555,7 @@ module GitHub def forked_repo_info!(tap_remote_repo, org: nil) response = create_fork(tap_remote_repo, org: org) # GitHub API responds immediately but fork takes a few seconds to be ready. - sleep 1 until check_fork_exists(tap_remote_repo, org: org) + sleep 1 until fork_exists?(tap_remote_repo, org: org) remote_url = if system("git", "config", "--local", "--get-regexp", "remote..*.url", "git@github.com:.*") response.fetch("ssh_url") else