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

Make README template customizable #165

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

ashleywillard
Copy link
Contributor

@ashleywillard ashleywillard commented Dec 12, 2024

Allows users to specify a README template other than the default template currently defined in packs. Also allows users to specify a path to the readme template, or by default the template should be located at README_TEMPLATE.md. The README_TODO file currently contains the following text:

Welcome to `#{pack_name}`!

If you're the author, please consider replacing this file with a README.md, which may contain:
  - What your pack is and does
  - How you expect people to use your pack
  - Example usage of your pack's public API (which lives in `#{pack_name}/#{ParsePackwerk::DEFAULT_PUBLIC_PATH}`)
  - Limitations, risks, and important considerations of usage
  - How to get in touch with eng and other stakeholders for questions or issues pertaining to this pack (note: it is recommended to add ownership in `#{pack_name}/package.yml` under the `owner` metadata key)
  - What SLAs/SLOs (service level agreements/objectives), if any, your package provides
  - When in doubt, keep it simple
  - Anything else you may want to include!

 README.md files are under version control and should change as your public API changes.#{' '}

See #{documentation_link} for more info!

Some organizations may want to use their own README template. #154 requested the ability to customize the README but was closed due to inactivity.

  • TODO: specs
  • I bumped the gem version (or don't need to) 💎

Allows users to specify a README template other than the default template currently defined in `packs`.
@ashleywillard ashleywillard force-pushed the aw/make-readme-template-customizable branch from 58dc555 to 68847d7 Compare December 16, 2024 22:43
@ashleywillard ashleywillard marked this pull request as ready for review December 16, 2024 22:43
Packs.create_pack!(pack_name: 'packs/organisms')
ParsePackwerk.bust_cache!
actual_readme_todo = ParsePackwerk.find('packs/organisms').directory.join('README_TODO.md')
expect(actual_readme_todo.read).to eq 'This is the template'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change the content to This is the custom template so that it's clear this test is testing something different from the one on 342

@ashleywillard ashleywillard merged commit 332b8f5 into main Dec 18, 2024
6 checks passed
@ashleywillard ashleywillard deleted the aw/make-readme-template-customizable branch December 18, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants