diff --git a/.dockerignore b/.dockerignore index ccb5b2a28906d6..6816be3151e5ad 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,32 +1,31 @@ -node_modules -npm-debug.log +.github +.idea +.vscode Dockerfile* -docker-compose* -.dockerignore -.gitignore LICENSE -.vscode -.github +Procfile +app-minimal assets coverage docs +node_modules test .codecov.yml +.dockerignore +.editorconfig +.env .eslint* +.gitignore .prettier* .(yarn|npm|nvm)rc *.md -process.json app.json -.travis.yml -app-minimal -.idea -.env -.editorconfig -Procfile -now.json +docker-compose* jsconfig.json +npm-debug.log +process.json package-lock.json +vercel.json #git but keep the git commit hash .git/logs diff --git a/.editorconfig b/.editorconfig index ac7881bde2cf1d..91508c45aa5a8f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -40,3 +40,6 @@ indent_size = 2 [{**.yml,**.yaml}] indent_size = 2 + +[*.vue] +indent_size = 2 diff --git a/.github/ISSUE_TEMPLATE/bug_report_en.yml b/.github/ISSUE_TEMPLATE/bug_report_en.yml index abaea019a5b9f9..eec29a15a7228c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_en.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_en.yml @@ -9,21 +9,23 @@ body: 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. 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: input + - type: textarea id: routes attributes: label: Routes - description: The involved route, without any parameters - placeholder: /rsshub/routes + 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. + placeholder: /rsshub/someroute/:type? + render: routes validations: required: true - - type: input + - type: textarea id: fullroutes attributes: label: Full routes - description: The involved route, with all required and optional parameters - placeholder: /rsshub/routes + description: The involved route, with all required and optional parameters, and could be duplicate if necessary (different parameters) + placeholder: /rsshub/routes/1234?some_extension=mode + render: fullroutes validations: required: true diff --git a/.github/ISSUE_TEMPLATE/bug_report_zh.yml b/.github/ISSUE_TEMPLATE/bug_report_zh.yml index 9840c5d33fd014..7295927ccfac4a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report_zh.yml +++ b/.github/ISSUE_TEMPLATE/bug_report_zh.yml @@ -9,21 +9,23 @@ body: 请确保已阅读 [文档](https://docs.rsshub.app) 内相关部分,并按照模版提供信息,否则 issue 将被立即关闭。 由于部分源网站反爬缘故,演示地址一些 RSS 会返回 status code 403,该问题不是 RSSHub 所致,请勿提交 issue。 - - type: input + - type: textarea id: routes attributes: label: 路由地址 - description: 不包含参数 - placeholder: /rsshub/routes + description: 不包含参数,复制文档路由参数,一行一个,不要重复。如果和路由没有关系,请写`NOROUTE` + placeholder: /rsshub/someroute/:type? + render: routes validations: required: true - - type: input + - type: textarea id: fullroutes attributes: label: 完整路由地址 - description: 包含所有必选与可选参数 - placeholder: /rsshub/routes + description: 包含所有必选与可选参数,一行一个,可以有重复路由不同参数(如果需要) + placeholder: /rsshub/routes/1234?some_extension=mode + render: fullroutes validations: required: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fad65effbcae19..1eccb7e08ad59d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -19,12 +19,16 @@ updates: 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: 'github-actions' directory: '/' diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index a467da5e288c9b..2eaa3e05861711 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -6,6 +6,7 @@ on: - master paths: - 'lib/**' + - 'scripts/workflow/*.js' jobs: build: diff --git a/.github/workflows/comment-on-issue.yml b/.github/workflows/comment-on-issue.yml new file mode 100644 index 00000000000000..4fa53662fecf5e --- /dev/null +++ b/.github/workflows/comment-on-issue.yml @@ -0,0 +1,25 @@ +name: Comment on Issue + +on: + issues: + types: [opened] + +jobs: + testRoute: + name: Call maintainers + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 # just need its cache + with: + node-version: 16 + cache: 'yarn' + - name: Install dependencies (yarn) # needed since we need to parse markdown, so we also use got instead + run: yarn + - name: Generate feedback + uses: actions/github-script@v6 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-issue/call-maintainer.js`) + return await script({ github, context, core }) diff --git a/.github/workflows/comment-on-pr.yml b/.github/workflows/comment-on-pr.yml deleted file mode 100644 index 0b066982aa3a8b..00000000000000 --- a/.github/workflows/comment-on-pr.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Comment on Issue - -on: - issues: - types: [opened] - -jobs: - comment: - runs-on: ubuntu-latest - steps: - - name: Comment - uses: ben-z/actions-comment-on-issue@1.0.2 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - message: '👍 感谢提交该 Issue,请确保仔细阅读 [Issue 模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_zh.yml),[RSS 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_zh.yml) 或 [Feature 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_zh.yml) 以便于测试。不符合模板将导致 Issue 被直接关闭。

👍 Thanks for the issue, please follow the [Issue template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_en.yml), [RSS proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_en.yml) or [Feature proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_en.yml). Otherwise the issue will be closed.' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f102c8ea113162..2bcd3e70cb6e7a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,7 @@ jobs: puppeteer: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: node-version: [ 14, 16 ] chromium: diff --git a/.github/workflows/yarn-lock-changes.yml b/.github/workflows/yarn-lock-changes.yml index 59842d45325146..32fbc6333acc4d 100644 --- a/.github/workflows/yarn-lock-changes.yml +++ b/.github/workflows/yarn-lock-changes.yml @@ -11,6 +11,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Yarn Lock Changes - uses: Simek/yarn-lock-changes@v0.9.0 + uses: Simek/yarn-lock-changes@v0.11.3 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/api/now.js b/api/vercel.js similarity index 100% rename from api/now.js rename to api/vercel.js diff --git a/assets/radar-rules.js b/assets/radar-rules.js index 6a9867f1beb4ef..cb6e43829cee25 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -129,29 +129,6 @@ { title: '仓库 Contributors', docs: 'https://docs.rsshub.app/programming.html#github', source: ['/:user/:repo/graphs/contributors', '/:user/:repo'], target: '/github/contributors/:user/:repo' }, ], }, - 'zhihu.com': { - _name: '知乎', - www: [ - { title: '收藏夹', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/collection/:id', target: '/zhihu/collection/:id' }, - { title: '用户动态', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id', target: '/zhihu/people/activities/:id' }, - { title: '用户回答', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id/answers', target: '/zhihu/people/answers/:id' }, - { title: '用户想法', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/people/:id/pins', target: '/zhihu/people/pins/:id' }, - { title: '用户文章', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/:usertype/:id/posts', target: '/zhihu/posts/:usertype/:id' }, - { title: '热榜', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/hot', target: '/zhihu/hotlist' }, - { title: '想法热榜', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', target: '/zhihu/pin/hotlist' }, - { title: '问题', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/question/:questionId', target: '/zhihu/question/:questionId' }, - { title: '话题', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/topic/:topicId/:type', target: '/zhihu/topic/:topicId' }, - { title: '新书', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/zhihu/bookstore/newest', target: '/zhihu/pin/hotlist' }, - { title: '想法-24 小时新闻汇总', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/pin/special/972884951192113152', target: '/zhihu/pin/daily' }, - { title: '书店-周刊', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/pub/weekly', target: '/zhihu/weekly' }, - { title: '专栏', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/column/:id', target: '/zhihu/zhuanlan/:id' }, - ], - zhuanlan: [{ title: '专栏', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/:id', target: '/zhihu/zhuanlan/:id' }], - daily: [ - { title: '日报', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '', target: '/zhihu/daily' }, - { title: '日报', docs: 'https://docs.rsshub.app/social-media.html#zhi-hu', source: '/*tpath', target: '/zhihu/daily' }, - ], - }, 'smzdm.com': { _name: '什么值得买', www: [{ title: '排行榜', docs: 'https://docs.rsshub.app/shopping.html#shen-me-zhi-de-mai', source: '/top' }], @@ -174,22 +151,6 @@ }, 'algocasts.io': { _name: 'AlgoCasts', '.': [{ title: '视频更新', docs: 'https://docs.rsshub.app/programming.html#algocasts', source: '/episodes', target: '/algocasts' }] }, 'soulapp.cn': { _name: 'Soul', '.': [{ title: '瞬间更新', docs: 'https://docs.rsshub.app/social-media.html#soul' }] }, - 'juejin.cn': { - _name: '掘金', - '.': [ - { title: '标签', docs: 'https://docs.rsshub.app/programming.html#jue-jin-biao-qian', source: '/tag/:tag', target: '/juejin/tag/:tag' }, - { title: '小册', docs: 'https://docs.rsshub.app/programming.html#jue-jin-xiao-ce', source: '/books', target: '/juejin/books' }, - { - title: '沸点', - docs: 'https://docs.rsshub.app/programming.html#jue-jin-fei-dian', - source: ['/pins/:type', '/pins/topic/:type'], - target: (params) => (params.type !== 'recommended' ? '/juejin/pins/:type' : '/juejin/pins'), - }, - { title: '专栏', docs: 'https://docs.rsshub.app/programming.html#jue-jin-zhuan-lan', source: ['/user/:id', '/user/:id/posts'], target: '/juejin/posts/:id' }, - { title: '收藏集', docs: 'https://docs.rsshub.app/programming.html#jue-jin-shou-cang-ji', source: ['/user/:id', '/user/:id/collections'], target: '/juejin/collections/:id' }, - { title: '单个收藏夹', docs: 'https://docs.rsshub.app/programming.html#jue-jin-dan-ge-shou-cang-jia', source: '/collection/:collectionId', target: '/juejin/collection/:collectionId' }, - ], - }, 'anime1.me': { _name: 'Anime1', '.': [ diff --git a/docs/.vuepress/components/Route.vue b/docs/.vuepress/components/Route.vue index d8c02e350a55e8..22be4fd0cb5c9b 100644 --- a/docs/.vuepress/components/Route.vue +++ b/docs/.vuepress/components/Route.vue @@ -1,7 +1,14 @@