feat(ui): 实现 UI 字体可配置化及全局布局自适应 #50
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
| name: Reopen on not-duplicate | |
| # 如果一个被自动关闭为 duplicate 的 issue,评论里出现任意大小写、可带空格或连字符 | |
| # 的 "not-duplicate" / "not duplicate" 写法,则重新打开并移除 duplicate 标签。 | |
| # 真正的大小写不敏感匹配由 step 内部的 `grep -qi` 完成;workflow if 条件只做粗筛。 | |
| on: | |
| issue_comment: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| issue_number: | |
| description: '用于手动测试的已有 issue number' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| reopen: | |
| # workflow_dispatch 路径直接放行(手动测试)。 | |
| # issue_comment 路径只做廉价的粗筛: | |
| # - 评论作者不是 bot(user.type 字段,比 actor 名后缀更可靠) | |
| # - issue 已 closed | |
| # - 当前带 duplicate label | |
| # - 评论里包含 "uplicate" 子串(足以覆盖各种大小写/连字符/空格变体) | |
| # 精确匹配(含大小写不敏感)由 step 内部 grep -qi 完成。 | |
| if: | | |
| github.event_name == 'workflow_dispatch' || | |
| ( | |
| github.event.comment.user.type != 'Bot' && | |
| github.event.issue.state == 'closed' && | |
| contains(toJSON(github.event.issue.labels.*.name), '"duplicate"') && | |
| contains(github.event.comment.body, 'uplicate') | |
| ) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| steps: | |
| - name: Match not-duplicate keyword (case-insensitive) | |
| id: match | |
| if: github.event_name == 'issue_comment' | |
| env: | |
| COMMENT_BODY: ${{ github.event.comment.body }} | |
| run: | | |
| set -euo pipefail | |
| # 真正的大小写不敏感匹配,覆盖 not-duplicate / not duplicate / notduplicate | |
| # 等各种变体(连字符/空格/无分隔符,任意大小写)。 | |
| if printf '%s' "$COMMENT_BODY" | grep -qiE 'not[-_ ]?duplicate'; then | |
| echo "matched=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "matched=false" >> "$GITHUB_OUTPUT" | |
| echo "comment did not contain not-duplicate keyword; skipping." | |
| fi | |
| - name: Reopen and remove duplicate label | |
| if: github.event_name == 'workflow_dispatch' || steps.match.outputs.matched == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue_number }} | |
| run: | | |
| set -euo pipefail | |
| echo "Reopening issue #$ISSUE_NUMBER" | |
| gh issue reopen "$ISSUE_NUMBER" --repo "$GITHUB_REPOSITORY" | |
| gh issue edit "$ISSUE_NUMBER" --repo "$GITHUB_REPOSITORY" --remove-label "duplicate" || true | |
| gh issue comment "$ISSUE_NUMBER" --repo "$GITHUB_REPOSITORY" --body "Reopened per \`not-duplicate\` request. A maintainer will re-triage. / 已根据 \`not-duplicate\` 请求重新打开,维护者会重新分流。" |