Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log request info #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GH_USER="mike-north"
#
# https://github.com/settings/tokens/new?scopes=public_repo,read:user
#
GH_USER_TOKEN=1234567890
GH_USER_TOKEN=""

#
# Once you've created a GITHUB APP here:
Expand Down
6 changes: 5 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const express = require('express');
const bodyParser = require('body-parser');
const { createLogger, logWebhookPayload } = require('./logger');
// const debounce = require('debounce');
// const { make_github_rest_api_call } = require('./gh_utils');
const { make_github_rest_api_call } = require('./gh_utils');

const log = createLogger('./app.js');

Expand All @@ -20,6 +20,10 @@ async function main() {
// webhook receiver function
app.post('/webhook', async function(req, resp) {
logWebhookPayload(log, req);
console.log("header: ", req.header("x-github-event"));
console.log("body.action: ", req.body.action);
console.log("body.issue.comments_url: ", req.body.issue.comments_url);

});

// start the app
Expand Down