FinderSync badges and context menu disappear for classic sync accounts when Virtual Files are enabled for another account (macOS Tahoe) #312
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
| # SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | |
| # SPDX-License-Identifier: GPL-2.0-or-later | |
| name: Auto-label bug reports | |
| on: | |
| issues: | |
| types: [opened] | |
| jobs: | |
| add-os-label: | |
| if: contains(github.event.issue.title, '[Bug]') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Extract OS and apply label | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const body = context.payload.issue.body || ''; | |
| const normalizedBody = body.replace(/\r\n?/g, '\n'); | |
| let label = ''; | |
| if (/### Operating system\s*\n+macOS\b/.test(normalizedBody)) { | |
| label = 'os: :apple: macOS'; | |
| } else if (/### Operating system\s*\n+Windows\b/.test(normalizedBody)) { | |
| label = 'os: :door: Windows'; | |
| } else if (/### Operating system\s*\n+Linux\b/.test(normalizedBody)) { | |
| label = 'os: :penguin: Linux'; | |
| } | |
| if (label) { | |
| try { | |
| await github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: [label] | |
| }); | |
| } catch (error) { | |
| core.setFailed(`Failed to add label "${label}": ${error.message || error}`); | |
| } | |
| } |