Skip to content

Commit

Permalink
Touch up debug messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmHughes committed Mar 10, 2020
1 parent e719965 commit c6f62fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14011,24 +14011,21 @@ async function run() {
issue_pr_number = context.payload.pull_request.number;
body = context.payload.pull_request.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, pr_number: ${issue_pr_number}, body: ${body}`)
// Issues event
// Webhook Documentation: https://developer.github.com/v3/activity/events/types/#issuesevent
} else if (event_type === 'issues') {
core.debug(`context.issue = ${context.issue}`);
issue_pr_number = context.payload.issue.number;
body = context.payload.issue.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, issue_number: ${issue_pr_number}, body: ${body}`)
// Issue comment event
// Webhook Documentation: https://developer.github.com/v3/activity/events/types/#issuecommentevent
} else {
core.debug(`context.issue = ${context.issue}`);
core.debug(`context.comment = ${context.comment}`);
issue_pr_number = context.payload.issue.number;
body = context.payload.comment.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, issue_or_pr_number: ${issue_pr_number}, body: ${body}`)
}

if (body.includes(command)) {
Expand Down
9 changes: 3 additions & 6 deletions src/giphy-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,21 @@ async function run() {
issue_pr_number = context.payload.pull_request.number;
body = context.payload.pull_request.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, pr_number: ${issue_pr_number}, body: ${body}`)
// Issues event
// Webhook Documentation: https://developer.github.com/v3/activity/events/types/#issuesevent
} else if (event_type === 'issues') {
core.debug(`context.issue = ${context.issue}`);
issue_pr_number = context.payload.issue.number;
body = context.payload.issue.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, issue_number: ${issue_pr_number}, body: ${body}`)
// Issue comment event
// Webhook Documentation: https://developer.github.com/v3/activity/events/types/#issuecommentevent
} else {
core.debug(`context.issue = ${context.issue}`);
core.debug(`context.comment = ${context.comment}`);
issue_pr_number = context.payload.issue.number;
body = context.payload.comment.body;

core.debug(`${event_type} event triggered action, issue_pr_number: ${issue_pr_number}, body: ${body}`)
core.debug(`${event_type} event triggered action, issue_or_pr_number: ${issue_pr_number}, body: ${body}`)
}

if (body.includes(command)) {
Expand Down

0 comments on commit c6f62fa

Please sign in to comment.