Skip to content

🛠 Tooling: Have hydration run the setup script after completion #475

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

Closed
3 tasks done
JoshuaKGoldberg opened this issue May 22, 2023 · 2 comments · Fixed by #489
Closed
3 tasks done

🛠 Tooling: Have hydration run the setup script after completion #475

JoshuaKGoldberg opened this issue May 22, 2023 · 2 comments · Fixed by #489
Assignees
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

Once a local repository is hydrated, there are still some setup tasks what will need to be done: setting up GitHub labels, repo settings, etc. Those things are generally run by the setup script. So it'd be useful for repositories to have that setup script run after hydration!

Let's do that: have src/hydrate/hydrate's hydrate function call the setup method exported by src/setup/setup upon completion.

Additional Info

We'll want to have a --skip-setup flag added to hydration so end-to-end tests don't have to also run setup.

This issue supercedes #451.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! labels May 22, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Jun 1, 2023
JoshuaKGoldberg added a commit that referenced this issue Jun 1, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #475; fixes #476
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

A sweeping refactor, hooray! This unifies much of the the _hydration_
and _setup_ infrastructure:

* Reuses the spinner blocks already used in _setup_ for the steps in
_hydration_
* Extracts the `try`/`catch` logic already used in _setup_ to a new
`runOrRestore` function, and uses it in _hydration_
* `runOrRestore` also includes args parsing for the shared values
between the two
* Standardizes the names of settings/values as `values`

Test coverage has dipped a bit, even with the end-to-end scripts.
This'll be a good followup issue - the _setup_ script's end-to-end test
doesn't upload coverage...
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

🎉 This is included in version v1.28.1 🎉

The release is available on:

Cheers! 📦🚀

1 similar comment
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

🎉 This is included in version v1.28.1 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant