Skip to content

Commit

Permalink
feat: "<account> is enabled for the pro plan for free" message in sta…
Browse files Browse the repository at this point in the history
…tus summary
  • Loading branch information
gr2m committed Oct 23, 2018
1 parent 5eef822 commit 7e5a195
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/pro/set-status.js
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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 = {
Expand Down Expand Up @@ -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))
}

1 comment on commit 7e5a195

@vercel
Copy link

@vercel vercel bot commented on 7e5a195 Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully aliased the URL https://wip-nlmbhidnkv.now.sh to the following alias.

Please sign in to comment.