netlify-plugin-qawolf
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "netlify-plugin-qawolf", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Netlify Build plugin to run QA Wolf tests on deployments", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -7,7 +7,10 @@ const retry = require('async-retry') | ||
const buildCommittedAt = (commits) => { | ||
const buildCommitFields = (commits) => { | ||
const commit = commits.find((c) => c.sha === process.env.COMMIT_REF) | ||
if (!commit) return null | ||
if (!commit) return {} | ||
return commit.committer.date || commit.author.date | ||
return { | ||
committed_at: commit.committer.date || commit.author.date, | ||
message: commit.message, | ||
} | ||
} | ||
@@ -28,3 +31,2 @@ | ||
{ | ||
committed_at: buildCommittedAt(commits), | ||
deployment_environment: process.env.CONTEXT, | ||
@@ -38,2 +40,3 @@ deployment_url: process.env.DEPLOY_PRIME_URL, | ||
unique_deployment_url: process.env.DEPLOY_URL, | ||
...buildCommitFields(commits), | ||
}, | ||
@@ -40,0 +43,0 @@ { headers: { authorization: process.env.QAWOLF_API_KEY } }, |
18154
122