diff --git a/.travis.yml b/.travis.yml index a432f9e121..05b457eb38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ sudo: required env: global: - BUILD_TIMEOUT=10000 - - BROWSER_USERNAME=PaulBGD + - BROWSER_USERNAME=paulsauve1 cache: directories: - "$HOME/.yarn-cache" diff --git a/scripts/travis-bench.js b/scripts/travis-bench.js index 4f5fe2f2ea..83e5b7409d 100644 --- a/scripts/travis-bench.js +++ b/scripts/travis-bench.js @@ -67,7 +67,7 @@ const headers = { Authorization: `token ${githubToken}` }; -fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/comments`, { headers }) +fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/comments`) .then(res => res.json()) .then(res => { let addComment = false; @@ -82,8 +82,9 @@ fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/commen if (addComment) { const contents = '
Benchmark Results' + fs.readFileSync(outputFile) + '
'; + let action; if (editId === null) { - return fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/comments`, { + action = fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/comments`, { method: 'POST', headers, body: JSON.stringify({ @@ -91,7 +92,7 @@ fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/commen }) }); } else { - return fetch(`https://api.github.com/repos/sveltejs/svelte/issues/comments/${editId}`, { + action = fetch(`https://api.github.com/repos/sveltejs/svelte/issues/comments/${editId}`, { method: 'PATCH', headers, body: JSON.stringify({ @@ -99,5 +100,6 @@ fetch(`https://api.github.com/repos/sveltejs/svelte/issues/${pullRequest}/commen }) }); } + return action.then(res => res.json()).then(res => console.log('[DEBUG]', res)); } });