chore: legacy-tree notices — PR bot, sentinel READMEs, PR template
Two contributors in one week sent solid PRs against the retired Tauri/Svelte tree (#561, #564) because nothing in the repo says it is dead. Three zero-risk notices, no code touched: a pull_request_target bot that leaves one sticky comment when a PR touches src//src-tauri/ (target on purpose — fork PRs cannot be commented under plain pull_request; the PR code is never checked out), sentinel READMEs at both tree roots (what GitHub renders when browsing), and a PR template checkbox. The tree deletion + local reference worktree is the 2.0.2 follow-up (owner hold: no dependency risk allowed before 2.0.1). cc
This commit is contained in:
4 files changed
+86
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
## Summary
|
||||||
|
|
||||||
|
<!-- What does this PR do? -->
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
- [ ] My change does **not** touch `src/` or `src-tauri/` — those trees are the
|
||||||
|
retired pre-2.0 frontend, kept only as a porting reference. The live app
|
||||||
|
is the Slint UI under `crates/`. (If your fix targets the old tree, open
|
||||||
|
an issue instead and we'll help you port it.)
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
name: legacy-tree-notice
|
||||||
|
|
||||||
|
# The Tauri/Svelte frontend (src/, src-tauri/) is RETIRED — kept in-tree only
|
||||||
|
# as the 1:1 port reference until the 2.x cleanup removes it. Contributors
|
||||||
|
# keep sending PRs against it (#561, #564), so this bot leaves one sticky
|
||||||
|
# comment when a PR touches those paths. pull_request_target ON PURPOSE:
|
||||||
|
# fork PRs get a read-only token under plain pull_request and could not be
|
||||||
|
# commented on. Safe: the PR's code is NEVER checked out or executed here —
|
||||||
|
# we only read the changed-file list and post a comment.
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened, synchronize]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
notice:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Comment when the PR touches the legacy tree
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const files = await github.paginate(github.rest.pulls.listFiles, {
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
pull_number: context.payload.pull_request.number,
|
||||||
|
per_page: 100,
|
||||||
|
});
|
||||||
|
const legacy = files.filter(f =>
|
||||||
|
f.filename.startsWith('src/') || f.filename.startsWith('src-tauri/'));
|
||||||
|
if (legacy.length === 0) return;
|
||||||
|
const marker = '<!-- legacy-tree-notice -->';
|
||||||
|
const comments = await github.paginate(github.rest.issues.listComments, {
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.payload.pull_request.number,
|
||||||
|
per_page: 100,
|
||||||
|
});
|
||||||
|
if (comments.some(c => c.body && c.body.includes(marker))) return;
|
||||||
|
const body = [
|
||||||
|
marker,
|
||||||
|
'Hi! Thanks a lot for contributing.',
|
||||||
|
'',
|
||||||
|
'Heads up: this change touches `src/` / `src-tauri/`, which is the **retired Tauri/Svelte frontend**. Since 2.0 the app that actually ships is the native Slint UI under `crates/` — the old tree stays in the repo only as a porting reference and will be deleted soon.',
|
||||||
|
'',
|
||||||
|
'Your analysis is still valuable! If the bug/feature also applies to the live app, we are happy to help port it — recent examples: #561 (Dutch translation) and #564 (favorite sync) were both re-implemented in `crates/` with credit to their authors.',
|
||||||
|
].join('\n');
|
||||||
|
await github.rest.issues.createComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.payload.pull_request.number,
|
||||||
|
body,
|
||||||
|
});
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ⚠️ RETIRED — legacy Tauri backend (do not submit PRs here)
|
||||||
|
|
||||||
|
This tree is the pre-2.0 Tauri backend. **It no longer ships**: since QBZ 2.0
|
||||||
|
the app is a single native Rust process with a Slint UI living under
|
||||||
|
[`crates/`](../crates/). This code remains in the repository only as a
|
||||||
|
porting reference and will be removed in an upcoming cleanup release.
|
||||||
|
|
||||||
|
If you found a bug here, it very likely exists (or was already fixed) in the
|
||||||
|
live app — please target `crates/` instead, or open an issue and we will help
|
||||||
|
you port the change.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# ⚠️ RETIRED — legacy Svelte frontend (do not submit PRs here)
|
||||||
|
|
||||||
|
This tree is the pre-2.0 Svelte UI. **It no longer ships**: since QBZ 2.0 the
|
||||||
|
app is a single native Rust process with a Slint UI living under
|
||||||
|
[`crates/`](../crates/). This code remains in the repository only as a
|
||||||
|
porting reference and will be removed in an upcoming cleanup release.
|
||||||
|
|
||||||
|
If you found a bug here, it very likely exists (or was already fixed) in the
|
||||||
|
live app — please target `crates/` instead, or open an issue and we will help
|
||||||
|
you port the change.
|
||||||
Reference in new issue
Block a user