feat: implement dynamic score color for toolbar health indicators #473
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
| # Triages pull requests and applies labels based on the changed files and the | |
| # head-branch name (.github/labeler.yml), plus the PR title (Conventional Commits) | |
| # in the dedicated step below. | |
| # https://github.com/actions/labeler | |
| name: Labeler | |
| on: [pull_request_target] | |
| concurrency: | |
| # One labeling run per PR; a newer event on the same PR supersedes an | |
| # in-flight one so labels can't race each other. | |
| group: labeler-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Label by changed files and branch name | |
| uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0 | |
| with: | |
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
| # actions/labeler cannot match the PR title, so map Conventional Commits | |
| # prefixes to labels here. The title is passed via env (never interpolated | |
| # into the script) and only used as regex match data, so it cannot inject | |
| # shell commands. | |
| - name: Label by PR title | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| shopt -s nocasematch | |
| if [[ "$PR_TITLE" =~ ^(feat|feature)(\(.+\))?!?: ]]; then | |
| gh pr edit "$PR_NUMBER" --add-label Feature | |
| fi | |
| if [[ "$PR_TITLE" =~ ^(fix|bugfix)(\(.+\))?!?: ]]; then | |
| gh pr edit "$PR_NUMBER" --add-label Fix | |
| fi | |
| if [[ "$PR_TITLE" =~ ^chore(\(.+\))?!?:[[:space:]]release ]]; then | |
| gh pr edit "$PR_NUMBER" --add-label Next-Release | |
| fi |