Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/daily-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,19 @@ jobs:
echo "opener=ready version=${DECIDE_VERSION}" >> "$GITHUB_STEP_SUMMARY"
echo "ready=true" >> "$GITHUB_OUTPUT"

- name: Check the UI mock snapshot
# #777: the mock is a release artifact, not a per-PR gate. The nightly
# refuses to plan a release whose views moved without the snapshot; the
# release routine regenerates it in a docs pull request.
if: ${{ inputs.dry_run != true && steps.opener.outputs.ready == 'true' }}
run: |
set -euo pipefail
npm ci --no-audit --no-fund
if ! npm run mock:check; then
echo "::error::mock/ is stale: run npm run mock:snapshot, commit mock/ in a docs pull request, and re-run the release"
exit 1
fi

- name: Push the release branch
id: push
# A manual dispatch defaults to a dry run: it writes the summary and the
Expand Down
10 changes: 6 additions & 4 deletions docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,14 @@ Before that, every release pull request was red by construction — `#347` was t
one that showed it. The reasoning is recorded in
[decisions/0011-mechanical-readme-status.md](decisions/0011-mechanical-readme-status.md).

The release routine also refreshes the generated UI snapshot once per release:
The release routine refreshes the generated UI snapshot once per release:
run `npm run mock:snapshot`, then `npm run mock:check`, and commit the
regenerated `mock/` with the release work or its follow-up docs pull request.
`mock/` is generated from the released views and is read-only; do not edit it by
hand and do not add a per-PR drift gate. The snapshot is the UI at the release
tip, not a second application.
The nightly release job runs `npm run mock:check` before it plans a branch; a
stale snapshot is a red night and names the command. `mock/` is generated from
the released views and is read-only; do not edit it by hand and do not add a
per-PR drift gate. The snapshot is the UI at the release tip, not a second
application.

The daily workflow pushes `release/v<next>` and then opens exactly one release
pull request for it, because a pull request opened with `GITHUB_TOKEN` starts no
Expand Down
35 changes: 30 additions & 5 deletions mock/add-repository.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="color-scheme" content="light dark" />
<meta name="theme-color" content="#f4f6f9" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#07090d" media="(prefers-color-scheme: dark)" />
<meta name="theme-color" content="#f6f1e7" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#0d0c0b" media="(prefers-color-scheme: dark)" />
<title>GitHub App 接入 · Fledge</title>
<link rel="stylesheet" href="assets/app.css?v=b77a91a74e2c" />
<link rel="stylesheet" href="assets/app.css?v=cf958854359d" />
</head>
<body>
<a class="skip-link" href="#main">跳到主要内容</a>
Expand Down Expand Up @@ -71,10 +71,35 @@ <h2>已安装</h2>
<a href="https://fledge-docs.hugoxk.online/docs/" target="_blank" rel="noreferrer">文档</a>
<a href="https://portal.hugoxk.online" target="_blank" rel="noreferrer">Portal</a>
<a href="https://hugoxk.online/status/" target="_blank" rel="noreferrer">平台状态</a>
<a href="settings.html#feedback">反馈</a>
<a href="https://github.com/HugoXK/fledge" target="_blank" rel="noreferrer">★ 在 GitHub 上加星</a>
<a href="settings.html#feedback" data-open-dialog="feedback-dialog" aria-haspopup="dialog" aria-controls="feedback-dialog">反馈</a>
<a class="star-link" href="https://github.com/HugoXK/fledge" target="_blank" rel="noreferrer" title="在 GitHub 上加星" aria-label="在 GitHub 上加星"><svg class="star-icon" viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" focusable="false"><path d="M12 3.2l2.7 5.5 6.1.9-4.4 4.3 1 6.1L12 17.1l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9L12 3.2z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg><span>加星</span></a>
</nav>
</footer>
<dialog id="feedback-dialog" class="add-repo-dialog feedback-dialog" aria-labelledby="feedback-dialog-title">
<div class="row between dialog-head">
<h2 id="feedback-dialog-title">反馈给开发者</h2>
<button class="link" type="button" data-close-dialog aria-label="关闭">×</button>
</div>
<p class="muted">遇到问题、想要一个功能,或者发现异常?这里会保存一条记录并邮件通知开发者。</p>
<form method="post" action="#" class="form" data-mock-inert onsubmit="return false;">
<input type="hidden" name="csrf" value="mock-csrf" />
<input type="hidden" name="returnTo" value="/repos/new" />
<div class="row">
<label>类型
<select name="kind">
<option value="feedback">建议 / 一般反馈</option>
<option value="bug">Bug</option>
<option value="other">其他</option>
</select>
</label>
<label class="grow">相关页面(可选) <input name="page" maxlength="200" value="/repos/new" placeholder="/settings 或 /dashboard" /></label>
</div>
<label>内容<textarea name="message" rows="4" maxlength="2000" required placeholder="发生了什么?你期望什么?"></textarea></label>
<label class="check"><input type="checkbox" name="publishConsent" value="1" /> 我同意 Fledge 在公开 GitHub issue 中 @ 我的账号,并引用脱敏后的反馈摘要。</label>
<p class="fine">不要粘贴 token、密码或他人的隐私信息。反馈会保存并邮件通知开发者。</p>
<button class="btn" type="submit">发送反馈</button>
</form>
</dialog>
<dialog id="confirm-dialog" class="confirm-dialog" aria-labelledby="confirm-dialog-title">
<form method="dialog" data-mock-inert onsubmit="return false;">
<h2 id="confirm-dialog-title">请确认</h2>
Expand Down
Loading
Loading