GitHub Action
PostHog Annotations
0.2.0
Latest version
This action lets you send annotations to PostHog from your GitHub actions.
At PostHog we use it to track when PRs are merged
Required Your PostHog Personal API Token. Not the write-only project key. Create a personal api token at https://app.posthog.com/me/settings
Required Your PostHog Project ID. You can find this in the project settings.
Your PostHog API Host.
Defaults to "https://app.posthog.com"
REQUIRED The message to send to PostHog.
Your personal API token must be kept secret.
name: Report PR to PostHog
on:
pull_request:
types:
- closed
jobs:
report-pr-age:
name: Report PR to PostHog
runs-on: ubuntu-20.04
if: github.event.pull_request.merged == true
steps:
- name: Report PR to PostHog
uses: PostHog/[email protected]
with:
posthog-token: ${{secrets.POSTHOG_PERSONAL_API_KEY}}
posthog-project-id: ${{secrets.POSTHOG_PROJECT_ID}}
annotation-message: "Merged PR #${{github.event.pull_request.number}} ${{github.event.pull_request.title}}"