Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

docs: use official-style Star History chart (#156)

tt-a1i12106be58b34
diff --git a/.github/workflows/star-history.yml b/.github/workflows/star-history.yml
index a4755c0f..b8122271 100644
--- a/.github/workflows/star-history.yml
+++ b/.github/workflows/star-history.yml
@@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Prepare chart output directory
- run: mkdir -p assets
- - uses: xpzouying/star-history@8b1f26dc5e9a17caa75da9351b688509ef312811 # v1
+ - uses: narayann7/star-history-action@a68d8f9d67ca20d55b682a264e69152dcf326e9c # v1.0.5
with:
+ output-dir: assets
+ update-readme: 'false'
commit: 'false'
- name: Publish charts with linear history
run: bash scripts/publish-star-history.sh star-history
diff --git a/README.md b/README.md
index 87b0837f..480afd4d 100644
--- a/README.md
+++ b/README.md
@@ -286,4 +286,4 @@ Issues, pull requests, and real-world diagrams are welcome. Start with the [cont
## Star History
-<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history.svg" /></picture></p>
+<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-light.svg" /></picture></p>
diff --git a/README_EN.md b/README_EN.md
index 87b0837f..480afd4d 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -286,4 +286,4 @@ Issues, pull requests, and real-world diagrams are welcome. Start with the [cont
## Star History
-<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history.svg" /></picture></p>
+<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-light.svg" /></picture></p>
diff --git a/README_ZH.md b/README_ZH.md
index 3ed6146f..60924c89 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -290,4 +290,4 @@ Claude.ai 中的上传入口:
## Star History
-<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history.svg" /></picture></p>
+<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-light.svg" /></picture></p>
diff --git a/archify/test/readme-showcase.test.mjs b/archify/test/readme-showcase.test.mjs
index a7ab22f0..fac0705f 100644
--- a/archify/test/readme-showcase.test.mjs
+++ b/archify/test/readme-showcase.test.mjs
@@ -24,7 +24,7 @@ function git(cwd, ...args) {
function writeStarHistoryCharts(cwd, version) {
const assets = path.join(cwd, 'assets');
fs.mkdirSync(assets, { recursive: true });
- fs.writeFileSync(path.join(assets, 'star-history.svg'), `<svg><title>light ${version}</title></svg>\n`);
+ fs.writeFileSync(path.join(assets, 'star-history-light.svg'), `<svg><title>light ${version}</title></svg>\n`);
fs.writeFileSync(path.join(assets, 'star-history-dark.svg'), `<svg><title>dark ${version}</title></svg>\n`);
}
@@ -213,7 +213,7 @@ test('README stays scannable without deleting the visual proof set', () => {
});
test('all README languages end with the self-hosted star history chart', () => {
- const lightChart = 'https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history.svg';
+ const lightChart = 'https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-light.svg';
const darkChart = 'https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg';
const workflow = fs.readFileSync(path.join(repoRoot, '.github', 'workflows', 'star-history.yml'), 'utf8');
@@ -228,14 +228,13 @@ test('all README languages end with the self-hosted star history chart', () => {
}
assert.match(workflow, /permissions:\n contents: write/);
- assert.match(workflow, /xpzouying\/star-history@[0-9a-f]{40}/);
+ assert.match(workflow, /narayann7\/star-history-action@[0-9a-f]{40}/);
+ assert.match(workflow, /output-dir: assets/);
+ assert.match(workflow, /update-readme: ['"]false['"]/);
assert.match(workflow, /commit: ['"]false['"]/);
assert.match(workflow, /bash scripts\/publish-star-history\.sh star-history/);
assert.doesNotMatch(workflow, /branch: star-history/);
- const prepareOutputIndex = workflow.indexOf('run: mkdir -p assets');
- const generateChartIndex = workflow.indexOf('uses: xpzouying/star-history@');
- assert.ok(prepareOutputIndex >= 0, 'Star History workflow must create the chart output directory');
- assert.ok(prepareOutputIndex < generateChartIndex, 'Star History output directory must exist before generation');
+ assert.doesNotMatch(workflow, /xpzouying\/star-history/);
});
test('Star History publishing advances the data branch without a force push', () => {
@@ -283,10 +282,10 @@ test('Star History publishing advances the data branch without a force push', ()
git(fixture, '--git-dir', remote, 'merge-base', '--is-ancestor', firstCommit, secondCommit);
assert.deepEqual(
git(fixture, '--git-dir', remote, 'ls-tree', '-r', '--name-only', secondCommit).split('\n'),
- ['assets/star-history-dark.svg', 'assets/star-history.svg'],
+ ['assets/star-history-dark.svg', 'assets/star-history-light.svg'],
);
assert.match(
- git(fixture, '--git-dir', remote, 'show', `${secondCommit}:assets/star-history.svg`),
+ git(fixture, '--git-dir', remote, 'show', `${secondCommit}:assets/star-history-light.svg`),
/light v2/,
);
} finally {
diff --git a/scripts/publish-star-history.sh b/scripts/publish-star-history.sh
index 1cfa7599..e0378248 100755
--- a/scripts/publish-star-history.sh
+++ b/scripts/publish-star-history.sh
@@ -3,7 +3,7 @@
set -euo pipefail
data_branch="${1:-star-history}"
-light_chart="${2:-assets/star-history.svg}"
+light_chart="${2:-assets/star-history-light.svg}"
dark_chart="${3:-assets/star-history-dark.svg}"
git check-ref-format --branch "$data_branch" >/dev/null