Skip to content

Commit 6290767

Browse files
authored
Merge branch 'master' into ENSV-Offshore
2 parents bb968c7 + 956c975 commit 6290767

File tree

18 files changed

+1888
-119
lines changed

18 files changed

+1888
-119
lines changed

.github/workflows/check.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Data check
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
check-dat:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 22.x
16+
- name: Install deps
17+
shell: sh
18+
working-directory: ./scripts
19+
run: yarn
20+
- name: Check VATSpy.dat
21+
shell: sh
22+
working-directory: ./scripts
23+
run: yarn validate-dat
24+
check-geojson:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Install node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
- name: Install deps
33+
shell: sh
34+
working-directory: ./scripts
35+
run: yarn
36+
- name: Check Boundaries.geojson
37+
shell: sh
38+
working-directory: ./scripts
39+
run: yarn validate-schema
40+
validate-contributor:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Install node
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: 22.x
48+
- name: Install deps
49+
shell: sh
50+
working-directory: ./scripts
51+
run: yarn
52+
- name: Check Boundaries.geojson
53+
shell: sh
54+
working-directory: ./scripts
55+
run: yarn check-contributor --login="${{ github.actor }}" --failWhenMissing

.github/workflows/open.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Data check
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
branches: [ master ]
7+
8+
jobs:
9+
comment-on-pr:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Comment on PR
13+
uses: actions/github-script@v7
14+
with:
15+
script: |
16+
const prNumber = context.issue.number;
17+
const url = `https://vatsim-radar.com/data/vatspy/${prNumber}/compare`;
18+
github.rest.issues.createComment({
19+
issue_number: context.issue.number,
20+
owner: context.repo.owner,
21+
repo: context.repo.repo,
22+
body: `Validate data: ${url}\n\nFor controllers data testing visit https://docs.vatsim-radar.com/contributing/debug.html`
23+
})
24+
contributor-data:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
result: ${{ steps.check-contributor.outputs.result }}
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Install node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 22.x
34+
- name: Install deps
35+
shell: sh
36+
working-directory: ./scripts
37+
run: yarn
38+
- id: check-contributor
39+
name: Run contributor check
40+
shell: bash
41+
working-directory: ./scripts
42+
run: |
43+
OUTPUT=$(yarn check-contributor --login="${{ github.event.pull_request.user.login }}")
44+
echo "result<<EOF" >> $GITHUB_OUTPUT
45+
echo "$OUTPUT" >> $GITHUB_OUTPUT
46+
echo "EOF" >> $GITHUB_OUTPUT
47+
contributor-comment:
48+
runs-on: ubuntu-latest
49+
needs: contributor-data
50+
steps:
51+
- uses: actions/github-script@v7
52+
with:
53+
script: |
54+
const result = `${{ needs.contributor-data.outputs.result }}`;
55+
const pr = context.issue.number;
56+
const msg = result !== "not found"
57+
? result
58+
: `❌ Github login ${context.payload.pull_request.user.login} was not found in [contributor list](https://docs.google.com/spreadsheets/u/4/d/e/2PACX-1vRHzHhKz4icslNkd3I6mF1Mp_6gan4muRcWZb8fCYL8_S0C6GDpG409xQGTmPAXLPupEWWws3euNK7O/pubhtml?gid=0). Please read [Readme](https://github.com/vatsimnetwork/vatspy-data-project?tab=readme-ov-file#approved-contributors) to learn more.\n\nKeep in mind: this message will not update automatically. Please, re-run \`validate-contributor\` job when this will be solved.`;
59+
await github.rest.issues.createComment({
60+
issue_number: pr,
61+
owner: context.repo.owner,
62+
repo: context.repo.repo,
63+
body: msg
64+
});

.github/workflows/push.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Data check
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
check-dat:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 22.x
16+
- name: Install deps
17+
shell: sh
18+
working-directory: ./scripts
19+
run: yarn
20+
- name: Check VATSpy.dat
21+
shell: sh
22+
working-directory: ./scripts
23+
run: yarn validate-dat
24+
check-geojson:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Install node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
- name: Install deps
33+
shell: sh
34+
working-directory: ./scripts
35+
run: yarn
36+
- name: Check Boundaries.geojson
37+
shell: sh
38+
working-directory: ./scripts
39+
run: yarn validate-schema

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/VATSpyConfig.xml
22
/WorldMap.dat
3-
/Meta.json
3+
/Meta.json
4+
.idea

0 commit comments

Comments
 (0)