Skip to content

Commit 253fdf6

Browse files
committed
chore: make the repo safe and clear to fork
The repository picked up its first fork. Three things a forker would hit: * deploy-pages, notify-engine and bump-engine publish the site or talk to TechEngine. In a fork they have no secrets and no Pages, so they can only fail. Their entry jobs now run only in GetTechAPI/TechAPI; deploy-pages' `deploy` job needs `build` and is skipped with it. * The data license lived only in a README sentence, while the repo's sole LICENSE file is the MIT one for the code — so GitHub, and anyone reusing the data, sees "MIT". data/LICENSE.md restates the existing CC BY-SA 4.0 declaration where the data actually sits, and points to ../LICENSE for the code. No licensing terms change. * The contributing section listed five categories as needing `source_urls`; the validator enforces it for all thirteen. The PR template also gains a "targets develop" check. The two secret-bearing triggers were reviewed and need no change: pr-metadata runs on pull_request_target but never checks out the PR, and its only event-derived expression (html_url) is passed through env; verify-command only accepts OWNER/MEMBER/COLLABORATOR. Refs #1
1 parent cd53784 commit 253fdf6

6 files changed

Lines changed: 32 additions & 5 deletions

File tree

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
## Checklist
1212

13+
- [ ] The PR targets `develop` (`main` only moves through release PRs)
1314
- [ ] `python -m app.validate` passes locally
1415
- [ ] Files live at the correct `data/<category>/<...>/<slug>.json` path
1516
- [ ] Slugs are kebab-case and unique within the category

.github/workflows/bump-engine.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ concurrency:
2020

2121
jobs:
2222
bump:
23+
# Org-only: this job publishes the site or talks to TechEngine. In a fork
24+
# it can only fail (no secrets, no Pages), so it does not run there.
25+
if: github.repository == 'GetTechAPI/TechAPI'
2326
runs-on: ubuntu-latest
2427
env:
2528
ENGINE_TOKEN: ${{ secrets.ENGINE_TOKEN }}

.github/workflows/deploy-pages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ concurrency:
2121

2222
jobs:
2323
build:
24+
# Org-only: this job publishes the site or talks to TechEngine. In a fork
25+
# it can only fail (no secrets, no Pages), so it does not run there.
26+
if: github.repository == 'GetTechAPI/TechAPI'
2427
runs-on: ubuntu-latest
2528
steps:
2629
- uses: actions/checkout@v4

.github/workflows/notify-engine.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ permissions:
2727

2828
jobs:
2929
notify:
30+
# Org-only: this job publishes the site or talks to TechEngine. In a fork
31+
# it can only fail (no secrets, no Pages), so it does not run there.
32+
if: github.repository == 'GetTechAPI/TechAPI'
3033
runs-on: ubuntu-latest
3134
env:
3235
ENGINE_TOKEN: ${{ secrets.ENGINE_TOKEN }}

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ submodule bump and the verified-promotion bot both land on `develop`.
6262

6363
## Contributing
6464

65-
Open a PR **against `develop`** with the new/updated JSON file. The PR template
66-
walks through what to include. The validator must pass. All records (`brand`,
67-
`soc`, `smartphone`, `gpu`, and `cpu`) must include `source_urls` with at least
68-
one canonical reference (vendor product page, Wikipedia infobox, datasheet).
65+
Open a PR **against `develop`** with the new/updated JSON file — that is also
66+
the default branch, so a PR from a fork targets it automatically. The PR
67+
template walks through what to include, and the validator must pass. Every
68+
record, in every category, must include `source_urls` with at least one
69+
canonical reference (vendor product page, Wikipedia infobox, datasheet).
6970

7071
## License
7172

72-
Data is licensed **CC-BY-SA 4.0**; attribute "Data from TechAPI" and share alike.
73+
Data is licensed **CC-BY-SA 4.0**; attribute "Data from TechAPI" and share alike
74+
(see [`data/LICENSE.md`](data/LICENSE.md)).
7375
The bundled validator code is [MIT](LICENSE).

data/LICENSE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Data license
2+
3+
The dataset in this directory (`data/**`), and the static JSON API generated
4+
from it (`site/public/v1/**`), are licensed under **Creative Commons
5+
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)**:
6+
<https://creativecommons.org/licenses/by-sa/4.0/>
7+
8+
When you reuse the data, attribute it as "Data from TechAPI" with a link to
9+
<https://github.com/GetTechAPI/TechAPI>, and release derived datasets under the
10+
same license. Each record also lists the sources it was compiled from in its
11+
`source_urls` field.
12+
13+
This notice restates the license declared in the top-level `README.md`. The
14+
code in this repository — the validator, the site and the workflows — is
15+
licensed separately under MIT; see [`../LICENSE`](../LICENSE).

0 commit comments

Comments
 (0)