mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
Merge pull request #6661 from NeverBehave/master
fix: core reference, template
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
name: PR route test
|
||||
|
||||
on: pull_request
|
||||
# https://github.com/actions/first-interaction/issues/10#issuecomment-670968624
|
||||
# https://github.com/actions/first-interaction/issues/10#issuecomment-752360668
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
testRoute:
|
||||
@@ -37,6 +40,6 @@ jobs:
|
||||
const link = process.env.TEST_BASEURL
|
||||
const routes = JSON.parse(process.env.TEST_ROUTES)
|
||||
const number = context.payload.pull_request.number
|
||||
console.log(link, routes, number)
|
||||
core.info(`${link}, ${routes}, ${number}`)
|
||||
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/test.js`)
|
||||
return await script({github, context}, link, routes, number)
|
||||
return await script({github, context, core}, link, routes, number)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable */
|
||||
|
||||
module.exports = async ({ github, context }, baseUrl, routes, number) => {
|
||||
module.exports = async ({ github, context, core}, baseUrl, routes, number) => {
|
||||
if (routes[0] === 'NOROUTE') {
|
||||
return;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ module.exports = async ({ github, context }, baseUrl, routes, number) => {
|
||||
let com = 'Successfully generated as following:\n\n';
|
||||
|
||||
for (const lks of links) {
|
||||
console.log('testing route: ', lks);
|
||||
core.info(`testing route: ${lks}`);
|
||||
// Intended, one at a time
|
||||
const res = await github.request(`GET ${lks}`).catch((err) => {
|
||||
com += `
|
||||
|
||||
Reference in New Issue
Block a user