Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate hall of fame JSON
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
json-yaml-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v5
with:
schema_mappings: |
- type: json
schema: ./schemas/halloffame-schema.json
files:
- ./halloffame.json
json_schema_version: draft-07
4 changes: 2 additions & 2 deletions halloffame.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"first": "Anarchy Stars",
"second": "3 elves 1 santa",
"third": "PayBack",
"beta": "Runie Runners",
"beta": "Runie Runners"
},
{
"name": "November 2025",
Expand Down Expand Up @@ -821,4 +821,4 @@
"third": "#BlameFanzy"
}
]
}
}
2 changes: 1 addition & 1 deletion js/halloffameloader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var numLoaded = 0;

fetch("https://lowink.iplabs.ink/halloffame.json")
fetch(`https://${window.location.host}/halloffame.json`)
.then(response => {
return response.json()
})
Expand Down
55 changes: 55 additions & 0 deletions schemas/halloffame-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Hall of Frame",
"type": "object",
"properties": {
"hallOfFame": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"teams": {
"type": "string"
},
"first": {
"type": "string"
},
"second": {
"type": "string"
},
"third": {
"type": "string"
},
"beta": {
"type": "string"
},
"gamma": {
"type": "string"
},
"id": {
"type": "string"
},
"delta": {
"type": "string"
},
"epsilon": {
"type": "string"
}
},
"required": [
"name",
"teams",
"first",
"second",
"third"
]
}
}
},
"required": [
"hallOfFame"
]
}
Loading