Skip to content

Commit

Permalink
Fix wrong repo url used by badges (woodpecker-ci#2037) (woodpecker-ci…
Browse files Browse the repository at this point in the history
…#2039)

backport woodpecker-ci#2037

Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
  • Loading branch information
6543 and xoxys authored Jul 27, 2023
1 parent b57c4e1 commit 196af15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/components/repo/settings/BadgeTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export default defineComponent({
const badgeUrl = computed(
() => `/api/badges/${repo.value.id}/status.svg${branch.value !== '' ? `?branch=${branch.value}` : ''}`,
);
const repoUrl = computed(() => `/${repo.value.id}${branch.value !== '' ? `/branches/${branch.value}` : ''}`);
const repoUrl = computed(
() => `/repos/${repo.value.id}${branch.value !== '' ? `/branches/${encodeURIComponent(branch.value)}` : ''}`,
);
const badgeContent = computed(() => {
if (!repo) {
Expand Down

0 comments on commit 196af15

Please sign in to comment.