8000 chore(skills): update patent-disclosure-skill by github-actions[bot] · Pull Request #9 · trsoliu/mini-wiki · GitHub
[go: up one dir, main page]

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Update star history (orphan branch)
#
# 方案说明:
# - 用本仓 GITHUB_TOKEN 拉取 stargazer 时间戳,生成本地静态 SVG(避免第三方
# api.star-history.com 因 GitHub API 限制而空白)。
# - 图表只 force-push 到 orphan 分支 `star-history`(分支上仅有 SVG,无项目源码),
# 不往默认分支提交,避免 main 被每日 bot commit 刷屏。
# - README 通过 raw.githubusercontent.com/.../star-history/star-history.svg 引用。
# - 首次运行会自动创建该 orphan 分支;无需预先建分支,也无需额外 PAT。
#
name: Update star history

on:
schedule:
# Daily 11:48 Beijing (UTC 03:48). Avoid :00 to reduce schedule drop under load.
- cron: "56 3 * * *"
workflow_dispatch:

permissions:
contents: write

concurrency:
group: update-star-history
cancel-in-progress: true

jobs:
update-star-history:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Generate static star history
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p /tmp/star-history-out
python3 scripts/generate-star-history.py \
--repo "$GITHUB_REPOSITORY" \
--output /tmp/star-history-out/star-history.svg

- name: Publish SVG to orphan branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: star-history
SVG: /tmp/star-history-out/star-history.svg
run: |
set -euo pipefail
test -f "$SVG"

SHOULD_PUSH=1
if git fetch --depth=1 origin "$BRANCH"; then
if git show "origin/${BRANCH}:star-history.svg" > /tmp/star-history-old.svg 2>/dev/null; then
if python3 scripts/generate-star-history.py \
--same-chart "$SVG" /tmp/star-history-old.svg; then
echo "Star history chart unchanged; skip orphan-branch push."
SHOULD_PUSH=0
fi
fi
else
echo "Orphan branch '$BRANCH' not found yet; will create on first publish."
fi

if [ "$SHOULD_PUSH" -eq 0 ]; then
exit 0
fi

WORK="$(mktemp -d)"
cp "$SVG" "$WORK/star-history.svg"
cd "$WORK"
git init
git checkout --orphan "$BRANCH"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add star-history.svg
git commit -m "chore: update star history"
git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push -f origin "HEAD:${BRANCH}"
echo "Published star-history.svg to orphan branch '$BRANCH'."
34 changes: 22 additions & 12 deletions .agents/skills/patent-disclosure-skill/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,36 @@ tmp/
~$*

# 示例专利材料(仅提交 README 中的镜像链接;PDF/TXT 等本地自备)
examples/example_patent_reader/**
!examples/example_patent_reader/README.md
skills/patent-reader/examples/example_patent_reader/**
!skills/patent-reader/examples/example_patent_reader/README.md

# 国知局抓取结果缓存(tools/)
tools/_last_result*.html
# 国知局抓取结果缓存
skills/patent-disclosure/tools/crawl/_last_result*.html
skills/patent-disclosure/tools/crawl/_last_home.html
skills/patent-search/tools/_last_result*.html
skills/patent-reader/tools/crawl/_last_result*.html

# Python / tools
tools/node_modules/
**/node_modules/
__pycache__/
*.py[cod]
.pyo
.venv/
venv/
.venv-step310/
skills/patent-d AEAA isclosure/tools/cad-env/
*.egg-info/

# math_render 联调产物(tests/test_math_render.py 运行时生成)
tests/_math_test_figures/
tests/_math_test_out.md
tests/_math_test_bad.md
# math_render 联调产物
skills/patent-disclosure/tests/_math_test_figures/
skills/patent-disclosure/tests/_math_test_out.md
skills/patent-disclosure/tests/_math_test_bad.md

# OS
.DS_Store
Thumbs.db
# 技能市场上架限制:不得提交 Obsidian Bases(*.base);源稿用 *.base.yaml,拷库时再写成 .base
skills/patent-reader/assets/obsidian/*.base
skills/patent-oa/assets/obsidian/*.base

# IPC 方案源文件(只提交编译后的 ipc_subclasses_*.csv)
skills/patent-map/data/_ipc_*
skills/patent-map/data/_c08g*
skills/patent-map/tools/ipc_scheme/cache/
179 changes: 157 additions & 22 deletions .agents/skills/patent-disclosure-skill/INSTALL.md

Large diffs are not rendered by default.

Loading
0