Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Display jsonlint error in parsing .mention-bot file with syntax error #190

Merged
merged 2 commits into from
Nov 29, 2016

Conversation

jeffreyleeon
Copy link
Contributor

connects #188

@mention-bot
Copy link

@jeffreyleeon, thanks for your PR! By analyzing the history of the files in this pull request, we identified @saiqulhaq, @vjeux and @jgardella to be potential reviewers.

@@ -19,6 +19,7 @@ var util = require('util');
var schedule = require('./schedule.js');

var GitHubApi = require('github');
var jsonlint = require("jsonlint");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: single quote

@@ -166,12 +168,20 @@ async function work(body) {
}).catch(function(e) {
if (e instanceof SyntaxError && repoConfig.actions.indexOf(data.action) !== -1) {
// Syntax error while reading custom configuration file
var errorLog = '';
try {
jsonlint.parse(e.repoConfig)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sweet!
image

@vjeux
Copy link
Contributor

vjeux commented Nov 29, 2016

Awesome! Thanks, this is an awesome output. Please tweak the little quote and i'll merge it in :)

@hunkim
Copy link
Contributor

hunkim commented Nov 29, 2016

@jeffreyleeon Very cool!

@jeffreyleeon jeffreyleeon force-pushed the display-jsonlint-error branch from f15a5fd to e0ef073 Compare November 29, 2016 04:34
@facebook-github-bot
Copy link

@jeffreyleeon updated the pull request - view changes

@vjeux vjeux merged commit c7faf14 into facebookarchive:master Nov 29, 2016
@vjeux
Copy link
Contributor

vjeux commented Nov 29, 2016

YAY

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants