Skip to content

chore(ci): try and alert when automerge jobs complete or fail #274618

chore(ci): try and alert when automerge jobs complete or fail

chore(ci): try and alert when automerge jobs complete or fail #274618

Workflow file for this run

name: Automerge
env:
MERGE_METHOD: 'squash'
MERGE_RETRY_SLEEP: 300000
MERGE_ERROR_FAIL: true
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
check_suite:
types:
- completed
status: {}
jobs:
automerge:
name: Automerge if requested
runs-on: ubuntu-24.04
env:
IS_POSTHOG_BOT_AVAILABLE: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN != '' }}
steps:
- name: Automerge
if: env.IS_POSTHOG_BOT_AVAILABLE == 'true'
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}
- name: Send automerge event to PostHog
uses: PostHog/[email protected]
with:
posthog-token: ${{secrets.POSTHOG_API_TOKEN}}
event: 'posthog-github-automerge-pr-status'
properties: '{"prUrl": "${{ github.event.pull_request.html_url }}", "jobStatus": "${{ job.status }}", "prTitle": "${{ github.event.pull_request.title}}", "prNumber": "${{ github.event.pull_request.number}}", "mergeResult": "${{ steps.automerge.outputs.mergeResult }}" }'