Update autolabeler.yml (#2968)

This commit is contained in:
Michel Roegl-Brunner 2025-03-10 13:07:02 +01:00 committed by GitHub
parent d4ac4809c0
commit 8441e65000
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,12 +11,12 @@ jobs:
permissions: permissions:
pull-requests: write pull-requests: write
env: env:
CONFIG_PATH: .github/autolabeler-config.json CONFIG_PATH: .github/autolabeler-config_new.json
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install minimatch - name: Install dependencies
run: npm install minimatch run: npm install minimatch
- name: Label PR based on file changes and PR template - name: Label PR based on file changes and PR template
@ -61,6 +61,8 @@ jobs:
labelsToAdd.add(label); labelsToAdd.add(label);
} }
} }
//if two labels or more are added, return
if (labelsToAdd.size < 2) {
const templateLabelMappings = { const templateLabelMappings = {
"🐞 **Bug fix**": "bugfix", "🐞 **Bug fix**": "bugfix",
"✨ **New feature**": "feature", "✨ **New feature**": "feature",
@ -76,6 +78,9 @@ jobs:
labelsToAdd.add(label); labelsToAdd.add(label);
} }
} }
}
console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`); console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`);