diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index b034619be6124d..77026d75ece61f 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,8 +1,8 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
-// https://github.com/devcontainers/images/blob/v0.2.24/src/javascript-node/.devcontainer/devcontainer.json
+// https://github.com/devcontainers/images/blob/v0.3.24/src/javascript-node/.devcontainer/devcontainer.json
{
"name": "Node.js",
- "image": "mcr.microsoft.com/devcontainers/javascript-node:18-bullseye",
+ "image": "mcr.microsoft.com/devcontainers/javascript-node:22-bookworm",
// Configure tool-specific properties.
"customizations": {
@@ -16,8 +16,9 @@
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"deepscan.vscode-deepscan",
- "rangav.vscode-thunder-client",
"SonarSource.sonarlint-vscode",
+ "unifiedjs.vscode-mdx",
+ "VASubasRaj.flashpost", // Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0
"ZihanLi.at-helper"
]
}
@@ -37,12 +38,12 @@
}
},
- "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 && sudo apt-get autoremove -y && sudo apt-get clean -y && sudo rm -rf /var/lib/apt/lists/*",
+ "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/*",
- "updateContentCommand": "pnpm i && pnpm i -C website && pnpm rb",
+ "updateContentCommand": "export JAVA_HOME=/usr/lib/jvm/default-java && pnpm config set store-dir ~/.local/share/pnpm/store && pnpm i && pnpm rb",
// Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": "pnpm i && pnpm i -C website && pnpm rb",
+ "postCreateCommand": "pnpm i && pnpm rb",
// Disable auto start dev env since codespaces sometimes fails to attach to the terminal
// "postAttachCommand": {
diff --git a/.dockerignore b/.dockerignore
index 7abe42543ba1a3..81d65ee79f4eb1 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -8,9 +8,7 @@ Dockerfile*
LICENSE
Procfile
app-minimal
-assets
coverage
-docs
node_modules
test
@@ -27,21 +25,21 @@ test
.(yarn|npm|nvm)rc
*.md
app.json
+eslint.config.mjs
docker-compose*
fly.toml
jsconfig.json
npm-debug.log
process.json
package-lock.json
+vitest.config.ts
vercel.json
-#git but keep the git commit hash
+# git but keep the git commit hash
.git/logs
-.git/objects
.git/index
.git/info
.git/hooks
-#rsshub auxiliary files
-lib/radar-rules.js
-lib/v2/**/radar.js
+# rsshub auxiliary files
+lib/routes/**/radar.js
diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index b28531c34a1101..00000000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,6 +0,0 @@
-coverage
-.vscode
-docker-compose.yml
-!/.github
-!/docs/.vuepress
-website
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 7a65cd5d6bcc7d..00000000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,113 +0,0 @@
-{
- "extends": ["eslint:recommended", "plugin:n/recommended", "plugin:prettier/recommended", "plugin:yml/recommended"],
- "plugins": ["prettier"],
- "parserOptions": {
- "ecmaVersion": "latest",
- "sourceType": "module"
- },
- "env": {
- "node": true,
- "es6": true,
- "browser": true
- },
- "rules": {
- // possible problems
- "array-callback-return": 2,
- "no-await-in-loop": 2,
- "no-control-regex": 0,
- "no-duplicate-imports": 2,
- "no-prototype-builtins": 0,
- "no-unsafe-negation": 2,
- "require-atomic-updates": 0,
- // suggestions
- "arrow-body-style": 2,
- "block-scoped-var": 2,
- "curly": 2,
- "dot-notation": 2,
- "eqeqeq": 2,
- "no-console": 2,
- "no-eval": 2,
- "no-extend-native": 2,
- "no-extra-label": 2,
- "no-global-assign": 2,
- "no-implicit-coercion": [
- "error",
- {
- "boolean": false,
- "number": false,
- "string": false,
- "disallowTemplateShorthand": true
- }
- ],
- "no-implicit-globals": 2,
- "no-labels": 2,
- "no-multi-str": 2,
- "no-new-func": 2,
- "no-restricted-imports": 2,
- "no-unneeded-ternary": 2,
- "no-useless-computed-key": 2,
- "no-useless-concat": 1,
- "no-useless-rename": 2,
- "no-var": 2,
- "object-shorthand": 2,
- "prefer-arrow-callback": 2,
- "prefer-const": 2,
- "prefer-regex-literals": 1,
- "require-await": 2,
- "spaced-comment": 2,
- // layout & formatting
- "arrow-parens": 2,
- "arrow-spacing": 2,
- "comma-spacing": 2,
- "comma-style": 2,
- "func-call-spacing": 2,
- "keyword-spacing": 2,
- "linebreak-style": 2,
- "lines-around-comment": 2,
- "no-multiple-empty-lines": 2,
- "no-trailing-spaces": 2,
- "rest-spread-spacing": 2,
- "semi": 2,
- "space-before-blocks": 2,
- "space-in-parens": 2,
- "space-infix-ops": 2,
- "space-unary-ops": 2,
- // plugin specific
- "n/no-extraneous-require": [
- "error",
- {
- "allowModules": ["puppeteer-extra-plugin-user-preferences", "puppeteer-extra-plugin-user-data-dir"]
- }
- ],
- "n/no-deprecated-api": 1,
- "n/no-missing-require": 0,
- "n/no-process-exit": 0,
- "n/no-unpublished-require": [
- "error",
- {
- "allowModules": ["tosource"]
- }
- ],
- "prettier/prettier": 0,
- "yml/quotes": [
- "error",
- {
- "prefer": "single"
- }
- ]
- },
- "overrides": [
- {
- "files": ["*.yaml", "*.yml"],
- "parser": "yaml-eslint-parser",
- "rules": {
- "lines-around-comment": [
- "error",
- {
- "beforeBlockComment": false
- }
- ]
- }
- }
- ]
-}
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 1642f7a25db3f7..00000000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-# These are supported funding model platforms
-github: DIYgod
-open_collective: RSSHub
-patreon: DIYgod
-custom: ['https://afdian.net/@diygod', 'https://archive.diygod.me/images/zfb.jpg', 'https://archive.diygod.me/images/wx.jpg']
diff --git a/.github/ISSUE_TEMPLATE/bug_report_en.yml b/.github/ISSUE_TEMPLATE/bug_report_en.yml
index ac686b2dcc909a..de560dad5979cc 100644
--- a/.github/ISSUE_TEMPLATE/bug_report_en.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report_en.yml
@@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
- Please ensure you have read [documentation](https://docs.rsshub.app/en), and provide all the information required by this template, otherwise the issue will be closed immediately.
+ 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.
Due to the anti-crawling policy implemented by certain websites, some RSS routes provided by the demo will return status code 403. This is not an issue caused by RSSHub and please do not report it.
- type: textarea
diff --git a/.github/ISSUE_TEMPLATE/feature_request_en.yml b/.github/ISSUE_TEMPLATE/feature_request_en.yml
index ed5db239e07fe0..7aee701cc8e5d9 100644
--- a/.github/ISSUE_TEMPLATE/feature_request_en.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request_en.yml
@@ -7,7 +7,7 @@ body:
- type: markdown
attributes:
value: |
- Please ensure the feature requested is not listed in [documentation](https://docs.rsshub.app/en) 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.
+ 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.
Otherwise the issue will be closed immediately.
- type: textarea
diff --git a/.github/ISSUE_TEMPLATE/rss_request_en.yml b/.github/ISSUE_TEMPLATE/rss_request_en.yml
index 85ad25a14bb3a6..0f1efc64b5c915 100644
--- a/.github/ISSUE_TEMPLATE/rss_request_en.yml
+++ b/.github/ISSUE_TEMPLATE/rss_request_en.yml
@@ -1,4 +1,4 @@
-name: 🍰 RSS Proposal
+name: 🧡 RSS Proposal
description: Submit a new RSS proposal
labels: ['RSS proposal']
@@ -7,7 +7,7 @@ body:
- type: markdown
attributes:
value: |
- Please ensure the RSS proposal is not listed in [documentation](https://docs.rsshub.app/en) 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.
+ 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.
Otherwise the issue will be closed immediately.
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!
diff --git a/.github/ISSUE_TEMPLATE/rss_request_zh.yml b/.github/ISSUE_TEMPLATE/rss_request_zh.yml
index a737cdcbf0d3ff..2970aa6381e330 100644
--- a/.github/ISSUE_TEMPLATE/rss_request_zh.yml
+++ b/.github/ISSUE_TEMPLATE/rss_request_zh.yml
@@ -1,4 +1,4 @@
-name: 🍰 RSS 提案
+name: 🧡 RSS 提案
description: 提交新的 RSS 提案
labels: ['RSS proposal']
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index fb401f50abd56d..e6ae2dd496121c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,6 @@
## Involved Issue / 该 PR 相关 Issue
@@ -15,7 +15,7 @@ Fail to comply will result in your pull request being closed automatically.
请在 `routes` 区域填写以 / 开头的完整路由地址,否则你的 PR 将会被无条件关闭。
如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。
-```route
+```routes
/some/route
/some/other/route
/dont/use/this/or/modify/it
@@ -32,14 +32,9 @@ If your changes are not related to route, please fill in `routes` section with `
## New RSS Route Checklist / 新 RSS 路由检查表
- [ ] New Route / 新的路由
- - [ ] Follows [v2 Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [v2 路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard)
-- [ ] Documentation / 文档说明
- - [ ] EN / 英文文档
- - [ ] CN / 中文文档
-- [ ] Full text / 全文获取
- - [ ] Use cache / 使用缓存
-- [ ] Anti-bot or rate limit / 反爬/频率限制
- - [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
+ - [ ] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard)
+- [ ] Anti-bot or rate limit / 反爬/频率限制
+ - [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
- [ ] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date)
- [ ] Parsed / 可以解析
- [ ] Correct time zone / 时区正确
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 4bfc2c1d8571e0..72d8543ed327e7 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -4,73 +4,19 @@ updates:
directory: '/'
schedule:
interval: daily
- time: '21:00'
- open-pull-requests-limit: 10
+ time: '08:00'
+ open-pull-requests-limit: 100
labels:
- dependencies
ignore:
- # ESM only packages
- - dependency-name: fanfou-sdk
- versions: ['>=5.0.0']
- - dependency-name: got
- versions: ['>=12.0.0']
- - dependency-name: ip-regex
- versions: ['>=5.0.0']
- - dependency-name: query-string
- versions: ['>=8.0.0']
- - dependency-name: rand-user-agent
- versions: ['>=2.0.1']
- - dependency-name: remark
- versions: ['>=14.0.0']
- - dependency-name: remark-frontmatter
- versions: ['>=4.0.0']
- - dependency-name: remark-gfm
- versions: ['>=2.0.0']
- - dependency-name: remark-parse
- versions: ['>=10.0.0']
- - dependency-name: remark-preset-prettier
- versions: ['>=1.0.0']
- - dependency-name: remark-stringify
- versions: ['>=10.0.0']
- - dependency-name: string-width
- versions: ['>=5.0.0']
- - dependency-name: unified
- versions: ['>=10.0.0']
-
- - package-ecosystem: npm
- directory: '/website'
- schedule:
- interval: daily
- time: '21:00'
- open-pull-requests-limit: 10
- labels:
- - dependencies
- ignore:
- # ESM only packages
- - dependency-name: remark
- versions: ['>=14.0.0']
- - dependency-name: remark-frontmatter
- versions: ['>=4.0.0']
- - dependency-name: remark-gfm
- versions: ['>=2.0.0']
- - dependency-name: remark-parse
- versions: ['>=10.0.0']
- - dependency-name: remark-preset-prettier
- versions: ['>=1.0.0']
- - dependency-name: remark-stringify
- versions: ['>=10.0.0']
- - dependency-name: string-width
- versions: ['>=5.0.0']
- groups:
- docs:
- patterns:
- - '@docusaurus/*'
+ - dependency-name: jsrsasign
+ versions: ['>=11.0.0'] # no longer includes KJUR.crypto.Cipher for RSA
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: daily
- time: '21:00'
- open-pull-requests-limit: 10
+ time: '08:00'
+ open-pull-requests-limit: 100
labels:
- dependencies
diff --git a/.github/labeler.yml b/.github/labeler.yml
index d9a23aa3d088ee..5838333146c094 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -1,15 +1,17 @@
-'Route: v1':
-- lib/router.js
-- any: ['lib/routes/**/*.js', '!lib/routes/index.js']
+'Route: deprecated':
+- changed-files:
+ - any-glob-to-any-file: ['lib/router.js']
+ - all-globs-to-any-file: ['lib/routes-deprecated/**/*.js', '!lib/routes-deprecated/index.js']
-'Route: v2':
-- 'lib/v2/**/*.js'
+'Route':
+- changed-files:
+ - any-glob-to-any-file: ['lib/routes/**/*.ts']
core enhancement:
-- lib/routes/index.js
-- any: ['lib/**', '!lib/radar-rules.js', '!lib/router.js', '!lib/routes/**', '!lib/v2/**']
+- changed-files:
+ - any-glob-to-any-file: ['lib/routes/index.ts']
+ - all-globs-to-any-file: ['lib/**', '!lib/config.ts', '!lib/router.js', '!lib/routes/**', '!lib/routes-deprecated/**']
dependencies:
-- package.json
-- pnpm-lock.yaml
-- yarn.lock
+- changed-files:
+ - any-glob-to-any-file: ['package.json', 'pnpm-lock.yaml', 'yarn.lock']
diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml
index d80d8bf661a8b3..e824ab20547146 100644
--- a/.github/workflows/build-assets.yml
+++ b/.github/workflows/build-assets.yml
@@ -1,38 +1,69 @@
-name: build assets
+name: Build assets
on:
+ workflow_dispatch:
push:
branches:
- master
paths:
- - 'lib/**'
- - 'scripts/workflow/*.js'
+ - 'lib/**/*.ts'
jobs:
build:
runs-on: ubuntu-latest
name: Build assets
timeout-minutes: 5
+ permissions:
+ contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
- uses: pnpm/action-setup@v2
- with:
- version: 8
+ uses: pnpm/action-setup@v4
- name: Use Node.js Active LTS
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- name: Install dependencies (yarn)
run: pnpm i
- name: Build assets
- run: npm run build:all
+ run: pnpm build
- name: Deploy
- uses: peaceiris/actions-gh-pages@v3
+ uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./assets
user_name: 'github-actions[bot]'
user_email: '41898282+github-actions[bot]@users.noreply.github.com'
+ # prevent deleting build/test-full-routes.json which will break build:docs
+ keep_files: true
+ - name: Build docs
+ run: pnpm build:docs
+ - id: check-env
+ env:
+ DOCS_API_TOKEN: ${{ secrets.DOCS_API_TOKEN }}
+ if: ${{ env.DOCS_API_TOKEN != '' }}
+ run: echo "defined=true" >> $GITHUB_OUTPUT
+ - name: Checkout docs
+ uses: actions/checkout@v4
+ if: steps.check-env.outputs.defined == 'true'
+ with:
+ repository: 'RSSNext/rsshub-docs'
+ token: ${{ secrets.DOCS_API_TOKEN }}
+ path: rsshub-docs
+ - name: Update docs
+ if: steps.check-env.outputs.defined == 'true'
+ run: |
+ cp -r ./assets/build/docs/en/* ./rsshub-docs/src/routes
+ cp -r ./assets/build/docs/zh/* ./rsshub-docs/src/zh/routes
+ cp ./lib/types.ts ./rsshub-docs/.vitepress/theme/types.ts
+ cp ./scripts/workflow/data.ts ./rsshub-docs/.vitepress/config/data.ts
+ - name: Commit docs
+ if: steps.check-env.outputs.defined == 'true'
+ run: |
+ cd rsshub-docs
+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ git status
+ 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)
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 6ac7b5230ae772..7985f4e1501b46 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -13,28 +13,37 @@ name: 'CodeQL'
on:
push:
- branches: [master]
+ branches: ['master']
pull_request:
- # The branches below must be a subset of the branches above
- branches: [master]
+ branches: ['master']
schedule:
- cron: '15 9 * * 3'
jobs:
analyze:
name: Analyze
+ # Runner size impacts CodeQL analysis time. To learn more, please see:
+ # - https://gh.io/recommended-hardware-resources-for-running-codeql
+ # - https://gh.io/supported-runners-and-hardware-resources
+ # - https://gh.io/using-larger-runners
+ # Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
+ # required for all workflows
+ security-events: write
+
+ # only required for workflows in private repositories
actions: read
contents: read
- security-events: write
strategy:
fail-fast: false
matrix:
- language: ['javascript']
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ language: ['javascript-typescript']
+ # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
+ # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
+ # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
@@ -43,31 +52,32 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@v2
+ uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
- # 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
+ # 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
# queries: security-extended,security-and-quality
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
- # 📚 https://git.io/JvXDl
+ # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
+ # If the Autobuild fails above, remove it and uncomment the following three lines.
+ # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
- # make bootstrap
- # make release
+ # echo "Run, Build Application using script"
+ # ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ uses: github/codeql-action/analyze@v3
+ with:
+ category: '/language:${{matrix.language}}'
diff --git a/.github/workflows/comment-on-issue.yml b/.github/workflows/comment-on-issue.yml
index 61b518ba884bf2..f0fdb344784301 100644
--- a/.github/workflows/comment-on-issue.yml
+++ b/.github/workflows/comment-on-issue.yml
@@ -9,21 +9,22 @@ jobs:
name: Call maintainers
runs-on: ubuntu-latest
timeout-minutes: 5
+ permissions:
+ issues: write
+ if: github.event.sender.login != 'issuehunt-oss[bot]'
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3 # just need its cache
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- - name: Install dependencies (pnpm) # needed since we need to parse markdown, so we also use got instead
+ - name: Install dependencies (pnpm) # import remark-parse and unified
run: pnpm i
- name: Generate feedback
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
with:
- github-token: ${{secrets.GITHUB_TOKEN}}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
- const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-issue/call-maintainer.js`)
- return script({ github, context, core })
+ const { default: callMaintainer } = await import('${{ github.workspace }}/scripts/workflow/test-issue/call-maintainer.mjs')
+ await callMaintainer({ github, context, core })
diff --git a/.github/workflows/dependabot-fork.yml b/.github/workflows/dependabot-fork.yml
index b39ec2ae7cd20f..baeeff107b6ca8 100644
--- a/.github/workflows/dependabot-fork.yml
+++ b/.github/workflows/dependabot-fork.yml
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v4
- name: Comment Dependabot PR
- uses: thollander/actions-comment-pull-request@v2
+ uses: thollander/actions-comment-pull-request@v3
with:
message: '@dependabot ignore this dependency'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml
index 8e25b730e701c3..1d8c5b6bd546d6 100644
--- a/.github/workflows/docker-release.yml
+++ b/.github/workflows/docker-release.yml
@@ -1,4 +1,4 @@
-name: '[docker] CI for releases'
+name: 'Docker Release'
on:
push:
@@ -7,13 +7,9 @@ on:
paths:
- '.github/workflows/docker-release.yml'
- 'lib/**'
- - '!**/maintainer.js'
- - '!**/radar.js'
- - '!**/radar-rules.js'
- - '!lib/v2/test/**'
- - '!test/**'
+ - '!lib/**/*.test.ts'
- 'Dockerfile'
- workflow_dispatch: ~
+ workflow_dispatch: {}
jobs:
check-env:
@@ -33,10 +29,9 @@ jobs:
runs-on: ubuntu-latest
needs: check-env
if: needs.check-env.outputs.check-docker == 'true'
- timeout-minutes: 120
+ timeout-minutes: 60
permissions:
packages: write
- contents: read
id-token: write
steps:
- name: Checkout
@@ -75,11 +70,12 @@ jobs:
tags: |
type=raw,value=latest,enable=true
type=raw,value={{date 'YYYY-MM-DD'}},enable=true
+ type=sha,format=long,prefix=,enable=true
flavor: latest=false
- name: Build and push Docker image (ordinary version)
id: build-and-push
- uses: docker/build-push-action@v5
+ uses: docker/build-push-action@v6
with:
context: .
push: true
@@ -105,11 +101,12 @@ jobs:
tags: |
type=raw,value=chromium-bundled,enable=true
type=raw,value=chromium-bundled-{{date 'YYYY-MM-DD'}},enable=true
+ type=sha,format=long,prefix=chromium-bundled-,enable=true
flavor: latest=false
- name: Build and push Docker image (Chromium-bundled version)
id: build-and-push-chromium
- uses: docker/build-push-action@v5
+ uses: docker/build-push-action@v6
with:
context: .
build-args: PUPPETEER_SKIP_DOWNLOAD=0
@@ -136,7 +133,7 @@ jobs:
- uses: actions/checkout@v4
- name: Docker Hub Description
- uses: peter-evans/dockerhub-description@v3
+ uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
diff --git a/.github/workflows/docker-test-cont.yml b/.github/workflows/docker-test-cont.yml
new file mode 100644
index 00000000000000..be3c207be45aa4
--- /dev/null
+++ b/.github/workflows/docker-test-cont.yml
@@ -0,0 +1,119 @@
+name: PR - route test
+
+on:
+ workflow_run:
+ workflows: [PR - Docker build test] # open, reopen, synchronized, edited included
+ types: [completed]
+
+jobs:
+ testRoute:
+ name: Route test
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ if: ${{ github.event.workflow_run.conclusion == 'success' }} # skip if unsuccessful
+ steps:
+ - uses: actions/checkout@v4
+
+ # https://github.com/orgs/community/discussions/25220
+ - name: Search the PR that triggered this workflow
+ uses: potiuk/get-workflow-origin@v1_5
+ id: source-run-info
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ sourceRunId: ${{ github.event.workflow_run.id }}
+
+ - name: Fetch PR data via GitHub API
+ uses: octokit/request-action@v2.x
+ id: pr-data
+ with:
+ route: GET /repos/{repo}/pulls/{number}
+ repo: ${{ github.repository }}
+ number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Fetch affected routes
+ id: fetch-route
+ uses: actions/github-script@v7
+ env:
+ PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
+ with:
+ # by default, JSON format returned
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const PR = JSON.parse(process.env.PULL_REQUEST)
+ const body = PR.body
+ const number = PR.number
+ const sender = PR.user.login
+ const { default: identify } = await import('${{ github.workspace }}/scripts/workflow/test-route/identify.mjs')
+ return identify({ github, context, core }, body, number, sender)
+
+ - name: Fetch Docker image
+ if: (env.TEST_CONTINUE)
+ uses: dawidd6/action-download-artifact@v7
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ run_id: ${{ github.event.workflow_run.id }}
+ name: docker-image
+ path: ../artifacts-${{ github.run_id }}
+
+ - name: Import Docker image and set up Docker container
+ if: (env.TEST_CONTINUE)
+ working-directory: ../artifacts-${{ github.run_id }}
+ run: |
+ set -ex
+ zstd -d --stdout rsshub.tar.zst | docker load
+ docker run -d \
+ --name rsshub \
+ -e NODE_ENV=dev \
+ -e LOGGER_LEVEL=debug \
+ -e ALLOW_USER_HOTLINK_TEMPLATE=true \
+ -e ALLOW_USER_SUPPLY_UNSAFE_DOMAIN=true \
+ -p 1200:1200 \
+ rsshub:latest
+
+ - uses: pnpm/action-setup@v4
+
+ - uses: actions/setup-node@v4
+ if: (env.TEST_CONTINUE)
+ with:
+ node-version: lts/*
+ cache: 'pnpm'
+
+ - name: Install dependencies (pnpm) # require js-beautify
+ if: (env.TEST_CONTINUE)
+ run: pnpm i
+
+ - name: Generate feedback
+ if: (env.TEST_CONTINUE)
+ id: generate-feedback
+ timeout-minutes: 10
+ uses: actions/github-script@v7
+ env:
+ TEST_BASEURL: http://localhost:1200
+ TEST_ROUTES: ${{ steps.fetch-route.outputs.result }}
+ PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const PR = JSON.parse(process.env.PULL_REQUEST)
+ const link = process.env.TEST_BASEURL
+ const routes = JSON.parse(process.env.TEST_ROUTES)
+ const number = PR.number
+ core.info(`${link}, ${routes}, ${number}`)
+ const { default: test } = await import('${{ github.workspace }}/scripts/workflow/test-route/test.mjs')
+ await test({ github, context, core }, link, routes, number)
+
+ - name: Pull Request Labeler
+ if: ${{ failure() }}
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: 'add-labels'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
+ labels: 'Auto: Route Test Failed'
+
+ - name: Print Docker container logs
+ if: (env.TEST_CONTINUE)
+ run: docker logs rsshub # logs/combined.log? Not so readable...
diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml
index 7571ecb60f6007..79144429814db9 100644
--- a/.github/workflows/docker-test.yml
+++ b/.github/workflows/docker-test.yml
@@ -1,5 +1,3 @@
-# name: '[docker] CI for build tests'
-# https://github.community/t/215358
name: PR - Docker build test
on:
@@ -9,19 +7,12 @@ on:
paths:
- '.github/workflows/docker-test.yml'
- 'lib/**'
- - '!**/maintainer.js'
- - '!**/radar.js'
- - '!**/radar-rules.js'
- 'Dockerfile'
- 'package.json'
- 'pnpm-lock.yaml'
types: [opened, reopened, synchronize, edited]
# Please, always create a pull request instead of push to master.
-permissions:
- contents: read
- pull-requests: write
-
concurrency:
group: docker-test-${{ github.ref_name }}
cancel-in-progress: true
@@ -29,8 +20,11 @@ concurrency:
jobs:
test:
name: Docker build & tests
+ permissions:
+ pull-requests: write
+ attestations: write
runs-on: ubuntu-latest
- timeout-minutes: 15
+ timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -46,7 +40,7 @@ jobs:
flavor: latest=true
- name: Build Docker image
- uses: docker/build-push-action@v5
+ uses: docker/build-push-action@v6
with:
context: .
build-args: PUPPETEER_SKIP_DOWNLOAD=0 # also test bundling Chromium
@@ -65,17 +59,17 @@ jobs:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
- labels: 'Route Test: Failed'
+ labels: 'Auto: Route Test Failed'
- name: Test Docker image
run: bash scripts/docker/test-docker.sh
- name: Export Docker image
- run: docker save rsshub:latest | gzip -1cf > rsshub.tar.gz
+ run: docker save rsshub:latest | zstdmt -o rsshub.tar.zst
- name: Upload Docker image
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: docker-image
- path: rsshub.tar.gz
+ path: rsshub.tar.zst
retention-days: 1
diff --git a/.github/workflows/docs-search-index.yml b/.github/workflows/docs-search-index.yml
deleted file mode 100644
index 2cca71ac98c38f..00000000000000
--- a/.github/workflows/docs-search-index.yml
+++ /dev/null
@@ -1,58 +0,0 @@
-name: Update meilisearch index
-
-on:
- push:
- branches:
- - master
- paths:
- - '.github/workflows/docs-search-index.yml'
- - 'scripts/docs-scraper/docs.rsshub.app.json'
- - 'website/**'
- workflow_dispatch: ~
- schedule:
- - cron: '44 1 * * 1'
-
-concurrency:
- group: docs-search-index
-
-jobs:
- scrape-docs:
- runs-on: ubuntu-latest
- timeout-minutes: 15
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Pull image
- run: docker pull getmeili/docs-scraper
- - name: Wait for Netlify to finish
- run: sleep 2m
- if: github.event_name == 'push'
- - name: Run docs-scraper
- env:
- HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
- API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
- CONFIG_FILE_PATH: ${{ github.workspace }}/scripts/docs-scraper/docs.rsshub.app.json
- run: |
- docker run -t --rm \
- -e MEILISEARCH_HOST_URL=$HOST_URL \
- -e MEILISEARCH_API_KEY=$API_KEY \
- -v $CONFIG_FILE_PATH:/docs-scraper/config.json \
- getmeili/docs-scraper pipenv run ./docs_scraper config.json
- - name: Swap index
- env:
- HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
- API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
- run: |
- curl \
- -X POST $HOST_URL/swap-indexes \
- -H "Authorization: Bearer $API_KEY" \
- -H 'Content-Type: application/json' \
- -d '[{"indexes":["rsshub","rsshub-tmp"]}]'
- - name: Delete old index
- env:
- HOST_URL: ${{ secrets.MEILISEARCH_HOST_URL }}
- API_KEY: ${{ secrets.MEILISEARCH_API_KEY }}
- run: |
- curl \
- -X DELETE $HOST_URL/indexes/rsshub-tmp \
- -H "Authorization: Bearer $API_KEY"
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index e82387e8486fb9..a2ca9899fa5b32 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -1,13 +1,10 @@
-name: format
+name: Format
on:
push:
branches:
- master
-permissions:
- contents: read
-
jobs:
format:
permissions:
@@ -18,16 +15,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
- run: pnpm i
- - run: pnpm i
- working-directory: website
- run: npm run format
- name: Commit files
run: |
diff --git a/.github/workflows/issue-command.yml b/.github/workflows/issue-command.yml
index 1206b0c514e451..b80c2b5ea2dfa4 100644
--- a/.github/workflows/issue-command.yml
+++ b/.github/workflows/issue-command.yml
@@ -4,15 +4,15 @@ on:
issue_comment:
types: [created]
-permissions:
- contents: read
-
jobs:
rebase:
name: Automatic Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'COLLABORATOR'
runs-on: ubuntu-latest
timeout-minutes: 5
+ permissions:
+ contents: write
+ pull-requests: write
steps:
- name: Checkout the latest code
uses: actions/checkout@v4
@@ -21,7 +21,7 @@ jobs:
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.8
env:
- GITHUB_TOKEN: ${{ secrets.TOKEN_SUPER }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
self-assign:
name: Self Assign
@@ -29,10 +29,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
- contents: read
issues: write
steps:
- - uses: bdougie/take-action@v1.5
+ - uses: bdougie/take-action@v1.6.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
trigger: '/wip'
@@ -43,19 +42,36 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
- contents: read
+ attestations: write
issues: write
+ pull-requests: write
steps:
+ - name: Fetch PR data (for PR)
+ if: github.event.issue.pull_request
+ uses: octokit/request-action@v2.x
+ id: pr-data
+ with:
+ route: GET /repos/{repo}/pulls/{number}
+ repo: ${{ github.repository }}
+ number: ${{ github.event.issue.number }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
- name: Checkout
+ if: ${{ !github.event.issue.pull_request }}
uses: actions/checkout@v4
- - name: Install pnpm
- uses: pnpm/action-setup@v2
+ - name: Checkout PR
+ if: github.event.issue.pull_request
+ uses: actions/checkout@v4
with:
- version: 8
+ ref: ${{ fromJson(steps.pr-data.outputs.data).head.ref }}
+
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
- name: Use Node.js Active LTS
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
@@ -64,8 +80,8 @@ jobs:
run: pnpm i && pnpm rb
- name: Fetch affected routes
- id: fetchRoute
- uses: actions/github-script@v6
+ id: fetch-route
+ uses: actions/github-script@v7
env:
EVENT: ${{ toJson(github.event) }}
with:
@@ -74,8 +90,12 @@ jobs:
const body = event.comment.body
const number = event.issue.number
const sender = event.comment.user.login
- const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/identify.js`)
- return script({ github, context, core }, body, number, sender)
+ const { default: identify } = await import('${{ github.workspace }}/scripts/workflow/test-route/identify.mjs')
+ return identify({ github, context, core }, body, number, sender)
+
+ - name: Build RSSHub
+ if: env.TEST_CONTINUE
+ run: pnpm build
- name: Start RSSHub
if: env.TEST_CONTINUE
@@ -88,10 +108,10 @@ jobs:
- name: Generate feedback
if: env.TEST_CONTINUE
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
env:
TEST_BASEURL: http://localhost:1200
- TEST_ROUTES: ${{ steps.fetchRoute.outputs.result }}
+ TEST_ROUTES: ${{ steps.fetch-route.outputs.result }}
EVENT: ${{ toJson(github.event) }}
with:
script: |
@@ -100,16 +120,15 @@ jobs:
const routes = JSON.parse(process.env.TEST_ROUTES)
const number = event.issue.number
core.info(`${link}, ${routes}, ${number}`)
- const got = require("got")
- const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/test.js`)
- return script({ github, context, core, got }, link, routes, number)
+ const { default: test } = await import('${{ github.workspace }}/scripts/workflow/test-route/test.mjs')
+ await test({ github, context, core }, link, routes, number)
- name: Print logs
- if: (env.TEST_CONTINUE)
+ if: env.TEST_CONTINUE
run: cat ${{ github.workspace }}/logs/combined.log
- name: Upload Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: logs
path: logs
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 00000000000000..4f317a38646bd1
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,83 @@
+name: Linter
+
+# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
+# pull_request includes [opened, reopened, synchronize] events by default
+# 'edited' is required for title-lint
+on:
+ push: {}
+ pull_request:
+ types: [opened, reopened, synchronize, edited]
+ pull_request_target:
+ types: [opened, reopened, synchronize, edited]
+
+jobs:
+ # eslint:
+ # name: ESLint
+ # if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
+ # runs-on: ubuntu-latest
+ # timeout-minutes: 5
+ # steps:
+ # - uses: actions/checkout@v4
+ # - uses: pnpm/action-setup@v4
+ # with:
+ # version: 9
+ # - uses: actions/setup-node@v4
+ # with:
+ # node-version: lts/*
+ # cache: 'pnpm'
+ # - run: pnpm i
+ # - name: Lint
+ # run: pnpm run lint
+
+# https://github.com/actions/starter-workflows/blob/main/code-scanning/eslint.yml
+ eslint-warning:
+ name: Lint
+ if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ permissions:
+ security-events: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: lts/*
+ cache: 'pnpm'
+ - run: pnpm i
+ - name: Lint
+ run: pnpm run lint
+ --format @microsoft/eslint-formatter-sarif
+ --output-file eslint-results.sarif
+ continue-on-error: true
+ - name: Upload analysis results to GitHub
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: eslint-results.sarif
+ wait-for-processing: true
+
+# https://github.com/amannn/action-semantic-pull-request
+ title-lint:
+ if: ${{ github.event_name == 'pull_request_target' && github.repository == 'DIYgod/RSSHub' }}
+ name: Validate PR title
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ steps:
+ - uses: amannn/action-semantic-pull-request@v5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ ignoreLabels: |
+ dependencies
+ wip: true
+
+ labeler:
+ name: Pull Request Labeler
+ if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' && github.repository == 'DIYgod/RSSHub' }}
+ permissions:
+ pull-requests: write
+ runs-on: ubuntu-latest
+ timeout-minutes: 5
+ steps:
+ - uses: actions/labeler@v5
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
index 03e77142c59db5..bd6666ae3af8f8 100644
--- a/.github/workflows/npm-publish.yml
+++ b/.github/workflows/npm-publish.yml
@@ -1,4 +1,4 @@
-name: publish
+name: npm Publish
on:
push:
@@ -7,12 +7,8 @@ on:
paths:
- '.github/workflows/npm-publish.yml'
- 'lib/**'
- - '!**/maintainer.js'
- - '!**/radar.js'
- - '!**/radar-rules.js'
permissions:
- contents: read
id-token: write
jobs:
@@ -25,10 +21,8 @@ jobs:
HUSKY: 0
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
diff --git a/.github/workflows/pr-deploy-route-test.yml b/.github/workflows/pr-deploy-route-test.yml
deleted file mode 100644
index 900bb493206c48..00000000000000
--- a/.github/workflows/pr-deploy-route-test.yml
+++ /dev/null
@@ -1,106 +0,0 @@
-name: PR - route test
-on:
- workflow_run:
- workflows: [ PR - Docker build test ] # open, reopen, synchronized, edited included
- types: [ completed ]
-
-jobs:
- testRoute:
- name: Route test
- runs-on: ubuntu-latest
- if: ${{ github.event.workflow_run.conclusion == 'success' }} # skip if unsuccessful
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
-
- # https://github.com/orgs/community/discussions/25220
- - name: Search the PR that triggered this workflow
- uses: potiuk/get-workflow-origin@v1_5
- id: source-run-info
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- sourceRunId: ${{ github.event.workflow_run.id }}
-
- - name: Fetch PR data via GitHub API
- uses: octokit/request-action@v2.x
- id: pr-data
- with:
- route: GET /repos/{repo}/pulls/{number}
- repo: ${{ github.repository }}
- number: ${{ steps.source-run-info.outputs.pullRequestNumber }}
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Fetch affected routes
- id: fetchRoute
- uses: actions/github-script@v6
- env:
- PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
- with:
- # by default, JSON format returned
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const PR = JSON.parse(process.env.PULL_REQUEST)
- const body = PR.body
- const number = PR.number
- const sender = PR.user.login
- const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/identify.js`)
- return script({ github, context, core }, body, number, sender)
-
- - name: Fetch Docker image
- if: (env.TEST_CONTINUE)
- uses: dawidd6/action-download-artifact@v2
- with:
- workflow: ${{ github.event.workflow_run.workflow_id }}
- run_id: ${{ github.event.workflow_run.id }}
-
- - name: Import Docker image and set up Docker container
- if: (env.TEST_CONTINUE)
- run: |
- set -ex
- gzip -cvd docker-image/rsshub.tar.gz | docker load
- docker run -d \
- --name rsshub \
- -e NODE_ENV=dev \
- -e LOGGER_LEVEL=debug \
- -e ALLOW_USER_HOTLINK_TEMPLATE=true \
- -e ALLOW_USER_SUPPLY_UNSAFE_DOMAIN=true \
- -p 1200:1200 \
- rsshub:latest
-
- - uses: pnpm/action-setup@v2
- with:
- version: 8
-
- - uses: actions/setup-node@v3 # just need its cache
- if: (env.TEST_CONTINUE)
- with:
- node-version: lts/*
- cache: 'pnpm'
-
- - name: Install dependencies (pnpm) # `got` needed since `github.request` disallows HTTP requests
- if: (env.TEST_CONTINUE)
- run: pnpm i
-
- - name: Generate feedback
- if: (env.TEST_CONTINUE)
- uses: actions/github-script@v6
- env:
- TEST_BASEURL: http://localhost:1200
- TEST_ROUTES: ${{ steps.fetchRoute.outputs.result }}
- PULL_REQUEST: ${{ steps.pr-data.outputs.data }}
- with:
- github-token: ${{secrets.GITHUB_TOKEN}}
- script: |
- const PR = JSON.parse(process.env.PULL_REQUEST)
- const link = process.env.TEST_BASEURL
- const routes = JSON.parse(process.env.TEST_ROUTES)
- const number = PR.number
- core.info(`${link}, ${routes}, ${number}`)
- const got = require("got");
- const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/test.js`)
- return script({ github, context, core, got }, link, routes, number)
-
- - name: Print Docker container logs
- if: (env.TEST_CONTINUE)
- run: docker logs rsshub # logs/combined.log? Not so readable...
diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml
deleted file mode 100644
index 3a1a784a5900f0..00000000000000
--- a/.github/workflows/pr-lint.yml
+++ /dev/null
@@ -1,95 +0,0 @@
-name: Linter
-
-on: [push, pull_request, pull_request_target]
-
-jobs:
- eslint:
- name: ESLint
- if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
- runs-on: ubuntu-latest
- timeout-minutes: 5
- steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
- with:
- node-version: lts/*
- cache: 'pnpm'
- - run: pnpm i
- - name: Lint
- run: pnpm run lint
-
- eslint-warning:
- name: Lint
- if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
- runs-on: ubuntu-latest
- timeout-minutes: 5
- permissions:
- contents: read
- security-events: write
- steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
- with:
- node-version: lts/*
- cache: 'pnpm'
- - run: pnpm i
- - name: Lint
- run: pnpm run lint
- --format @microsoft/eslint-formatter-sarif
- --output-file eslint-results.sarif
- continue-on-error: true
- - name: Upload analysis results to GitHub
- uses: github/codeql-action/upload-sarif@v2
- with:
- sarif_file: eslint-results.sarif
- wait-for-processing: true
-
- titleLint:
- if: ${{ github.event_name == 'pull_request_target' && github.repository == 'DIYgod/RSSHub' }}
- name: Validate PR title
- runs-on: ubuntu-latest
- timeout-minutes: 5
- steps:
- - uses: amannn/action-semantic-pull-request@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- ignoreLabels: |
- dependencies
- wip: true
-
- labeler:
- name: Pull Request Labeler
- if: ${{ github.event_name == 'pull_request_target' && github.actor != 'dependabot[bot]' }}
- permissions:
- contents: read
- pull-requests: write
- runs-on: ubuntu-latest
- timeout-minutes: 5
- steps:
- - uses: actions/labeler@v4
- with:
- repo-token: ${{ secrets.GITHUB_TOKEN }}
-
- chatgpt-review:
- name: ChatGPT PR reviewer
- if: ${{ github.event_name == 'pull_request_target' && false }}
- permissions:
- contents: read
- pull-requests: write
- runs-on: ubuntu-latest
- timeout-minutes: 5
- steps:
- - uses: fluxninja/openai-pr-reviewer@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- with:
- openai_base_url: ${{ secrets.OPENAI_API_ENDPOINT }}
- openai_model_temperature: '1.0'
- disable_release_notes: true
diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml
index d67cc7ddccd77a..5fb469de005d95 100644
--- a/.github/workflows/semgrep.yml
+++ b/.github/workflows/semgrep.yml
@@ -1,26 +1,33 @@
+name: Semgrep
+
+# https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#sample-github-actions-configuration-file
on:
pull_request_target:
branches:
- - master
- paths:
- - .github/workflows/semgrep.yml
+ - master
push:
branches:
- - master
- paths:
- - .github/workflows/semgrep.yml
+ - master
schedule:
- # random HH:MM to avoid a load spike on GitHub Actions at 00:00
- - cron: 21 20 * * *
-name: Semgrep
+ # random HH:MM to avoid a load spike on GitHub Actions at 00:00
+ - cron: 21 20 * * *
+
jobs:
semgrep:
name: Scan
runs-on: ubuntu-latest
- env:
- SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
image: returntocorp/semgrep
+ if: (github.triggering_actor != 'dependabot[bot]')
+ permissions:
+ security-events: write
steps:
- - uses: actions/checkout@v4
- - run: semgrep ci
+ - uses: actions/checkout@v4
+ - run: semgrep ci --sarif > semgrep.sarif
+ env:
+ SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
+ - name: Upload SARIF file for GitHub Advanced Security Dashboard
+ uses: github/codeql-action/upload-sarif@v3
+ with:
+ sarif_file: semgrep.sarif
+ if: always()
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 90701a832db464..c11a215094233a 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -1,4 +1,5 @@
name: 'Close stale issues and PRs'
+
on:
schedule:
- cron: '31 23 * * *'
@@ -11,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- - uses: actions/stale@v8
+ - uses: actions/stale@v9
with:
# Don't stale issues
days-before-issue-stale: -1
@@ -21,3 +22,6 @@ jobs:
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.
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
+ exempt-issue-labels: 'dependencies,wait for upstream'
+ exempt-pr-labels: 'dependencies,wait for upstream'
+ any-of-issue-labels: 'more data required'
diff --git a/.github/workflows/test-full-routes.yml b/.github/workflows/test-full-routes.yml
new file mode 100644
index 00000000000000..ce46651922ba53
--- /dev/null
+++ b/.github/workflows/test-full-routes.yml
@@ -0,0 +1,39 @@
+name: Build assets (Full Routes Test Result)
+
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 * * *'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ name: Build assets
+ timeout-minutes: 120
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Install pnpm
+ uses: pnpm/action-setup@v4
+ - name: Use Node.js Active LTS
+ uses: actions/setup-node@v4
+ with:
+ node-version: lts/*
+ cache: 'pnpm'
+ - name: Install dependencies (yarn)
+ run: pnpm i
+ - name: Build assets
+ run: pnpm build
+ - name: Build full routes test result
+ continue-on-error: true
+ run: pnpm vitest:fullroutes
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v4
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./assets
+ user_name: 'github-actions[bot]'
+ user_email: '41898282+github-actions[bot]@users.noreply.github.com'
+ keep_files: true
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 63356b25073d1a..f335abdebb7725 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,25 +1,21 @@
-name: test
+name: Test
on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- - 'test/**'
- 'lib/**'
- - '!**/maintainer.js'
- - '!**/radar.js'
- - '!**/radar-rules.js'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/test.yml'
- pull_request: ~
+ pull_request: {}
permissions:
- contents: read
+ checks: write
jobs:
- jest:
+ vitest:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
@@ -31,14 +27,12 @@ jobs:
strategy:
fail-fast: false
matrix:
- node-version: [ 18, 20 ]
- name: Jest on Node ${{ matrix.node-version }}
+ node-version: [ latest, lts/*, lts/-1 ]
+ name: Vitest on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
@@ -46,13 +40,15 @@ jobs:
run: pnpm i
- name: Run postinstall script for dependencies
run: pnpm rb
+ - name: Build routes
+ run: pnpm build
- name: Test all and generate coverage
- run: pnpm run jest:coverage
+ run: pnpm run vitest:coverage --reporter=github-actions
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- name: Upload coverage to Codecov
- if: ${{ matrix.node-version == '18' }}
- uses: codecov/codecov-action@v3
+ if: ${{ matrix.node-version == 'lts/*' }}
+ uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken
@@ -62,39 +58,42 @@ jobs:
strategy:
fail-fast: false
matrix:
- node-version: [ 18, 20 ]
+ node-version: [ latest, lts/*, lts/-1 ]
chromium:
- name: bundled Chromium
dependency: ''
- environment: '{}'
+ environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "0" }'
- name: Chromium from Ubuntu
dependency: chromium-browser
- environment: '{ "CHROMIUM_EXECUTABLE_PATH": "chromium-browser" }'
+ environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "1" }'
- name: Chrome from Google
dependency: google-chrome-stable
- environment: '{ "CHROMIUM_EXECUTABLE_PATH": "google-chrome-stable" }'
- name: Jest puppeteer on Node ${{ matrix.node-version }} with ${{ matrix.chromium.name }}
+ environment: '{ "PUPPETEER_SKIP_DOWNLOAD": "1" }'
+ name: Vitest puppeteer on Node ${{ matrix.node-version }} with ${{ matrix.chromium.name }}
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies (pnpm)
run: pnpm i
+ env: ${{ fromJSON(matrix.chromium.environment) }}
- name: Run postinstall script for dependencies
run: pnpm rb
+ env: ${{ fromJSON(matrix.chromium.environment) }}
+ - name: Build routes
+ run: pnpm build
+ env: ${{ fromJSON(matrix.chromium.environment) }}
- name: Install Chromium
if: ${{ matrix.chromium.dependency != '' }}
# 'chromium-browser' from Ubuntu APT repo is a dummy package. Its version (85.0.4183.83) means
# nothing since it calls Snap (disgusting!) to install Chromium, which should be up-to-date.
- # That's not really a problem since the Chromium-bundled Docker image is based on Debian bullseye,
+ # That's not really a problem since the Chromium-bundled Docker image is based on Debian bookworm,
# which provides up-to-date native packages.
run: |
- set -ex
+ set -eux
curl -s "https://dl.google.com/linux/linux_signing_key.pub" | gpg --dearmor |
sudo tee /etc/apt/trusted.gpg.d/google-chrome.gpg > /dev/null
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" |
@@ -102,59 +101,41 @@ jobs:
sudo apt-get update
sudo apt-get install -yq --no-install-recommends ${{ matrix.chromium.dependency }}
- name: Test puppeteer
- run: pnpm run jest puppeteer
+ run: |
+ set -eux
+ export CHROMIUM_EXECUTABLE_PATH="$(which ${{ matrix.chromium.dependency }})"
+ pnpm run vitest puppeteer
env: ${{ fromJSON(matrix.chromium.environment) }}
- docs:
- runs-on: ubuntu-latest
- timeout-minutes: 10
- strategy:
- fail-fast: false
- matrix:
- node-version: [ 18, 20 ]
- defaults:
- run:
- working-directory: website
- name: Build docs on Node ${{ matrix.node-version }}
- steps:
- - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- cache: 'pnpm'
- cache-dependency-path: website/pnpm-lock.yaml
- - run: pnpm i
- - name: Build docs
- run: pnpm run build
- working-directory: website
-
all:
runs-on: ubuntu-latest
timeout-minutes: 5
+ permissions:
+ attestations: write
strategy:
fail-fast: false
matrix:
- node-version: [ 18, 20 ]
+ node-version: [ 23, 22, 20 ]
name: Build radar and maintainer on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2
- with:
- version: 8
- - uses: actions/setup-node@v3
+ - uses: pnpm/action-setup@v4
+ - uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm i
- name: Build radar and maintainer
- run: npm run build:all
+ run: npm run build
+ - name: Upload assets
+ uses: actions/upload-artifact@v4
+ with:
+ name: generated-assets-${{ matrix.node-version }}
+ path: assets/build/
automerge:
- if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
- needs: [ jest, puppeteer, docs, all ]
+ if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request'
+ needs: [ vitest, puppeteer, all ]
runs-on: ubuntu-latest
permissions:
pull-requests: write
diff --git a/.github/workflows/yarn-lock-changes.yml b/.github/workflows/yarn-lock-changes.yml
deleted file mode 100644
index 00b14898fe60af..00000000000000
--- a/.github/workflows/yarn-lock-changes.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Yarn Lock Changes
-on:
- pull_request:
- paths:
- - '.github/workflows/yarn-lock-changes.yml'
- - 'yarn.lock'
- - 'docs/yarn.lock'
-
-jobs:
- yarn_lock_changes:
- runs-on: ubuntu-latest
- timeout-minutes: 5
- # Permission overwrite is required for Dependabot PRs, see https://github.com/marketplace/actions/yarn-lock-changes#-common-issues.
- permissions:
- pull-requests: write
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Yarn Lock Changes
- uses: Simek/yarn-lock-changes@v0.11.2
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 0f1bcc4871414c..368a4c547ba8e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
.DS_Store
-.env
+.env*
.eslintcache
.idea
.log
@@ -19,6 +19,7 @@ coverage
docs/.vuepress/dist
node_modules
tmp
+dist
Session.vim
combined.log
diff --git a/.gitpod.yml b/.gitpod.yml
index 1b49b8f8bd39b6..0ee2c93f22e2c0 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -14,7 +14,7 @@ tasks:
sudo apt update
sudo apt install -y 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-util
sudo apt install -y redis-server
- init: pnpm i && pnpm i -C website && pnpm rb
+ init: pnpm i && pnpm rb
- name: app
command: pnpm run dev
openMode: tab-after
@@ -32,15 +32,7 @@ vscode:
- EditorConfig.EditorConfig
- esbenp.prettier-vscode
- deepscan.vscode-deepscan
- - rangav.vscode-thunder-client
- sonarsource.sonarlint-vscode
+ # - VASubasRaj.flashpost not available on Open VSX, Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0
+ - unifiedjs.vscode-mdx
# - ZihanLi.at-helper not available on Open VSX
-
-github:
- prebuilds:
- master: true
- branches: true
- pullRequests: false
- pullRequestsFromForks: false
- addCheck: false
- addComment: false
diff --git a/.husky/pre-commit b/.husky/pre-commit
old mode 100755
new mode 100644
index d24fdfc601b9ff..c27d8893a99490
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1 @@
-#!/usr/bin/env sh
-. "$(dirname -- "$0")/_/husky.sh"
-
-npx lint-staged
+lint-staged
diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc
deleted file mode 100644
index e426ea78adf606..00000000000000
--- a/.markdownlint.jsonc
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "MD007": { "indent": 4 }, // ul-indent - Unordered list indentation
- "MD013": false, // line-length - Line length
- "MD014": false, // commands-show-output - Dollar signs used before commands without showing output
- "MD024": { "siblings_only": true }, // no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
- "MD030": { "ul_single": 3, "ol_single": 2, "ul_multi": 3, "ol_multi": 2 }, // list-marker-space - Spaces after list markers
- "MD033": false, // no-inline-html - Inline HTML
- "MD036": false, // no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading
- "MD040": false, // fenced-code-language - Fenced code blocks should have a language specified
- "MD051": false // link-fragments - Link fragments should be valid
-}
diff --git a/.npmrc b/.npmrc
new file mode 100644
index 00000000000000..74538ab74e5dd9
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1,2 @@
+package-lock=true
+package-manager-strict=false
diff --git a/.nvmrc b/.nvmrc
deleted file mode 100644
index a77793ecc5200b..00000000000000
--- a/.nvmrc
+++ /dev/null
@@ -1 +0,0 @@
-lts/hydrogen
diff --git a/.prettierignore b/.prettierignore
index 8ee16a7bc609f1..b6b684c5ac07b0 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,8 +1,4 @@
-package.json
-docs/.vuepress/dist
-package-lock.json
-.github/*.md
-renovate.json
-coverage
-.vscode/
-website
+lib/routes-deprecated
+lib/router.js
+babel.config.js
+scripts/docker/minify-docker.js
diff --git a/.puppeteerrc.cjs b/.puppeteerrc.cjs
new file mode 100644
index 00000000000000..a4e6d37234ef19
--- /dev/null
+++ b/.puppeteerrc.cjs
@@ -0,0 +1,9 @@
+const path = require('path');
+
+/**
+ * @type {import("puppeteer").Configuration}
+ */
+module.exports = {
+ // Changes the cache location for Puppeteer.
+ cacheDirectory: path.join(__dirname, 'node_modules', '.cache', 'puppeteer'),
+};
diff --git a/.puppeteerrc.js b/.puppeteerrc.js
deleted file mode 100644
index 06843b6b1575cc..00000000000000
--- a/.puppeteerrc.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const { join } = require('path');
-
-/**
- * @type {import("puppeteer").Configuration}
- */
-module.exports = {
- // Changes the cache location for Puppeteer.
- cacheDirectory: join(__dirname, 'node_modules', '.cache', 'puppeteer'),
-};
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index c63af734ae66fa..e452526ecf3d55 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -39,7 +39,7 @@ This Code of Conduct applies within all community spaces, and also applies when
## Enforcement
-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.
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
@@ -74,11 +74,11 @@ Community leaders will follow these Community Impact Guidelines in determining t
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
-available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
+available at