-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use AST parser to validate alt text - markdown-lint #33
Conversation
action.yml
Outdated
runs: | ||
using: "composite" | ||
steps: | ||
- name: Runs alt text check and adds comment | ||
run: | | ||
source ${{ github.action_path }}/flag-alt-text.sh | ||
source ${{ github.action_path }}/queries.sh | ||
source ${{ github.action_path }}/flag-alt-text.sh |
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.
Looks like we can delete this given the file has been removed!
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 am testing this branch in one of my repos! (Related workflow error)
src/index.test.js
Outdated
@@ -0,0 +1,127 @@ | |||
import { validate } from "./validate.js"; |
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.
Beautiful test coverage!
elif [[ $type = discussion_description ]]; then | ||
addDiscussionComment $discussion_node_id "$message" | ||
elif [[ $type = discussion_comment ]]; then | ||
addDiscussionComment $discussion_node_id "$message" $reply_to_id |
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 would love if we can eventually move all of this bash logic into a well-tested node script! Out of scope here though :)
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.
Agreed!!
Proof of concept run: khiga8/link-checker#9 @khiga8 ... i had to check in node_modules..... but it works |
Eeep sorry I didn't get to review this today, I'll take a look first thing tomorrow! |
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.
Great work!
What
Closes #30
I updated the alt-text-bot to use an AST (markdown-lint) to parse images for bad alt text. Using an AST allows us to ignore any images defined in code blocks.
Why is this cool