Hello,
After reading eda rulebook example for github and source azure_service_bus, I wonder how it’s possible to configure Github to send events into Azure service bus.
Or since Github can only send webhooks, there is custom service which inject the webhook payload into queue.
- name: GitHub Deploy Git Hook Rules
hosts: all
sources:
- ansible.eda.azure_service_bus:
conn_str: "{{connection_str}}"
queue_name: "{{queue_name}}"
filters:
- benthomasosn.eda.json_filter:
include_keys: ['clone_url']
exclude_keys: ['*_url', '_links', 'base', 'sender', 'owner', 'user']
- benthomasosn.eda.dashes_to_underscores:
rules:
- name: Pull Request Open
condition: event.meta.headers.X_Github_Event == "pull_request" and event.payload.action == "opened"
action:
post_event:
fact:
repository_name: "{{event.payload.repository.full_name}}"
repo: "{{event.payload.pull_request.head.repo.clone_url}}"
ref: "{{event.payload.pull_request.head.ref}}"
pr: "{{event.payload.number}}"
sha: "{{event.payload.pull_request.head.sha}}"