Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Label pull requests from the paths they change

v0lumehif97d4c16aafc
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 00000000..5862e89f
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,21 @@
+launcher:
+ - changed-files:
+ - any-glob-to-any-file: 'frontend/**'
+windows:
+ - changed-files:
+ - any-glob-to-any-file: 'frontend-qt/**'
+ios:
+ - changed-files:
+ - any-glob-to-any-file: ['frontend-ios/**', 'dm/ios/**']
+mac:
+ - changed-files:
+ - any-glob-to-any-file: ['dm/mac/**', 'dm/host/front_mac.m']
+patch-queue:
+ - changed-files:
+ - any-glob-to-any-file: ['patches/**', '.upstream-ref']
+documentation:
+ - changed-files:
+ - any-glob-to-any-file: ['docs/**', '**/*.md']
+ci:
+ - changed-files:
+ - any-glob-to-any-file: '.github/**'
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index e413fa31..de1f6860 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,5 +1,7 @@
<!-- One change per PR. CONTRIBUTING.md says where a change may go. Read it before touching dm/, scripts/, docs/, ref/ or AGENTS.md. -->
+Fix or feature? A fix merges once CI is green, a feature after 48 hours. Maintainers label it `bug` or `enhancement`.
+
## What and why
<!-- The symptom or the need, the cause, and the change. Link the issue (Fixes #...). -->
diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml
new file mode 100644
index 00000000..0c473530
--- /dev/null
+++ b/.github/workflows/pr-labeler.yml
@@ -0,0 +1,25 @@
+# Labels a pull request from the paths it changes (config: .github/labeler.yml).
+#
+# pull_request_target is used so that PRs from forks get labels too: on a plain
+# pull_request event a fork's token is read-only. It is safe here because
+# nothing from the PR is checked out or executed. actions/labeler reads the
+# config from the base branch and only asks the API for the list of changed
+# files. Permissions are minimal, and labels are only added, never removed
+# (sync-labels: false), so labels set by hand stay.
+name: PR labeler
+
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened]
+
+permissions:
+ contents: read
+ pull-requests: write
+
+jobs:
+ label:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0
+ with:
+ sync-labels: false