fix: show real exported file size instead of estimate #155
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: PR Labeler | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, edited] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| paths: | |
| name: Label by changed files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/labeler@v6 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| configuration-path: .github/labeler.yml | |
| sync-labels: false | |
| type: | |
| name: Label by PR title | |
| runs-on: ubuntu-latest | |
| if: github.event.action != 'synchronize' | |
| steps: | |
| - name: Map Conventional Commit type to label | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const title = context.payload.pull_request.title || ''; | |
| const match = title.match(/^(\w+)(?:\([^)]*\))?!?:/); | |
| if (!match) return; | |
| const map = { | |
| feat: 'enhancement', | |
| fix: 'Bug', | |
| docs: 'documentation', | |
| perf: 'performance', | |
| refactor: 'refactor', | |
| test: 'tests', | |
| build: 'dependencies', | |
| ci: 'area: ci', | |
| chore: 'chore', | |
| style: 'chore', | |
| revert: 'Bug', | |
| }; | |
| const label = map[match[1].toLowerCase()]; | |
| if (label) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: [label], | |
| }); | |
| } | |
| if (/^(\w+)(?:\([^)]*\))?!:/.test(title)) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['scope: breaking'], | |
| }); | |
| } | |
| triage: | |
| name: Mark new PRs for triage | |
| runs-on: ubuntu-latest | |
| if: >- | |
| github.event.action == 'opened' && | |
| github.event.pull_request.author_association != 'OWNER' && | |
| github.event.pull_request.author_association != 'MEMBER' | |
| steps: | |
| - uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['status: waiting triage'], | |
| }); |