Commit f582d718 authored by James Ramsay's avatar James Ramsay

Update application link to filter-repo

The documentation now recommends git filter-repo. In-application help
links should be consistent.
parent c405779f
......@@ -284,8 +284,8 @@ module ProjectsHelper
"xcode://clone?repo=#{CGI.escape(default_url_to_repo(project))}"
end
def link_to_bfg
link_to 'BFG', 'https://rtyley.github.io/bfg-repo-cleaner/', target: '_blank', rel: 'noopener noreferrer'
def link_to_filter_repo
link_to 'git filter-repo', 'https://github.com/newren/git-filter-repo', target: '_blank', rel: 'noopener noreferrer'
end
def explore_projects_tab?
......
......@@ -6,7 +6,7 @@
%button.btn.js-settings-toggle
= expanded ? _('Collapse') : _('Expand')
%p
= _("Clean up after running %{bfg} on the repository" % { bfg: link_to_bfg }).html_safe
= _("Clean up after running %{filter_repo} on the repository" % { filter_repo: link_to_filter_repo }).html_safe
= link_to icon('question-circle'),
help_page_path('user/project/repository/reducing_the_repo_size_using_git.md'),
target: '_blank', rel: 'noopener noreferrer'
......
......@@ -685,11 +685,11 @@ describe ProjectsHelper do
end
end
describe 'link_to_bfg' do
subject { helper.link_to_bfg }
describe 'link_to_filter_repo' do
subject { helper.link_to_filter_repo }
it 'generates a hardcoded link to the BFG Repo-Cleaner' do
result = helper.link_to_bfg
it 'generates a hardcoded link to git filter-repo' do
result = helper.link_to_filter_repo
doc = Nokogiri::HTML.fragment(result)
expect(doc.children.size).to eq(1)
......@@ -702,8 +702,8 @@ describe ProjectsHelper do
expect(link.name).to eq('a')
expect(link[:target]).to eq('_blank')
expect(link[:rel]).to eq('noopener noreferrer')
expect(link[:href]).to eq('https://rtyley.github.io/bfg-repo-cleaner/')
expect(link.inner_html).to eq('BFG')
expect(link[:href]).to eq('https://github.com/newren/git-filter-repo')
expect(link.inner_html).to eq('git filter-repo')
expect(result).to be_html_safe
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment