Add cosmetics, server NPC assets & animations (#728) #119
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: Missing info report | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - pokemons.json | |
| jobs: | |
| generate-and-comment: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Generate missing_info.md and log file | |
| run: npm run generatePokemonFiles | |
| - name: Upload missing_info.md and log files as artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: reports | |
| path: | | |
| missing_info.md | |
| log-*.log | |
| - name: Post comments on pull request | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const missingInfoPath = path.join(process.cwd(), 'missing_info.md'); | |
| const missingInfo = fs.existsSync(missingInfoPath) ? fs.readFileSync(missingInfoPath, 'utf8') : ''; | |
| if (missingInfo) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: `### Missing Information Report\n\n${missingInfo}\n` | |
| }); | |
| } |