Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/changelog-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Snapshot Pyth symbols for Change Log

on:
schedule:
# Daily at 00:30 UTC. Slight offset from midnight to avoid contention
# and to ensure any in-progress upstream writes have settled.
- cron: "30 0 * * *"
workflow_dispatch: {}

permissions:
contents: write

jobs:
snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version-file: "package.json"
cache: pnpm

- name: Install dependencies for developer-hub
working-directory: apps/developer-hub
run: pnpm install --frozen-lockfile --filter @pythnetwork/developer-hub...

# Restore the rolling baseline (the 3 MB symbols snapshot from the
# previous run) so today's diff can be computed against it. Missing
# cache is fine — the snapshot script bootstraps a fresh baseline.
- name: Restore baseline snapshot
uses: actions/cache/restore@v4
with:
path: apps/developer-hub/data/latest-snapshot.json
key: changelog-baseline
restore-keys: changelog-baseline

- name: Capture today's snapshot and diff
working-directory: apps/developer-hub
run: pnpm snapshot:changelog

- name: Verify generator runs cleanly
working-directory: apps/developer-hub
run: pnpm generate:changelog

# Save today's snapshot back to the cache for tomorrow. Unique key
# per run so each save creates a new entry; old caches age out via
# GitHub's standard 7-day inactivity eviction.
- name: Save baseline snapshot
if: always()
uses: actions/cache/save@v4
with:
path: apps/developer-hub/data/latest-snapshot.json
key: changelog-baseline-${{ github.run_id }}

- name: Commit and push diff if changed
run: |
set -euo pipefail

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add apps/developer-hub/data/changelog-diffs/

if git diff --cached --quiet; then
echo "No new diff today — nothing to commit."
exit 0
fi

DATE=$(date -u +%Y-%m-%d)
git commit -m "chore(developer-hub): daily change-log diff ${DATE}"

# Retry on conflict — another commit may have landed on the
# default branch between checkout and push. Rebase and retry
# up to 3 times before giving up loudly.
BRANCH="${GITHUB_REF_NAME}"
for attempt in 1 2 3; do
if git push origin "HEAD:${BRANCH}"; then
echo "Push succeeded on attempt ${attempt}."
exit 0
fi
echo "Push rejected on attempt ${attempt}; rebasing onto origin/${BRANCH} and retrying…"
git fetch origin "${BRANCH}"
git rebase "origin/${BRANCH}"
done

echo "::error::Push failed after 3 attempts. Investigate branch protection or persistent races." >&2
exit 1
7 changes: 7 additions & 0 deletions apps/developer-hub/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
dist/
next-env.d.ts

# Auto-generated by `pnpm generate:changelog` from data/changelog-diffs/.
src/components/ChangeLog/generated-data.ts
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Commit or pre-generate required change-log module

src/components/ChangeLog/generated-data.ts is now ignored, but data.ts imports it unconditionally, so a fresh checkout does not contain a resolvable module until someone manually runs pnpm generate:changelog. In this repo the normal dev path (start:dev -> next dev) does not generate that file first, which causes a module-not-found failure for the new page in clean environments.

Useful? React with 👍 / 👎.


# Rolling snapshot baseline used by the daily diff job. Persisted between
# CI runs via GitHub Actions cache, never committed.
data/latest-snapshot.json

# Ai Migration
.ai/**
9 changes: 9 additions & 0 deletions apps/developer-hub/content/docs/price-feeds/changelog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Change Log
description: Daily record of status transitions on Pyth price feeds — additions, activations, upcoming expirations, and removals.
slug: /price-feeds/changelog
---

import { ChangeLog } from "../../../src/components/ChangeLog";

<ChangeLog />
2 changes: 1 addition & 1 deletion apps/developer-hub/content/docs/price-feeds/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"title": "Price Feeds",
"description": "Real-time financial market data",
"pages": ["core", "pro"],
"pages": ["core", "pro", "changelog"],
"defaultOpen": true,
"icon": "ChartLine"
}
87 changes: 87 additions & 0 deletions apps/developer-hub/data/changelog-diffs/2026-05-08.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"date": "2026-05-08",
"label": "Friday",
"summary": {
"added": 6,
"went_live": 2,
"expiring": 0,
"removed": 0
},
"hero": "6 new feeds announced, 2 went live.",
"events": [
{
"id": "Equity.US.IGE/USD",
"lazerId": 2795,
"asset": "Ishares North American Natural Resources Etf",
"assetType": "equity",
"date": "2026-05-08",
"quote": "USD",
"hermesId": "c0948c8763aafa254159835fac7d9cc1f65cb2c370791d7fa52493e0bfe974bd",
"changeType": "went_live"
},
{
"id": "Equity.US.TER/USD",
"lazerId": 1420,
"asset": "Teradyne Inc",
"assetType": "equity",
"date": "2026-05-08",
"quote": "USD",
"hermesId": "58ab181e7512766728d2cc3581839bbb913e6cd24457ba422cbe2a33df64416e",
"changeType": "went_live"
},
{
"id": "Crypto.AFSUI/SUI.RR",
"lazerId": 3245,
"asset": "Aftermath Staked Sui",
"assetType": "crypto-redemption-rate",
"date": "2026-05-08",
"quote": "SUI",
"changeType": "added"
},
{
"id": "Crypto.HASUI/SUI.RR",
"lazerId": 3244,
"asset": "Haedal Staked Sui",
"assetType": "crypto-redemption-rate",
"date": "2026-05-08",
"quote": "SUI",
"changeType": "added"
},
{
"id": "Crypto.EXUSDC/USDC.RR",
"lazerId": 3243,
"asset": "Exceed Usd Coin",
"assetType": "crypto-redemption-rate",
"date": "2026-05-08",
"quote": "USDC",
"changeType": "added"
},
{
"id": "Crypto.LIMUSD/USDC.RR",
"lazerId": 3242,
"asset": "Liminal Us Dollar",
"assetType": "crypto-redemption-rate",
"date": "2026-05-08",
"quote": "USDC",
"changeType": "added"
},
{
"id": "Crypto.HEMIBTC/BTC.RR",
"lazerId": 3241,
"asset": "Hemi Bitcoin",
"assetType": "crypto-redemption-rate",
"date": "2026-05-08",
"quote": "BTC",
"changeType": "added"
},
{
"id": "Equity.US.DRAM/USD",
"lazerId": 3240,
"asset": "Roundhill Memory Etf",
"assetType": "equity",
"date": "2026-05-08",
"quote": "USD",
"changeType": "added"
}
]
}
2 changes: 1 addition & 1 deletion apps/developer-hub/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const config = {
},

{
source: String.raw`/price-feeds/:path((?!core(?:/|$|\.mdx?$)|pro(?:/|$|\.mdx?$)|hip-3-service(?:/|$|\.mdx?$)).*)`,
source: String.raw`/price-feeds/:path((?!core(?:/|$|\.mdx?$)|pro(?:/|$|\.mdx?$)|hip-3-service(?:/|$|\.mdx?$)|changelog(?:/|$|\.mdx?$)).*)`,
destination: "/price-feeds/core/:path",
permanent: true,
},
Expand Down
2 changes: 2 additions & 0 deletions apps/developer-hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
"build:analyze": "ANALYZE=true next build",
"count:llm-tokens": "tsx ./scripts/count-llm-tokens.ts",
"fix:lint:stylelint": "stylelint --fix 'src/**/*.scss'",
"generate:changelog": "tsx ./scripts/generate-changelog.ts",
"generate:docs": "tsx ./scripts/generate-docs.ts",
"snapshot:changelog": "tsx ./scripts/snapshot-and-diff.ts",
"start:dev": "next dev --port 3627",
"start:prod": "next start --port 3627",
"test:lint:stylelint": "stylelint 'src/**/*.scss' --max-warnings 0",
Expand Down
Loading
Loading