graduate primer_react_theme_provider_remove_ssr_handoff ff #28467
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: Pull request | |
| on: | |
| pull_request: | |
| jobs: | |
| release-template: | |
| # Only run on Release Tracking branch | |
| if: ${{ github.head_ref == 'changeset-release/main' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Get or Create Comment | |
| uses: actions/github-script@5c56fde4671bc2d3592fb0f2c5b5bab9ddae03b1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const fs = require('fs') | |
| const body = await fs.readFileSync('.github/release_template.md', 'utf8') | |
| const result = await github.rest.issues.listComments({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo | |
| }); | |
| const botComments = result.data.filter(c => c.user.login == 'github-actions[bot]') | |
| if (!botComments.length) { | |
| await github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: body.replace('{{PR_AUTHOR}}', context.payload.sender.login) | |
| }) | |
| } |