Fix wrong repo url used by badges (#2037)

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Robert Kaussow 2023-07-27 02:08:06 +02:00 committed by GitHub
parent 1da0ad38a8
commit b824693b0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {