Skip to content

Commit

Permalink
chore(ci): πŸ”– use new label format (#2786)
Browse files Browse the repository at this point in the history
  • Loading branch information
okineadev authored Jan 6, 2025
1 parent 26b4377 commit 74b46fb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
Empty file modified .github/actions/update-status-label.sh
100644 β†’ 100755
Empty file.
10 changes: 5 additions & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Add 'icons' label to any file changes within 'icons' folder or 'src/core/icons' typescript files
icons:
🏞️ icons:
- changed-files:
- any-glob-to-any-file: ['icons/*', 'src/core/icons/*.ts']

# Add 'translations' label to any changes within 'package.nls*.json' files or 'src/core/i18n' folder
translations:
πŸ’± translations:
- changed-files:
- any-glob-to-any-file: ['package.nls*.json', 'src/core/i18n']

# Add 'docs' label to any changes to markdown files
docs:
πŸ“ docs:
- changed-files:
- any-glob-to-any-file: '*.md'

# Add 'workflows' label to any changes within '.github/workflows' folder or '.github/labeler.yml' file
workflows:
πŸ”„ workflows:
- changed-files:
- any-glob-to-any-file: ['.github/workflows/*', '.github/labeler.yml']

# Add 'devcontainers' label to any changes within '.devcontainer' folder
devcontainers:
πŸ‹ devcontainers:
- changed-files:
- any-glob-to-any-file: '.devcontainer/*'
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:
- name: 🏷️ Manage label based on build result
if: ${{ always() }}
run: ../actions/add-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.build.outputs.status }} "failed build"
run: .github/actions/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.build.outcome }} "❌ failed build"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
any-of-labels: "info-needed,invalid"
any-of-labels: "❓info-needed,❌ invalid"
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/color-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
- name: 🏷️ Manage label based on color check result
if: ${{ always() }}
run: ../actions/add-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.color-check.outputs.status }} "invalid colors"
run: .github/actions/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.color-check.outcome }} "🎨 invalid colors"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 9 additions & 2 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@ on:
pull_request:
types: [opened, edited]

permissions:
pull-requests: write

jobs:
lint-pr-title:
name: Check PR Title

runs-on: ubuntu-latest

if: ${{ github.event.action == 'opened' || github.event.changes.title != null }}
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Only fetch the config file from the repository
sparse-checkout: commitlint.config.js
sparse-checkout: |
commitlint.config.js
.github/actions/update-status-label.sh
- name: πŸ“¦ Install dependencies
run: npm install --global @commitlint/config-conventional commitlint
Expand All @@ -28,6 +35,6 @@ jobs:

- name: 🏷️ Manage label based on PR title check result
if: ${{ always() }}
run: ../actions/add-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.title-check.outputs.status }} "invalid title"
run: .github/actions/update-status-label.sh ${{ github.event.pull_request.number }} ${{ steps.title-check.outcome }} "πŸ”€ invalid title"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 74b46fb

Please sign in to comment.