Skip to content

Commit

Permalink
fix: avoid PRs when there's no contributions (#118)
Browse files Browse the repository at this point in the history
* fix: avoid PRs when there's no contributions

* fix: avoid PRs when there's no contributions

* refactor(processIssueComment): made it more explicit

Made the conditional on `contributions` more explicit

* refactor(processIssueComment): changed the contribution names' URL
  • Loading branch information
Berkmann18 authored and jakebolam committed Jan 30, 2019
1 parent a0bd7c1 commit 69eaa7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tasks/processIssueComment/probot-processIssueComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ async function processAddContributor({
contributions,
branchName,
}) {
if (contributions.length === 0) {
context.log.debug('No contributions')
return commentReply.reply(
`I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use [valid contribution names](https://all-contributors.js.org/docs/emoji-key).`,
)
}
const { name, avatar_url, profile } = await getUserDetails({
github: context.github,
username: who,
Expand Down

0 comments on commit 69eaa7e

Please sign in to comment.