refactor(gui): use explicit type aliases for database IDs #1940
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 Auto Labeler | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| path-labels: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Apply path-based labels | |
| uses: actions/labeler@v6 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| configuration-path: .github/labeler.yml | |
| quick-fix-label: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Check total changed lines and add quick fix label | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const owner = context.repo.owner; | |
| const repo = context.repo.repo; | |
| const prNumber = context.payload.pull_request.number; | |
| // List files in PR | |
| const files = await github.paginate( | |
| github.rest.pulls.listFiles, | |
| { | |
| owner, | |
| repo, | |
| pull_number: prNumber, | |
| per_page: 100, | |
| } | |
| ); | |
| // Sum additions + deletions | |
| const changed = files.reduce( | |
| (sum, f) => sum + (f.additions || 0) + (f.deletions || 0), | |
| 0 | |
| ); | |
| core.info(`Total changed lines: ${changed}`); | |
| if (changed <= 20) { | |
| try { | |
| await github.rest.issues.addLabels({ | |
| owner, | |
| repo, | |
| issue_number: prNumber, | |
| labels: ["quick fix 🚀"], | |
| }); | |
| core.info('Added "quick fix 🚀" label.'); | |
| } catch (e) { | |
| core.warning(`Failed to add label: ${e.message}`); | |
| } | |
| } else { | |
| core.info("Change exceeds quick fix threshold; not labeling."); | |
| } |