Honeybadger deployment notification with curl

Shell command to tell Honeybadger about a new deployment:

curl --data "deploy[revision]=$(date -u +%Y%m%d%H%M%S)_$(git rev-parse --short HEAD)&api_key=$HONEYBADGER_API_KEY" "https://api.honeybadger.io/v1/deploys"

Params:

Getting Honeybadger API key:

Project page → Settings → API keys

Ansible task:

- name: clone or update sources
  ansible.builtin.git:
    # ...
  register: git_result

- name: notify honeybadger.io about the deployment
  community.general.honeybadger_deployment:
    token: "{{lookup('env', 'HONEYBADGER_API_KEY')}}"
    environment: "production"
    user: "ansible"
    revision: "{{git_result.after}}"
    repo: "{{git_url}}"

References: