增加格式化,解决cocos在字节小游戏上下载文件,每隔2秒掉帧到30-40帧的问题。原因是_write方法里使用writeFileSync… #89
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: <Native> Assign Generated PR | |
| # on: | |
| # pull_request_target: | |
| # types: [opened] | |
| # paths: | |
| # - 'native/cocos/bindings/auto/**' | |
| on: pull_request_target | |
| jobs: | |
| auto-assign: | |
| if: | |
| (contains(github.event.pull_request.body, 'Automated PR to genbindings')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Update assignees | |
| id: merger | |
| env: | |
| PR_NUMBER: ${{github.event.number}} | |
| # REPO_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
| # REPO_TOKEN: ${{secrets.PR_TOKEN}} | |
| REPO_TOKEN: ${{secrets.LABEL_TOKEN}} | |
| run: | | |
| SRC_PR=`curl ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/commits | \ | |
| sh -c 'node ./.github/workflows/jsonr.js [0].commit.message "\(#(\w+)\)" 1'` | |
| echo "Source PR: ${SRC_PR}" | |
| SRC_MERGER=`curl -H "Accept: application/vnd.github+json" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${SRC_PR} | \ | |
| sh -c 'node ./.github/workflows/jsonr.js merged_by.login'` | |
| echo "Source PR merger: ${SRC_MERGER}" | |
| echo "Token Length: ${#REPO_TOKEN}" | |
| echo ::set-output name=SRC_MERGER::${SRC_MERGER} | |
| # curl -X POST -H "Accept: application/vnd.github+json" \ | |
| # -H "Authorization: token $REPO_TOKEN" \ | |
| # ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/assignees \ | |
| # -d "{\"assignees\":[\"${SRC_MERGER}\"]}" | |
| # exit 0 | |
| # - name: Assignment | |
| # uses: OperationsYU/auto-assignment@v1 | |
| # with: | |
| # token: ${{ secrets.LABEL_TOKEN }} | |
| # users: '["${{steps.merger.outputs.SRC_MERGER}}"]' | |
| - name: Notify the merger of previous commit | |
| uses: mshick/add-pr-comment@v2 | |
| with: | |
| message: | | |
| @${{steps.merger.outputs.SRC_MERGER}} please review |