Created
April 16, 2017 17:56
-
-
Save dend/4f2eb7e2cbcd35877dba561ae450ab68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check if we have a push event in place. That is a standard commit. | |
if (req.headers["x-github-event"] && req.headers["x-github-event"].toLowerCase() === "push") | |
{ | |
console.log("This is a push event for commit: " + bodyObject.after); | |
bot.getCommit(bodyObject.after, function(result){ | |
console.log("Commit obtained!"); | |
for(var i = 0; i < result.files.length; i++){ | |
var file = result.files[i]; | |
if (file.status.toLowerCase() === 'added' && | |
file.filename.indexOf(config.relativeFolder + "/",0) === 0 && | |
file.filename.split('.').pop().toLowerCase() === 'md'){ | |
console.log("Got us a Markdown file!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment