Skip to content

build: remove url from payload status #5092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/dashboard/functions/github/github-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type GithubStatusData = {
result: boolean;
name: string;
description: string;
url: string;
url?: string;
};

/** Function that sets a Github commit status */
Expand Down
5 changes: 2 additions & 3 deletions tools/dashboard/functions/payload-github-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {setGithubStatus} from './github/github-status';
export const payloadGithubStatus = https.onRequest(async (request, response) => {
const authToken = request.header('auth-token');
const commitSha = request.header('commit-sha');
const payloadDiff = parseInt(request.header('commit-payload-diff'));
const payloadDiff = parseFloat(request.header('commit-payload-diff'));

if (!verifyToken(authToken)) {
return response.status(403).json({message: 'Auth token is not valid'});
Expand All @@ -22,8 +22,7 @@ export const payloadGithubStatus = https.onRequest(async (request, response) =>
await setGithubStatus(commitSha, {
result: true,
name: 'Library Payload',
url: `https://travis-ci.org/angular/material2/jobs/${process.env['TRAVIS_JOB_ID']}`,
description: `${payloadDiff > 0 ? `+` : ''} ${payloadDiff.toFixed(2)}KB`
description: `${payloadDiff >= 0 ? `+` : ''}${payloadDiff.toFixed(2)}KB`
});

response.json({message: 'Payload Github status successfully set.'});
Expand Down