Skip to content

Commit

Permalink
Merge pull request #11 from trade-tariff/BAU-fix-source-links
Browse files Browse the repository at this point in the history
BAU: Fixes source links
  • Loading branch information
willfish authored Apr 10, 2024
2 parents 23105fa + eaac253 commit 8e9422a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/source_url.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ def source_from_yaml_file

# As the last fallback link to the source file in this repository.
def source_from_file
"https://github.com/trade-tariff/govuk-developer-docs/blob/main/source/#{current_page.file_descriptor[:relative_path]}"
"https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/source/#{current_page.file_descriptor[:relative_path]}"
end
end
2 changes: 1 addition & 1 deletion helpers/commit_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def commit_url(current_page)
if current_page.data.latest_commit
"https://github.com/trade-tariff/#{current_page.data.repo_name}/commit/#{current_page.data.latest_commit[:sha]}"
elsif local_commit(current_page)
"https://github.com/trade-tariff/govuk-developer-docs/commit/#{local_commit(current_page).sha}"
"https://github.com/trade-tariff/trade-tariff-tech-docs/commit/#{local_commit(current_page).sha}"
else
"#"
end
Expand Down
2 changes: 1 addition & 1 deletion source/error.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ index: false
If you entered a web address, please check it was correct.

If the page you are looking for has been moved, you should
<a href='https://github.com/trade-tariff/govuk-developer-docs/blob/main/config/tech-docs.yml'>set up a redirect</a>.
<a href='https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/config/tech-docs.yml'>set up a redirect</a>.
2 changes: 1 addition & 1 deletion source/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: core
title: Dashboard
source_url: https://github.com/trade-tariff/govuk-developer-docs/blob/main/data/dashboard.yml
source_url: https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/data/dashboard.yml
---

<% content_for :sidebar do %>
Expand Down
2 changes: 1 addition & 1 deletion source/manual/dictionary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parent: /manual.html
layout: false
section: Learning OTT
type: learn
source_url: https://github.com/trade-tariff/govuk-developer-docs/blob/main/data/dictionary.yml
source_url: https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/data/dictionary.yml
---

<% content_for :sidebar do %>
Expand Down
2 changes: 1 addition & 1 deletion source/manual/setting-up-new-rails-app.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parent: "/manual.html"
---

[mit-license]: https://en.wikipedia.org/wiki/MIT_License
[docs-applications]: https://github.com/trade-tariff/govuk-developer-docs/blob/main/data/repos.yml
[docs-applications]: https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/data/repos.yml
[get-started]: /manual/get-started.html
[linting]: /manual/configure-linting.html
[rails-conv]: /manual/conventions-for-rails-applications.html
Expand Down
2 changes: 1 addition & 1 deletion source/templates/repo_template.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: repo_layout
parent: /apps.html
source_url: https://github.com/trade-tariff/govuk-developer-docs/blob/main/data/repos.yml
source_url: https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/data/repos.yml
---

<% if repo.retired? %>
Expand Down
2 changes: 1 addition & 1 deletion spec/app/source_url_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

source_url = SourceUrl.new({}, current_page).source_url

expect(source_url).to eql("https://github.com/trade-tariff/govuk-developer-docs/blob/main/source/foo.html.md")
expect(source_url).to eql("https://github.com/trade-tariff/trade-tariff-tech-docs/blob/main/source/foo.html.md")
end
end
end
2 changes: 1 addition & 1 deletion spec/helpers/commit_helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
file_descriptor: OpenStruct.new(relative_path: source_file),
)
expect(helper.commit_url(current_page)).to match(
/https:\/\/github.com\/trade-tariff\/govuk-developer-docs\/commit\/[0-9a-f]{40}$/,
/https:\/\/github.com\/trade-tariff\/trade-tariff-tech-docs\/commit\/[0-9a-f]{40}$/,
)
end

Expand Down

0 comments on commit 8e9422a

Please sign in to comment.