1
0
Fork 0
mirror of https://github.com/veggiemonk/awesome-docker.git synced 2025-04-21 08:18:08 +02:00

fixed pull request checks

This commit is contained in:
Julien Bisconti 2020-10-16 08:50:27 +02:00 committed by Julien Bisconti
parent 9a31161d83
commit d5dca645a0
3 changed files with 9 additions and 6 deletions

View file

@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@01aecccf739ca6ff86c0539fbc67a7a5007bbc81
- uses: actions/setup-node@83c9f7a7df54d6b57455f7c57ac414f2ae5fb8de
with:
node-version: 12
node-version: 14
- uses: actions/cache@70655ec8323daeeaa7ef06d7c56e1b9191396cbe
id: cache

View file

@ -29,7 +29,7 @@
},
"devDependencies": {
"babel-eslint": "10.1.0",
"eslint": "7.10.0",
"eslint": "7.11.0",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.12.0",
"eslint-plugin-import": "2.22.1",

View file

@ -154,6 +154,7 @@ async function main() {
duplicates: '',
other_links_error: '',
github_repos: '',
query: '',
};
const markdown = await fs.readFile(README, 'utf8');
let links = extract_all_links(markdown);
@ -192,16 +193,18 @@ async function main() {
const repos = extract_repos(github_links);
const query = generate_GQL_query(repos);
const options = make_GQL_options(query);
const gql_response = await fetch(GITHUB_GQL_API, options).then((r) =>
r.json(),
);
const gql_response = await fetch(GITHUB_GQL_API, options)
.then((r) => r.json())
.catch((err) => console.error(err));
if (gql_response.errors) {
has_error.show = true;
has_error.github_repos = gql_response.errors;
has_error.query = query;
}
console.log({
TEST_PASSED: has_error.show,
TEST_PASSED: !has_error.show,
GITHUB_REPOSITORY: github_links.length,
EXTERNAL_LINKS: external_links.length,
});