Skip to content

Commit

Permalink
Attempt to attach any found metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Jun 15, 2024
1 parent 108bbdc commit 1562c54
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/ff_bot/dispatch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ defmodule FFBot.Dispatch do
alias FFBot.Dispatch

def dispatch(event, action, body) do
Logger.metadata(installation_id: body["installation"]["id"])

if body["repository"] do
repo = body["repository"]
Logger.metadata(repo: "#{repo["owner"]["login"]}/#{repo["name"]}")
end

if body["issue"] do
Logger.metadata(issue: "#{body["issue"]["number"]}")
end

if body["sender"] do
Logger.metadata(sender: "#{body["sender"]["login"]}")
end

# Search for a module for the given event type
module =
case event do
Expand Down

0 comments on commit 1562c54

Please sign in to comment.