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

🛠 Tooling: Use the create engine for shell commands #1751

Closed
3 tasks done
JoshuaKGoldberg opened this issue Dec 7, 2024 · 2 comments
Closed
3 tasks done

🛠 Tooling: Use the create engine for shell commands #1751

JoshuaKGoldberg opened this issue Dec 7, 2024 · 2 comments
Assignees
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Dec 7, 2024

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

Splitting out of #1181: I'm onboarding this project to the new "create" engine in https://github.com/JoshuaKGoldberg/create. #1670 added usage of file creations. Another step will be having shell commands such as pnpm format --write and pnpm lint --fix provided by blocks.

Additional Info

Linked issue on create: JoshuaKGoldberg/create#22

💖

@JoshuaKGoldberg JoshuaKGoldberg added area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! labels Dec 7, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Dec 7, 2024
@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Dec 8, 2024

For reference, here are the shell commands executed in CTA today as part of >=1 mode runtime...

  • pnpm install: in the finalizeDependencies step, which is in create and migrate modes
  • pnpm dedupe --offline: in the finalizeDependencies step for create and migrate modes; as a final cleanup command in initialize mode
  • pnpm build: in createCleanupCommands after other steps in all three modes, if bin is enabled
  • pnpm lint --fix: in createCleanupCommands after other steps in all three modes, after pnpm build if was included
  • pnpm format --write: in createCleanupCommands after other steps in all three modes, after pnpm format --write
  • pnpm remove <...packages...>: in removeDependencies:
    • To remove all-contributors-cli and all-contributors-for-repository in finalizeDependencies, which appears to be an old form of a migration
    • In uninstallPackages, called towards the end of initialize mode and before pnpm dedupe --offline
  • pnpm add <...devDependencies...>: in finalizeDependencies
  • pnpm add prettier -D: at the end of uninstallPackages, as a part of initialize mode
  • pnpm run lint:spelling: in getStdout <- populateCSpellDictionary, in migrate mode
  • git tag -l and git tag -d <...tags...>: in clearLocalGitTags, as part of create mode
  • git tag -l and git tag -d <...tags...>: in resetGitTags, as part of initialize mode
  • git init -b main: in createAndEnterGitDirectory, as part of create mode
  • git status and git init: in ensureGitRepository, as part of initialize and migrate modes
  • git restore .: in runOrRestore for all modes if executing catches an error
  • git remote, and if an origin remote doesn't yet exist, git remote add origin <origin>, and git fetch: in initializeGitRemote <- initializeGitHubRepository
  • npx -y all-contributors-cli@6.25 add <user> <...contributions...>: in `getGitHubUserAsAllContributor, called by:
    • addOwnerAsAllContributor: in initialize mode
    • addToolAllContributors: in create mode
  • npx all-contributors-cli generate: near the end of finalizeDependencies
  • npx-y all-contributors-cli add JoshuaKGoldberg tool: by addToolAllContributors in create mode
  • npx -y all-contributors-cli add <contributor> <...types...>: in detectExistingContributors for each contributor, in migrate mode
  • chmod ug+x .husky/pre-commit: in writeStructure because of 🐛 Bug: Error in git commit on created repo: "The '.husky/pre-commit' hook was ignored because it's not set as executable." #718

Roughly. I might have missed some.

@JoshuaKGoldberg
Copy link
Owner Author

Resolved by #1766.

JoshuaKGoldberg added a commit that referenced this issue Dec 16, 2024
…-for-repository internally (#1772)

## PR Checklist

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

## Overview

Brings on a few utilities I recently extracted:

* https://github.com/JoshuaKGoldberg/octokit-from-auth
*
https://github.com/JoshuaKGoldberg/populate-all-contributors-for-repository
* https://github.com/JoshuaKGoldberg/set-github-repository-labels

These should all have the same functionality as before. This should be a
`chore:` PR, not a `feat:` or `fix:`.

The utility here is that the latter two are now used as standalone
scripts in onboarding to the "create" engine. I thought they'd be done
as network requests (#1752), but in this way I found it a lot simpler to
have them as standalone scripts (#1751,
JoshuaKGoldberg/create#60).

💖
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!
Projects
None yet
Development

No branches or pull requests

1 participant