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

DRY out hook functionality #41

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

mcdonnnj
Copy link
Member

🗣 Description

This pull request breaks duplicated hook logic out into a separate library that is imported. Since it's another potentially general piece of functionality the unique path logic is also moved into the utility library.

💭 Motivation and context

It's best to break out duplicated or general code when possible to reduce conflicting duplication and effort.

🧪 Testing

Automated tests pass. I tested it locally and the hooks functioned as expected.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

Create a utility library to handle argument processing since it is used
by both hooks. Also put the logic for getting unique directory paths
there since it makes sense to put that kind of functionality in a
utility library.
@mcdonnnj mcdonnnj added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Sep 16, 2024
@mcdonnnj mcdonnnj requested a review from a team September 16, 2024 19:54
@mcdonnnj mcdonnnj self-assigned this Sep 16, 2024
Copy link
Member

@dav3r dav3r left a comment

Choose a reason for hiding this comment

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

👍 👍

@mcdonnnj mcdonnnj merged commit dd47d69 into develop Sep 16, 2024
4 checks passed
@mcdonnnj mcdonnnj deleted the improvement/dry_out_hook_code branch September 16, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants