From 9c5a79f198a63d8105a6994702fcf7be6acc8022 Mon Sep 17 00:00:00 2001 From: billytrend Date: Tue, 27 Nov 2018 13:10:28 -0800 Subject: [PATCH] Adds encoding to url parameters --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 60871fd..556acce 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,8 @@ export = (app: Application) => { if (prContent.base.ref === 'master') { app.log('PR against master') - const prFromOwnerRepo = prContent.head.repo.full_name - const prFromRef = prContent.head.ref + const prFromOwnerRepo = encodeURIComponent(prContent.head.repo.full_name) + const prFromRef = encodeURIComponent(prContent.head.ref) app.log(`repo: ${prFromOwnerRepo}, branch: ${prFromRef}`) const prComment = context.issue({ body: `If you're a MSFT employee, click [this link](https://portal.azure-devex-tools.com/app/branch/${prFromOwnerRepo}/${prFromRef}?source=github)