Skip to content
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

Generate Hook Docs with a GitHub Action #448

Merged
merged 7 commits into from
Sep 25, 2019
Merged

Conversation

adamsilverstein
Copy link

@adamsilverstein adamsilverstein commented Aug 23, 2019

Description of the Change

Addresses #387.

  • Add wp-hookdoc a package designed to parse WordPress hooks using JSDON
  • Add the @hook notation wp-hookdoc requires across the plugin for all instances of apply_filter and do_action. (side note: that was tedious, open an upstream issue to remove that requirement).
  • Noted a few hooks that are not documented with @todo notes, cleaned up a few arrays definitions that weren't getting parsed correctly.
  • Add an npm command to build the docs: npm run build:docs
  • Add a GitHub Action yaml file that builds the docs for every commit to develop.
  • Action is now set to deploy to GH Pages, I can add an auth token once the PR is merged.

Alternate Designs

Considered phpdoc-parser https://github.com/WordPress/phpdoc-parser which is used in WordPress core. This project seems more suited for GitHub Actions and our needs.

Benefits

Builds hook docs automatically with an action on each deploy.

Verification Process

  • run npm install && npm run build:docs.
  • open hook_docs/index.html in a browser.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

@adamsilverstein adamsilverstein changed the title Feature/hook docs Generate Hook Docs with a GitHub Action Aug 23, 2019
@jeffpaul jeffpaul added the type:enhancement New feature or request. label Aug 26, 2019
@jeffpaul
Copy link
Member

Thoughts on adding a link to the resulting GitHub Page to distributorplugin.com?

@jeffpaul jeffpaul added this to the 2.0.0 milestone Aug 26, 2019
@adamsilverstein
Copy link
Author

Thoughts on adding a link to the resulting GitHub Page to distributorplugin.com?

yes, we can do that in a follow up PR once this is merged and we are happy with how the GH pages look.

@adamsilverstein adamsilverstein marked this pull request as ready for review September 16, 2019 02:15
@adamsilverstein adamsilverstein merged commit b1dd60f into develop Sep 25, 2019
@jeffpaul jeffpaul mentioned this pull request Jan 21, 2020
@jeffpaul jeffpaul deleted the feature/hook-docs branch June 30, 2020 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants