generated from pengx17/logseq-plugin-template-react
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: too many pages created due to author names with commas (#30)
* fix: variable collision * feat: import authors with links * docs: update readme * docs: add badges * ci: add review workflow
- Loading branch information
1 parent
7029bcf
commit 874f44d
Showing
16 changed files
with
170 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Review | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
node_test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "yarn" | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
env: | ||
CI: TRUE | ||
|
||
- name: Test | ||
run: yarn test --json --outputFile=jest-results.json | ||
continue-on-error: true | ||
|
||
- name: Process jest results with default | ||
if: always() | ||
uses: im-open/process-jest-test-results@v2.0.6 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
results-file: "jest-results.json" | ||
|
||
- name: Linting | ||
run: yarn lint --output-file eslint_report.json --format json src | ||
continue-on-error: true | ||
|
||
- name: Annotate Code Linting Results | ||
uses: ataylorme/eslint-annotate-action@v2 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
report-json: "eslint_report.json" | ||
|
||
- name: Upload ESLint report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: eslint_report.json | ||
path: eslint_report.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules | |
dist | ||
dist-ssr | ||
*.local | ||
.env | ||
.env | ||
coverage/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { nameToLink } from './useImportBooks'; | ||
|
||
describe('useImportBooks', () => { | ||
describe('nameToLink', () => { | ||
it('should create a link', () => { | ||
const result = nameToLink()('Last, First'); | ||
|
||
expect(result).toEqual('[[Last, First]]'); | ||
}); | ||
|
||
it('should reverse name order when set', () => { | ||
const result = nameToLink({ reverseNameOrder: true })('Last, First'); | ||
|
||
expect(result).toEqual('[[First Last]]'); | ||
}) | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters