Skip to content

Commit 1a3e55a

Browse files
authored
Merge pull request hayatbiralem#48 from JeffML/master
Avoid triggering npm publish from this repo
2 parents 2720319 + aa7fbc1 commit 1a3e55a

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,24 @@ The npm package provides `getFromTos(fen)` which:
229229
**Result**: Complete data decoupling - fensterchess no longer bundles any eco.json-sourced files. All data loads from GitHub at runtime with caching.
230230

231231
**Alternative approach**: The npm package provides `getFromToIndex()` and could provide a scores utility, but direct GitHub downloads work well for serverless functions.
232+
233+
## Fork / Upstream Relationship
234+
235+
This repo (`JeffML/eco.json`) is a fork of `hayatbiralem/eco.json`. Key points:
236+
237+
- **JeffML/eco.json is the functional repo** — the npm package, CI, and all data URLs point here
238+
- **hayatbiralem/eco.json is the upstream** — the original community repo; kept in sync for visibility
239+
- `upstream` remote is configured locally: `git remote add upstream git@github.com:hayatbiralem/eco.json.git`
240+
241+
### What to PR upstream (hayatbiralem)
242+
243+
**Only data file changes** warrant a PR upstream:
244+
- `ecoA-E.json`, `eco_interpolated.json`, `fromTo.json`, `fromToPositionIndexed.json`, `scores.json`
245+
246+
Everything else (npm package, CI workflows, copilot instructions, tooling) is specific to this fork — do **not** PR those upstream.
247+
248+
### CI Publishing
249+
250+
- Uses OIDC Trusted Publishing (no stored `NPM_TOKEN`)
251+
- Configured on npmjs.com: Trusted Publisher = `JeffML/eco.json`, workflow = `publish.yml`
252+
- Workflow has `if: github.repository == 'JeffML/eco.json'` guard so it silently skips when run from hayatbiralem's repo after a PR merge

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14+
if: github.repository == 'JeffML/eco.json'
1415
permissions:
1516
contents: write
1617
id-token: write

0 commit comments

Comments
 (0)