Skip to content

🐛 Bug: Hydration script shouldn't clear existing allcontributors #449

Closed
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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.

Expected

#441 added a hydration script that can set up an existing repository with this template's tooling. That hydration script ideally shouldn't remove any information from the repository: for example, it shouldn't wipe out the list of contributors in the .all-contributorsrc file...

Actual

...but in actuality, that's exactly what happens. 😬

The problem is that the function that generates new .all-contributorsrc content doesn't respect the existing contributors in the file, if it exists. It just creates a new file with the same content always:

https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/791332de33d8c89c62c689b9ed5ca7c10234fcb4/src/hydrate/creation/rootFiles.ts#L24-L46

Let's make the file take in any existing contributors if they exist!

Additional Info

This'll likely result in the createRootFiles function becoming async, as well as every function that calls it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: accepting prsPlease, send a pull request to resolve this!type: bugSomething isn't working :(

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions