Skip to content

Commit 96e36ed

Browse files
committed
Alerts and stuff
1 parent 9a476ac commit 96e36ed

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

.github/workflows/e2e.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,11 @@ jobs:
6565

6666
- name: Send failure event to PostHog
6767
if: failure()
68-
uses: PostHog/[email protected]
69-
# A CDP destination is set-up to alert when we get this event
70-
with:
71-
posthog-token: '${{ secrets.PERSONAL_ACCESS_KEY }}'
72-
event: 'posthog-examples-repo-test-failure'
73-
properties: >-
74-
{
68+
run: |
69+
curl -X POST https://webhooks.us.posthog.com/public/webhooks/019a7a81-7961-0000-d3e3-b5f34cc2a32b \
70+
-H "Content-Type: application/json" \
71+
-d '{
72+
"event": "posthog-examples-repo-test-failure",
7573
"commitSha": "${{ github.sha }}",
7674
"jobStatus": "${{ job.status }}",
7775
"commitMessage": "${{ github.event.head_commit.message }}",
@@ -80,8 +78,9 @@ jobs:
8078
"workflow": "${{ github.workflow }}",
8179
"runId": "${{ github.run_id }}",
8280
"runNumber": "${{ github.run_number }}",
81+
"jobUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
8382
"matrixExample": "${{ matrix.example }}"
84-
}
83+
}'
8584
8685
- uses: actions/upload-artifact@v4
8786
if: always()

.github/workflows/integration.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ jobs:
6666
NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_HOST }}
6767

6868
- name: Send failure event to PostHog
69-
if: failure()
70-
uses: PostHog/[email protected]
71-
# A CDP destination is set-up to alert when we get this event
72-
with:
73-
posthog-token: '${{ secrets.PERSONAL_ACCESS_KEY }}'
74-
event: 'posthog-examples-repo-test-failure'
75-
properties: >-
76-
{
69+
if: failure()
70+
run: |
71+
curl -X POST https://webhooks.us.posthog.com/public/webhooks/019a7a81-7961-0000-d3e3-b5f34cc2a32b \
72+
-H "Content-Type: application/json" \
73+
-d '{
74+
"event": "posthog-examples-repo-test-failure",
7775
"commitSha": "${{ github.sha }}",
7876
"jobStatus": "${{ job.status }}",
7977
"commitMessage": "${{ github.event.head_commit.message }}",
@@ -82,8 +80,9 @@ jobs:
8280
"workflow": "${{ github.workflow }}",
8381
"runId": "${{ github.run_id }}",
8482
"runNumber": "${{ github.run_number }}",
83+
"jobUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
8584
"example": "${{ matrix.example }}"
86-
}
85+
}'
8786
8887
- uses: actions/upload-artifact@v4
8988
if: always()

0 commit comments

Comments
 (0)