[polaris.shopify.com] Feedback (on /components/navigation/tabs?example=tabs-with-badge-content) #1836
This file contains 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: Add untriaged label | |
on: | |
issues: | |
types: | |
- opened | |
- labeled | |
jobs: | |
label_issues: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Check labels | |
id: check_labels | |
uses: actions/github-script@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const labels = context.payload.issue.labels.map(label => label.name); | |
const hasBugLabel = labels.includes('Bug'); | |
const hasUntriagedLabel = labels.includes('untriaged'); | |
core.setOutput('hasBugLabel', hasBugLabel); | |
core.setOutput('hasUntriagedLabel', hasUntriagedLabel); | |
- name: Label issues | |
uses: andymckay/labeler@1.0.2 | |
if: steps.check_labels.outputs.hasBugLabel && !steps.check_labels.outputs.hasUntriagedLabel | |
with: | |
add-labels: 'untriaged' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} |