fix(codacy): stop preprocessing branch name

Documentation doesn't say anything about branch name preprocessing
and shields doesn't do it either:
https://github.com/badges/shields/blob/d3a7afd/services/codacy/codacy-coverage.service.js#L59
pull/465/head
Dario Vladović 2021-01-04 06:07:35 +00:00 zatwierdzone przez GitHub
rodzic a91d673970
commit cc63816816
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -36,7 +36,7 @@ const SUBJECT_BY_TYPE = {
async function handler ({ type, projectId, branch }: PathArgs) {
const searchParams = new URLSearchParams()
if (branch) searchParams.append('branch', branch.replace(/-/g, '--'))
if (branch) searchParams.append('branch', branch)
const endpoint = `project/badge/${type}/${projectId}`
const svg = await client.get(endpoint, { searchParams }).text()