Skip to content

Commit

Permalink
feat: 記事取得機能を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
mk2 committed Feb 28, 2021
1 parent 8df8fef commit 2541807
Show file tree
Hide file tree
Showing 840 changed files with 49,371 additions and 9,008 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ dist/
lib/
node_modules/
jest.config.js
.pnp.js
.yarn
54 changes: 54 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"plugins": ["jest", "@typescript-eslint", "simple-import-sort"],
"extends": ["prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
54 changes: 0 additions & 54 deletions .eslintrc.json

This file was deleted.

9 changes: 0 additions & 9 deletions .github/dependabot.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/test-and-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: test-and-demo
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
yarn set version berry
yarn install --immutable --immutable-cache
- run: |
yarn all
demo-fetch-articles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: zenn/qiitaのユーザーIDリストの設定
id: id-list-json
run: |
zenn=$(echo $(cat ./docs/zenn.json))
echo "::set-output name=zenn::$zenn"
qiita=$(echo $(cat ./docs/qiita.json))
echo "::set-output name=qiita::$qiita"
- uses: ./
with:
zenn: ${{ steps.id-list-json.outputs.zenn }}
qiita: ${{ steps.id-list-json.outputs.qiita }}
qiitaAccessToken: ${{ secrets.QIITA_ACCESS_TOKEN }}
fromDaysAgo: 30

demo-use-result:
needs: demo-fetch-articles
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: articles
path: .
- run: |
node -e "const {spawnSync}=require('child_process');const url='https://idobata.io/hook/custom/844d3335-68f4-445f-ba22-7b70d7746319';console.log(url);const json=JSON.parse(require('fs').readFileSync('./articles.json'));json.forEach(a => spawnSync('curl',['--data-urlencode','source='+a.title,url]));"
24 changes: 0 additions & 24 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,14 @@ Thumbs.db

# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*

/.yarn/*
!/.yarn/releases
!/.yarn/plugins
!/.yarn/sdks

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
!/.yarn/cache
#/.pnp.*
Loading

0 comments on commit 2541807

Please sign in to comment.