Skip to content

Commit

Permalink
Fix issue title
Browse files Browse the repository at this point in the history
  • Loading branch information
smainz committed May 14, 2024
1 parent d0e1e86 commit f09698a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/repo-links-azure.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ $baseUrl := replaceRE "/_git/.+$" "" .repo.url }}
{{ $viewURL := printf "%s?path=%s&version=GB%s&_a=contents" .repo.url .repo_path .repo_branch -}}
{{ $issuesURL := printf "%s/_workitems/create/Bug?[title]=%s" $baseUrl (safeURL $.Title ) -}}
{{ $issuesURL := printf "%s/_workitems/create/Bug?[title]=%s" $baseUrl (safeURL $.context.Title ) -}}
{{ if .repo.azure.issue_area -}}
{{ $issuesURL = printf "%s/_workitems/create/Bug?[title]=%s&[Area Path]=%s" $baseUrl (safeURL $.Title) (safeURL .repo.azure.issue_area) -}}
{{ $issuesURL = printf "%s/_workitems/create/Bug?[title]=%s&[Area Path]=%s" $baseUrl (safeURL $.context.Title) (safeURL .repo.azure.issue_area) -}}
{{ end -}}
<a href="{{ $viewURL }}" class="td-page-meta--edit td-page-meta__edit" target="_blank" rel="noopener"><i class="fa-solid fa-pen-to-square fa-fw"></i> {{ T "post_view_this" }}</a>
<a href="{{ $issuesURL }}" class="td-page-meta--issue td-page-meta__issue" target="_blank" rel="noopener"><i class="fa-solid fa-list-check fa-fw"></i> {{ T "post_create_issue" }}</a>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/repo-links-gitea.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

{{ $viewURL := path.Join .repo.url "/src/branch/" .repo_branch .repo_path -}}
{{ $editURL := path.Join .repo.url "_edit/" .repo_branch .repo_path -}}
{{ $issuesQS := printf "title=%s" .repo.url (safeURL $.Title )}}
{{ $issuesQS := printf "title=%s" (safeURL $.context.Title )}}
{{ $issuesURL := path.Join .repo.url "/issues/new" -}}
{{ $issuesURL = printf "%s?%S" $issuesURL $issuesQS -}}
{{ $issuesURL = printf "%s?%s" $issuesURL $issuesQS -}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
{{ $newPageURL := path.Join .repo.url "/_new/" .repo_branch (path.Dir .repo_path) -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/repo-links-github.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

{{ $viewURL := path.Join .repo.url "/tree" .repo_branch .repo_path -}}
{{ $editURL := path.Join .repo.url "/edit" .repo_branch .repo_path -}}
{{ $issuesQS := printf "title=%s" .repo.url (safeURL $.Title) -}}
{{ $issuesQS := printf "title=%s" (safeURL $.context.Title) -}}
{{ $issuesURL := path.Join .repo.url "/issues/new" -}}
{{ $issuesURL = printf "%s?%S" $issuesURL $issuesQS -}}
{{ $issuesURL = printf "%s?%s" $issuesURL $issuesQS -}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
{{ $newPageURL := path.Join .repo.url "/new" .repo_branch (path.Dir .repo_path) -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/repo-links-gitlab.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

{{ $viewURL := path.Join .repo.url "/tree" .repo_branch .repo_path -}}
{{ $editURL := path.Join .repo.url "/edit" .repo_branch .repo_path -}}
{{ $issuesQS := printf "issue[title]=%s" .repo.url (safeURL $.Title) -}}
{{ $issuesQS := printf "issue[title]=%s" (safeURL $.context.Title) -}}
{{ $issuesURL := path.Join .repo.url "/issues/new" -}}
{{ $issuesURL = printf "%s?%S" $issuesURL $issuesQS -}}
{{ $issuesURL = printf "%s?%" $issuesURL $issuesQS -}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
{{ $newPageURL := path.Join .repo.url "/new" .repo_branch (path.Dir .repo_path) -}}
Expand Down

0 comments on commit f09698a

Please sign in to comment.