lib/neetob/cli/github/search.rb in neetob-0.4.6 vs lib/neetob/cli/github/search.rb in neetob-0.4.7
- old
+ new
@@ -46,11 +46,11 @@
end
private
def search_for_keyword(repo)
- `#{cd_to_repo_in_tmp_dir(repo)} && \
+ `#{cd_to_repo(repo)} && \
find . -type f -iregex "#{search_file_path}" | xargs grep -E "#{key_to_search}"`
end
def find_and_print_matching_lines(repo)
files_with_matching_lines = find_matching_files(repo)
@@ -74,15 +74,15 @@
list_of_lines.each { |line| ui.success(" ↳#{line}") }
end
end
def are_changes_made?(repo)
- changes_made = `#{cd_to_repo_in_tmp_dir(repo)} && git checkout #{branch_name} && git status`
+ changes_made = `#{cd_to_repo(repo)} && git checkout #{branch_name} && git status`
!changes_made.include?("nothing to commit")
end
def find_and_replace_keyword(repo)
- `#{cd_to_repo_in_tmp_dir(repo)} && \
+ `#{cd_to_repo(repo)} && \
find . -type f -regex #{search_file_path} -print0 | \
xargs -0 sed -i '' 's/#{key_to_search}/#{replacement_term}/g'`
end
def build_pr_title