Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #40 from guardian/fix-deployTime
Browse files Browse the repository at this point in the history
Fix deployTime in lambda
  • Loading branch information
Mario Galic committed Jul 31, 2018
2 parents 9bdc100 + 120d8c9 commit 884b2e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cloud/tip-create-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const AWS = require('aws-sdk');
AWS.config.update({region: 'eu-west-1'});
const ddb = new AWS.DynamoDB.DocumentClient();

function registerBoard(sha, board, repo, commitMessage, deployTime) {
function registerBoard(sha, board, repo, deployTime) {
return ddb.put(
{
TableName: 'tipcloud',
Expand Down
5 changes: 2 additions & 3 deletions cloud/tip-get-board.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function renderBoard(data) {
const repo = data.Item.repo;
const numberOfVerifiedPaths = data.Item.board.filter( path => path.verified == true).length;
const coverage = Math.round((100 * numberOfVerifiedPaths) / data.Item.board.length);
const deployTime = data.Item.deployTime
const deployTime = data.Item.deployTime;
const elapsedTimeSinceDeploy = Date.now() - Date.parse(deployTime);

const linkToCommit = `https://github.com/${repo}/commit/${sha}`
const linkToCommit = `https://github.com/${repo}/commit/${sha}`;

const html = `
<!DOCTYPE html>
Expand Down Expand Up @@ -82,7 +82,6 @@ function renderBoard(data) {
.progressbar {
text-align: right;
padding-right: 20px;
line-height: 30px;
color: white;
}
Expand Down

0 comments on commit 884b2e7

Please sign in to comment.