From b68bfcf006036aa264e5c769d1c5bd47e726a393 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Wed, 8 Feb 2023 18:49:38 +0000 Subject: [PATCH] chore: add more info when reporting pr age (#14149) --- .github/workflows/report-pr-age.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/report-pr-age.yml b/.github/workflows/report-pr-age.yml index dfc0ea84829d2..ce84de446a94a 100644 --- a/.github/workflows/report-pr-age.yml +++ b/.github/workflows/report-pr-age.yml @@ -27,4 +27,15 @@ jobs: with: posthog-token: ${{secrets.POSTHOG_API_TOKEN}} event: 'posthog-ci-pr-stats' - properties: '{"prAgeInSeconds": ${{ env.pr_age }}, "isRevert": ${{env.is_revert}} }' + properties: '{"prAgeInSeconds": ${{ env.pr_age }}, "isRevert": ${{env.is_revert}}, "prTitle": "${{ github.event.pull_request.title}}", "prNumber": "${{ github.event.pull_request.number}}" }' + report-pr-as-annotation: + name: Report PR to PostHog + runs-on: ubuntu-20.04 + if: github.repository == 'PostHog/posthog' && github.event.pull_request.merged == true + steps: + - name: Report PR to PostHog + uses: PostHog/posthog-annotate-merges-github-action@0.1.4 + with: + posthog-token: ${{secrets.POSTHOG_CLOUD_ACCESS_TOKEN}} + posthog-project-id: ${{secrets.POSTHOG_PROJECT_ID}} + annotation-message: 'Merged PR #${{github.event.pull_request.number}} ${{github.event.pull_request.title}}'