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

🚀 Feature: Add option to remove "generated from" notice from created repositories #913

Closed
3 tasks done
JoshuaKGoldberg opened this issue Oct 1, 2023 · 2 comments · Fixed by #940
Closed
3 tasks done
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Oct 1, 2023

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

Right now, newly created repositories -including npx create-typescript-app with --mode create- are created with GitHub's "create from template" feature. That means they have a "generated from https://github.com/JoshuaKGoldberg/create-typescript-app" notice:

Screenshot of KATT/tupleson repo title with a 'generated from' notice

I like this for my personal repos because it's nice advertising for the template 😄. But I can definitely see why it'd be annoying for a not-me person to have a pointer to some random template stuck there. And TIL it's actually kind of annoying/manual to get rid of that notice: https://stackoverflow.com/questions/16052477/delete-fork-dependency-of-a-github-repository 😕.

Let's add in a flag to make it so the notice doesn't get added upon creation of a new repository. Maybe a name like --exclude-generated-from? I haven't thought about the name very much. Nor have I looked into how to do this.

Additional Info

https://octokit.github.io/rest.js/v20#repos-create-using-template is how repos are created for setup scripts right now:

await github.octokit.rest.repos.createUsingTemplate({

I haven't looked into how to create a repo other ways in a while and don't remember if there are other, more convenient ways.

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Oct 1, 2023
@JoshuaKGoldberg
Copy link
Owner Author

JoshuaKGoldberg commented Oct 3, 2023

I switched to --preserve-generated-from in #940 because:

  • --exclude-* flags have really all been used for features, not advertising
  • I want it to be opt-out by default

JoshuaKGoldberg added a commit that referenced this issue Oct 3, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #913
- [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

GitHub doesn't have a unified _"create a new blank repository"_ API. So
unless the new `--preserve-generated-from` option is true, repo creation
will check whether the authenticated user has the same login as the
`--owner` option, then use either `createForAuthenticatedUser` or
`createInOrg.

Slightly rephrases the end-of-README notice while I'm here to remove my
username from it. And in doing so, expands the _"does the notice already
exist?"_ logic to check previous variants.
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

🎉 This is included in version v1.35.0 🎉

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
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