VATPAC 2602 - Fix TRS sector boundary #78
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Data check | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| permissions: | |
| contents: read | |
| jobs: | |
| comment-on-pr: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| contents: read | |
| steps: | |
| - name: Comment on PR | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const prNumber = context.issue.number; | |
| const url = `https://vatsim-radar.com/data/vatspy/${prNumber}/compare`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: `Validate data: ${url}\n\nFor controllers data testing visit https://docs.vatsim-radar.com/contributing/debug.html` | |
| }) | |
| contributor-data: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| result: ${{ steps.check-contributor.outputs.result }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - name: Install deps | |
| shell: sh | |
| working-directory: ./scripts | |
| run: yarn | |
| - id: check-contributor | |
| name: Run contributor check | |
| shell: bash | |
| working-directory: ./scripts | |
| run: | | |
| OUTPUT=$(yarn check-contributor --login="${{ github.event.pull_request.user.login }}") | |
| echo "result<<EOF" >> $GITHUB_OUTPUT | |
| echo "$OUTPUT" >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| contributor-comment: | |
| runs-on: ubuntu-latest | |
| needs: contributor-data | |
| permissions: | |
| pull-requests: write | |
| issues: write | |
| contents: read | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const result = `${{ needs.contributor-data.outputs.result }}`; | |
| const pr = context.issue.number; | |
| const msg = result !== "not found" | |
| ? result | |
| : `❌ 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.`; | |
| await github.rest.issues.createComment({ | |
| issue_number: pr, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: msg | |
| }); |