-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a bug in the audit system #71
Merged
Merged
Conversation
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
The `Page.children` property was not recursing into child blocks and as a result any child database or page that was not a top-level block would be picked up by the audit system. This bug would affect other things too, although it was noticed due to an audit producing false positives.
johndgiese
commented
Sep 9, 2022
tests/test_audit_end_to_end.py
Outdated
|
||
assert external_link_in_top_page in stdoutput | ||
assert external_link_in_child_page in stdoutput | ||
assert internal_link_in_child_page not in stdoutput | ||
assert external_link_in_child_database in stdoutput | ||
assert link_to_local_page_in_database_in_column not in stdoutput |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After adding this assertion, the test failed until I updated Page.children
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a typo in page.py on line 42:
ensure's
Mentions in simple tables were showing up as "Untitled". I found a workaround that should suffice for now. I will also point Notion to the test.
This is important as we're soon going to be using link to page blocks in an upcoming plugin.
Previosuly, the id and url properties were only available when dumping to YAML files. There are valid use cases when these properties should be added to markdown front matter YAML too. This commit makes them apply to both.
sHermanGriffiths
approved these changes
Sep 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
Page.children
property was not recursing into child blocks and as a result any child database or page that was not a top-level block would be picked up by the audit system.This bug would affect other things too, although it was noticed due to an audit producing false positives.