asemxin commited on
Commit ·
bf48b89
0
Parent(s):
Initial commit for HF Spaces
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .codecov.yml +1 -0
- .devcontainer/devcontainer.json +57 -0
- .dockerignore +48 -0
- .editorconfig +45 -0
- .envrc +1 -0
- .github/ISSUE_TEMPLATE/bug_report_en.yml +88 -0
- .github/ISSUE_TEMPLATE/bug_report_zh.yml +90 -0
- .github/ISSUE_TEMPLATE/config.yml +1 -0
- .github/ISSUE_TEMPLATE/feature_request_en.yml +40 -0
- .github/ISSUE_TEMPLATE/feature_request_zh.yml +40 -0
- .github/ISSUE_TEMPLATE/rss_request_en.yml +81 -0
- .github/ISSUE_TEMPLATE/rss_request_zh.yml +81 -0
- .github/PULL_REQUEST_TEMPLATE.md +45 -0
- .github/dependabot.yml +44 -0
- .github/labeler.yml +17 -0
- .github/prompts/pr_review_rules.md +50 -0
- .github/pull.yml +8 -0
- .github/workflows/build-assets.yml +74 -0
- .github/workflows/codeql.yml +84 -0
- .github/workflows/comment-on-issue.yml +30 -0
- .github/workflows/dependabot-fork.yml +19 -0
- .github/workflows/docker-release.yml +287 -0
- .github/workflows/docker-test-cont.yml +169 -0
- .github/workflows/docker-test.yml +76 -0
- .github/workflows/format.yml +30 -0
- .github/workflows/ghcr-retention.yml +26 -0
- .github/workflows/issue-command.yml +136 -0
- .github/workflows/lint.yml +70 -0
- .github/workflows/npm-publish.yml +42 -0
- .github/workflows/pr-review.yml +147 -0
- .github/workflows/semgrep.yml +33 -0
- .github/workflows/similar-issues.yml +71 -0
- .github/workflows/stale.yml +37 -0
- .github/workflows/test-full-routes.yml +39 -0
- .github/workflows/test.yml +151 -0
- .gitignore +44 -0
- .husky/pre-commit +1 -0
- .idx/dev.nix +63 -0
- .npmrc +2 -0
- .oxfmtrc.json +12 -0
- .puppeteerrc.cjs +9 -0
- AGENTS.md +127 -0
- CODE_OF_CONDUCT.md +84 -0
- CONTRIBUTING.md +1 -0
- Dockerfile +206 -0
- LICENSE +661 -0
- README.md +71 -0
- SECURITY.md +9 -0
- app.json +22 -0
- assets/404.html +4 -0
.codecov.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
comment: off
|
.devcontainer/devcontainer.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
| 2 |
+
// https://github.com/devcontainers/images/blob/v0.4.19/src/typescript-node/.devcontainer/devcontainer.json
|
| 3 |
+
{
|
| 4 |
+
"name": "Node.js & TypeScript",
|
| 5 |
+
"image": "mcr.microsoft.com/devcontainers/typescript-node:24-bookworm",
|
| 6 |
+
"features": {
|
| 7 |
+
"ghcr.io/devcontainers/features/docker-in-docker": {
|
| 8 |
+
"version": "latest"
|
| 9 |
+
},
|
| 10 |
+
"ghcr.io/devcontainers/features/github-cli": {
|
| 11 |
+
"version": "latest"
|
| 12 |
+
}
|
| 13 |
+
},
|
| 14 |
+
|
| 15 |
+
// Configure tool-specific properties.
|
| 16 |
+
"customizations": {
|
| 17 |
+
// Configure properties specific to VS Code.
|
| 18 |
+
"vscode": {
|
| 19 |
+
// Add the IDs of extensions you want installed when the container is created.
|
| 20 |
+
"extensions": [
|
| 21 |
+
"cweijan.vscode-database-client2",
|
| 22 |
+
"dbaeumer.vscode-eslint",
|
| 23 |
+
"eamodio.gitlens",
|
| 24 |
+
"EditorConfig.EditorConfig",
|
| 25 |
+
"oxc.oxc-vscode",
|
| 26 |
+
"SonarSource.sonarlint-vscode",
|
| 27 |
+
"VASubasRaj.flashpost", // Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0
|
| 28 |
+
"ZihanLi.at-helper"
|
| 29 |
+
]
|
| 30 |
+
}
|
| 31 |
+
},
|
| 32 |
+
|
| 33 |
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
| 34 |
+
"forwardPorts": [1200],
|
| 35 |
+
|
| 36 |
+
"portsAttributes": {
|
| 37 |
+
"1200": {
|
| 38 |
+
"label": "app port",
|
| 39 |
+
"onAutoForward": "notify"
|
| 40 |
+
}
|
| 41 |
+
},
|
| 42 |
+
|
| 43 |
+
"onCreateCommand": "sudo apt-get update && export DEBIAN_FRONTEND=noninteractive && sudo apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils redis-server default-jre-headless && sudo apt-get autoremove -y && sudo apt-get clean -y && sudo rm -rf /var/lib/apt/lists/*",
|
| 44 |
+
|
| 45 |
+
"updateContentCommand": "export JAVA_HOME=/usr/lib/jvm/default-java && pnpm config set store-dir ~/.local/share/pnpm/store && pnpm i && pnpm rb && pnpx rebrowser-puppeteer browsers install chrome",
|
| 46 |
+
|
| 47 |
+
// Use 'postCreateCommand' to run commands after the container is created.
|
| 48 |
+
"postCreateCommand": "pnpm i && pnpm rb && pnpx rebrowser-puppeteer browsers install chrome",
|
| 49 |
+
|
| 50 |
+
// Disable auto start dev env since codespaces sometimes fails to attach to the terminal
|
| 51 |
+
// "postAttachCommand": {
|
| 52 |
+
// "app": "pnpm i",
|
| 53 |
+
// },
|
| 54 |
+
|
| 55 |
+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
| 56 |
+
"remoteUser": "node"
|
| 57 |
+
}
|
.dockerignore
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# folders
|
| 2 |
+
.devcontainer
|
| 3 |
+
.github
|
| 4 |
+
.husky
|
| 5 |
+
.idea
|
| 6 |
+
.idx
|
| 7 |
+
.vscode
|
| 8 |
+
app-minimal
|
| 9 |
+
coverage
|
| 10 |
+
eslint-plugins
|
| 11 |
+
node_modules
|
| 12 |
+
test
|
| 13 |
+
|
| 14 |
+
# files
|
| 15 |
+
.codecov.yml
|
| 16 |
+
.dockerignore
|
| 17 |
+
.editorconfig
|
| 18 |
+
.env*
|
| 19 |
+
.eslint*
|
| 20 |
+
.gitignore
|
| 21 |
+
.markdownlint.jsonc
|
| 22 |
+
.(yarn|npm|nvm)rc
|
| 23 |
+
*.md
|
| 24 |
+
*.nix
|
| 25 |
+
Dockerfile*
|
| 26 |
+
LICENSE
|
| 27 |
+
app.json
|
| 28 |
+
eslint.config.mjs
|
| 29 |
+
docker-compose*
|
| 30 |
+
flake.lock
|
| 31 |
+
fly.toml
|
| 32 |
+
jsconfig.json
|
| 33 |
+
npm-debug.log
|
| 34 |
+
process.json
|
| 35 |
+
package-lock.json
|
| 36 |
+
tsdown-lib.config.ts
|
| 37 |
+
tsdown-vercel.config.ts
|
| 38 |
+
vitest.config.ts
|
| 39 |
+
vercel.json
|
| 40 |
+
|
| 41 |
+
# git but keep the git commit hash
|
| 42 |
+
.git/logs
|
| 43 |
+
.git/index
|
| 44 |
+
.git/info
|
| 45 |
+
.git/hooks
|
| 46 |
+
|
| 47 |
+
# rsshub auxiliary files
|
| 48 |
+
lib/routes/**/radar.js
|
.editorconfig
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# http://editorconfig.org
|
| 2 |
+
root = true
|
| 3 |
+
|
| 4 |
+
[*]
|
| 5 |
+
indent_style = space
|
| 6 |
+
indent_size = 4
|
| 7 |
+
end_of_line = lf
|
| 8 |
+
charset = utf-8
|
| 9 |
+
trim_trailing_whitespace = true
|
| 10 |
+
insert_final_newline = true
|
| 11 |
+
|
| 12 |
+
# Use 4 spaces for the Python files
|
| 13 |
+
[*.py]
|
| 14 |
+
indent_size = 4
|
| 15 |
+
max_line_length = 80
|
| 16 |
+
|
| 17 |
+
# The JSON files contain newlines inconsistently
|
| 18 |
+
[*.json]
|
| 19 |
+
insert_final_newline = ignore
|
| 20 |
+
|
| 21 |
+
# Minified JavaScript files shouldn't be changed
|
| 22 |
+
[**.min.js]
|
| 23 |
+
indent_style = ignore
|
| 24 |
+
insert_final_newline = ignore
|
| 25 |
+
|
| 26 |
+
# Makefiles always use tabs for indentation
|
| 27 |
+
[Makefile]
|
| 28 |
+
indent_style = tab
|
| 29 |
+
|
| 30 |
+
# Batch files use tabs for indentation
|
| 31 |
+
[*.bat]
|
| 32 |
+
indent_style = tab
|
| 33 |
+
|
| 34 |
+
[*.md]
|
| 35 |
+
trim_trailing_whitespace = false
|
| 36 |
+
|
| 37 |
+
# Matches the exact files either package.json or .travis.yml
|
| 38 |
+
[{package.json,.travis.yml}]
|
| 39 |
+
indent_size = 2
|
| 40 |
+
|
| 41 |
+
[{**.yml,**.yaml}]
|
| 42 |
+
indent_size = 2
|
| 43 |
+
|
| 44 |
+
[*.vue]
|
| 45 |
+
indent_size = 2
|
.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
use flake . --no-pure-eval
|
.github/ISSUE_TEMPLATE/bug_report_en.yml
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🐛 Bug Report
|
| 2 |
+
description: Submit discovered bugs
|
| 3 |
+
labels: ['RSS bug']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
Please ensure you have read [documentation](https://docs.rsshub.app/), and provide all the information required by this template, otherwise the issue will be closed immediately.
|
| 10 |
+
Due to the anti-crawling policy implemented by certain websites, some RSS routes provided by the demo will return status code 403 or fetch failed. This is not an issue caused by RSSHub and please do not report it.
|
| 11 |
+
|
| 12 |
+
- type: textarea
|
| 13 |
+
id: routes
|
| 14 |
+
attributes:
|
| 15 |
+
label: Routes
|
| 16 |
+
description: The involved route, without any parameters, copied directly from the docs "route" field, one link per line. Use `NOROUTE` if it is not route related.
|
| 17 |
+
placeholder: /someroute/:type?
|
| 18 |
+
render: routes
|
| 19 |
+
validations:
|
| 20 |
+
required: true
|
| 21 |
+
|
| 22 |
+
- type: textarea
|
| 23 |
+
id: fullroutes
|
| 24 |
+
attributes:
|
| 25 |
+
label: Full routes
|
| 26 |
+
description: The involved route, with all required and optional parameters, and could be duplicate if necessary (different parameters)
|
| 27 |
+
placeholder: /routes/1234?some_extension=mode
|
| 28 |
+
render: fullroutes
|
| 29 |
+
validations:
|
| 30 |
+
required: true
|
| 31 |
+
|
| 32 |
+
- type: input
|
| 33 |
+
id: docs-link
|
| 34 |
+
attributes:
|
| 35 |
+
label: Related documentation
|
| 36 |
+
description: Link to related documentation
|
| 37 |
+
placeholder: https://docs.rsshub.app/...
|
| 38 |
+
validations:
|
| 39 |
+
required: true
|
| 40 |
+
|
| 41 |
+
- type: textarea
|
| 42 |
+
id: what-expected
|
| 43 |
+
attributes:
|
| 44 |
+
label: What is expected?
|
| 45 |
+
validations:
|
| 46 |
+
required: true
|
| 47 |
+
|
| 48 |
+
- type: textarea
|
| 49 |
+
id: actual-happened
|
| 50 |
+
attributes:
|
| 51 |
+
label: What is actually happening?
|
| 52 |
+
validations:
|
| 53 |
+
required: true
|
| 54 |
+
|
| 55 |
+
- type: dropdown
|
| 56 |
+
id: deployment
|
| 57 |
+
attributes:
|
| 58 |
+
label: Deployment information
|
| 59 |
+
multiple: false
|
| 60 |
+
options:
|
| 61 |
+
- Self-hosted
|
| 62 |
+
- RSSHub demo (https://rsshub.app)
|
| 63 |
+
validations:
|
| 64 |
+
required: true
|
| 65 |
+
|
| 66 |
+
- type: input
|
| 67 |
+
id: deploy-info
|
| 68 |
+
attributes:
|
| 69 |
+
label: Deployment information (for self-hosted)
|
| 70 |
+
description: Please provide your OS, node version, docker version and environment variables (if applicable)
|
| 71 |
+
placeholder: 'OS: Linux, Node: v10.15.3, Docker: v19.03.13'
|
| 72 |
+
|
| 73 |
+
- type: textarea
|
| 74 |
+
id: logs
|
| 75 |
+
attributes:
|
| 76 |
+
label: Additional info
|
| 77 |
+
description: logs, errors, etc.
|
| 78 |
+
render: shell
|
| 79 |
+
validations:
|
| 80 |
+
required: true
|
| 81 |
+
|
| 82 |
+
- type: checkboxes
|
| 83 |
+
id: terms
|
| 84 |
+
attributes:
|
| 85 |
+
label: This is not a duplicated issue
|
| 86 |
+
options:
|
| 87 |
+
- label: I have searched [existing issues](https://github.com/DIYgod/RSSHub/issues) to ensure this bug has not already been reported
|
| 88 |
+
required: true
|
.github/ISSUE_TEMPLATE/bug_report_zh.yml
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🐛 Bug 报告
|
| 2 |
+
description: 早起的小可爱有虫抓
|
| 3 |
+
labels: ['RSS bug']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
请确保已阅读 [文档](https://docs.rsshub.app) 内相关部分,并按照模版提供信息,否则 issue 将被立即关闭。
|
| 10 |
+
由于部分源网站反爬缘故,演示地址一些 RSS 会返回 status code 403 或 fetch failed,该问题不是 RSSHub 所致,请勿提交 issue。
|
| 11 |
+
|
| 12 |
+
- type: textarea
|
| 13 |
+
id: routes
|
| 14 |
+
attributes:
|
| 15 |
+
label: 路由地址
|
| 16 |
+
description: 不包含参数,复制文档路由参数,一行一个,不要重复。如果和路由没有关系,请写 `NOROUTE`
|
| 17 |
+
placeholder: /someroute/:type?
|
| 18 |
+
render: routes
|
| 19 |
+
validations:
|
| 20 |
+
required: true
|
| 21 |
+
|
| 22 |
+
- type: textarea
|
| 23 |
+
id: fullroutes
|
| 24 |
+
attributes:
|
| 25 |
+
label: 完整路由地址
|
| 26 |
+
description: 包含所有必选与可选参数,一行一个,可以有重复路由不同参数(如果需要)
|
| 27 |
+
placeholder: /routes/1234?some_extension=mode
|
| 28 |
+
render: fullroutes
|
| 29 |
+
validations:
|
| 30 |
+
required: true
|
| 31 |
+
|
| 32 |
+
- type: input
|
| 33 |
+
id: docs-link
|
| 34 |
+
attributes:
|
| 35 |
+
label: 相关文档
|
| 36 |
+
description: 相关文档地址
|
| 37 |
+
placeholder: https://docs.rsshub.app/...
|
| 38 |
+
validations:
|
| 39 |
+
required: true
|
| 40 |
+
|
| 41 |
+
- type: textarea
|
| 42 |
+
id: what-expected
|
| 43 |
+
attributes:
|
| 44 |
+
label: 预期是什么?
|
| 45 |
+
validations:
|
| 46 |
+
required: true
|
| 47 |
+
|
| 48 |
+
- type: textarea
|
| 49 |
+
id: actual-happened
|
| 50 |
+
attributes:
|
| 51 |
+
label: 实际发生了什么?
|
| 52 |
+
validations:
|
| 53 |
+
required: true
|
| 54 |
+
|
| 55 |
+
- type: dropdown
|
| 56 |
+
id: deployment
|
| 57 |
+
attributes:
|
| 58 |
+
label: 部署
|
| 59 |
+
multiple: false
|
| 60 |
+
options:
|
| 61 |
+
- 自建
|
| 62 |
+
- RSSHub 演示 (https://rsshub.app)
|
| 63 |
+
validations:
|
| 64 |
+
required: true
|
| 65 |
+
|
| 66 |
+
- type: input
|
| 67 |
+
id: deploy-info
|
| 68 |
+
attributes:
|
| 69 |
+
label: 部署相关信息
|
| 70 |
+
description: |
|
| 71 |
+
请提供您的操作系统、node 版本、(如果适用) docker 版本和环境变量。
|
| 72 |
+
请确保您部署的是 [主线 master 分支](https://github.com/DIYgod/RSSHub/tree/master) 最新版 RSSHub。
|
| 73 |
+
placeholder: 'OS: Linux, Node: v10.15.3, Docker: v19.03.13'
|
| 74 |
+
|
| 75 |
+
- type: textarea
|
| 76 |
+
id: logs
|
| 77 |
+
attributes:
|
| 78 |
+
label: 额外信息
|
| 79 |
+
description: 日志、报错等
|
| 80 |
+
render: shell
|
| 81 |
+
validations:
|
| 82 |
+
required: true
|
| 83 |
+
|
| 84 |
+
- type: checkboxes
|
| 85 |
+
id: terms
|
| 86 |
+
attributes:
|
| 87 |
+
label: 这不是重复的 issue
|
| 88 |
+
options:
|
| 89 |
+
- label: 我已经搜索了 [现有 issue](https://github.com/DIYgod/RSSHub/issues),以确保该错误尚未被报告。
|
| 90 |
+
required: true
|
.github/ISSUE_TEMPLATE/config.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
blank_issues_enabled: false
|
.github/ISSUE_TEMPLATE/feature_request_en.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🍭 Feature Request
|
| 2 |
+
description: Submit a new feature request
|
| 3 |
+
labels: ['RSS enhancement']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
Please ensure the feature requested is not listed in [documentation](https://docs.rsshub.app/) or [issue](https://github.com/DIYgod/RSSHub/issues), and is not a [new RSS proposal](https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+proposal&template=rss_request_en.yml), and provide all the information required by this template.
|
| 10 |
+
Otherwise the issue will be closed immediately.
|
| 11 |
+
|
| 12 |
+
- type: textarea
|
| 13 |
+
id: feature
|
| 14 |
+
attributes:
|
| 15 |
+
label: What feature is it?
|
| 16 |
+
placeholder: Please describe the feature you want to see.
|
| 17 |
+
validations:
|
| 18 |
+
required: true
|
| 19 |
+
|
| 20 |
+
- type: textarea
|
| 21 |
+
id: problem
|
| 22 |
+
attributes:
|
| 23 |
+
label: What problem does this feature solve?
|
| 24 |
+
placeholder: Please describe the problem this feature solves.
|
| 25 |
+
validations:
|
| 26 |
+
required: true
|
| 27 |
+
|
| 28 |
+
- type: textarea
|
| 29 |
+
id: description
|
| 30 |
+
attributes:
|
| 31 |
+
label: Additional description
|
| 32 |
+
placeholder: Any additional description.
|
| 33 |
+
|
| 34 |
+
- type: checkboxes
|
| 35 |
+
id: terms
|
| 36 |
+
attributes:
|
| 37 |
+
label: This is not a duplicated feature request or new RSS proposal
|
| 38 |
+
options:
|
| 39 |
+
- label: I have searched [existing issues](https://github.com/DIYgod/RSSHub/issues) to ensure this feature has not already been requested and this is not a [new RSS proposal](https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+proposal&template=rss_request_en.yml).
|
| 40 |
+
required: true
|
.github/ISSUE_TEMPLATE/feature_request_zh.yml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🍭 功能需求
|
| 2 |
+
description: 提交新的功能需求
|
| 3 |
+
labels: ['RSS enhancement']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
请确保 [文档](https://docs.rsshub.app) 和 [Issue](https://github.com/DIYgod/RSSHub/issues) 中没有相关内容及不是 [新的 RSS 提案](https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+proposal&template=rss_request_zh.yml),并按照模版提供信息,
|
| 10 |
+
否则 issue 将被立即关闭。
|
| 11 |
+
|
| 12 |
+
- type: textarea
|
| 13 |
+
id: feature
|
| 14 |
+
attributes:
|
| 15 |
+
label: 这是一个什么样的功能?
|
| 16 |
+
placeholder: 请描述你想看到的功能。
|
| 17 |
+
validations:
|
| 18 |
+
required: true
|
| 19 |
+
|
| 20 |
+
- type: textarea
|
| 21 |
+
id: problem
|
| 22 |
+
attributes:
|
| 23 |
+
label: 这个功能可以解决什么问题?
|
| 24 |
+
placeholder: 请描述该功能解决的问题。
|
| 25 |
+
validations:
|
| 26 |
+
required: true
|
| 27 |
+
|
| 28 |
+
- type: textarea
|
| 29 |
+
id: description
|
| 30 |
+
attributes:
|
| 31 |
+
label: 额外描述
|
| 32 |
+
placeholder: 任何补充说明。
|
| 33 |
+
|
| 34 |
+
- type: checkboxes
|
| 35 |
+
id: terms
|
| 36 |
+
attributes:
|
| 37 |
+
label: 这不是重复的功能请求和 RSS 提案
|
| 38 |
+
options:
|
| 39 |
+
- label: 我已经搜索了 [现有 issue](https://github.com/DIYgod/RSSHub/issues),以确保这项功能尚未被请求及不是 [新的 RSS 提案](https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+proposal&template=rss_request_zh.yml)。
|
| 40 |
+
required: true
|
.github/ISSUE_TEMPLATE/rss_request_en.yml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🧡 RSS Proposal
|
| 2 |
+
description: Submit a new RSS proposal
|
| 3 |
+
labels: ['RSS proposal']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
Please ensure the RSS proposal is not listed in [documentation](https://docs.rsshub.app/) or [issue](https://github.com/DIYgod/RSSHub/issues), website doesn't provide this kind of RSS feed, and provide all the information required by this template.
|
| 10 |
+
Otherwise the issue will be closed immediately.
|
| 11 |
+
|
| 12 |
+
We are flooded with feature requests and short-handed, please try to make it yourself, the [guide](https://docs.rsshub.app/joinus) is a good place to start. Submit a pull request when done!
|
| 13 |
+
|
| 14 |
+
- type: dropdown
|
| 15 |
+
id: category
|
| 16 |
+
attributes:
|
| 17 |
+
label: Category
|
| 18 |
+
multiple: false
|
| 19 |
+
options:
|
| 20 |
+
- Social Media
|
| 21 |
+
- New media
|
| 22 |
+
- News
|
| 23 |
+
- BBS
|
| 24 |
+
- Blog
|
| 25 |
+
- Programming
|
| 26 |
+
- Design
|
| 27 |
+
- Live
|
| 28 |
+
- Multimedia
|
| 29 |
+
- Picture
|
| 30 |
+
- ACG
|
| 31 |
+
- Application Updates
|
| 32 |
+
- University
|
| 33 |
+
- Forecast
|
| 34 |
+
- Travel
|
| 35 |
+
- Shopping
|
| 36 |
+
- Gaming
|
| 37 |
+
- Reading
|
| 38 |
+
- Government
|
| 39 |
+
- Study
|
| 40 |
+
- Scientific Journal
|
| 41 |
+
- Finance
|
| 42 |
+
- Uncategorized
|
| 43 |
+
validations:
|
| 44 |
+
required: true
|
| 45 |
+
|
| 46 |
+
- type: input
|
| 47 |
+
id: site-url
|
| 48 |
+
attributes:
|
| 49 |
+
label: Website URL
|
| 50 |
+
placeholder: https://example.com
|
| 51 |
+
validations:
|
| 52 |
+
required: true
|
| 53 |
+
|
| 54 |
+
- type: textarea
|
| 55 |
+
id: description
|
| 56 |
+
attributes:
|
| 57 |
+
label: Website description
|
| 58 |
+
placeholder: A short description of the website
|
| 59 |
+
validations:
|
| 60 |
+
required: true
|
| 61 |
+
|
| 62 |
+
- type: textarea
|
| 63 |
+
id: content
|
| 64 |
+
attributes:
|
| 65 |
+
label: What content should be included?
|
| 66 |
+
validations:
|
| 67 |
+
required: true
|
| 68 |
+
|
| 69 |
+
- type: textarea
|
| 70 |
+
id: info
|
| 71 |
+
attributes:
|
| 72 |
+
label: Additional description
|
| 73 |
+
placeholder: Any additional information you want to share
|
| 74 |
+
|
| 75 |
+
- type: checkboxes
|
| 76 |
+
id: terms
|
| 77 |
+
attributes:
|
| 78 |
+
label: This is not a duplicated rss request
|
| 79 |
+
options:
|
| 80 |
+
- label: I have searched [existing issues](https://github.com/DIYgod/RSSHub/issues) and [pull requests](https://github.com/DIYgod/RSSHub/pulls) to ensure this rss proposal has not already been requested
|
| 81 |
+
required: true
|
.github/ISSUE_TEMPLATE/rss_request_zh.yml
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 🧡 RSS 提案
|
| 2 |
+
description: 提交新的 RSS 提案
|
| 3 |
+
labels: ['RSS proposal']
|
| 4 |
+
|
| 5 |
+
body:
|
| 6 |
+
- type: markdown
|
| 7 |
+
attributes:
|
| 8 |
+
value: |
|
| 9 |
+
请确保 [文档](https://docs.rsshub.app) 和 [issue](https://github.com/DIYgod/RSSHub/issues) 中没有相关内容,且源站没有提供 RSS,并按照模版提供信息
|
| 10 |
+
否则 issue 将被立即关闭
|
| 11 |
+
|
| 12 |
+
目前 RSS 提案滞销,如有能力请按照 [指南](https://docs.rsshub.app/joinus/quick-start) 自行编写并提交 PR
|
| 13 |
+
|
| 14 |
+
- type: dropdown
|
| 15 |
+
id: category
|
| 16 |
+
attributes:
|
| 17 |
+
label: 类型
|
| 18 |
+
multiple: false
|
| 19 |
+
options:
|
| 20 |
+
- 社交媒体
|
| 21 |
+
- 新媒体
|
| 22 |
+
- 传统媒体
|
| 23 |
+
- 论坛
|
| 24 |
+
- 博客
|
| 25 |
+
- 编程
|
| 26 |
+
- 设计
|
| 27 |
+
- 直播
|
| 28 |
+
- 音视频
|
| 29 |
+
- 图片
|
| 30 |
+
- 二次元
|
| 31 |
+
- 程序更新
|
| 32 |
+
- 大学通知
|
| 33 |
+
- 预报预警
|
| 34 |
+
- 出行旅游
|
| 35 |
+
- 购物
|
| 36 |
+
- 游戏
|
| 37 |
+
- 阅读
|
| 38 |
+
- 政务消息
|
| 39 |
+
- 学习
|
| 40 |
+
- 科学期刊
|
| 41 |
+
- 金融
|
| 42 |
+
- 其他
|
| 43 |
+
validations:
|
| 44 |
+
required: true
|
| 45 |
+
|
| 46 |
+
- type: input
|
| 47 |
+
id: site-url
|
| 48 |
+
attributes:
|
| 49 |
+
label: 网站地址
|
| 50 |
+
placeholder: https://example.com
|
| 51 |
+
validations:
|
| 52 |
+
required: true
|
| 53 |
+
|
| 54 |
+
- type: textarea
|
| 55 |
+
id: description
|
| 56 |
+
attributes:
|
| 57 |
+
label: 网站描述
|
| 58 |
+
placeholder: 对网站的简短描述
|
| 59 |
+
validations:
|
| 60 |
+
required: true
|
| 61 |
+
|
| 62 |
+
- type: textarea
|
| 63 |
+
id: content
|
| 64 |
+
attributes:
|
| 65 |
+
label: 需要生成什么内容?
|
| 66 |
+
validations:
|
| 67 |
+
required: true
|
| 68 |
+
|
| 69 |
+
- type: textarea
|
| 70 |
+
id: info
|
| 71 |
+
attributes:
|
| 72 |
+
label: 额外描述
|
| 73 |
+
placeholder: 如果提案需要额外描述,请在此处填写
|
| 74 |
+
|
| 75 |
+
- type: checkboxes
|
| 76 |
+
id: terms
|
| 77 |
+
attributes:
|
| 78 |
+
label: 这不是重复的 RSS 请求
|
| 79 |
+
options:
|
| 80 |
+
- label: 我已经搜索了[现有 issue](https://github.com/DIYgod/RSSHub/issues) 和 [pull requests](https://github.com/DIYgod/RSSHub/pulls),以确保该 RSS 尚未被请求。
|
| 81 |
+
required: true
|
.github/PULL_REQUEST_TEMPLATE.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!--
|
| 2 |
+
If you have any difficulties in filling out this form, please refer to https://docs.rsshub.app/joinus/new-rss/submit-route
|
| 3 |
+
如果你在填写此表单时遇到任何困难,请参考 https://docs.rsshub.app/zh/joinus/new-rss/submit-route
|
| 4 |
+
-->
|
| 5 |
+
|
| 6 |
+
## Involved Issue / 该 PR 相关 Issue
|
| 7 |
+
|
| 8 |
+
Close #
|
| 9 |
+
|
| 10 |
+
## Example for the Proposed Route(s) / 路由地址示例
|
| 11 |
+
|
| 12 |
+
<!--
|
| 13 |
+
Please include route starts with /, with all required and optional parameters.
|
| 14 |
+
Fail to comply will result in your pull request being closed automatically.
|
| 15 |
+
请在 `routes` 区域填写以 / 开头的完整路由地址,否则你的 PR 将会被无条件关闭。
|
| 16 |
+
如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。
|
| 17 |
+
|
| 18 |
+
```routes
|
| 19 |
+
/some/route
|
| 20 |
+
/some/other/route
|
| 21 |
+
/dont/use/this/or/modify/it
|
| 22 |
+
/use/the/fenced/code/block/below
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
If your changes are not related to route, please fill in `routes` section with `NOROUTE`. Fail to comply will result in your PR being closed.
|
| 26 |
+
如果你的 PR 与路由无关, 请在 `routes` 区域 填写 `NOROUTE`,而不是直接删除 `routes` 区域。否则你的 PR 将会被无条件关闭。
|
| 27 |
+
-->
|
| 28 |
+
|
| 29 |
+
```routes
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## New RSS Route Checklist / 新 RSS 路由检查表
|
| 34 |
+
|
| 35 |
+
- [ ] New Route / 新的路由
|
| 36 |
+
- [ ] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard)
|
| 37 |
+
- [ ] Anti-bot or rate limit / 反爬/频率限制
|
| 38 |
+
- [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
|
| 39 |
+
- [ ] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date)
|
| 40 |
+
- [ ] Parsed / 可以解析
|
| 41 |
+
- [ ] Correct time zone / 时区正确
|
| 42 |
+
- [ ] New package added / 添加了新的包
|
| 43 |
+
- [ ] `Puppeteer`
|
| 44 |
+
|
| 45 |
+
## Note / 说明
|
.github/dependabot.yml
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: 2
|
| 2 |
+
updates:
|
| 3 |
+
- package-ecosystem: npm
|
| 4 |
+
directory: '/'
|
| 5 |
+
schedule:
|
| 6 |
+
interval: daily
|
| 7 |
+
time: '08:00'
|
| 8 |
+
open-pull-requests-limit: 100
|
| 9 |
+
labels:
|
| 10 |
+
- dependencies
|
| 11 |
+
ignore:
|
| 12 |
+
# pin to version before it is sold to potential suspicious party
|
| 13 |
+
# https://github.com/goofychris/art-template/issues/660 the issue created from original author stating v4.13.3
|
| 14 |
+
# contains suspicious code and related issues (#658, #659) were deleted
|
| 15 |
+
# related:
|
| 16 |
+
# https://github.com/fastify/point-of-view/issues/463 https://github.com/fastify/point-of-view/pull/461#issuecomment-2718888986
|
| 17 |
+
# https://github.com/cnpm/bug-versions/pull/266 https://github.com/cnpm/cnpmcore/issues/777
|
| 18 |
+
# https://github.com/yoimiya-kokomi/Miao-Yunzai/pull/515 https://github.com/zhangfisher/flex-tools/commit/09b565dfe6e2932bb829613ddbe09f6d0acbccd4
|
| 19 |
+
- dependency-name: art-template
|
| 20 |
+
versions: ['>=4.13.3']
|
| 21 |
+
# pin jsdom to avoid `Error: require() of ES Module` issue caused by parse5 v8
|
| 22 |
+
# https://github.com/jsdom/jsdom/issues/3959
|
| 23 |
+
- dependency-name: jsdom
|
| 24 |
+
versions: ['>=27.0.1']
|
| 25 |
+
groups:
|
| 26 |
+
eslint:
|
| 27 |
+
patterns:
|
| 28 |
+
- 'eslint'
|
| 29 |
+
- '@eslint/*'
|
| 30 |
+
opentelemetry:
|
| 31 |
+
patterns:
|
| 32 |
+
- '@opentelemetry/*'
|
| 33 |
+
typescript-eslint:
|
| 34 |
+
patterns:
|
| 35 |
+
- '@typescript-eslint/*'
|
| 36 |
+
|
| 37 |
+
- package-ecosystem: 'github-actions'
|
| 38 |
+
directory: '/'
|
| 39 |
+
schedule:
|
| 40 |
+
interval: daily
|
| 41 |
+
time: '08:00'
|
| 42 |
+
open-pull-requests-limit: 100
|
| 43 |
+
labels:
|
| 44 |
+
- dependencies
|
.github/labeler.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'route: deprecated':
|
| 2 |
+
- changed-files:
|
| 3 |
+
- any-glob-to-any-file: ['lib/router.js']
|
| 4 |
+
- all-globs-to-any-file: ['lib/routes-deprecated/**/*.js', '!lib/routes-deprecated/index.js']
|
| 5 |
+
|
| 6 |
+
'Route':
|
| 7 |
+
- changed-files:
|
| 8 |
+
- any-glob-to-any-file: ['lib/routes/**/*.ts', 'lib/routes/**/*.tsx']
|
| 9 |
+
|
| 10 |
+
core enhancement:
|
| 11 |
+
- changed-files:
|
| 12 |
+
- any-glob-to-any-file: ['lib/routes/index.ts']
|
| 13 |
+
- all-globs-to-any-file: ['lib/**', '!lib/config.ts', '!lib/router.js', '!lib/routes/**', '!lib/routes-deprecated/**']
|
| 14 |
+
|
| 15 |
+
dependencies:
|
| 16 |
+
- changed-files:
|
| 17 |
+
- any-glob-to-any-file: ['package.json', 'pnpm-lock.yaml', 'yarn.lock']
|
.github/prompts/pr_review_rules.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PR Review Rules for RSSHub
|
| 2 |
+
|
| 3 |
+
You are reviewing pull requests for RSSHub.
|
| 4 |
+
|
| 5 |
+
Only report **clear and actionable** violations in changed lines/files. Do not report speculative or uncertain issues.
|
| 6 |
+
|
| 7 |
+
## Route Metadata and Docs
|
| 8 |
+
|
| 9 |
+
1. `example` must start with `/` and be a working RSSHub route path.
|
| 10 |
+
2. Route name must not repeat namespace name.
|
| 11 |
+
3. In radar rules, `source` must be a relative host/path (no `https://`, no hash/query matching).
|
| 12 |
+
4. In radar rules, `target` may be empty; if present, it must match the route path and its parameters.
|
| 13 |
+
5. Namespace `url` should not include protocol prefix.
|
| 14 |
+
6. Use a single category in `categories`.
|
| 15 |
+
7. `parameters` keys must match real path parameters.
|
| 16 |
+
8. Keep route/docs lists in alphabetical order when touching sorted files.
|
| 17 |
+
9. Do not modify default values or working examples unless they are broken.
|
| 18 |
+
|
| 19 |
+
## Data Handling and Feed Quality
|
| 20 |
+
|
| 21 |
+
10. Use `cache.tryGet()` (from `@/utils/cache`) for detail fetching in loops; cache processed result instead of raw HTML.
|
| 22 |
+
11. `description` should contain article content only; do not duplicate `title`, `author`, `pubDate`, or tags.
|
| 23 |
+
12. Extract tags/categories into `category` field.
|
| 24 |
+
13. Use `parseDate()` for date fields when source provides time.
|
| 25 |
+
14. Do not set fake dates (`new Date()` fallback) when source has no valid time.
|
| 26 |
+
15. Keep each item `link` unique; feed-level `link` should be human-readable (not raw API endpoint).
|
| 27 |
+
16. Do not trim/truncate title/content manually.
|
| 28 |
+
|
| 29 |
+
## API and Requesting
|
| 30 |
+
|
| 31 |
+
17. Prefer official API endpoints over scraping when available.
|
| 32 |
+
18. Fetch first page only; do not add custom pagination behavior.
|
| 33 |
+
19. Use common parameter `limit` instead of custom limit/query filtering.
|
| 34 |
+
20. Prefer path parameters over custom query parameters for route config.
|
| 35 |
+
21. Use RSSHub built-in UA behavior; when browser-like headers are needed, use `config.trueUA` instead of hardcoded UA strings.
|
| 36 |
+
|
| 37 |
+
## Code Style and Maintainability
|
| 38 |
+
|
| 39 |
+
22. Use `camelCase` naming.
|
| 40 |
+
23. Use `import type { ... }` for type-only imports.
|
| 41 |
+
24. Keep imports sorted.
|
| 42 |
+
25. Use JSX-based rendering (`renderToString` and template components) for custom HTML rendering patterns used by RSSHub.
|
| 43 |
+
26. Avoid unnecessary changes outside PR scope.
|
| 44 |
+
|
| 45 |
+
## Reporting Format
|
| 46 |
+
|
| 47 |
+
- Report only violated rules.
|
| 48 |
+
- Each bullet should include: file path, problem, and concrete fix.
|
| 49 |
+
- Group repeated issues across files into one concise bullet when possible.
|
| 50 |
+
- If no rule is clearly violated, do not comment.
|
.github/pull.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: '1'
|
| 2 |
+
rules:
|
| 3 |
+
- base: master
|
| 4 |
+
upstream: diygod:master
|
| 5 |
+
# default value if this file does not exist is `hardreset`, effectively overwriting any downstream changes!
|
| 6 |
+
# previously it was the misconfigured PR route test workflow that rescued downstream changes from being overwritten
|
| 7 |
+
mergeMethod: merge
|
| 8 |
+
mergeUnstable: true # prevent non-pass tests from preventing automatic merge
|
.github/workflows/build-assets.yml
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Build assets
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
workflow_dispatch:
|
| 5 |
+
push:
|
| 6 |
+
branches:
|
| 7 |
+
- master
|
| 8 |
+
paths:
|
| 9 |
+
- 'lib/**/*.ts'
|
| 10 |
+
- 'lib/**/*.tsx'
|
| 11 |
+
|
| 12 |
+
jobs:
|
| 13 |
+
build:
|
| 14 |
+
runs-on: ubuntu-slim
|
| 15 |
+
name: Build assets
|
| 16 |
+
timeout-minutes: 10
|
| 17 |
+
permissions:
|
| 18 |
+
contents: write
|
| 19 |
+
steps:
|
| 20 |
+
- name: Checkout
|
| 21 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 22 |
+
- name: Install pnpm
|
| 23 |
+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 24 |
+
- name: Use Node.js Active LTS
|
| 25 |
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 26 |
+
with:
|
| 27 |
+
node-version: lts/*
|
| 28 |
+
cache: 'pnpm'
|
| 29 |
+
- name: Install dependencies (yarn)
|
| 30 |
+
run: pnpm i
|
| 31 |
+
|
| 32 |
+
# assets
|
| 33 |
+
- name: Build assets
|
| 34 |
+
run: pnpm build
|
| 35 |
+
- name: Deploy
|
| 36 |
+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
| 37 |
+
with:
|
| 38 |
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
| 39 |
+
publish_dir: ./assets
|
| 40 |
+
user_name: 'github-actions[bot]'
|
| 41 |
+
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
|
| 42 |
+
# prevent deleting build/test-full-routes.json which will break build:docs
|
| 43 |
+
keep_files: true
|
| 44 |
+
|
| 45 |
+
# docs
|
| 46 |
+
- name: Build docs
|
| 47 |
+
run: pnpm build:docs
|
| 48 |
+
- id: check-docs-env
|
| 49 |
+
env:
|
| 50 |
+
DOCS_API_TOKEN: ${{ secrets.DOCS_API_TOKEN }}
|
| 51 |
+
if: ${{ env.DOCS_API_TOKEN != '' }}
|
| 52 |
+
run: echo "defined=true" >> $GITHUB_OUTPUT
|
| 53 |
+
- name: Checkout docs
|
| 54 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 55 |
+
if: steps.check-docs-env.outputs.defined == 'true'
|
| 56 |
+
with:
|
| 57 |
+
repository: 'RSSNext/rsshub-docs'
|
| 58 |
+
token: ${{ secrets.DOCS_API_TOKEN }}
|
| 59 |
+
path: rsshub-docs
|
| 60 |
+
- name: Update docs
|
| 61 |
+
if: steps.check-docs-env.outputs.defined == 'true'
|
| 62 |
+
run: |
|
| 63 |
+
cp ./assets/build/docs/routes.json ./rsshub-docs/src/public/routes.json
|
| 64 |
+
cp ./assets/build/docs/categories.json ./rsshub-docs/src/public/categories.json
|
| 65 |
+
cp ./lib/types.ts ./rsshub-docs/.vitepress/theme/types.ts
|
| 66 |
+
cp ./scripts/workflow/data.ts ./rsshub-docs/.vitepress/config/data.ts
|
| 67 |
+
- name: Commit docs
|
| 68 |
+
if: steps.check-docs-env.outputs.defined == 'true'
|
| 69 |
+
run: |
|
| 70 |
+
cd rsshub-docs
|
| 71 |
+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
| 72 |
+
git config --local user.name "github-actions[bot]"
|
| 73 |
+
git status
|
| 74 |
+
git diff-index --quiet HEAD || (git commit -m "chore: auto build https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.DOCS_API_TOKEN }}@github.com/RSSNext/rsshub-docs.git" HEAD:main)
|
.github/workflows/codeql.yml
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# For most projects, this workflow file will not need changing; you simply need
|
| 2 |
+
# to commit it to your repository.
|
| 3 |
+
#
|
| 4 |
+
# You may wish to alter this file to override the set of languages analyzed,
|
| 5 |
+
# or to provide custom queries or build logic.
|
| 6 |
+
#
|
| 7 |
+
# ******** NOTE ********
|
| 8 |
+
# We have attempted to detect the languages in your repository. Please check
|
| 9 |
+
# the `language` matrix defined below to confirm you have the correct set of
|
| 10 |
+
# supported CodeQL languages.
|
| 11 |
+
#
|
| 12 |
+
name: 'CodeQL'
|
| 13 |
+
|
| 14 |
+
on:
|
| 15 |
+
push:
|
| 16 |
+
branches: ['master']
|
| 17 |
+
pull_request:
|
| 18 |
+
branches: ['master']
|
| 19 |
+
schedule:
|
| 20 |
+
- cron: '15 9 * * 3'
|
| 21 |
+
|
| 22 |
+
jobs:
|
| 23 |
+
analyze:
|
| 24 |
+
name: Analyze
|
| 25 |
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
| 26 |
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
| 27 |
+
# - https://gh.io/supported-runners-and-hardware-resources
|
| 28 |
+
# - https://gh.io/using-larger-runners
|
| 29 |
+
# Consider using larger runners for possible analysis time improvements.
|
| 30 |
+
runs-on: ubuntu-latest
|
| 31 |
+
timeout-minutes: 10
|
| 32 |
+
permissions:
|
| 33 |
+
# required for all workflows
|
| 34 |
+
security-events: write
|
| 35 |
+
|
| 36 |
+
# only required for workflows in private repositories
|
| 37 |
+
actions: read
|
| 38 |
+
contents: read
|
| 39 |
+
|
| 40 |
+
strategy:
|
| 41 |
+
fail-fast: false
|
| 42 |
+
matrix:
|
| 43 |
+
language: ['javascript-typescript']
|
| 44 |
+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
|
| 45 |
+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
|
| 46 |
+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
| 47 |
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
| 48 |
+
|
| 49 |
+
steps:
|
| 50 |
+
- name: Checkout repository
|
| 51 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 52 |
+
|
| 53 |
+
# Initializes the CodeQL tools for scanning.
|
| 54 |
+
# TODO: use hash pinning when https://github.com/dependabot/dependabot-core/pull/13007 pass
|
| 55 |
+
- name: Initialize CodeQL
|
| 56 |
+
uses: github/codeql-action/init@v4
|
| 57 |
+
with:
|
| 58 |
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
| 59 |
+
# By default, queries listed here will override any specified in a config file.
|
| 60 |
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
| 61 |
+
|
| 62 |
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
| 63 |
+
# queries: security-extended,security-and-quality
|
| 64 |
+
languages: ${{ matrix.language }}
|
| 65 |
+
|
| 66 |
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
|
| 67 |
+
# If this step fails, then you should remove it and run the build manually (see below)
|
| 68 |
+
- name: Autobuild
|
| 69 |
+
uses: github/codeql-action/autobuild@v4
|
| 70 |
+
|
| 71 |
+
# ℹ️ Command-line programs to run using the OS shell.
|
| 72 |
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
| 73 |
+
|
| 74 |
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
| 75 |
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
| 76 |
+
|
| 77 |
+
# - run: |
|
| 78 |
+
# echo "Run, Build Application using script"
|
| 79 |
+
# ./location_of_script_within_repo/buildscript.sh
|
| 80 |
+
|
| 81 |
+
- name: Perform CodeQL Analysis
|
| 82 |
+
uses: github/codeql-action/analyze@v4
|
| 83 |
+
with:
|
| 84 |
+
category: '/language:${{matrix.language}}'
|
.github/workflows/comment-on-issue.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Comment on Issue
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
issues:
|
| 5 |
+
types: [opened, edited, reopened]
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
testRoute:
|
| 9 |
+
name: Call maintainers
|
| 10 |
+
runs-on: ubuntu-slim
|
| 11 |
+
timeout-minutes: 5
|
| 12 |
+
permissions:
|
| 13 |
+
issues: write
|
| 14 |
+
if: github.event.sender.login != 'issuehunt-oss[bot]'
|
| 15 |
+
steps:
|
| 16 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 17 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 18 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 19 |
+
with:
|
| 20 |
+
node-version: lts/*
|
| 21 |
+
cache: 'pnpm'
|
| 22 |
+
- name: Install dependencies (pnpm) # import remark-parse and unified
|
| 23 |
+
run: pnpm i
|
| 24 |
+
- name: Generate feedback
|
| 25 |
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
| 26 |
+
with:
|
| 27 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 28 |
+
script: |
|
| 29 |
+
const { default: callMaintainer } = await import('${{ github.workspace }}/scripts/workflow/test-issue/call-maintainer.mjs')
|
| 30 |
+
await callMaintainer({ github, context, core })
|
.github/workflows/dependabot-fork.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Ignore dependabot on forks
|
| 2 |
+
|
| 3 |
+
on: pull_request
|
| 4 |
+
|
| 5 |
+
jobs:
|
| 6 |
+
dependabot-fork:
|
| 7 |
+
if: github.repository_owner != 'DIYgod' && github.actor == 'dependabot[bot]'
|
| 8 |
+
runs-on: ubuntu-slim
|
| 9 |
+
name: Ignore dependabot on forks
|
| 10 |
+
timeout-minutes: 5
|
| 11 |
+
steps:
|
| 12 |
+
- name: Checkout
|
| 13 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 14 |
+
|
| 15 |
+
- name: Comment Dependabot PR
|
| 16 |
+
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
|
| 17 |
+
with:
|
| 18 |
+
message: '@dependabot ignore this dependency'
|
| 19 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/docker-release.yml
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 'Docker Release'
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- master
|
| 7 |
+
paths:
|
| 8 |
+
- '.github/workflows/docker-release.yml'
|
| 9 |
+
- 'lib/**'
|
| 10 |
+
- '!lib/**/*.test.ts'
|
| 11 |
+
- 'Dockerfile'
|
| 12 |
+
workflow_dispatch: {}
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
check-env:
|
| 16 |
+
permissions:
|
| 17 |
+
contents: none
|
| 18 |
+
runs-on: ubuntu-slim
|
| 19 |
+
timeout-minutes: 5
|
| 20 |
+
outputs:
|
| 21 |
+
check-docker: ${{ steps.check-docker.outputs.defined }}
|
| 22 |
+
steps:
|
| 23 |
+
- id: check-docker
|
| 24 |
+
env:
|
| 25 |
+
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}
|
| 26 |
+
if: ${{ env.DOCKER_USERNAME != '' }}
|
| 27 |
+
run: echo "defined=true" >> $GITHUB_OUTPUT
|
| 28 |
+
release:
|
| 29 |
+
runs-on: ${{ matrix.runner }}
|
| 30 |
+
needs: check-env
|
| 31 |
+
if: needs.check-env.outputs.check-docker == 'true'
|
| 32 |
+
timeout-minutes: 30
|
| 33 |
+
outputs:
|
| 34 |
+
repo-name: ${{ steps.repo-name.outputs.repo-name }}
|
| 35 |
+
strategy:
|
| 36 |
+
fail-fast: false
|
| 37 |
+
matrix:
|
| 38 |
+
include:
|
| 39 |
+
- platform: linux/amd64
|
| 40 |
+
runner: ubuntu-latest
|
| 41 |
+
- platform: linux/arm64
|
| 42 |
+
runner: ubuntu-24.04-arm
|
| 43 |
+
permissions:
|
| 44 |
+
packages: write
|
| 45 |
+
id-token: write
|
| 46 |
+
attestations: write
|
| 47 |
+
steps:
|
| 48 |
+
- name: Enable ZRAM
|
| 49 |
+
# Reduce memory pressure
|
| 50 |
+
# PERCENT=100 is safe: https://fedoraproject.org/wiki/Changes/Scale_ZRAM_to_full_memory_size
|
| 51 |
+
run: |
|
| 52 |
+
sudo apt-get update -yq
|
| 53 |
+
sudo apt-get install -yq "linux-modules-extra-$(uname -r)" zram-tools
|
| 54 |
+
echo -e 'ALGO=zstd\nPERCENT=100' | sudo tee -a /etc/default/zramswap
|
| 55 |
+
sudo systemctl restart zramswap
|
| 56 |
+
swapon
|
| 57 |
+
|
| 58 |
+
- name: Prepare
|
| 59 |
+
run: |
|
| 60 |
+
platform=${{ matrix.platform }}
|
| 61 |
+
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
| 62 |
+
|
| 63 |
+
- name: Checkout
|
| 64 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 65 |
+
|
| 66 |
+
- name: Extract repository name
|
| 67 |
+
id: repo-name
|
| 68 |
+
run: |
|
| 69 |
+
REPO_NAME="${GITHUB_REPOSITORY#*/}"
|
| 70 |
+
REPO_NAME_LOWER="${REPO_NAME,,}"
|
| 71 |
+
echo "repo-name=$REPO_NAME_LOWER" >> "$GITHUB_OUTPUT"
|
| 72 |
+
|
| 73 |
+
- name: Set up Docker Buildx
|
| 74 |
+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
| 75 |
+
|
| 76 |
+
- name: Log in to Docker Hub
|
| 77 |
+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
| 78 |
+
with:
|
| 79 |
+
username: ${{ vars.DOCKER_USERNAME }}
|
| 80 |
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
| 81 |
+
|
| 82 |
+
- name: Log in to the Container registry
|
| 83 |
+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
| 84 |
+
with:
|
| 85 |
+
registry: ghcr.io
|
| 86 |
+
username: ${{ github.actor }}
|
| 87 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 88 |
+
|
| 89 |
+
- name: Extract Docker metadata (ordinary version)
|
| 90 |
+
id: meta-ordinary
|
| 91 |
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
| 92 |
+
with:
|
| 93 |
+
images: |
|
| 94 |
+
${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}
|
| 95 |
+
ghcr.io/${{ github.repository }}
|
| 96 |
+
tags: |
|
| 97 |
+
type=raw,value=latest,enable=true
|
| 98 |
+
type=raw,value={{date 'YYYY-MM-DD'}},enable=true
|
| 99 |
+
type=sha,format=long,prefix=,enable=true
|
| 100 |
+
flavor: latest=false
|
| 101 |
+
|
| 102 |
+
- name: Extract image names (ordinary version)
|
| 103 |
+
id: image-name-ordinary
|
| 104 |
+
run: |
|
| 105 |
+
tags=$(jq -r '.target["docker-metadata-action"].args.DOCKER_META_IMAGES' "$DOCKER_METADATA_OUTPUT_BAKE_FILE_TAGS")
|
| 106 |
+
echo "tags=$tags" >> "$GITHUB_OUTPUT"
|
| 107 |
+
|
| 108 |
+
- name: Build and push Docker image (ordinary version)
|
| 109 |
+
id: build-and-push
|
| 110 |
+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
| 111 |
+
with:
|
| 112 |
+
context: .
|
| 113 |
+
tags: ${{ steps.image-name-ordinary.outputs.tags }}
|
| 114 |
+
labels: ${{ steps.meta-ordinary.outputs.labels }}
|
| 115 |
+
platforms: ${{ matrix.platform }}
|
| 116 |
+
cache-from: type=gha,scope=docker-release-${{ env.PLATFORM_PAIR }}
|
| 117 |
+
cache-to: type=gha,mode=max,scope=docker-release-${{ env.PLATFORM_PAIR }}
|
| 118 |
+
outputs: type=image,compression=zstd,force-compression=true,push-by-digest=true,name-canonical=true,push=true
|
| 119 |
+
|
| 120 |
+
- name: Attest (ordinary version)
|
| 121 |
+
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
|
| 122 |
+
with:
|
| 123 |
+
subject-name: |
|
| 124 |
+
${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}
|
| 125 |
+
ghcr.io/${{ github.repository }}
|
| 126 |
+
subject-digest: ${{ steps.build-and-push.outputs.digest }}
|
| 127 |
+
|
| 128 |
+
- name: Export digest (ordinary version)
|
| 129 |
+
run: |
|
| 130 |
+
mkdir -p ${{ runner.temp }}/digests/ordinary
|
| 131 |
+
digest="${{ steps.build-and-push.outputs.digest }}"
|
| 132 |
+
touch "${{ runner.temp }}/digests/ordinary/${digest#sha256:}"
|
| 133 |
+
|
| 134 |
+
- name: Upload digest (ordinary version)
|
| 135 |
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
| 136 |
+
with:
|
| 137 |
+
name: digests-ordinary-${{ env.PLATFORM_PAIR }}
|
| 138 |
+
path: ${{ runner.temp }}/digests/ordinary/*
|
| 139 |
+
if-no-files-found: error
|
| 140 |
+
retention-days: 1
|
| 141 |
+
|
| 142 |
+
- name: Extract Docker metadata (Chromium-bundled version)
|
| 143 |
+
id: meta-chromium-bundled
|
| 144 |
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
| 145 |
+
with:
|
| 146 |
+
images: |
|
| 147 |
+
${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}
|
| 148 |
+
ghcr.io/${{ github.repository }}
|
| 149 |
+
tags: |
|
| 150 |
+
type=raw,value=chromium-bundled,enable=true
|
| 151 |
+
type=raw,value=chromium-bundled-{{date 'YYYY-MM-DD'}},enable=true
|
| 152 |
+
type=sha,format=long,prefix=chromium-bundled-,enable=true
|
| 153 |
+
flavor: latest=false
|
| 154 |
+
|
| 155 |
+
- name: Extract image names (Chromium-bundled version)
|
| 156 |
+
id: image-name-chromium-bundled
|
| 157 |
+
run: |
|
| 158 |
+
tags=$(jq -r '.target["docker-metadata-action"].args.DOCKER_META_IMAGES' "$DOCKER_METADATA_OUTPUT_BAKE_FILE_TAGS")
|
| 159 |
+
echo "tags=$tags" >> "$GITHUB_OUTPUT"
|
| 160 |
+
|
| 161 |
+
- name: Build and push Docker image (Chromium-bundled version)
|
| 162 |
+
id: build-and-push-chromium
|
| 163 |
+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
| 164 |
+
with:
|
| 165 |
+
context: .
|
| 166 |
+
build-args: PUPPETEER_SKIP_DOWNLOAD=0
|
| 167 |
+
tags: ${{ steps.image-name-chromium-bundled.outputs.tags }}
|
| 168 |
+
labels: ${{ steps.meta-chromium-bundled.outputs.labels }}
|
| 169 |
+
platforms: ${{ matrix.platform }}
|
| 170 |
+
cache-from: |
|
| 171 |
+
type=registry,ref=${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}:chromium-bundled
|
| 172 |
+
cache-to: type=inline,ref=${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}:chromium-bundled # inline cache is enough
|
| 173 |
+
outputs: type=image,compression=zstd,force-compression=true,push-by-digest=true,name-canonical=true,push=true
|
| 174 |
+
|
| 175 |
+
- name: Attest (Chromium-bundled version)
|
| 176 |
+
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
|
| 177 |
+
with:
|
| 178 |
+
subject-name: |
|
| 179 |
+
${{ vars.DOCKER_USERNAME }}/${{ steps.repo-name.outputs.repo-name }}
|
| 180 |
+
ghcr.io/${{ github.repository }}
|
| 181 |
+
subject-digest: ${{ steps.build-and-push-chromium.outputs.digest }}
|
| 182 |
+
|
| 183 |
+
- name: Export digest (Chromium-bundled version)
|
| 184 |
+
run: |
|
| 185 |
+
mkdir -p ${{ runner.temp }}/digests/chromium
|
| 186 |
+
digest="${{ steps.build-and-push-chromium.outputs.digest }}"
|
| 187 |
+
touch "${{ runner.temp }}/digests/chromium/${digest#sha256:}"
|
| 188 |
+
|
| 189 |
+
- name: Upload digest (Chromium-bundled version)
|
| 190 |
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
| 191 |
+
with:
|
| 192 |
+
name: digests-chromium-${{ env.PLATFORM_PAIR }}
|
| 193 |
+
path: ${{ runner.temp }}/digests/chromium/*
|
| 194 |
+
if-no-files-found: error
|
| 195 |
+
retention-days: 1
|
| 196 |
+
|
| 197 |
+
merge:
|
| 198 |
+
runs-on: ubuntu-latest
|
| 199 |
+
needs: [check-env, release]
|
| 200 |
+
if: needs.check-env.outputs.check-docker == 'true'
|
| 201 |
+
timeout-minutes: 5
|
| 202 |
+
permissions:
|
| 203 |
+
packages: write
|
| 204 |
+
id-token: write
|
| 205 |
+
steps:
|
| 206 |
+
- name: Set up Docker Buildx
|
| 207 |
+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
| 208 |
+
|
| 209 |
+
- name: Log in to Docker Hub
|
| 210 |
+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
| 211 |
+
with:
|
| 212 |
+
username: ${{ vars.DOCKER_USERNAME }}
|
| 213 |
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
| 214 |
+
|
| 215 |
+
- name: Log in to the Container registry
|
| 216 |
+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
|
| 217 |
+
with:
|
| 218 |
+
registry: ghcr.io
|
| 219 |
+
username: ${{ github.actor }}
|
| 220 |
+
password: ${{ secrets.GITHUB_TOKEN }}
|
| 221 |
+
|
| 222 |
+
- name: Download digests (ordinary version)
|
| 223 |
+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
| 224 |
+
with:
|
| 225 |
+
path: ${{ runner.temp }}/digests/ordinary
|
| 226 |
+
pattern: digests-ordinary-*
|
| 227 |
+
merge-multiple: true
|
| 228 |
+
|
| 229 |
+
- name: Extract Docker metadata (ordinary version)
|
| 230 |
+
id: meta-ordinary-merge
|
| 231 |
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
| 232 |
+
with:
|
| 233 |
+
images: |
|
| 234 |
+
${{ vars.DOCKER_USERNAME }}/${{ needs.release.outputs.repo-name }}
|
| 235 |
+
ghcr.io/${{ github.repository }}
|
| 236 |
+
tags: |
|
| 237 |
+
type=raw,value=latest,enable=true
|
| 238 |
+
type=raw,value={{date 'YYYY-MM-DD'}},enable=true
|
| 239 |
+
type=sha,format=long,prefix=,enable=true
|
| 240 |
+
flavor: latest=false
|
| 241 |
+
|
| 242 |
+
- name: Create manifest list and push (ordinary version)
|
| 243 |
+
working-directory: ${{ runner.temp }}/digests/ordinary
|
| 244 |
+
run: |
|
| 245 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
| 246 |
+
$(printf '${{ vars.DOCKER_USERNAME }}/${{ needs.release.outputs.repo-name }}@sha256:%s ' *)
|
| 247 |
+
|
| 248 |
+
- name: Download digests (Chromium-bundled version)
|
| 249 |
+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
| 250 |
+
with:
|
| 251 |
+
path: ${{ runner.temp }}/digests/chromium
|
| 252 |
+
pattern: digests-chromium-*
|
| 253 |
+
merge-multiple: true
|
| 254 |
+
|
| 255 |
+
- name: Extract Docker metadata (Chromium-bundled version)
|
| 256 |
+
id: meta-chromium-bundled-merge
|
| 257 |
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
| 258 |
+
with:
|
| 259 |
+
images: |
|
| 260 |
+
${{ vars.DOCKER_USERNAME }}/${{ needs.release.outputs.repo-name }}
|
| 261 |
+
ghcr.io/${{ github.repository }}
|
| 262 |
+
tags: |
|
| 263 |
+
type=raw,value=chromium-bundled,enable=true
|
| 264 |
+
type=raw,value=chromium-bundled-{{date 'YYYY-MM-DD'}},enable=true
|
| 265 |
+
type=sha,format=long,prefix=chromium-bundled-,enable=true
|
| 266 |
+
flavor: latest=false
|
| 267 |
+
|
| 268 |
+
- name: Create manifest list and push (Chromium-bundled version)
|
| 269 |
+
working-directory: ${{ runner.temp }}/digests/chromium
|
| 270 |
+
run: |
|
| 271 |
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
| 272 |
+
$(printf '${{ vars.DOCKER_USERNAME }}/${{ needs.release.outputs.repo-name }}@sha256:%s ' *)
|
| 273 |
+
|
| 274 |
+
description:
|
| 275 |
+
runs-on: ubuntu-slim
|
| 276 |
+
needs: [check-env, release]
|
| 277 |
+
if: needs.check-env.outputs.check-docker == 'true'
|
| 278 |
+
timeout-minutes: 5
|
| 279 |
+
steps:
|
| 280 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 281 |
+
|
| 282 |
+
- name: Docker Hub Description
|
| 283 |
+
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa # v5.0.0
|
| 284 |
+
with:
|
| 285 |
+
username: ${{ vars.DOCKER_USERNAME }}
|
| 286 |
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
| 287 |
+
repository: ${{ vars.DOCKER_USERNAME }}/${{ needs.release.outputs.repo-name }}
|
.github/workflows/docker-test-cont.yml
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: PR - route test
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
workflow_run:
|
| 5 |
+
workflows: [PR - Docker build test] # open, reopen, synchronized, edited included
|
| 6 |
+
types: [completed]
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
testRoute:
|
| 10 |
+
name: Route test
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
permissions:
|
| 13 |
+
pull-requests: write
|
| 14 |
+
if: ${{ github.event.workflow_run.conclusion == 'success' }} # skip if unsuccessful
|
| 15 |
+
steps:
|
| 16 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 17 |
+
|
| 18 |
+
# https://github.com/orgs/community/discussions/25220#discussioncomment-11316244
|
| 19 |
+
- name: Search the PR that triggered this workflow
|
| 20 |
+
id: source-run-info
|
| 21 |
+
env:
|
| 22 |
+
# Token required for GH CLI:
|
| 23 |
+
GH_TOKEN: ${{ github.token }}
|
| 24 |
+
# Best practice for scripts is to reference via ENV at runtime. Avoid using the expression syntax in the script content directly:
|
| 25 |
+
PR_TARGET_REPO: ${{ github.repository }}
|
| 26 |
+
# If the PR is from a fork, prefix it with `<owner-login>:`, otherwise only the PR branch name is relevant:
|
| 27 |
+
PR_BRANCH: |-
|
| 28 |
+
${{
|
| 29 |
+
(github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
|
| 30 |
+
&& format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
|
| 31 |
+
|| github.event.workflow_run.head_branch
|
| 32 |
+
}}
|
| 33 |
+
# Query the PR number by repo + branch, then assign to step output:
|
| 34 |
+
run: |
|
| 35 |
+
gh pr view --repo "${PR_TARGET_REPO}" "${PR_BRANCH}" \
|
| 36 |
+
--json 'number' --jq '"number=\(.number)"' \
|
| 37 |
+
>> "${GITHUB_OUTPUT}"
|
| 38 |
+
|
| 39 |
+
- name: Fetch PR data via GitHub API
|
| 40 |
+
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d # v2.4.0
|
| 41 |
+
id: pr-data
|
| 42 |
+
with:
|
| 43 |
+
route: GET /repos/{repo}/pulls/{number}
|
| 44 |
+
repo: ${{ github.repository }}
|
| 45 |
+
number: ${{ steps.source-run-info.outputs.number }}
|
| 46 |
+
env:
|
| 47 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 48 |
+
|
| 49 |
+
- name: Fetch affected routes
|
| 50 |
+
id: fetch-route
|
| 51 |
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
| 52 |
+
env:
|
| 53 |
+
PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
|
| 54 |
+
with:
|
| 55 |
+
# by default, JSON format returned
|
| 56 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 57 |
+
script: |
|
| 58 |
+
const PR = JSON.parse(process.env.PULL_REQUEST)
|
| 59 |
+
const body = PR.body
|
| 60 |
+
const number = PR.number
|
| 61 |
+
const sender = PR.user.login
|
| 62 |
+
const { default: identify } = await import('${{ github.workspace }}/scripts/workflow/test-route/identify.mjs')
|
| 63 |
+
return identify({ github, context, core }, body, number, sender)
|
| 64 |
+
|
| 65 |
+
- name: Fetch Docker image
|
| 66 |
+
if: (env.TEST_CONTINUE)
|
| 67 |
+
uses: dawidd6/action-download-artifact@fe9d59ce33ce92db8a6ac90b2c8be6b6d90417c8 # v15
|
| 68 |
+
with:
|
| 69 |
+
workflow: ${{ github.event.workflow_run.workflow_id }}
|
| 70 |
+
run_id: ${{ github.event.workflow_run.id }}
|
| 71 |
+
name: docker-image
|
| 72 |
+
path: ../artifacts-${{ github.run_id }}
|
| 73 |
+
|
| 74 |
+
- name: Import Docker image and set up Docker container
|
| 75 |
+
if: (env.TEST_CONTINUE)
|
| 76 |
+
working-directory: ../artifacts-${{ github.run_id }}
|
| 77 |
+
run: |
|
| 78 |
+
set -ex
|
| 79 |
+
zstd -d --stdout rsshub.tar.zst | docker load
|
| 80 |
+
docker run -d \
|
| 81 |
+
--name rsshub \
|
| 82 |
+
-e NODE_ENV=dev \
|
| 83 |
+
-e NODE_OPTIONS='--max-http-header-size=32768' \
|
| 84 |
+
-e LOGGER_LEVEL=debug \
|
| 85 |
+
-e ALLOW_USER_HOTLINK_TEMPLATE=true \
|
| 86 |
+
-e ALLOW_USER_SUPPLY_UNSAFE_DOMAIN=true \
|
| 87 |
+
-p 1200:1200 \
|
| 88 |
+
rsshub:latest
|
| 89 |
+
|
| 90 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 91 |
+
|
| 92 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 93 |
+
if: (env.TEST_CONTINUE)
|
| 94 |
+
with:
|
| 95 |
+
node-version: lts/*
|
| 96 |
+
cache: 'pnpm'
|
| 97 |
+
|
| 98 |
+
- name: Install dependencies (pnpm) # require js-beautify
|
| 99 |
+
if: (env.TEST_CONTINUE)
|
| 100 |
+
run: pnpm i
|
| 101 |
+
|
| 102 |
+
- name: Generate feedback
|
| 103 |
+
if: (env.TEST_CONTINUE)
|
| 104 |
+
id: generate-feedback
|
| 105 |
+
timeout-minutes: 10
|
| 106 |
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
| 107 |
+
env:
|
| 108 |
+
TEST_BASEURL: http://localhost:1200
|
| 109 |
+
TEST_ROUTES: ${{ steps.fetch-route.outputs.result }}
|
| 110 |
+
PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
|
| 111 |
+
with:
|
| 112 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 113 |
+
script: |
|
| 114 |
+
const PR = JSON.parse(process.env.PULL_REQUEST)
|
| 115 |
+
const link = process.env.TEST_BASEURL
|
| 116 |
+
const routes = JSON.parse(process.env.TEST_ROUTES)
|
| 117 |
+
const number = PR.number
|
| 118 |
+
core.info(`${link}, ${routes}, ${number}`)
|
| 119 |
+
const { default: test } = await import('${{ github.workspace }}/scripts/workflow/test-route/test.mjs')
|
| 120 |
+
await test({ github, context, core }, link, routes, number)
|
| 121 |
+
|
| 122 |
+
- name: Pull Request Labeler
|
| 123 |
+
if: ${{ failure() }}
|
| 124 |
+
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
|
| 125 |
+
with:
|
| 126 |
+
actions: 'add-labels'
|
| 127 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 128 |
+
issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
|
| 129 |
+
labels: 'auto: DO NOT merge'
|
| 130 |
+
|
| 131 |
+
- name: Print Docker container logs
|
| 132 |
+
if: ${{ always() }}
|
| 133 |
+
run: docker logs rsshub || true # logs/combined.log? Not so readable...
|
| 134 |
+
|
| 135 |
+
fail-build:
|
| 136 |
+
name: Fail build
|
| 137 |
+
runs-on: ubuntu-slim
|
| 138 |
+
permissions:
|
| 139 |
+
pull-requests: write
|
| 140 |
+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
| 141 |
+
steps:
|
| 142 |
+
# https://github.com/orgs/community/discussions/25220#discussioncomment-11316244
|
| 143 |
+
- name: Search the PR that triggered this workflow
|
| 144 |
+
id: source-run-info
|
| 145 |
+
env:
|
| 146 |
+
# Token required for GH CLI:
|
| 147 |
+
GH_TOKEN: ${{ github.token }}
|
| 148 |
+
# Best practice for scripts is to reference via ENV at runtime. Avoid using the expression syntax in the script content directly:
|
| 149 |
+
PR_TARGET_REPO: ${{ github.repository }}
|
| 150 |
+
# If the PR is from a fork, prefix it with `<owner-login>:`, otherwise only the PR branch name is relevant:
|
| 151 |
+
PR_BRANCH: |-
|
| 152 |
+
${{
|
| 153 |
+
(github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
|
| 154 |
+
&& format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
|
| 155 |
+
|| github.event.workflow_run.head_branch
|
| 156 |
+
}}
|
| 157 |
+
# Query the PR number by repo + branch, then assign to step output:
|
| 158 |
+
run: |
|
| 159 |
+
gh pr view --repo "${PR_TARGET_REPO}" "${PR_BRANCH}" \
|
| 160 |
+
--json 'number' --jq '"number=\(.number)"' \
|
| 161 |
+
>> "${GITHUB_OUTPUT}"
|
| 162 |
+
|
| 163 |
+
- name: Pull Request Labeler
|
| 164 |
+
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
|
| 165 |
+
with:
|
| 166 |
+
actions: 'add-labels'
|
| 167 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 168 |
+
issue-number: ${{ steps.source-run-info.outputs.number }}
|
| 169 |
+
labels: 'auto: DO NOT merge'
|
.github/workflows/docker-test.yml
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: PR - Docker build test
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request:
|
| 5 |
+
branches:
|
| 6 |
+
- master
|
| 7 |
+
paths:
|
| 8 |
+
- '.github/workflows/docker-test.yml'
|
| 9 |
+
- 'lib/**'
|
| 10 |
+
- 'Dockerfile'
|
| 11 |
+
- 'package.json'
|
| 12 |
+
- 'pnpm-lock.yaml'
|
| 13 |
+
types: [opened, reopened, synchronize, edited]
|
| 14 |
+
# Please, always create a pull request instead of push to master.
|
| 15 |
+
|
| 16 |
+
concurrency:
|
| 17 |
+
group: docker-test-${{ github.ref_name }}
|
| 18 |
+
cancel-in-progress: true
|
| 19 |
+
|
| 20 |
+
jobs:
|
| 21 |
+
test:
|
| 22 |
+
name: Docker build & tests
|
| 23 |
+
permissions:
|
| 24 |
+
pull-requests: write
|
| 25 |
+
attestations: write
|
| 26 |
+
runs-on: ubuntu-latest
|
| 27 |
+
timeout-minutes: 10
|
| 28 |
+
steps:
|
| 29 |
+
- name: Checkout
|
| 30 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 31 |
+
|
| 32 |
+
- name: Set up Docker Buildx # needed by `cache-from`
|
| 33 |
+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
|
| 34 |
+
|
| 35 |
+
- name: Extract Docker metadata
|
| 36 |
+
id: meta
|
| 37 |
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
| 38 |
+
with:
|
| 39 |
+
images: rsshub
|
| 40 |
+
flavor: latest=true
|
| 41 |
+
|
| 42 |
+
- name: Build Docker image
|
| 43 |
+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
|
| 44 |
+
with:
|
| 45 |
+
context: .
|
| 46 |
+
build-args: PUPPETEER_SKIP_DOWNLOAD=0 # also test bundling Chromium
|
| 47 |
+
load: true
|
| 48 |
+
tags: ${{ steps.meta.outputs.tags }}
|
| 49 |
+
labels: ${{ steps.meta.outputs.labels }}
|
| 50 |
+
platforms: linux/amd64 # explicit
|
| 51 |
+
cache-from: |
|
| 52 |
+
type=registry,ref=${{ vars.DOCKER_USERNAME }}/rsshub:chromium-bundled
|
| 53 |
+
type=gha,scope=docker-release-linux-amd64
|
| 54 |
+
outputs: type=docker,compression=zstd,force-compression=true # load: true means docker output type
|
| 55 |
+
|
| 56 |
+
- name: Pull Request Labeler
|
| 57 |
+
if: ${{ failure() }}
|
| 58 |
+
uses: actions-cool/issues-helper@71b62d7da76e59ff7b193904feb6e77d4dbb2777 # v3.7.6
|
| 59 |
+
with:
|
| 60 |
+
actions: 'add-labels'
|
| 61 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 62 |
+
issue-number: ${{ github.event.pull_request.number }}
|
| 63 |
+
labels: 'auto: DO NOT merge'
|
| 64 |
+
|
| 65 |
+
- name: Test Docker image
|
| 66 |
+
run: bash scripts/docker/test-docker.sh
|
| 67 |
+
|
| 68 |
+
- name: Export Docker image
|
| 69 |
+
run: docker save rsshub:latest | zstdmt -o rsshub.tar.zst
|
| 70 |
+
|
| 71 |
+
- name: Upload Docker image
|
| 72 |
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
| 73 |
+
with:
|
| 74 |
+
name: docker-image
|
| 75 |
+
path: rsshub.tar.zst
|
| 76 |
+
retention-days: 1
|
.github/workflows/format.yml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Format
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- master
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
format:
|
| 10 |
+
permissions:
|
| 11 |
+
contents: write # for Git to git push
|
| 12 |
+
name: Auto format
|
| 13 |
+
runs-on: ubuntu-latest
|
| 14 |
+
timeout-minutes: 15
|
| 15 |
+
|
| 16 |
+
steps:
|
| 17 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 18 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 19 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 20 |
+
with:
|
| 21 |
+
node-version: lts/*
|
| 22 |
+
cache: 'pnpm'
|
| 23 |
+
- run: pnpm i
|
| 24 |
+
- run: npm run format
|
| 25 |
+
- name: Commit files
|
| 26 |
+
run: |
|
| 27 |
+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
| 28 |
+
git config --local user.name "github-actions[bot]"
|
| 29 |
+
git status
|
| 30 |
+
git diff-index --quiet HEAD || (git commit -m "style: auto format" -a --no-verify && git push "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master)
|
.github/workflows/ghcr-retention.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 'Clean up GHCR Packages'
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: '0 0 * * 0'
|
| 6 |
+
workflow_dispatch:
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
cleanup:
|
| 10 |
+
runs-on: ubuntu-slim
|
| 11 |
+
permissions:
|
| 12 |
+
packages: write
|
| 13 |
+
contents: read
|
| 14 |
+
steps:
|
| 15 |
+
- name: Delete old container versions (30+ days)
|
| 16 |
+
uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
|
| 17 |
+
with:
|
| 18 |
+
dry-run: false
|
| 19 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 20 |
+
package: rsshub
|
| 21 |
+
older-than: 30 days
|
| 22 |
+
keep-n-tagged: 5
|
| 23 |
+
delete-untagged: true
|
| 24 |
+
delete-ghost-images: true
|
| 25 |
+
delete-orphaned-images: true
|
| 26 |
+
delete-partial-images: true
|
.github/workflows/issue-command.yml
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Issue Command
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
issue_comment:
|
| 5 |
+
types: [created]
|
| 6 |
+
|
| 7 |
+
jobs:
|
| 8 |
+
rebase:
|
| 9 |
+
name: Automatic Rebase
|
| 10 |
+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'COLLABORATOR'
|
| 11 |
+
runs-on: ubuntu-slim
|
| 12 |
+
timeout-minutes: 5
|
| 13 |
+
permissions:
|
| 14 |
+
contents: write
|
| 15 |
+
pull-requests: write
|
| 16 |
+
steps:
|
| 17 |
+
- name: Checkout the latest code
|
| 18 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 19 |
+
with:
|
| 20 |
+
fetch-depth: 0
|
| 21 |
+
- name: Automatic Rebase
|
| 22 |
+
uses: cirrus-actions/rebase@1.8
|
| 23 |
+
env:
|
| 24 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 25 |
+
|
| 26 |
+
self-assign:
|
| 27 |
+
name: Self Assign
|
| 28 |
+
if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, '/wip') }}
|
| 29 |
+
runs-on: ubuntu-slim
|
| 30 |
+
timeout-minutes: 5
|
| 31 |
+
permissions:
|
| 32 |
+
issues: write
|
| 33 |
+
steps:
|
| 34 |
+
- uses: bdougie/take-action@1439165ac45a7461c2d89a59952cd7d941964b87 # v1.6.1
|
| 35 |
+
with:
|
| 36 |
+
token: ${{ secrets.GITHUB_TOKEN }}
|
| 37 |
+
trigger: '/wip'
|
| 38 |
+
|
| 39 |
+
test-on-demand:
|
| 40 |
+
name: Test route on demand
|
| 41 |
+
if: startsWith(github.event.comment.body, '/test')
|
| 42 |
+
runs-on: ubuntu-latest
|
| 43 |
+
timeout-minutes: 5
|
| 44 |
+
permissions:
|
| 45 |
+
attestations: write
|
| 46 |
+
issues: write
|
| 47 |
+
pull-requests: write
|
| 48 |
+
steps:
|
| 49 |
+
- name: Fetch PR data (for PR)
|
| 50 |
+
if: github.event.issue.pull_request
|
| 51 |
+
uses: octokit/request-action@dad4362715b7fb2ddedf9772c8670824af564f0d # v2.4.0
|
| 52 |
+
id: pr-data
|
| 53 |
+
with:
|
| 54 |
+
route: GET /repos/{repo}/pulls/{number}
|
| 55 |
+
repo: ${{ github.repository }}
|
| 56 |
+
number: ${{ github.event.issue.number }}
|
| 57 |
+
env:
|
| 58 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 59 |
+
|
| 60 |
+
- name: Checkout
|
| 61 |
+
if: ${{ !github.event.issue.pull_request }}
|
| 62 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 63 |
+
|
| 64 |
+
- name: Checkout PR
|
| 65 |
+
if: github.event.issue.pull_request
|
| 66 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 67 |
+
with:
|
| 68 |
+
ref: ${{ fromJson(steps.pr-data.outputs.data).head.ref }}
|
| 69 |
+
|
| 70 |
+
- name: Install pnpm
|
| 71 |
+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 72 |
+
|
| 73 |
+
- name: Use Node.js Active LTS
|
| 74 |
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 75 |
+
with:
|
| 76 |
+
node-version: lts/*
|
| 77 |
+
cache: 'pnpm'
|
| 78 |
+
|
| 79 |
+
- name: Install dependencies (pnpm)
|
| 80 |
+
run: pnpm i && pnpm rb && pnpx rebrowser-puppeteer browsers install chrome
|
| 81 |
+
|
| 82 |
+
- name: Fetch affected routes
|
| 83 |
+
id: fetch-route
|
| 84 |
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
| 85 |
+
env:
|
| 86 |
+
EVENT: ${{ toJson(github.event) }}
|
| 87 |
+
with:
|
| 88 |
+
script: |
|
| 89 |
+
const event = JSON.parse(process.env.EVENT)
|
| 90 |
+
const body = event.comment.body
|
| 91 |
+
const number = event.issue.number
|
| 92 |
+
const sender = event.comment.user.login
|
| 93 |
+
const { default: identify } = await import('${{ github.workspace }}/scripts/workflow/test-route/identify.mjs')
|
| 94 |
+
return identify({ github, context, core }, body, number, sender)
|
| 95 |
+
|
| 96 |
+
- name: Build RSSHub
|
| 97 |
+
if: env.TEST_CONTINUE
|
| 98 |
+
run: pnpm build
|
| 99 |
+
|
| 100 |
+
- name: Start RSSHub
|
| 101 |
+
if: env.TEST_CONTINUE
|
| 102 |
+
run: pnpm start &
|
| 103 |
+
env:
|
| 104 |
+
ALLOW_USER_HOTLINK_TEMPLATE: true
|
| 105 |
+
ALLOW_USER_SUPPLY_UNSAFE_DOMAIN: true
|
| 106 |
+
NODE_ENV: dev
|
| 107 |
+
NODE_OPTIONS: '--max-http-header-size=32768'
|
| 108 |
+
LOGGER_LEVEL: debug
|
| 109 |
+
|
| 110 |
+
- name: Generate feedback
|
| 111 |
+
if: env.TEST_CONTINUE
|
| 112 |
+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
| 113 |
+
env:
|
| 114 |
+
TEST_BASEURL: http://localhost:1200
|
| 115 |
+
TEST_ROUTES: ${{ steps.fetch-route.outputs.result }}
|
| 116 |
+
EVENT: ${{ toJson(github.event) }}
|
| 117 |
+
with:
|
| 118 |
+
script: |
|
| 119 |
+
const event = JSON.parse(process.env.EVENT)
|
| 120 |
+
const link = process.env.TEST_BASEURL
|
| 121 |
+
const routes = JSON.parse(process.env.TEST_ROUTES)
|
| 122 |
+
const number = event.issue.number
|
| 123 |
+
core.info(`${link}, ${routes}, ${number}`)
|
| 124 |
+
const { default: test } = await import('${{ github.workspace }}/scripts/workflow/test-route/test.mjs')
|
| 125 |
+
await test({ github, context, core }, link, routes, number)
|
| 126 |
+
|
| 127 |
+
- name: Print logs
|
| 128 |
+
if: env.TEST_CONTINUE
|
| 129 |
+
run: cat ${{ github.workspace }}/logs/combined.log
|
| 130 |
+
|
| 131 |
+
- name: Upload Artifact
|
| 132 |
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
| 133 |
+
with:
|
| 134 |
+
name: logs
|
| 135 |
+
path: logs
|
| 136 |
+
retention-days: 1
|
.github/workflows/lint.yml
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Linter
|
| 2 |
+
|
| 3 |
+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
|
| 4 |
+
# pull_request includes [opened, reopened, synchronize] events by default
|
| 5 |
+
# 'edited' is required for title-lint
|
| 6 |
+
on:
|
| 7 |
+
push: {}
|
| 8 |
+
pull_request:
|
| 9 |
+
types: [opened, reopened, synchronize, edited]
|
| 10 |
+
pull_request_target:
|
| 11 |
+
types: [opened, reopened, synchronize, edited]
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
# https://github.com/actions/starter-workflows/blob/main/code-scanning/eslint.yml
|
| 15 |
+
eslint-warning:
|
| 16 |
+
name: Lint
|
| 17 |
+
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
| 18 |
+
runs-on: ubuntu-slim
|
| 19 |
+
timeout-minutes: 15
|
| 20 |
+
permissions:
|
| 21 |
+
security-events: write
|
| 22 |
+
steps:
|
| 23 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 24 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 25 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 26 |
+
with:
|
| 27 |
+
node-version: lts/*
|
| 28 |
+
cache: 'pnpm'
|
| 29 |
+
- run: pnpm i
|
| 30 |
+
- name: Install ESLint SARIF formatter
|
| 31 |
+
# https://github.com/microsoft/sarif-js-sdk/issues/91 unncessary deps on eslint@8
|
| 32 |
+
run: |
|
| 33 |
+
wget https://raw.githubusercontent.com/microsoft/sarif-js-sdk/refs/heads/main/packages/eslint-formatter-sarif/sarif.js -O node_modules/sarif.cjs
|
| 34 |
+
pnpm i -D utf8 lodash jschardet
|
| 35 |
+
- name: Lint
|
| 36 |
+
run: pnpm run lint
|
| 37 |
+
--format node_modules/sarif.cjs
|
| 38 |
+
--output-file eslint-results.sarif
|
| 39 |
+
continue-on-error: true
|
| 40 |
+
- name: Upload analysis results to GitHub
|
| 41 |
+
uses: github/codeql-action/upload-sarif@v4
|
| 42 |
+
with:
|
| 43 |
+
sarif_file: eslint-results.sarif
|
| 44 |
+
wait-for-processing: true
|
| 45 |
+
|
| 46 |
+
# https://github.com/amannn/action-semantic-pull-request
|
| 47 |
+
title-lint:
|
| 48 |
+
if: ${{ github.event_name == 'pull_request_target' && github.repository == 'DIYgod/RSSHub' }}
|
| 49 |
+
name: Validate PR title
|
| 50 |
+
runs-on: ubuntu-slim
|
| 51 |
+
timeout-minutes: 5
|
| 52 |
+
steps:
|
| 53 |
+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
| 54 |
+
env:
|
| 55 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 56 |
+
ignoreLabels: |
|
| 57 |
+
dependencies
|
| 58 |
+
wip: true
|
| 59 |
+
|
| 60 |
+
labeler:
|
| 61 |
+
name: Pull Request Labeler
|
| 62 |
+
if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && github.repository == 'DIYgod/RSSHub' }}
|
| 63 |
+
permissions:
|
| 64 |
+
pull-requests: write
|
| 65 |
+
runs-on: ubuntu-slim
|
| 66 |
+
timeout-minutes: 5
|
| 67 |
+
steps:
|
| 68 |
+
- uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
|
| 69 |
+
with:
|
| 70 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
.github/workflows/npm-publish.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: npm Publish
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- master
|
| 7 |
+
paths:
|
| 8 |
+
- '.github/workflows/npm-publish.yml'
|
| 9 |
+
- 'tsdown-lib.config.ts'
|
| 10 |
+
- 'scripts/workflow/build-routes.ts'
|
| 11 |
+
- 'lib/**'
|
| 12 |
+
|
| 13 |
+
permissions:
|
| 14 |
+
id-token: write # Required for OIDC
|
| 15 |
+
|
| 16 |
+
jobs:
|
| 17 |
+
build:
|
| 18 |
+
name: npm publish
|
| 19 |
+
if: github.repository == 'DIYgod/RSSHub'
|
| 20 |
+
runs-on: ubuntu-slim
|
| 21 |
+
timeout-minutes: 5
|
| 22 |
+
env:
|
| 23 |
+
HUSKY: 0
|
| 24 |
+
steps:
|
| 25 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 26 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 27 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 28 |
+
with:
|
| 29 |
+
node-version: lts/*
|
| 30 |
+
cache: 'pnpm'
|
| 31 |
+
registry-url: 'https://registry.npmjs.org'
|
| 32 |
+
- name: Install dependencies (pnpm)
|
| 33 |
+
run: pnpm i
|
| 34 |
+
- name: Run postinstall script for dependencies
|
| 35 |
+
run: pnpm rb
|
| 36 |
+
- name: Release
|
| 37 |
+
run: |
|
| 38 |
+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
| 39 |
+
git config --local user.name "github-actions[bot]"
|
| 40 |
+
pnpx version-from-git --allow-same-version --template 'master.short'
|
| 41 |
+
- name: Publish to npmjs
|
| 42 |
+
run: pnpm publish --access public --tag latest
|
.github/workflows/pr-review.yml
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: pr-review
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
workflow_run:
|
| 5 |
+
workflows: [PR - Docker build test]
|
| 6 |
+
types: [completed]
|
| 7 |
+
workflow_dispatch:
|
| 8 |
+
inputs:
|
| 9 |
+
pr_number:
|
| 10 |
+
description: Pull request number to review manually
|
| 11 |
+
required: true
|
| 12 |
+
type: number
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
review-pr:
|
| 16 |
+
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
|
| 17 |
+
runs-on: ubuntu-latest
|
| 18 |
+
timeout-minutes: 10
|
| 19 |
+
permissions:
|
| 20 |
+
contents: read
|
| 21 |
+
issues: write
|
| 22 |
+
pull-requests: write
|
| 23 |
+
steps:
|
| 24 |
+
- name: Checkout repository
|
| 25 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 26 |
+
|
| 27 |
+
# https://github.com/orgs/community/discussions/25220#discussioncomment-11316244
|
| 28 |
+
- name: Search the PR that triggered this workflow
|
| 29 |
+
if: github.event_name != 'workflow_dispatch'
|
| 30 |
+
id: source-run-info
|
| 31 |
+
env:
|
| 32 |
+
GH_TOKEN: ${{ github.token }}
|
| 33 |
+
PR_TARGET_REPO: ${{ github.repository }}
|
| 34 |
+
PR_BRANCH: |-
|
| 35 |
+
${{
|
| 36 |
+
(github.event.workflow_run.head_repository.owner.login != github.event.workflow_run.repository.owner.login)
|
| 37 |
+
&& format('{0}:{1}', github.event.workflow_run.head_repository.owner.login, github.event.workflow_run.head_branch)
|
| 38 |
+
|| github.event.workflow_run.head_branch
|
| 39 |
+
}}
|
| 40 |
+
run: |
|
| 41 |
+
gh pr view --repo "${PR_TARGET_REPO}" "${PR_BRANCH}" \
|
| 42 |
+
--json 'number' --jq '"number=\(.number)"' \
|
| 43 |
+
>> "${GITHUB_OUTPUT}"
|
| 44 |
+
|
| 45 |
+
- name: Check PR author
|
| 46 |
+
if: github.event_name != 'workflow_dispatch'
|
| 47 |
+
id: check-pr-author
|
| 48 |
+
env:
|
| 49 |
+
GH_TOKEN: ${{ github.token }}
|
| 50 |
+
PR_TARGET_REPO: ${{ github.repository }}
|
| 51 |
+
PR_NUMBER: ${{ steps.source-run-info.outputs.number }}
|
| 52 |
+
run: |
|
| 53 |
+
AUTHOR=$(gh pr view --repo "${PR_TARGET_REPO}" "${PR_NUMBER}" --json author --jq '.author.login')
|
| 54 |
+
echo "author=${AUTHOR}" >> "${GITHUB_OUTPUT}"
|
| 55 |
+
if [[ "${AUTHOR}" == "dependabot[bot]" || "${AUTHOR}" == "app/dependabot" ]]; then
|
| 56 |
+
echo "skip=true" >> "${GITHUB_OUTPUT}"
|
| 57 |
+
else
|
| 58 |
+
echo "skip=false" >> "${GITHUB_OUTPUT}"
|
| 59 |
+
fi
|
| 60 |
+
|
| 61 |
+
- name: Comment on failed Docker build
|
| 62 |
+
if: github.event_name != 'workflow_dispatch' && github.event.workflow_run.conclusion == 'failure'
|
| 63 |
+
env:
|
| 64 |
+
GH_TOKEN: ${{ github.token }}
|
| 65 |
+
PR_TARGET_REPO: ${{ github.repository }}
|
| 66 |
+
PR_NUMBER: ${{ steps.source-run-info.outputs.number }}
|
| 67 |
+
run: |
|
| 68 |
+
gh pr comment --repo "${PR_TARGET_REPO}" "${PR_NUMBER}" --body "<!-- pr-auto-review -->
|
| 69 |
+
## Auto Review
|
| 70 |
+
⚠️ PR review will proceed after the Docker image can be successfully built.
|
| 71 |
+
|
| 72 |
+
Please fix the Docker build test issues first."
|
| 73 |
+
|
| 74 |
+
- name: Set up Bun
|
| 75 |
+
if: github.event_name == 'workflow_dispatch' || (steps.check-pr-author.outputs.skip != 'true' && github.event.workflow_run.conclusion != 'failure')
|
| 76 |
+
uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2
|
| 77 |
+
|
| 78 |
+
- name: Install opencode
|
| 79 |
+
if: github.event_name == 'workflow_dispatch' || (steps.check-pr-author.outputs.skip != 'true' && github.event.workflow_run.conclusion != 'failure')
|
| 80 |
+
run: curl -fsSL https://opencode.ai/install | bash
|
| 81 |
+
|
| 82 |
+
- name: Review PR with rules
|
| 83 |
+
if: github.event_name == 'workflow_dispatch' || (steps.check-pr-author.outputs.skip != 'true' && github.event.workflow_run.conclusion != 'failure')
|
| 84 |
+
env:
|
| 85 |
+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
| 86 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 87 |
+
GITHUB_REPOSITORY: ${{ github.repository }}
|
| 88 |
+
PR_NUMBER: ${{ steps.source-run-info.outputs.number || inputs.pr_number }}
|
| 89 |
+
OPENCODE_PERMISSION: |
|
| 90 |
+
{
|
| 91 |
+
"bash": {
|
| 92 |
+
"*": "deny",
|
| 93 |
+
"gh auth*": "allow",
|
| 94 |
+
"gh pr*": "allow",
|
| 95 |
+
"gh api*": "allow"
|
| 96 |
+
},
|
| 97 |
+
"webfetch": "deny"
|
| 98 |
+
}
|
| 99 |
+
run: |
|
| 100 |
+
if [ -z "$PR_NUMBER" ]; then
|
| 101 |
+
echo "pr_number is required"
|
| 102 |
+
exit 1
|
| 103 |
+
fi
|
| 104 |
+
|
| 105 |
+
RULES=$(cat .github/prompts/pr_review_rules.md)
|
| 106 |
+
|
| 107 |
+
opencode run -m ${{ vars.OPENCODE_MODEL }} "A pull request has been created or updated in this repository.
|
| 108 |
+
|
| 109 |
+
Pull request number:
|
| 110 |
+
$PR_NUMBER
|
| 111 |
+
|
| 112 |
+
Repository:
|
| 113 |
+
$GITHUB_REPOSITORY
|
| 114 |
+
|
| 115 |
+
Your task:
|
| 116 |
+
1. Use GitHub CLI commands to inspect this PR's metadata and code changes.
|
| 117 |
+
2. Review only based on the following rules.
|
| 118 |
+
3. Report only clear and actionable violations from changed files.
|
| 119 |
+
4. If no clear violations are found, do not comment.
|
| 120 |
+
|
| 121 |
+
Review rules:
|
| 122 |
+
$RULES
|
| 123 |
+
|
| 124 |
+
Required behavior:
|
| 125 |
+
- Keep feedback concise and grouped by rule.
|
| 126 |
+
- Include file path and a concrete fix suggestion for each issue.
|
| 127 |
+
- Ignore uncertain or low-confidence findings.
|
| 128 |
+
- Avoid duplicate comments.
|
| 129 |
+
|
| 130 |
+
Comment protocol:
|
| 131 |
+
- Use marker: <!-- pr-auto-review -->
|
| 132 |
+
- Check existing comments in issue comments for this marker.
|
| 133 |
+
- If a marker comment exists, update it with latest findings.
|
| 134 |
+
- Otherwise create a new PR comment.
|
| 135 |
+
- If there are no findings and marker comment exists, edit marker comment to a short pass status.
|
| 136 |
+
|
| 137 |
+
Suggested comment format:
|
| 138 |
+
<!-- pr-auto-review -->
|
| 139 |
+
## Auto Review
|
| 140 |
+
- [Rule] file: issue + suggestion
|
| 141 |
+
|
| 142 |
+
For no findings:
|
| 143 |
+
<!-- pr-auto-review -->
|
| 144 |
+
## Auto Review
|
| 145 |
+
No clear rule violations found in the current diff.
|
| 146 |
+
|
| 147 |
+
Use only gh commands and repository data."
|
.github/workflows/semgrep.yml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Semgrep
|
| 2 |
+
|
| 3 |
+
# https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#sample-github-actions-configuration-file
|
| 4 |
+
on:
|
| 5 |
+
pull_request_target:
|
| 6 |
+
branches:
|
| 7 |
+
- master
|
| 8 |
+
push:
|
| 9 |
+
branches:
|
| 10 |
+
- master
|
| 11 |
+
schedule:
|
| 12 |
+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
| 13 |
+
- cron: 21 20 * * *
|
| 14 |
+
|
| 15 |
+
jobs:
|
| 16 |
+
semgrep:
|
| 17 |
+
name: Scan
|
| 18 |
+
runs-on: ubuntu-latest
|
| 19 |
+
container:
|
| 20 |
+
image: returntocorp/semgrep
|
| 21 |
+
if: (github.triggering_actor != 'dependabot[bot]')
|
| 22 |
+
permissions:
|
| 23 |
+
security-events: write
|
| 24 |
+
steps:
|
| 25 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 26 |
+
- run: semgrep ci --sarif > semgrep.sarif
|
| 27 |
+
env:
|
| 28 |
+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
| 29 |
+
- name: Upload SARIF file for GitHub Advanced Security Dashboard
|
| 30 |
+
uses: github/codeql-action/upload-sarif@v4
|
| 31 |
+
with:
|
| 32 |
+
sarif_file: semgrep.sarif
|
| 33 |
+
if: always()
|
.github/workflows/similar-issues.yml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: duplicate-issues
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
issues:
|
| 5 |
+
types: [opened]
|
| 6 |
+
workflow_dispatch:
|
| 7 |
+
inputs:
|
| 8 |
+
issue_number:
|
| 9 |
+
description: Issue number to check manually
|
| 10 |
+
required: true
|
| 11 |
+
type: number
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
check-duplicates:
|
| 15 |
+
runs-on: ubuntu-latest
|
| 16 |
+
permissions:
|
| 17 |
+
contents: read
|
| 18 |
+
issues: write
|
| 19 |
+
steps:
|
| 20 |
+
- name: Checkout repository
|
| 21 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 22 |
+
|
| 23 |
+
- name: Set up Bun
|
| 24 |
+
uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2.1.2
|
| 25 |
+
|
| 26 |
+
- name: Install opencode
|
| 27 |
+
run: curl -fsSL https://opencode.ai/install | bash
|
| 28 |
+
|
| 29 |
+
- name: Check for duplicate issues
|
| 30 |
+
env:
|
| 31 |
+
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
| 32 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 33 |
+
ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue_number }}
|
| 34 |
+
OPENCODE_PERMISSION: |
|
| 35 |
+
{
|
| 36 |
+
"bash": {
|
| 37 |
+
"*": "deny",
|
| 38 |
+
"gh issue*": "allow"
|
| 39 |
+
},
|
| 40 |
+
"webfetch": "deny"
|
| 41 |
+
}
|
| 42 |
+
run: |
|
| 43 |
+
if [ -z "$ISSUE_NUMBER" ]; then
|
| 44 |
+
echo "issue_number is required"
|
| 45 |
+
exit 1
|
| 46 |
+
fi
|
| 47 |
+
|
| 48 |
+
opencode run -m ${{ vars.OPENCODE_MODEL }} "A new issue has been created:'
|
| 49 |
+
|
| 50 |
+
Issue number:
|
| 51 |
+
$ISSUE_NUMBER
|
| 52 |
+
|
| 53 |
+
Lookup this issue and search through existing issues (excluding #$ISSUE_NUMBER) in this repository to find any potential duplicates of this new issue.
|
| 54 |
+
Consider:
|
| 55 |
+
1. Similar titles or descriptions
|
| 56 |
+
2. Same error messages or symptoms
|
| 57 |
+
3. Related functionality or components
|
| 58 |
+
4. Similar feature requests
|
| 59 |
+
|
| 60 |
+
If you find any potential duplicates, please comment on the new issue with:
|
| 61 |
+
- A brief explanation of why it might be a duplicate
|
| 62 |
+
- Links to the potentially duplicate issues
|
| 63 |
+
- A suggestion to check those issues first
|
| 64 |
+
|
| 65 |
+
Use this format for the comment:
|
| 66 |
+
'This issue might be a duplicate of existing issues. Please check:
|
| 67 |
+
- #[issue_number]: [brief description of similarity]
|
| 68 |
+
|
| 69 |
+
Feel free to ignore if none of these address your specific case.'
|
| 70 |
+
|
| 71 |
+
If no clear duplicates are found, do not comment."
|
.github/workflows/stale.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: 'Close stale issues and PRs'
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: '31 23 * * *'
|
| 6 |
+
|
| 7 |
+
permissions:
|
| 8 |
+
issues: write
|
| 9 |
+
pull-requests: write
|
| 10 |
+
|
| 11 |
+
jobs:
|
| 12 |
+
stale:
|
| 13 |
+
runs-on: ubuntu-slim
|
| 14 |
+
steps:
|
| 15 |
+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
|
| 16 |
+
with:
|
| 17 |
+
# Don't stale issues
|
| 18 |
+
days-before-issue-stale: -1
|
| 19 |
+
days-before-pr-stale: 23
|
| 20 |
+
days-before-close: 7
|
| 21 |
+
stale-pr-message: >
|
| 22 |
+
This PR is stale because it has been opened for more than 3 weeks with no activity. Comment or this will be closed in 7 days.
|
| 23 |
+
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
|
| 24 |
+
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
|
| 25 |
+
exempt-issue-labels: 'wait for upstream'
|
| 26 |
+
exempt-pr-labels: 'wait for upstream'
|
| 27 |
+
any-of-issue-labels: 'more data required'
|
| 28 |
+
lock:
|
| 29 |
+
runs-on: ubuntu-slim
|
| 30 |
+
steps:
|
| 31 |
+
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
|
| 32 |
+
with:
|
| 33 |
+
github-token: ${{ github.token }}
|
| 34 |
+
process-only: 'prs'
|
| 35 |
+
pr-inactive-days: '30'
|
| 36 |
+
pr-comment: >
|
| 37 |
+
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
|
.github/workflows/test-full-routes.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Build assets (Full Routes Test Result)
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
workflow_dispatch:
|
| 5 |
+
schedule:
|
| 6 |
+
- cron: '0 0 * * *'
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
build:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
name: Build assets
|
| 12 |
+
timeout-minutes: 120
|
| 13 |
+
permissions:
|
| 14 |
+
contents: write
|
| 15 |
+
steps:
|
| 16 |
+
- name: Checkout
|
| 17 |
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 18 |
+
- name: Install pnpm
|
| 19 |
+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 20 |
+
- name: Use Node.js Active LTS
|
| 21 |
+
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 22 |
+
with:
|
| 23 |
+
node-version: lts/*
|
| 24 |
+
cache: 'pnpm'
|
| 25 |
+
- name: Install dependencies (yarn)
|
| 26 |
+
run: pnpm i
|
| 27 |
+
- name: Build assets
|
| 28 |
+
run: pnpm build
|
| 29 |
+
- name: Build full routes test result
|
| 30 |
+
continue-on-error: true
|
| 31 |
+
run: pnpm vitest:fullroutes
|
| 32 |
+
- name: Deploy
|
| 33 |
+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
|
| 34 |
+
with:
|
| 35 |
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
| 36 |
+
publish_dir: ./assets
|
| 37 |
+
user_name: 'github-actions[bot]'
|
| 38 |
+
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
|
| 39 |
+
keep_files: true
|
.github/workflows/test.yml
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Test
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches-ignore:
|
| 6 |
+
- 'dependabot/**'
|
| 7 |
+
paths:
|
| 8 |
+
- 'lib/**'
|
| 9 |
+
- 'package.json'
|
| 10 |
+
- 'pnpm-lock.yaml'
|
| 11 |
+
- '.github/workflows/test.yml'
|
| 12 |
+
pull_request: {}
|
| 13 |
+
|
| 14 |
+
permissions:
|
| 15 |
+
checks: write
|
| 16 |
+
|
| 17 |
+
jobs:
|
| 18 |
+
vitest:
|
| 19 |
+
runs-on: ubuntu-latest
|
| 20 |
+
timeout-minutes: 10
|
| 21 |
+
services:
|
| 22 |
+
redis:
|
| 23 |
+
image: redis
|
| 24 |
+
ports:
|
| 25 |
+
- 6379/tcp
|
| 26 |
+
options: --entrypoint redis-server
|
| 27 |
+
strategy:
|
| 28 |
+
fail-fast: false
|
| 29 |
+
matrix:
|
| 30 |
+
node-version: [latest, lts/*, lts/-1]
|
| 31 |
+
name: Vitest on Node ${{ matrix.node-version }}
|
| 32 |
+
steps:
|
| 33 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 34 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 35 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 36 |
+
with:
|
| 37 |
+
node-version: ${{ matrix.node-version }}
|
| 38 |
+
cache: 'pnpm'
|
| 39 |
+
- name: Install dependencies (pnpm)
|
| 40 |
+
run: pnpm i
|
| 41 |
+
- name: Run postinstall script for dependencies
|
| 42 |
+
run: pnpm rb && pnpx rebrowser-puppeteer browsers install chrome
|
| 43 |
+
- name: Build routes
|
| 44 |
+
run: pnpm build
|
| 45 |
+
- name: Build worker routes
|
| 46 |
+
run: WORKER_BUILD=true pnpm build:routes
|
| 47 |
+
- name: Build worker
|
| 48 |
+
run: pnpm worker-build
|
| 49 |
+
- name: Test all and generate coverage
|
| 50 |
+
run: pnpm run vitest:coverage --reporter=github-actions
|
| 51 |
+
env:
|
| 52 |
+
REDIS_URL: redis://localhost:${{ job.services.redis.ports['6379'] }}/
|
| 53 |
+
- name: Upload coverage to Codecov
|
| 54 |
+
if: ${{ matrix.node-version == 'lts/*' }}
|
| 55 |
+
uses: codecov/codecov-action@v5
|
| 56 |
+
with:
|
| 57 |
+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken
|
| 58 |
+
|
| 59 |
+
puppeteer:
|
| 60 |
+
runs-on: ubuntu-latest
|
| 61 |
+
timeout-minutes: 10
|
| 62 |
+
strategy:
|
| 63 |
+
fail-fast: false
|
| 64 |
+
matrix:
|
| 65 |
+
node-version: [latest, lts/*, lts/-1]
|
| 66 |
+
chromium:
|
| 67 |
+
- name: bundled Chromium
|
| 68 |
+
dependency: ''
|
| 69 |
+
environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "0" }'
|
| 70 |
+
- name: Chromium from Ubuntu
|
| 71 |
+
dependency: chromium-browser
|
| 72 |
+
environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "1" }'
|
| 73 |
+
- name: Chrome from Google
|
| 74 |
+
dependency: google-chrome-stable
|
| 75 |
+
environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "1" }'
|
| 76 |
+
name: Vitest puppeteer on Node ${{ matrix.node-version }} with ${{ matrix.chromium.name }}
|
| 77 |
+
steps:
|
| 78 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 79 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 80 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 81 |
+
with:
|
| 82 |
+
node-version: ${{ matrix.node-version }}
|
| 83 |
+
cache: 'pnpm'
|
| 84 |
+
- name: Install dependencies (pnpm)
|
| 85 |
+
run: pnpm i
|
| 86 |
+
env: ${{ fromJSON(matrix.chromium.environment) }}
|
| 87 |
+
- name: Run postinstall script for dependencies
|
| 88 |
+
run: pnpm rb && pnpx rebrowser-puppeteer browsers install chrome
|
| 89 |
+
env: ${{ fromJSON(matrix.chromium.environment) }}
|
| 90 |
+
- name: Build routes
|
| 91 |
+
run: pnpm build
|
| 92 |
+
env: ${{ fromJSON(matrix.chromium.environment) }}
|
| 93 |
+
- name: Install Chromium
|
| 94 |
+
if: ${{ matrix.chromium.dependency != '' }}
|
| 95 |
+
# 'chromium-browser' from Ubuntu APT repo is a dummy package. Its version (85.0.4183.83) means
|
| 96 |
+
# nothing since it calls Snap (disgusting!) to install Chromium, which should be up-to-date.
|
| 97 |
+
# That's not really a problem since the Chromium-bundled Docker image is based on Debian bookworm,
|
| 98 |
+
# which provides up-to-date native packages.
|
| 99 |
+
run: |
|
| 100 |
+
set -eux
|
| 101 |
+
curl -s "https://dl.google.com/linux/linux_signing_key.pub" | gpg --dearmor |
|
| 102 |
+
sudo tee /etc/apt/trusted.gpg.d/google-chrome.gpg > /dev/null
|
| 103 |
+
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" |
|
| 104 |
+
sudo tee /etc/apt/sources.list.d/google-chrome.list > /dev/null
|
| 105 |
+
sudo apt-get update
|
| 106 |
+
sudo apt-get install -yq --no-install-recommends ${{ matrix.chromium.dependency }}
|
| 107 |
+
- name: Test puppeteer
|
| 108 |
+
run: |
|
| 109 |
+
set -eux
|
| 110 |
+
export CHROMIUM_EXECUTABLE_PATH="$(which ${{ matrix.chromium.dependency }})"
|
| 111 |
+
pnpm run vitest puppeteer
|
| 112 |
+
env: ${{ fromJSON(matrix.chromium.environment) }}
|
| 113 |
+
|
| 114 |
+
all:
|
| 115 |
+
runs-on: ubuntu-latest
|
| 116 |
+
timeout-minutes: 5
|
| 117 |
+
permissions:
|
| 118 |
+
attestations: write
|
| 119 |
+
strategy:
|
| 120 |
+
fail-fast: false
|
| 121 |
+
matrix:
|
| 122 |
+
node-version: [24, 22, 20]
|
| 123 |
+
name: Build radar and maintainer on Node ${{ matrix.node-version }}
|
| 124 |
+
steps:
|
| 125 |
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
| 126 |
+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
| 127 |
+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
|
| 128 |
+
with:
|
| 129 |
+
node-version: ${{ matrix.node-version }}
|
| 130 |
+
cache: 'pnpm'
|
| 131 |
+
- run: pnpm i
|
| 132 |
+
- name: Build radar and maintainer
|
| 133 |
+
run: npm run build
|
| 134 |
+
- name: Upload assets
|
| 135 |
+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
|
| 136 |
+
with:
|
| 137 |
+
name: generated-assets-${{ matrix.node-version }}
|
| 138 |
+
path: assets/build/
|
| 139 |
+
|
| 140 |
+
automerge:
|
| 141 |
+
if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request'
|
| 142 |
+
needs: [vitest, puppeteer, all]
|
| 143 |
+
runs-on: ubuntu-slim
|
| 144 |
+
permissions:
|
| 145 |
+
pull-requests: write
|
| 146 |
+
contents: write
|
| 147 |
+
steps:
|
| 148 |
+
- uses: fastify/github-action-merge-dependabot@1b2ed42db8f9d81a46bac83adedfc03eb5149dff # v3.11.2
|
| 149 |
+
with:
|
| 150 |
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
| 151 |
+
target: patch
|
.gitignore
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.DS_Store
|
| 2 |
+
.cursorrules
|
| 3 |
+
.devenv
|
| 4 |
+
.direnv
|
| 5 |
+
.env
|
| 6 |
+
.eslintcache
|
| 7 |
+
.idea
|
| 8 |
+
.pre-commit-config.yaml
|
| 9 |
+
.log
|
| 10 |
+
.now
|
| 11 |
+
.roomodes
|
| 12 |
+
.vercel
|
| 13 |
+
.vscode
|
| 14 |
+
.windsurfrules
|
| 15 |
+
.yarn
|
| 16 |
+
.yarnrc.yml
|
| 17 |
+
.pnp*
|
| 18 |
+
|
| 19 |
+
*.swp
|
| 20 |
+
*.iml
|
| 21 |
+
|
| 22 |
+
app-minimal/
|
| 23 |
+
assets/build/
|
| 24 |
+
coverage
|
| 25 |
+
docs/.vuepress/dist
|
| 26 |
+
memory-bank/
|
| 27 |
+
node_modules
|
| 28 |
+
tmp
|
| 29 |
+
dist
|
| 30 |
+
dist-lib
|
| 31 |
+
dist-worker
|
| 32 |
+
.wrangler
|
| 33 |
+
|
| 34 |
+
Session.vim
|
| 35 |
+
combined.log
|
| 36 |
+
dump.rdb
|
| 37 |
+
error.log
|
| 38 |
+
npm-debug.log
|
| 39 |
+
package-lock.json
|
| 40 |
+
# pnpm-lock.yaml
|
| 41 |
+
yarn.lock
|
| 42 |
+
yarn-error.log
|
| 43 |
+
|
| 44 |
+
dist-container
|
.husky/pre-commit
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
lint-staged
|
.idx/dev.nix
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# To learn more about how to use Nix to configure your environment
|
| 2 |
+
# see: https://firebase.google.com/docs/studio/customize-workspace
|
| 3 |
+
{ pkgs, ... }: {
|
| 4 |
+
# Which nixpkgs channel to use.
|
| 5 |
+
channel = "unstable"; # or "unstable"
|
| 6 |
+
|
| 7 |
+
# Use https://search.nixos.org/packages to find packages
|
| 8 |
+
packages = [
|
| 9 |
+
# pkgs.go
|
| 10 |
+
# pkgs.python311
|
| 11 |
+
# pkgs.python311Packages.pip
|
| 12 |
+
pkgs.nodejs_22
|
| 13 |
+
pkgs.pnpm_9
|
| 14 |
+
# pkgs.nodePackages.nodemon
|
| 15 |
+
pkgs.cacert
|
| 16 |
+
pkgs.valkey
|
| 17 |
+
];
|
| 18 |
+
|
| 19 |
+
# Sets environment variables in the workspace
|
| 20 |
+
env = {};
|
| 21 |
+
idx = {
|
| 22 |
+
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
|
| 23 |
+
extensions = [
|
| 24 |
+
"cweijan.vscode-database-client2"
|
| 25 |
+
"dbaeumer.vscode-eslint"
|
| 26 |
+
"eamodio.gitlens"
|
| 27 |
+
"EditorConfig.EditorConfig"
|
| 28 |
+
"oxc.oxc-vscode"
|
| 29 |
+
"sonarsource.sonarlint-vscode"
|
| 30 |
+
];
|
| 31 |
+
|
| 32 |
+
# Enable previews
|
| 33 |
+
previews = {
|
| 34 |
+
enable = true;
|
| 35 |
+
previews = {
|
| 36 |
+
# web = {
|
| 37 |
+
# # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
|
| 38 |
+
# # and show it in IDX's web preview panel
|
| 39 |
+
# command = ["npm" "run" "dev"];
|
| 40 |
+
# manager = "web";
|
| 41 |
+
# env = {
|
| 42 |
+
# # Environment variables to set for your server
|
| 43 |
+
# PORT = "$PORT";
|
| 44 |
+
# };
|
| 45 |
+
# };
|
| 46 |
+
};
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
# Workspace lifecycle hooks
|
| 50 |
+
workspace = {
|
| 51 |
+
# Runs when a workspace is first created
|
| 52 |
+
onCreate = {
|
| 53 |
+
# Example: install JS dependencies from NPM
|
| 54 |
+
pnpm-install = "pnpm i && pnpm rb && pnpx rebrowser-puppeteer browsers install chrome";
|
| 55 |
+
};
|
| 56 |
+
# Runs when the workspace is (re)started
|
| 57 |
+
onStart = {
|
| 58 |
+
# Example: start a background task to watch and re-build backend code
|
| 59 |
+
# watch-backend = "npm run watch-backend";
|
| 60 |
+
};
|
| 61 |
+
};
|
| 62 |
+
};
|
| 63 |
+
}
|
.npmrc
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
package-lock=true
|
| 2 |
+
package-manager-strict=false
|
.oxfmtrc.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
| 3 |
+
"printWidth": 233,
|
| 4 |
+
"tabWidth": 4,
|
| 5 |
+
"singleQuote": true,
|
| 6 |
+
"trailingComma": "es5",
|
| 7 |
+
"arrowParens": "always",
|
| 8 |
+
"ignorePatterns": ["lib/routes-deprecated", "lib/router.js", "babel.config.js", "scripts/docker/minify-docker.js", "dist", "pnpm-lock.yaml"],
|
| 9 |
+
"experimentalSortPackageJson": {
|
| 10 |
+
"sortScripts": true
|
| 11 |
+
}
|
| 12 |
+
}
|
.puppeteerrc.cjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const path = require('node:path');
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* @type {import("puppeteer").Configuration}
|
| 5 |
+
*/
|
| 6 |
+
module.exports = {
|
| 7 |
+
// Changes the cache location for Puppeteer.
|
| 8 |
+
cacheDirectory: path.join(__dirname, 'node_modules', '.cache', 'puppeteer'),
|
| 9 |
+
};
|
AGENTS.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Review guidelines
|
| 2 |
+
|
| 3 |
+
### Route Configuration
|
| 4 |
+
|
| 5 |
+
1. **Example Format**: The `example` field must start with `/` and be a working RSSHub route path (e.g., `/example/route`), not a full URL or source website URL.
|
| 6 |
+
|
| 7 |
+
2. **Route Name**: Do NOT repeat the namespace name in the route name. The namespace is already defined in `namespace.ts`.
|
| 8 |
+
|
| 9 |
+
3. **Radar Source Format**: Use relative paths without `https://` prefix in `radar[]. source`. Example: `source: ['www.example.com/path']` instead of `source: ['https://www.example.com/path']`.
|
| 10 |
+
|
| 11 |
+
4. **Radar Target**: The `radar[].target` must match the route path. If the source URL does not contain a path parameter, do not include it in the target.
|
| 12 |
+
|
| 13 |
+
5. **Namespace URL**: In `namespace.ts`, the `url` field should NOT include the `https://` protocol prefix.
|
| 14 |
+
|
| 15 |
+
6. **Single Category**: Provide only ONE category in the `categories` array, not multiple.
|
| 16 |
+
|
| 17 |
+
7. **Unnecessary Files**: Do NOT create separate `README.md` or `radar.ts` files. Put descriptions in `Route['description']` and radar rules in `Route['radar']`.
|
| 18 |
+
|
| 19 |
+
8. **Legacy Router**: Do NOT add routes to `lib/router.js` - this file is deprecated.
|
| 20 |
+
|
| 21 |
+
9. **Features Accuracy**: Set `requirePuppeteer: true` only if your route actually uses Puppeteer. Do not mismatch feature flags.
|
| 22 |
+
|
| 23 |
+
10. **Maintainer GitHub ID**: The `maintainers` field must contain valid GitHub usernames. Verify that the username exists before adding it.
|
| 24 |
+
|
| 25 |
+
### Code Style
|
| 26 |
+
|
| 27 |
+
11. **Naming Convention**: Use `camelCase` for variable names in JavaScript/TypeScript. Avoid `snake_case` (e.g., use `videoUrl` instead of `video_url`).
|
| 28 |
+
|
| 29 |
+
12. **Type Imports**: Use `import type { ... }` for type-only imports instead of `import { ... }`.
|
| 30 |
+
|
| 31 |
+
13. **Import Sorting**: Keep imports sorted. Run autofix if linter reports import order issues.
|
| 32 |
+
|
| 33 |
+
14. **Unnecessary Template Literals**: Do not use template literals when simple strings suffice (e.g., use `'plain string'` instead of `` `plain string` ``).
|
| 34 |
+
|
| 35 |
+
15. **Avoid Loading HTML Twice**: Do not call `load()` from cheerio multiple times on the same content. Reuse the initial `$` object.
|
| 36 |
+
|
| 37 |
+
16. **Async/Await in Close**: When closing Puppeteer pages/browsers, use `await page.close()` and `await browser.close()` instead of non-awaited calls.
|
| 38 |
+
|
| 39 |
+
17. **No Explicit Null**: No need to explicitly set a property to `null` if it does not exist - just omit it.
|
| 40 |
+
|
| 41 |
+
18. **Valid Item Properties**: Only use properties defined in [lib/types. ts](https://github.com/DIYgod/RSSHub/blob/master/lib/types.ts). Custom properties like `avatar`, `bio` will be ignored by RSSHub.
|
| 42 |
+
|
| 43 |
+
19. **String Methods**: Use `startsWith()` instead of `includes()` when checking if a string begins with a specific prefix.
|
| 44 |
+
|
| 45 |
+
20. **Simplify Code**: Combine multiple conditional assignments into single expressions using `||` or `??` operators when appropriate.
|
| 46 |
+
|
| 47 |
+
### Data Handling
|
| 48 |
+
|
| 49 |
+
21. **Use Cache**: Always [cache](https://docs.rsshub.app/joinus/advanced/use-cache) the returned results when fetching article details in a loop using `cache.tryGet()`.
|
| 50 |
+
|
| 51 |
+
22. **Description Content**: The `description` field should contain ONLY the main article content. Do NOT include `title`, `author`, `pubDate`, or tags in `description` - they have their own dedicated fields.
|
| 52 |
+
|
| 53 |
+
23. **Category Field**: Extract tags/categories from articles and place them in the `category` field, not in `description`.
|
| 54 |
+
|
| 55 |
+
24. **pubDate Field**: Always include `pubDate` when the source provides date/time information. Use the `parseDate` utility function.
|
| 56 |
+
|
| 57 |
+
25. **No Fake Dates**: Do NOT use `new Date()` as a fallback for `pubDate`. If no date is available, leave it undefined. See [No Date documentation](https://docs.rsshub.app/joinus/advanced/pub-date#no-date).
|
| 58 |
+
|
| 59 |
+
26. **No Title Trimming**: Do not manually trim or truncate titles. RSSHub core handles title processing automatically.
|
| 60 |
+
|
| 61 |
+
27. **Unique Links**: Ensure each item's `link` is unique as it will be used as `guid`. Avoid fallback URLs that could cause duplicate `guid` values.
|
| 62 |
+
|
| 63 |
+
28. **Human-Readable Links**: The feed `link` field should point to a human-readable webpage URL, NOT an API endpoint URL.
|
| 64 |
+
|
| 65 |
+
### API and Data Fetching
|
| 66 |
+
|
| 67 |
+
29. **Prefer APIs Over Scraping**: When the target website has an API (often found by scrolling pages or checking network requests), use the API endpoint instead of HTML scraping.
|
| 68 |
+
|
| 69 |
+
30. **JSON Parsing**: When using `ofetch`, `JSON.parse` is automatically applied. Do not manually decode JSON escape sequences like `\u003C`.
|
| 70 |
+
|
| 71 |
+
31. **No Page Turning**: RSS feeds should only request the first page of content. Do not implement pagination parameters for users.
|
| 72 |
+
|
| 73 |
+
32. **Use Common Parameters**: Use RSSHub's built-in common parameters like [`limit`](https://docs.rsshub.app/guide/parameters#limit-entries) instead of implementing custom query parameters for limiting entries.
|
| 74 |
+
|
| 75 |
+
33. **No Custom Query Parameters**: Avoid using querystring parameters for route configuration. Use path parameters (`:param`) instead.
|
| 76 |
+
|
| 77 |
+
34. **No Custom Filtering**: Do not implement custom tag/category filtering in routes. Users can apply filtering using [common parameters](https://docs.rsshub.app/guide/parameters).
|
| 78 |
+
|
| 79 |
+
35. **Avoid Dynamic Hashes**: If an API requires a hash that changes across builds, extract it dynamically from the webpage rather than hardcoding it.
|
| 80 |
+
|
| 81 |
+
36. **User-Agent**: Use RSSHub's built-in [User-Agent](https://github.com/DIYgod/RSSHub/blob/master/lib/config.ts#L494) (`config.trueUA`) when making requests that need realistic browser headers.
|
| 82 |
+
|
| 83 |
+
### Media and Enclosures
|
| 84 |
+
|
| 85 |
+
37. **Valid MIME Types**: The `enclosure_type` must be a valid MIME type as defined in RFC specifications. For example, `video/youtube` is NOT valid - use actual video file URLs with proper types like `video/mp4`.
|
| 86 |
+
|
| 87 |
+
38. **Direct Media URLs**: `enclosure_url` must point directly to downloadable media files (e.g., `.mp4`, `.mp3`), not to web pages containing media.
|
| 88 |
+
|
| 89 |
+
39. **Video Poster**: Use the HTML5 `<video>` element's `poster` attribute for video thumbnails instead of adding separate `<img>` elements.
|
| 90 |
+
|
| 91 |
+
40. **No Referrer Policy in Routes**: Do not add `referrerpolicy` attributes to images/videos - RSSHub middleware handles this automatically.
|
| 92 |
+
|
| 93 |
+
### Puppeteer Usage
|
| 94 |
+
|
| 95 |
+
41. **Limit Request Types**: Do not allow every type of request through Puppeteer. Explicitly provide a list of allowed request types (e.g., `document`) to avoid wasting resources on images, scripts, etc.
|
| 96 |
+
|
| 97 |
+
42. **Use Selectors, Not Delays**: Do not use fixed `setTimeout` delays. Use `page.waitForSelector()` instead to wait for specific elements.
|
| 98 |
+
|
| 99 |
+
43. **Avoid Multiple Sessions**: Do not call Puppeteer inside `Promise.all()` loops - this creates multiple browser sessions and dramatically increases resource usage.
|
| 100 |
+
|
| 101 |
+
44. **Do Not Bypass Empty Checks**: Do not return empty arrays with custom messages to bypass RSSHub's [internal checks](https://github.com/DIYgod/RSSHub/blob/master/lib/middleware/parameter. ts#L72) for empty items. This makes it hard for users and maintainers to know if a feed is broken.
|
| 102 |
+
|
| 103 |
+
### Default Values and Examples
|
| 104 |
+
|
| 105 |
+
45. **Preserve Default Values**: Do not change documented default values for existing route parameters unless the current default is broken.
|
| 106 |
+
|
| 107 |
+
46. **Preserve Working Examples**: Do not modify existing route examples unless they no longer work.
|
| 108 |
+
|
| 109 |
+
47. **Route Parameters**: The `parameters` object keys must match the actual path parameters defined in the route path. Do not add non-existent parameters.
|
| 110 |
+
|
| 111 |
+
### Error Handling
|
| 112 |
+
|
| 113 |
+
48. **Error Messages**: Use clear, actionable error messages that help users understand what went wrong.
|
| 114 |
+
|
| 115 |
+
49. **Resolve All Review Comments**: Before requesting re-review, ensure ALL previous review comments are addressed, not just some of them.
|
| 116 |
+
|
| 117 |
+
### Code Organization
|
| 118 |
+
|
| 119 |
+
50. **Move Functions Up**: Move function definitions to the highest possible scope. Avoid defining functions inside loops or callbacks when they can be defined at module level.
|
| 120 |
+
|
| 121 |
+
51. **No Await in Loops**: Avoid using `await` inside loops when possible. Use `Promise.all()` with proper concurrency control instead.
|
| 122 |
+
|
| 123 |
+
52. **Check URL Validity**: Before using URLs from config files or namespaces, verify they don't return 404 errors.
|
| 124 |
+
|
| 125 |
+
53. **Comments Language**: Write code comments in English for consistency and accessibility.
|
| 126 |
+
|
| 127 |
+
54. **Parentheses in Arrow Functions**: Always use parentheses around arrow function parameters, even for single parameters.
|
CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Contributor Covenant Code of Conduct
|
| 2 |
+
|
| 3 |
+
## Our Pledge
|
| 4 |
+
|
| 5 |
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
| 6 |
+
|
| 7 |
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
| 8 |
+
|
| 9 |
+
## Our Standards
|
| 10 |
+
|
| 11 |
+
Examples of behavior that contributes to a positive environment for our community include:
|
| 12 |
+
|
| 13 |
+
- Demonstrating empathy and kindness toward other people
|
| 14 |
+
- Being respectful of differing opinions, viewpoints, and experiences
|
| 15 |
+
- Giving and gracefully accepting constructive feedback
|
| 16 |
+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
| 17 |
+
- Focusing on what is best not just for us as individuals, but for the overall community
|
| 18 |
+
|
| 19 |
+
Examples of unacceptable behavior include:
|
| 20 |
+
|
| 21 |
+
- The use of sexualized language or imagery, and sexual attention or
|
| 22 |
+
advances of any kind
|
| 23 |
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
| 24 |
+
- Public or private harassment
|
| 25 |
+
- Publishing others' private information, such as a physical or email
|
| 26 |
+
address, without their explicit permission
|
| 27 |
+
- Other conduct which could reasonably be considered inappropriate in a
|
| 28 |
+
professional setting
|
| 29 |
+
|
| 30 |
+
## Enforcement Responsibilities
|
| 31 |
+
|
| 32 |
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
| 33 |
+
|
| 34 |
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
| 35 |
+
|
| 36 |
+
## Scope
|
| 37 |
+
|
| 38 |
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
| 39 |
+
|
| 40 |
+
## Enforcement
|
| 41 |
+
|
| 42 |
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at <i@diygod.me>. All complaints will be reviewed and investigated promptly and fairly.
|
| 43 |
+
|
| 44 |
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
| 45 |
+
|
| 46 |
+
## Enforcement Guidelines
|
| 47 |
+
|
| 48 |
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
| 49 |
+
|
| 50 |
+
### 1. Correction
|
| 51 |
+
|
| 52 |
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
| 53 |
+
|
| 54 |
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
| 55 |
+
|
| 56 |
+
### 2. Warning
|
| 57 |
+
|
| 58 |
+
**Community Impact**: A violation through a single incident or series of actions.
|
| 59 |
+
|
| 60 |
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
| 61 |
+
|
| 62 |
+
### 3. Temporary Ban
|
| 63 |
+
|
| 64 |
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
| 65 |
+
|
| 66 |
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
| 67 |
+
|
| 68 |
+
### 4. Permanent Ban
|
| 69 |
+
|
| 70 |
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
| 71 |
+
|
| 72 |
+
**Consequence**: A permanent ban from any sort of public interaction within the project community.
|
| 73 |
+
|
| 74 |
+
## Attribution
|
| 75 |
+
|
| 76 |
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
| 77 |
+
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
|
| 78 |
+
|
| 79 |
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
| 80 |
+
|
| 81 |
+
[homepage]: https://www.contributor-covenant.org
|
| 82 |
+
|
| 83 |
+
For answers to common questions about this code of conduct, see the FAQ at
|
| 84 |
+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
|
CONTRIBUTING.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
## Please refer to [Join Us](https://docs.rsshub.app/joinus/)
|
Dockerfile
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:24-bookworm AS dep-builder
|
| 2 |
+
# Here we use the non-slim image to provide build-time deps (compilers and python), thus no need to install later.
|
| 3 |
+
# This effectively speeds up qemu-based cross-build.
|
| 4 |
+
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# place ARG statement before RUN statement which need it to avoid cache miss
|
| 8 |
+
ARG USE_CHINA_NPM_REGISTRY=0
|
| 9 |
+
RUN \
|
| 10 |
+
set -ex && \
|
| 11 |
+
corepack enable pnpm && \
|
| 12 |
+
if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
|
| 13 |
+
echo 'use npm mirror' && \
|
| 14 |
+
npm config set registry https://registry.npmmirror.com && \
|
| 15 |
+
yarn config set registry https://registry.npmmirror.com && \
|
| 16 |
+
pnpm config set registry https://registry.npmmirror.com ; \
|
| 17 |
+
fi;
|
| 18 |
+
|
| 19 |
+
COPY ./tsconfig.json /app/
|
| 20 |
+
COPY ./patches /app/patches
|
| 21 |
+
COPY ./pnpm-lock.yaml /app/
|
| 22 |
+
COPY ./package.json /app/
|
| 23 |
+
|
| 24 |
+
# lazy install Chromium to avoid cache miss, only install production dependencies to minimize the image size
|
| 25 |
+
RUN \
|
| 26 |
+
set -ex && \
|
| 27 |
+
export PUPPETEER_SKIP_DOWNLOAD=true && \
|
| 28 |
+
pnpm install --frozen-lockfile && \
|
| 29 |
+
pnpm rb
|
| 30 |
+
|
| 31 |
+
# ---------------------------------------------------------------------------------------------------------------------
|
| 32 |
+
|
| 33 |
+
FROM debian:bookworm-slim AS dep-version-parser
|
| 34 |
+
# This stage is necessary to limit the cache miss scope.
|
| 35 |
+
# With this stage, any modification to package.json won't break the build cache of the next two stages as long as the
|
| 36 |
+
# version unchanged.
|
| 37 |
+
# node:24-bookworm-slim is based on debian:bookworm-slim so this stage would not cause any additional download.
|
| 38 |
+
|
| 39 |
+
WORKDIR /ver
|
| 40 |
+
COPY ./package.json /app/
|
| 41 |
+
RUN \
|
| 42 |
+
set -ex && \
|
| 43 |
+
grep -Po '(?<="rebrowser-puppeteer": ")[^\s"]*(?=")' /app/package.json | tee /ver/.puppeteer_version && \
|
| 44 |
+
grep -Po '(?<="@vercel/nft": ")[^\s"]*(?=")' /app/package.json | tee /ver/.nft_version && \
|
| 45 |
+
grep -Po '(?<="fs-extra": ")[^\s"]*(?=")' /app/package.json | tee /ver/.fs_extra_version
|
| 46 |
+
|
| 47 |
+
# ---------------------------------------------------------------------------------------------------------------------
|
| 48 |
+
|
| 49 |
+
FROM node:24-bookworm-slim AS docker-minifier
|
| 50 |
+
# The stage is used to further reduce the image size by removing unused files.
|
| 51 |
+
|
| 52 |
+
WORKDIR /minifier
|
| 53 |
+
COPY --from=dep-version-parser /ver/* /minifier/
|
| 54 |
+
|
| 55 |
+
ARG USE_CHINA_NPM_REGISTRY=0
|
| 56 |
+
RUN \
|
| 57 |
+
set -ex && \
|
| 58 |
+
if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
|
| 59 |
+
npm config set registry https://registry.npmmirror.com && \
|
| 60 |
+
yarn config set registry https://registry.npmmirror.com && \
|
| 61 |
+
pnpm config set registry https://registry.npmmirror.com ; \
|
| 62 |
+
fi; \
|
| 63 |
+
npm install -g corepack@latest && \
|
| 64 |
+
corepack enable pnpm && \
|
| 65 |
+
pnpm add @vercel/nft@$(cat .nft_version) fs-extra@$(cat .fs_extra_version) --save-prod
|
| 66 |
+
|
| 67 |
+
COPY . /app
|
| 68 |
+
COPY --from=dep-builder /app /app
|
| 69 |
+
|
| 70 |
+
WORKDIR /app
|
| 71 |
+
RUN \
|
| 72 |
+
set -ex && \
|
| 73 |
+
pnpm build && \
|
| 74 |
+
rm -rf /app/lib && \
|
| 75 |
+
cp /app/scripts/docker/minify-docker.js /minifier/ && \
|
| 76 |
+
export PROJECT_ROOT=/app && \
|
| 77 |
+
node /minifier/minify-docker.js && \
|
| 78 |
+
rm -rf /app/node_modules /app/scripts && \
|
| 79 |
+
mv /app/app-minimal/node_modules /app/ && \
|
| 80 |
+
rm -rf /app/app-minimal && \
|
| 81 |
+
ls -la /app && \
|
| 82 |
+
du -hd1 /app
|
| 83 |
+
|
| 84 |
+
# ---------------------------------------------------------------------------------------------------------------------
|
| 85 |
+
|
| 86 |
+
FROM node:24-bookworm-slim AS chromium-downloader
|
| 87 |
+
# This stage is necessary to improve build concurrency and minimize the image size.
|
| 88 |
+
# Yeah, downloading Chromium never needs those dependencies below.
|
| 89 |
+
|
| 90 |
+
WORKDIR /app
|
| 91 |
+
COPY ./.puppeteerrc.cjs /app/
|
| 92 |
+
COPY --from=dep-version-parser /ver/.puppeteer_version /app/.puppeteer_version
|
| 93 |
+
|
| 94 |
+
ARG TARGETPLATFORM
|
| 95 |
+
ARG USE_CHINA_NPM_REGISTRY=0
|
| 96 |
+
ARG PUPPETEER_SKIP_DOWNLOAD=1
|
| 97 |
+
# The official recommended way to use Puppeteer on x86(_64) is to use the bundled Chromium from Puppeteer:
|
| 98 |
+
# https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-workwith-chromium-vyyy
|
| 99 |
+
RUN \
|
| 100 |
+
set -ex ; \
|
| 101 |
+
if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \
|
| 102 |
+
if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
|
| 103 |
+
npm config set registry https://registry.npmmirror.com && \
|
| 104 |
+
yarn config set registry https://registry.npmmirror.com && \
|
| 105 |
+
pnpm config set registry https://registry.npmmirror.com ; \
|
| 106 |
+
fi; \
|
| 107 |
+
echo 'Downloading Chromium...' && \
|
| 108 |
+
unset PUPPETEER_SKIP_DOWNLOAD && \
|
| 109 |
+
corepack enable pnpm && \
|
| 110 |
+
pnpm --allow-build=rebrowser-puppeteer add rebrowser-puppeteer@$(cat /app/.puppeteer_version) --save-prod && \
|
| 111 |
+
pnpm rb && \
|
| 112 |
+
pnpx rebrowser-puppeteer browsers install chrome ; \
|
| 113 |
+
else \
|
| 114 |
+
mkdir -p /app/node_modules/.cache/puppeteer ; \
|
| 115 |
+
fi;
|
| 116 |
+
|
| 117 |
+
# ---------------------------------------------------------------------------------------------------------------------
|
| 118 |
+
|
| 119 |
+
FROM node:24-bookworm-slim AS app
|
| 120 |
+
|
| 121 |
+
LABEL org.opencontainers.image.authors="https://github.com/DIYgod/RSSHub"
|
| 122 |
+
|
| 123 |
+
ENV NODE_ENV=production
|
| 124 |
+
ENV TZ=Asia/Shanghai
|
| 125 |
+
|
| 126 |
+
WORKDIR /app
|
| 127 |
+
|
| 128 |
+
# install deps first to avoid cache miss or disturbing buildkit to build concurrently
|
| 129 |
+
ARG TARGETPLATFORM
|
| 130 |
+
ARG PUPPETEER_SKIP_DOWNLOAD=1
|
| 131 |
+
# https://pptr.dev/troubleshooting#chrome-headless-doesnt-launch-on-unix
|
| 132 |
+
# https://github.com/puppeteer/puppeteer/issues/7822
|
| 133 |
+
# https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#noteworthy-obsolete-packages
|
| 134 |
+
# The official recommended way to use Puppeteer on arm/arm64 is to install Chromium from the distribution repositories:
|
| 135 |
+
# https://github.com/puppeteer/puppeteer/blob/07391bbf5feaf85c191e1aa8aa78138dce84008d/packages/puppeteer-core/src/node/BrowserFetcher.ts#L128-L131
|
| 136 |
+
# Dependencies of puppeteer-real-browser: xvfb, procps
|
| 137 |
+
RUN \
|
| 138 |
+
set -ex && \
|
| 139 |
+
apt-get update && \
|
| 140 |
+
apt-get install -yq --no-install-recommends \
|
| 141 |
+
dumb-init git curl \
|
| 142 |
+
; \
|
| 143 |
+
if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ]; then \
|
| 144 |
+
if [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \
|
| 145 |
+
apt-get install -yq --no-install-recommends \
|
| 146 |
+
ca-certificates fonts-liberation wget xdg-utils \
|
| 147 |
+
libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 \
|
| 148 |
+
libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 \
|
| 149 |
+
libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 \
|
| 150 |
+
; \
|
| 151 |
+
else \
|
| 152 |
+
apt-get install -yq --no-install-recommends \
|
| 153 |
+
chromium \
|
| 154 |
+
&& \
|
| 155 |
+
echo "CHROMIUM_EXECUTABLE_PATH=$(which chromium)" | tee /app/.env ; \
|
| 156 |
+
fi; \
|
| 157 |
+
apt-get install -yq --no-install-recommends \
|
| 158 |
+
xvfb procps \
|
| 159 |
+
; \
|
| 160 |
+
fi; \
|
| 161 |
+
rm -rf /var/lib/apt/lists/*
|
| 162 |
+
|
| 163 |
+
COPY --from=chromium-downloader /app/node_modules/.cache/puppeteer /app/node_modules/.cache/puppeteer
|
| 164 |
+
|
| 165 |
+
RUN \
|
| 166 |
+
set -ex && \
|
| 167 |
+
if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \
|
| 168 |
+
echo 'Verifying Chromium installation...' && \
|
| 169 |
+
_chrome_path=$(find /app/node_modules/.cache/puppeteer/chrome/ -name chrome -xtype f -executable | head -n1) && \
|
| 170 |
+
echo "CHROMIUM_EXECUTABLE_PATH=$_chrome_path" | tee /app/.env && \
|
| 171 |
+
if ldd "$_chrome_path" | grep "not found"; then \
|
| 172 |
+
echo "!!! Chromium has unmet shared libs !!!" && \
|
| 173 |
+
exit 1 ; \
|
| 174 |
+
else \
|
| 175 |
+
echo "Awesome! All shared libs are met!" ; \
|
| 176 |
+
fi; \
|
| 177 |
+
fi;
|
| 178 |
+
|
| 179 |
+
COPY --from=docker-minifier /app /app
|
| 180 |
+
|
| 181 |
+
EXPOSE 1200
|
| 182 |
+
ENTRYPOINT ["dumb-init", "--"]
|
| 183 |
+
|
| 184 |
+
CMD ["npm", "run", "start"]
|
| 185 |
+
|
| 186 |
+
# ---------------------------------------------------------------------------------------------------------------------
|
| 187 |
+
|
| 188 |
+
# In case Chromium has unmet shared libs, here is some magic to find and install the packages they belong to:
|
| 189 |
+
# In most case you can just stop at `grep ^lib` and add those packages to the above stage.
|
| 190 |
+
#
|
| 191 |
+
# set -ex && \
|
| 192 |
+
# apt-get update && \
|
| 193 |
+
# apt install -yq --no-install-recommends \
|
| 194 |
+
# apt-file \
|
| 195 |
+
# && \
|
| 196 |
+
# apt-file update && \
|
| 197 |
+
# ldd $(find /app/node_modules/.cache/puppeteer/ -name chrome -type f) | grep -Po "\S+(?= => not found)" | \
|
| 198 |
+
# sed 's/\./\\./g' | awk '{print $1"$"}' | apt-file search -xlf - | grep ^lib | \
|
| 199 |
+
# xargs -d '\n' -- \
|
| 200 |
+
# apt-get install -yq --no-install-recommends \
|
| 201 |
+
# && \
|
| 202 |
+
# apt purge -yq --auto-remove \
|
| 203 |
+
# apt-file \
|
| 204 |
+
# rm -rf /tmp/.chromium_path /var/lib/apt/lists/*
|
| 205 |
+
|
| 206 |
+
# !!! If you manually build Docker image but with buildx/BuildKit disabled, set TARGETPLATFORM yourself !!!
|
LICENSE
ADDED
|
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU AFFERO GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 3, 19 November 2007
|
| 3 |
+
|
| 4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
| 5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 6 |
+
of this license document, but changing it is not allowed.
|
| 7 |
+
|
| 8 |
+
Preamble
|
| 9 |
+
|
| 10 |
+
The GNU Affero General Public License is a free, copyleft license for
|
| 11 |
+
software and other kinds of works, specifically designed to ensure
|
| 12 |
+
cooperation with the community in the case of network server software.
|
| 13 |
+
|
| 14 |
+
The licenses for most software and other practical works are designed
|
| 15 |
+
to take away your freedom to share and change the works. By contrast,
|
| 16 |
+
our General Public Licenses are intended to guarantee your freedom to
|
| 17 |
+
share and change all versions of a program--to make sure it remains free
|
| 18 |
+
software for all its users.
|
| 19 |
+
|
| 20 |
+
When we speak of free software, we are referring to freedom, not
|
| 21 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 22 |
+
have the freedom to distribute copies of free software (and charge for
|
| 23 |
+
them if you wish), that you receive source code or can get it if you
|
| 24 |
+
want it, that you can change the software or use pieces of it in new
|
| 25 |
+
free programs, and that you know you can do these things.
|
| 26 |
+
|
| 27 |
+
Developers that use our General Public Licenses protect your rights
|
| 28 |
+
with two steps: (1) assert copyright on the software, and (2) offer
|
| 29 |
+
you this License which gives you legal permission to copy, distribute
|
| 30 |
+
and/or modify the software.
|
| 31 |
+
|
| 32 |
+
A secondary benefit of defending all users' freedom is that
|
| 33 |
+
improvements made in alternate versions of the program, if they
|
| 34 |
+
receive widespread use, become available for other developers to
|
| 35 |
+
incorporate. Many developers of free software are heartened and
|
| 36 |
+
encouraged by the resulting cooperation. However, in the case of
|
| 37 |
+
software used on network servers, this result may fail to come about.
|
| 38 |
+
The GNU General Public License permits making a modified version and
|
| 39 |
+
letting the public access it on a server without ever releasing its
|
| 40 |
+
source code to the public.
|
| 41 |
+
|
| 42 |
+
The GNU Affero General Public License is designed specifically to
|
| 43 |
+
ensure that, in such cases, the modified source code becomes available
|
| 44 |
+
to the community. It requires the operator of a network server to
|
| 45 |
+
provide the source code of the modified version running there to the
|
| 46 |
+
users of that server. Therefore, public use of a modified version, on
|
| 47 |
+
a publicly accessible server, gives the public access to the source
|
| 48 |
+
code of the modified version.
|
| 49 |
+
|
| 50 |
+
An older license, called the Affero General Public License and
|
| 51 |
+
published by Affero, was designed to accomplish similar goals. This is
|
| 52 |
+
a different license, not a version of the Affero GPL, but Affero has
|
| 53 |
+
released a new version of the Affero GPL which permits relicensing under
|
| 54 |
+
this license.
|
| 55 |
+
|
| 56 |
+
The precise terms and conditions for copying, distribution and
|
| 57 |
+
modification follow.
|
| 58 |
+
|
| 59 |
+
TERMS AND CONDITIONS
|
| 60 |
+
|
| 61 |
+
0. Definitions.
|
| 62 |
+
|
| 63 |
+
"This License" refers to version 3 of the GNU Affero General Public License.
|
| 64 |
+
|
| 65 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 66 |
+
works, such as semiconductor masks.
|
| 67 |
+
|
| 68 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 69 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 70 |
+
"recipients" may be individuals or organizations.
|
| 71 |
+
|
| 72 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 73 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 74 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 75 |
+
earlier work or a work "based on" the earlier work.
|
| 76 |
+
|
| 77 |
+
A "covered work" means either the unmodified Program or a work based
|
| 78 |
+
on the Program.
|
| 79 |
+
|
| 80 |
+
To "propagate" a work means to do anything with it that, without
|
| 81 |
+
permission, would make you directly or secondarily liable for
|
| 82 |
+
infringement under applicable copyright law, except executing it on a
|
| 83 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 84 |
+
distribution (with or without modification), making available to the
|
| 85 |
+
public, and in some countries other activities as well.
|
| 86 |
+
|
| 87 |
+
To "convey" a work means any kind of propagation that enables other
|
| 88 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 89 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 90 |
+
|
| 91 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 92 |
+
to the extent that it includes a convenient and prominently visible
|
| 93 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 94 |
+
tells the user that there is no warranty for the work (except to the
|
| 95 |
+
extent that warranties are provided), that licensees may convey the
|
| 96 |
+
work under this License, and how to view a copy of this License. If
|
| 97 |
+
the interface presents a list of user commands or options, such as a
|
| 98 |
+
menu, a prominent item in the list meets this criterion.
|
| 99 |
+
|
| 100 |
+
1. Source Code.
|
| 101 |
+
|
| 102 |
+
The "source code" for a work means the preferred form of the work
|
| 103 |
+
for making modifications to it. "Object code" means any non-source
|
| 104 |
+
form of a work.
|
| 105 |
+
|
| 106 |
+
A "Standard Interface" means an interface that either is an official
|
| 107 |
+
standard defined by a recognized standards body, or, in the case of
|
| 108 |
+
interfaces specified for a particular programming language, one that
|
| 109 |
+
is widely used among developers working in that language.
|
| 110 |
+
|
| 111 |
+
The "System Libraries" of an executable work include anything, other
|
| 112 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 113 |
+
packaging a Major Component, but which is not part of that Major
|
| 114 |
+
Component, and (b) serves only to enable use of the work with that
|
| 115 |
+
Major Component, or to implement a Standard Interface for which an
|
| 116 |
+
implementation is available to the public in source code form. A
|
| 117 |
+
"Major Component", in this context, means a major essential component
|
| 118 |
+
(kernel, window system, and so on) of the specific operating system
|
| 119 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 120 |
+
produce the work, or an object code interpreter used to run it.
|
| 121 |
+
|
| 122 |
+
The "Corresponding Source" for a work in object code form means all
|
| 123 |
+
the source code needed to generate, install, and (for an executable
|
| 124 |
+
work) run the object code and to modify the work, including scripts to
|
| 125 |
+
control those activities. However, it does not include the work's
|
| 126 |
+
System Libraries, or general-purpose tools or generally available free
|
| 127 |
+
programs which are used unmodified in performing those activities but
|
| 128 |
+
which are not part of the work. For example, Corresponding Source
|
| 129 |
+
includes interface definition files associated with source files for
|
| 130 |
+
the work, and the source code for shared libraries and dynamically
|
| 131 |
+
linked subprograms that the work is specifically designed to require,
|
| 132 |
+
such as by intimate data communication or control flow between those
|
| 133 |
+
subprograms and other parts of the work.
|
| 134 |
+
|
| 135 |
+
The Corresponding Source need not include anything that users
|
| 136 |
+
can regenerate automatically from other parts of the Corresponding
|
| 137 |
+
Source.
|
| 138 |
+
|
| 139 |
+
The Corresponding Source for a work in source code form is that
|
| 140 |
+
same work.
|
| 141 |
+
|
| 142 |
+
2. Basic Permissions.
|
| 143 |
+
|
| 144 |
+
All rights granted under this License are granted for the term of
|
| 145 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 146 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 147 |
+
permission to run the unmodified Program. The output from running a
|
| 148 |
+
covered work is covered by this License only if the output, given its
|
| 149 |
+
content, constitutes a covered work. This License acknowledges your
|
| 150 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 151 |
+
|
| 152 |
+
You may make, run and propagate covered works that you do not
|
| 153 |
+
convey, without conditions so long as your license otherwise remains
|
| 154 |
+
in force. You may convey covered works to others for the sole purpose
|
| 155 |
+
of having them make modifications exclusively for you, or provide you
|
| 156 |
+
with facilities for running those works, provided that you comply with
|
| 157 |
+
the terms of this License in conveying all material for which you do
|
| 158 |
+
not control copyright. Those thus making or running the covered works
|
| 159 |
+
for you must do so exclusively on your behalf, under your direction
|
| 160 |
+
and control, on terms that prohibit them from making any copies of
|
| 161 |
+
your copyrighted material outside their relationship with you.
|
| 162 |
+
|
| 163 |
+
Conveying under any other circumstances is permitted solely under
|
| 164 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 165 |
+
makes it unnecessary.
|
| 166 |
+
|
| 167 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 168 |
+
|
| 169 |
+
No covered work shall be deemed part of an effective technological
|
| 170 |
+
measure under any applicable law fulfilling obligations under article
|
| 171 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 172 |
+
similar laws prohibiting or restricting circumvention of such
|
| 173 |
+
measures.
|
| 174 |
+
|
| 175 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 176 |
+
circumvention of technological measures to the extent such circumvention
|
| 177 |
+
is effected by exercising rights under this License with respect to
|
| 178 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 179 |
+
modification of the work as a means of enforcing, against the work's
|
| 180 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 181 |
+
technological measures.
|
| 182 |
+
|
| 183 |
+
4. Conveying Verbatim Copies.
|
| 184 |
+
|
| 185 |
+
You may convey verbatim copies of the Program's source code as you
|
| 186 |
+
receive it, in any medium, provided that you conspicuously and
|
| 187 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 188 |
+
keep intact all notices stating that this License and any
|
| 189 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 190 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 191 |
+
recipients a copy of this License along with the Program.
|
| 192 |
+
|
| 193 |
+
You may charge any price or no price for each copy that you convey,
|
| 194 |
+
and you may offer support or warranty protection for a fee.
|
| 195 |
+
|
| 196 |
+
5. Conveying Modified Source Versions.
|
| 197 |
+
|
| 198 |
+
You may convey a work based on the Program, or the modifications to
|
| 199 |
+
produce it from the Program, in the form of source code under the
|
| 200 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 201 |
+
|
| 202 |
+
a) The work must carry prominent notices stating that you modified
|
| 203 |
+
it, and giving a relevant date.
|
| 204 |
+
|
| 205 |
+
b) The work must carry prominent notices stating that it is
|
| 206 |
+
released under this License and any conditions added under section
|
| 207 |
+
7. This requirement modifies the requirement in section 4 to
|
| 208 |
+
"keep intact all notices".
|
| 209 |
+
|
| 210 |
+
c) You must license the entire work, as a whole, under this
|
| 211 |
+
License to anyone who comes into possession of a copy. This
|
| 212 |
+
License will therefore apply, along with any applicable section 7
|
| 213 |
+
additional terms, to the whole of the work, and all its parts,
|
| 214 |
+
regardless of how they are packaged. This License gives no
|
| 215 |
+
permission to license the work in any other way, but it does not
|
| 216 |
+
invalidate such permission if you have separately received it.
|
| 217 |
+
|
| 218 |
+
d) If the work has interactive user interfaces, each must display
|
| 219 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 220 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 221 |
+
work need not make them do so.
|
| 222 |
+
|
| 223 |
+
A compilation of a covered work with other separate and independent
|
| 224 |
+
works, which are not by their nature extensions of the covered work,
|
| 225 |
+
and which are not combined with it such as to form a larger program,
|
| 226 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 227 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 228 |
+
used to limit the access or legal rights of the compilation's users
|
| 229 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 230 |
+
in an aggregate does not cause this License to apply to the other
|
| 231 |
+
parts of the aggregate.
|
| 232 |
+
|
| 233 |
+
6. Conveying Non-Source Forms.
|
| 234 |
+
|
| 235 |
+
You may convey a covered work in object code form under the terms
|
| 236 |
+
of sections 4 and 5, provided that you also convey the
|
| 237 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 238 |
+
in one of these ways:
|
| 239 |
+
|
| 240 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 241 |
+
(including a physical distribution medium), accompanied by the
|
| 242 |
+
Corresponding Source fixed on a durable physical medium
|
| 243 |
+
customarily used for software interchange.
|
| 244 |
+
|
| 245 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 246 |
+
(including a physical distribution medium), accompanied by a
|
| 247 |
+
written offer, valid for at least three years and valid for as
|
| 248 |
+
long as you offer spare parts or customer support for that product
|
| 249 |
+
model, to give anyone who possesses the object code either (1) a
|
| 250 |
+
copy of the Corresponding Source for all the software in the
|
| 251 |
+
product that is covered by this License, on a durable physical
|
| 252 |
+
medium customarily used for software interchange, for a price no
|
| 253 |
+
more than your reasonable cost of physically performing this
|
| 254 |
+
conveying of source, or (2) access to copy the
|
| 255 |
+
Corresponding Source from a network server at no charge.
|
| 256 |
+
|
| 257 |
+
c) Convey individual copies of the object code with a copy of the
|
| 258 |
+
written offer to provide the Corresponding Source. This
|
| 259 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 260 |
+
only if you received the object code with such an offer, in accord
|
| 261 |
+
with subsection 6b.
|
| 262 |
+
|
| 263 |
+
d) Convey the object code by offering access from a designated
|
| 264 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 265 |
+
Corresponding Source in the same way through the same place at no
|
| 266 |
+
further charge. You need not require recipients to copy the
|
| 267 |
+
Corresponding Source along with the object code. If the place to
|
| 268 |
+
copy the object code is a network server, the Corresponding Source
|
| 269 |
+
may be on a different server (operated by you or a third party)
|
| 270 |
+
that supports equivalent copying facilities, provided you maintain
|
| 271 |
+
clear directions next to the object code saying where to find the
|
| 272 |
+
Corresponding Source. Regardless of what server hosts the
|
| 273 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 274 |
+
available for as long as needed to satisfy these requirements.
|
| 275 |
+
|
| 276 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 277 |
+
you inform other peers where the object code and Corresponding
|
| 278 |
+
Source of the work are being offered to the general public at no
|
| 279 |
+
charge under subsection 6d.
|
| 280 |
+
|
| 281 |
+
A separable portion of the object code, whose source code is excluded
|
| 282 |
+
from the Corresponding Source as a System Library, need not be
|
| 283 |
+
included in conveying the object code work.
|
| 284 |
+
|
| 285 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 286 |
+
tangible personal property which is normally used for personal, family,
|
| 287 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 288 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 289 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 290 |
+
product received by a particular user, "normally used" refers to a
|
| 291 |
+
typical or common use of that class of product, regardless of the status
|
| 292 |
+
of the particular user or of the way in which the particular user
|
| 293 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 294 |
+
is a consumer product regardless of whether the product has substantial
|
| 295 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 296 |
+
the only significant mode of use of the product.
|
| 297 |
+
|
| 298 |
+
"Installation Information" for a User Product means any methods,
|
| 299 |
+
procedures, authorization keys, or other information required to install
|
| 300 |
+
and execute modified versions of a covered work in that User Product from
|
| 301 |
+
a modified version of its Corresponding Source. The information must
|
| 302 |
+
suffice to ensure that the continued functioning of the modified object
|
| 303 |
+
code is in no case prevented or interfered with solely because
|
| 304 |
+
modification has been made.
|
| 305 |
+
|
| 306 |
+
If you convey an object code work under this section in, or with, or
|
| 307 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 308 |
+
part of a transaction in which the right of possession and use of the
|
| 309 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 310 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 311 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 312 |
+
by the Installation Information. But this requirement does not apply
|
| 313 |
+
if neither you nor any third party retains the ability to install
|
| 314 |
+
modified object code on the User Product (for example, the work has
|
| 315 |
+
been installed in ROM).
|
| 316 |
+
|
| 317 |
+
The requirement to provide Installation Information does not include a
|
| 318 |
+
requirement to continue to provide support service, warranty, or updates
|
| 319 |
+
for a work that has been modified or installed by the recipient, or for
|
| 320 |
+
the User Product in which it has been modified or installed. Access to a
|
| 321 |
+
network may be denied when the modification itself materially and
|
| 322 |
+
adversely affects the operation of the network or violates the rules and
|
| 323 |
+
protocols for communication across the network.
|
| 324 |
+
|
| 325 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 326 |
+
in accord with this section must be in a format that is publicly
|
| 327 |
+
documented (and with an implementation available to the public in
|
| 328 |
+
source code form), and must require no special password or key for
|
| 329 |
+
unpacking, reading or copying.
|
| 330 |
+
|
| 331 |
+
7. Additional Terms.
|
| 332 |
+
|
| 333 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 334 |
+
License by making exceptions from one or more of its conditions.
|
| 335 |
+
Additional permissions that are applicable to the entire Program shall
|
| 336 |
+
be treated as though they were included in this License, to the extent
|
| 337 |
+
that they are valid under applicable law. If additional permissions
|
| 338 |
+
apply only to part of the Program, that part may be used separately
|
| 339 |
+
under those permissions, but the entire Program remains governed by
|
| 340 |
+
this License without regard to the additional permissions.
|
| 341 |
+
|
| 342 |
+
When you convey a copy of a covered work, you may at your option
|
| 343 |
+
remove any additional permissions from that copy, or from any part of
|
| 344 |
+
it. (Additional permissions may be written to require their own
|
| 345 |
+
removal in certain cases when you modify the work.) You may place
|
| 346 |
+
additional permissions on material, added by you to a covered work,
|
| 347 |
+
for which you have or can give appropriate copyright permission.
|
| 348 |
+
|
| 349 |
+
Notwithstanding any other provision of this License, for material you
|
| 350 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 351 |
+
that material) supplement the terms of this License with terms:
|
| 352 |
+
|
| 353 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 354 |
+
terms of sections 15 and 16 of this License; or
|
| 355 |
+
|
| 356 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 357 |
+
author attributions in that material or in the Appropriate Legal
|
| 358 |
+
Notices displayed by works containing it; or
|
| 359 |
+
|
| 360 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 361 |
+
requiring that modified versions of such material be marked in
|
| 362 |
+
reasonable ways as different from the original version; or
|
| 363 |
+
|
| 364 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 365 |
+
authors of the material; or
|
| 366 |
+
|
| 367 |
+
e) Declining to grant rights under trademark law for use of some
|
| 368 |
+
trade names, trademarks, or service marks; or
|
| 369 |
+
|
| 370 |
+
f) Requiring indemnification of licensors and authors of that
|
| 371 |
+
material by anyone who conveys the material (or modified versions of
|
| 372 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 373 |
+
any liability that these contractual assumptions directly impose on
|
| 374 |
+
those licensors and authors.
|
| 375 |
+
|
| 376 |
+
All other non-permissive additional terms are considered "further
|
| 377 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 378 |
+
received it, or any part of it, contains a notice stating that it is
|
| 379 |
+
governed by this License along with a term that is a further
|
| 380 |
+
restriction, you may remove that term. If a license document contains
|
| 381 |
+
a further restriction but permits relicensing or conveying under this
|
| 382 |
+
License, you may add to a covered work material governed by the terms
|
| 383 |
+
of that license document, provided that the further restriction does
|
| 384 |
+
not survive such relicensing or conveying.
|
| 385 |
+
|
| 386 |
+
If you add terms to a covered work in accord with this section, you
|
| 387 |
+
must place, in the relevant source files, a statement of the
|
| 388 |
+
additional terms that apply to those files, or a notice indicating
|
| 389 |
+
where to find the applicable terms.
|
| 390 |
+
|
| 391 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 392 |
+
form of a separately written license, or stated as exceptions;
|
| 393 |
+
the above requirements apply either way.
|
| 394 |
+
|
| 395 |
+
8. Termination.
|
| 396 |
+
|
| 397 |
+
You may not propagate or modify a covered work except as expressly
|
| 398 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 399 |
+
modify it is void, and will automatically terminate your rights under
|
| 400 |
+
this License (including any patent licenses granted under the third
|
| 401 |
+
paragraph of section 11).
|
| 402 |
+
|
| 403 |
+
However, if you cease all violation of this License, then your
|
| 404 |
+
license from a particular copyright holder is reinstated (a)
|
| 405 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 406 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 407 |
+
holder fails to notify you of the violation by some reasonable means
|
| 408 |
+
prior to 60 days after the cessation.
|
| 409 |
+
|
| 410 |
+
Moreover, your license from a particular copyright holder is
|
| 411 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 412 |
+
violation by some reasonable means, this is the first time you have
|
| 413 |
+
received notice of violation of this License (for any work) from that
|
| 414 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 415 |
+
your receipt of the notice.
|
| 416 |
+
|
| 417 |
+
Termination of your rights under this section does not terminate the
|
| 418 |
+
licenses of parties who have received copies or rights from you under
|
| 419 |
+
this License. If your rights have been terminated and not permanently
|
| 420 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 421 |
+
material under section 10.
|
| 422 |
+
|
| 423 |
+
9. Acceptance Not Required for Having Copies.
|
| 424 |
+
|
| 425 |
+
You are not required to accept this License in order to receive or
|
| 426 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 427 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 428 |
+
to receive a copy likewise does not require acceptance. However,
|
| 429 |
+
nothing other than this License grants you permission to propagate or
|
| 430 |
+
modify any covered work. These actions infringe copyright if you do
|
| 431 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 432 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 433 |
+
|
| 434 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 435 |
+
|
| 436 |
+
Each time you convey a covered work, the recipient automatically
|
| 437 |
+
receives a license from the original licensors, to run, modify and
|
| 438 |
+
propagate that work, subject to this License. You are not responsible
|
| 439 |
+
for enforcing compliance by third parties with this License.
|
| 440 |
+
|
| 441 |
+
An "entity transaction" is a transaction transferring control of an
|
| 442 |
+
organization, or substantially all assets of one, or subdividing an
|
| 443 |
+
organization, or merging organizations. If propagation of a covered
|
| 444 |
+
work results from an entity transaction, each party to that
|
| 445 |
+
transaction who receives a copy of the work also receives whatever
|
| 446 |
+
licenses to the work the party's predecessor in interest had or could
|
| 447 |
+
give under the previous paragraph, plus a right to possession of the
|
| 448 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 449 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 450 |
+
|
| 451 |
+
You may not impose any further restrictions on the exercise of the
|
| 452 |
+
rights granted or affirmed under this License. For example, you may
|
| 453 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 454 |
+
rights granted under this License, and you may not initiate litigation
|
| 455 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 456 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 457 |
+
sale, or importing the Program or any portion of it.
|
| 458 |
+
|
| 459 |
+
11. Patents.
|
| 460 |
+
|
| 461 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 462 |
+
License of the Program or a work on which the Program is based. The
|
| 463 |
+
work thus licensed is called the contributor's "contributor version".
|
| 464 |
+
|
| 465 |
+
A contributor's "essential patent claims" are all patent claims
|
| 466 |
+
owned or controlled by the contributor, whether already acquired or
|
| 467 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 468 |
+
by this License, of making, using, or selling its contributor version,
|
| 469 |
+
but do not include claims that would be infringed only as a
|
| 470 |
+
consequence of further modification of the contributor version. For
|
| 471 |
+
purposes of this definition, "control" includes the right to grant
|
| 472 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 473 |
+
this License.
|
| 474 |
+
|
| 475 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 476 |
+
patent license under the contributor's essential patent claims, to
|
| 477 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 478 |
+
propagate the contents of its contributor version.
|
| 479 |
+
|
| 480 |
+
In the following three paragraphs, a "patent license" is any express
|
| 481 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 482 |
+
(such as an express permission to practice a patent or covenant not to
|
| 483 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 484 |
+
party means to make such an agreement or commitment not to enforce a
|
| 485 |
+
patent against the party.
|
| 486 |
+
|
| 487 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 488 |
+
and the Corresponding Source of the work is not available for anyone
|
| 489 |
+
to copy, free of charge and under the terms of this License, through a
|
| 490 |
+
publicly available network server or other readily accessible means,
|
| 491 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 492 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 493 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 494 |
+
consistent with the requirements of this License, to extend the patent
|
| 495 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 496 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 497 |
+
covered work in a country, or your recipient's use of the covered work
|
| 498 |
+
in a country, would infringe one or more identifiable patents in that
|
| 499 |
+
country that you have reason to believe are valid.
|
| 500 |
+
|
| 501 |
+
If, pursuant to or in connection with a single transaction or
|
| 502 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 503 |
+
covered work, and grant a patent license to some of the parties
|
| 504 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 505 |
+
or convey a specific copy of the covered work, then the patent license
|
| 506 |
+
you grant is automatically extended to all recipients of the covered
|
| 507 |
+
work and works based on it.
|
| 508 |
+
|
| 509 |
+
A patent license is "discriminatory" if it does not include within
|
| 510 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 511 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 512 |
+
specifically granted under this License. You may not convey a covered
|
| 513 |
+
work if you are a party to an arrangement with a third party that is
|
| 514 |
+
in the business of distributing software, under which you make payment
|
| 515 |
+
to the third party based on the extent of your activity of conveying
|
| 516 |
+
the work, and under which the third party grants, to any of the
|
| 517 |
+
parties who would receive the covered work from you, a discriminatory
|
| 518 |
+
patent license (a) in connection with copies of the covered work
|
| 519 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 520 |
+
for and in connection with specific products or compilations that
|
| 521 |
+
contain the covered work, unless you entered into that arrangement,
|
| 522 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 523 |
+
|
| 524 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 525 |
+
any implied license or other defenses to infringement that may
|
| 526 |
+
otherwise be available to you under applicable patent law.
|
| 527 |
+
|
| 528 |
+
12. No Surrender of Others' Freedom.
|
| 529 |
+
|
| 530 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 531 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 532 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 533 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 534 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 535 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 536 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 537 |
+
the Program, the only way you could satisfy both those terms and this
|
| 538 |
+
License would be to refrain entirely from conveying the Program.
|
| 539 |
+
|
| 540 |
+
13. Remote Network Interaction; Use with the GNU General Public License.
|
| 541 |
+
|
| 542 |
+
Notwithstanding any other provision of this License, if you modify the
|
| 543 |
+
Program, your modified version must prominently offer all users
|
| 544 |
+
interacting with it remotely through a computer network (if your version
|
| 545 |
+
supports such interaction) an opportunity to receive the Corresponding
|
| 546 |
+
Source of your version by providing access to the Corresponding Source
|
| 547 |
+
from a network server at no charge, through some standard or customary
|
| 548 |
+
means of facilitating copying of software. This Corresponding Source
|
| 549 |
+
shall include the Corresponding Source for any work covered by version 3
|
| 550 |
+
of the GNU General Public License that is incorporated pursuant to the
|
| 551 |
+
following paragraph.
|
| 552 |
+
|
| 553 |
+
Notwithstanding any other provision of this License, you have
|
| 554 |
+
permission to link or combine any covered work with a work licensed
|
| 555 |
+
under version 3 of the GNU General Public License into a single
|
| 556 |
+
combined work, and to convey the resulting work. The terms of this
|
| 557 |
+
License will continue to apply to the part which is the covered work,
|
| 558 |
+
but the work with which it is combined will remain governed by version
|
| 559 |
+
3 of the GNU General Public License.
|
| 560 |
+
|
| 561 |
+
14. Revised Versions of this License.
|
| 562 |
+
|
| 563 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 564 |
+
the GNU Affero General Public License from time to time. Such new versions
|
| 565 |
+
will be similar in spirit to the present version, but may differ in detail to
|
| 566 |
+
address new problems or concerns.
|
| 567 |
+
|
| 568 |
+
Each version is given a distinguishing version number. If the
|
| 569 |
+
Program specifies that a certain numbered version of the GNU Affero General
|
| 570 |
+
Public License "or any later version" applies to it, you have the
|
| 571 |
+
option of following the terms and conditions either of that numbered
|
| 572 |
+
version or of any later version published by the Free Software
|
| 573 |
+
Foundation. If the Program does not specify a version number of the
|
| 574 |
+
GNU Affero General Public License, you may choose any version ever published
|
| 575 |
+
by the Free Software Foundation.
|
| 576 |
+
|
| 577 |
+
If the Program specifies that a proxy can decide which future
|
| 578 |
+
versions of the GNU Affero General Public License can be used, that proxy's
|
| 579 |
+
public statement of acceptance of a version permanently authorizes you
|
| 580 |
+
to choose that version for the Program.
|
| 581 |
+
|
| 582 |
+
Later license versions may give you additional or different
|
| 583 |
+
permissions. However, no additional obligations are imposed on any
|
| 584 |
+
author or copyright holder as a result of your choosing to follow a
|
| 585 |
+
later version.
|
| 586 |
+
|
| 587 |
+
15. Disclaimer of Warranty.
|
| 588 |
+
|
| 589 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 590 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 591 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 592 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 593 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 594 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 595 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 596 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 597 |
+
|
| 598 |
+
16. Limitation of Liability.
|
| 599 |
+
|
| 600 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 601 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 602 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 603 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 604 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 605 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 606 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 607 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 608 |
+
SUCH DAMAGES.
|
| 609 |
+
|
| 610 |
+
17. Interpretation of Sections 15 and 16.
|
| 611 |
+
|
| 612 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 613 |
+
above cannot be given local legal effect according to their terms,
|
| 614 |
+
reviewing courts shall apply local law that most closely approximates
|
| 615 |
+
an absolute waiver of all civil liability in connection with the
|
| 616 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 617 |
+
copy of the Program in return for a fee.
|
| 618 |
+
|
| 619 |
+
END OF TERMS AND CONDITIONS
|
| 620 |
+
|
| 621 |
+
How to Apply These Terms to Your New Programs
|
| 622 |
+
|
| 623 |
+
If you develop a new program, and you want it to be of the greatest
|
| 624 |
+
possible use to the public, the best way to achieve this is to make it
|
| 625 |
+
free software which everyone can redistribute and change under these terms.
|
| 626 |
+
|
| 627 |
+
To do so, attach the following notices to the program. It is safest
|
| 628 |
+
to attach them to the start of each source file to most effectively
|
| 629 |
+
state the exclusion of warranty; and each file should have at least
|
| 630 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 631 |
+
|
| 632 |
+
<one line to give the program's name and a brief idea of what it does.>
|
| 633 |
+
Copyright (C) <year> <name of author>
|
| 634 |
+
|
| 635 |
+
This program is free software: you can redistribute it and/or modify
|
| 636 |
+
it under the terms of the GNU Affero General Public License as published
|
| 637 |
+
by the Free Software Foundation, either version 3 of the License, or
|
| 638 |
+
(at your option) any later version.
|
| 639 |
+
|
| 640 |
+
This program is distributed in the hope that it will be useful,
|
| 641 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 642 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 643 |
+
GNU Affero General Public License for more details.
|
| 644 |
+
|
| 645 |
+
You should have received a copy of the GNU Affero General Public License
|
| 646 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 647 |
+
|
| 648 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 649 |
+
|
| 650 |
+
If your software can interact with users remotely through a computer
|
| 651 |
+
network, you should also make sure that it provides a way for users to
|
| 652 |
+
get its source. For example, if your program is a web application, its
|
| 653 |
+
interface could display a "Source" link that leads users to an archive
|
| 654 |
+
of the code. There are many ways you could offer source, and different
|
| 655 |
+
solutions will be better for different programs; see section 13 for the
|
| 656 |
+
specific requirements.
|
| 657 |
+
|
| 658 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 659 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 660 |
+
For more information on this, and how to apply and follow the GNU AGPL, see
|
| 661 |
+
<https://www.gnu.org/licenses/>.
|
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Rsshub
|
| 3 |
+
emoji: 🦀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
app_port: 1200
|
| 9 |
+
---
|
| 10 |
+
<p align="center">
|
| 11 |
+
<img src="https://docs.rsshub.app/img/logo.png" alt="RSSHub" width="100">
|
| 12 |
+
</p>
|
| 13 |
+
<h1 align="center">RSSHub</h1>
|
| 14 |
+
|
| 15 |
+
> 🧡 Everything is RSSible
|
| 16 |
+
|
| 17 |
+
[](https://rsshub.app)
|
| 18 |
+
[](https://hub.docker.com/r/diygod/rsshub)
|
| 19 |
+
[](https://www.npmjs.com/package/rsshub)
|
| 20 |
+
[](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster)
|
| 21 |
+
[](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master)
|
| 22 |
+
[](https://github.com/DIYgod/RSSHub)
|
| 23 |
+
|
| 24 |
+
[](https://t.me/rsshub) [](https://t.me/awesomeRSSHub) [](https://x.com/intent/follow?screen_name=_RSSHub)
|
| 25 |
+
|
| 26 |
+
## Introduction
|
| 27 |
+
|
| 28 |
+
RSSHub is the world's largest RSS network, consisting of over 5,000 global instances.
|
| 29 |
+
|
| 30 |
+
RSSHub delivers millions of contents aggregated from all kinds of sources, our vibrant open source community is ensuring the deliver of RSSHub's new routes, new features and bug fixes.
|
| 31 |
+
|
| 32 |
+
[Documentation](https://docs.rsshub.app) | [Telegram Group](https://t.me/rsshub) | [Telegram Channel](https://t.me/awesomeRSSHub) | [X (Twitter)](https://x.com/intent/follow?screen_name=_RSSHub)
|
| 33 |
+
|
| 34 |
+
## Related Projects
|
| 35 |
+
|
| 36 |
+
- [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites.
|
| 37 |
+
- [RSSBud](https://github.com/Cay-Zhang/RSSBud) | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization.
|
| 38 |
+
- [RSSAid](https://github.com/LeetaoGoooo/RSSAid) | RSSHub Radar for Android platform built with Flutter.
|
| 39 |
+
- [DocSearch](https://github.com/Fatpandac/DocSearch) | Link RSSHub DocSearch into Raycast.
|
| 40 |
+
- [Awesome RSSHub Routes](https://github.com/JackyST0/awesome-rsshub-routes) | Curated list of RSS feeds and RSSHub routes.
|
| 41 |
+
|
| 42 |
+
## Contribute
|
| 43 |
+
|
| 44 |
+
We welcome all pull requests. Suggestions and feedback are also welcomed [here](https://github.com/DIYgod/RSSHub/issues).
|
| 45 |
+
|
| 46 |
+
Refer to [Quick Start](https://docs.rsshub.app/joinus/)
|
| 47 |
+
|
| 48 |
+
## Deployment
|
| 49 |
+
|
| 50 |
+
Refer to [Deployment](https://docs.rsshub.app/deploy/)
|
| 51 |
+
|
| 52 |
+
## Special Thanks
|
| 53 |
+
|
| 54 |
+
<div align="center">
|
| 55 |
+
|
| 56 |
+
[](https://github.com/DIYgod/RSSHub/graphs/contributors)
|
| 57 |
+
|
| 58 |
+
Logo designer [sheldonrrr](https://dribbble.com/sheldonrrr)
|
| 59 |
+
|
| 60 |
+
[](https://github.com/DIYgod/sponsors)
|
| 61 |
+
|
| 62 |
+
<a href="https://www.cloudflare.com" target="_blank"><img height="50px" src="https://i.imgur.com/7Ph27Fq.png"></a> <a href="https://www.netlify.com" target="_blank"><img height="40px" src="https://i.imgur.com/cU01915.png"></a> <a href="https://1password.com" target="_blank"><img height="40px" src="https://i.imgur.com/a2XjflO.png"></a>
|
| 63 |
+
|
| 64 |
+
</div>
|
| 65 |
+
|
| 66 |
+
## Author
|
| 67 |
+
|
| 68 |
+
**RSSHub** © [DIYgod](https://github.com/DIYgod), Released under the [AGPL-3.0](./LICENSE) License.<br>
|
| 69 |
+
Authored and maintained by DIYgod with help from contributors ([list](https://github.com/DIYgod/RSSHub/contributors)).
|
| 70 |
+
|
| 71 |
+
> Blog [@DIYgod](https://diygod.cc) · GitHub [@DIYgod](https://github.com/DIYgod) · X (Twitter) [@DIYgod](https://x.com/DIYgod) · Telegram Channel [@awesomeDIYgod](https://t.me/awesomeDIYgod)
|
SECURITY.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Security Policy
|
| 2 |
+
|
| 3 |
+
## Supported Version
|
| 4 |
+
|
| 5 |
+
Latest commits in master branch
|
| 6 |
+
|
| 7 |
+
## Reporting a Vulnerability
|
| 8 |
+
|
| 9 |
+
If you believe you have found a security vulnerability in RSSHub, please let us know right away, you can [open a draft security advisory](https://github.com/DIYgod/RSSHub/security/advisories/new) or email us at [i@diygod.me](mailto:i@diygod.me). We will investigate all legitimate reports and do our best to quickly fix the problem.
|
app.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "RSSHub",
|
| 3 |
+
"description": "Everything is RSSible",
|
| 4 |
+
"repository": "https://github.com/DIYgod/RSSHub",
|
| 5 |
+
"website": "https://docs.rsshub.app/",
|
| 6 |
+
"logo": "https://i.loli.net/2019/04/23/5cbeb7e41414c.png",
|
| 7 |
+
"keywords": ["RSS"],
|
| 8 |
+
"env": {
|
| 9 |
+
"NODE_MODULES_CACHE": {
|
| 10 |
+
"value": "false",
|
| 11 |
+
"required": true
|
| 12 |
+
},
|
| 13 |
+
"PORT": {
|
| 14 |
+
"value": "80",
|
| 15 |
+
"required": false
|
| 16 |
+
},
|
| 17 |
+
"PUPPETEER_SKIP_DOWNLOAD": {
|
| 18 |
+
"value": "1",
|
| 19 |
+
"required": false
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
assets/404.html
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<script>
|
| 2 |
+
alert('The documentation has been changed to docs.rsshub.app and will be automatically redirected to the new documentation page.');
|
| 3 |
+
window.location.href = 'https://docs.rsshub.app';
|
| 4 |
+
</script>
|