From 7e5a195bfa077d0bf2ba72eef7acce133e033f11 Mon Sep 17 00:00:00 2001 From: Gregor Date: Mon, 22 Oct 2018 18:42:47 -0700 Subject: [PATCH] feat: " is enabled for the pro plan for free" message in status summary --- lib/pro/set-status.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/pro/set-status.js b/lib/pro/set-status.js index 8ff7db700..6eec3c741 100644 --- a/lib/pro/set-status.js +++ b/lib/pro/set-status.js @@ -1,7 +1,7 @@ module.exports = setStatusPro const getAppConfig = require('../app-config') -// const PRO_PLAN_FOR_FREE = require('../../pro-plan-for-free') +const PRO_PLAN_FOR_FREE = require('../../pro-plan-for-free') const locationLabel = { title: 'title', @@ -10,7 +10,7 @@ const locationLabel = { } function setStatusPro (newStatus, context) { - const { pull_request: pullRequest } = context.payload + const { repository, pull_request: pullRequest } = context.payload const { name } = getAppConfig() const checkOptions = { @@ -70,13 +70,13 @@ ${newStatus.config} }) } - // uncomment once WIP is listed in marketplace - // if (PRO_PLAN_FOR_FREE.includes(repo.owner.login)) { - // checkOptions.output.summary += ` - // ### 🆓💸 The account ${repo.owner.login} is [enabled for the pro plan for free](https://github.com/wip/app/blob/master/pro-plan-for-free.js) - // - // Please consider [signing up for the pro plan](https://github.com/marketplace/wip), all revenue is donated to [Rails Girls Summer of Code](https://railsgirlssummerofcode.org/).` - // } + /* istanbul ignore next */ + if (PRO_PLAN_FOR_FREE.includes(repository.owner.login)) { + checkOptions.output.summary += ` + ### 🆓💸 The account ${repository.owner.login} is [enabled for the pro plan for free](https://github.com/wip/app/blob/master/pro-plan-for-free.js) + + Please consider [signing up for the pro plan](https://github.com/marketplace/wip), all revenue is donated to [Rails Girls Summer of Code](https://railsgirlssummerofcode.org/).` + } return context.github.checks.create(context.repo(checkOptions)) }