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 network requests #1752

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

🛠 Tooling: Use the create engine for network requests #1752

JoshuaKGoldberg opened this issue Dec 7, 2024 · 2 comments
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! status: blocked Waiting for something else to be resolved

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 network requests such as GitHub branch protections and repo settings provided by blocks.

Additional Info

Linked issue in create: JoshuaKGoldberg/create#23

💖

@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

For reference, here are the network requests sent in CTA today as part of >=1 mode runtime...

  • octokit.rest.repos.get({ owner, repo }): in doesRepositoryExist, to check whether the repository exists
    • If it does, shell scripts around git remote add origin and git push -u origin main --force are sent
  • octokit.rest.users.getAuthenticated(): in getGitHubUserAsAllContributor, to add the current user as an allcontributors contributor
  • octokit.rest.repos.createUsingTemplate, octokit.rest.repos.createForAuthenticatedUser, or octokit.rest.repos.createInOrg: in createRepositoryWithApi
  • octokit.rest.repos.update: in initializeRepositorySettings
  • octokit.request('PUT /repos ... /branches/main/protection): in initializeBranchProtectionSettings
  • octokit.request('GET .../labels'), octokit.request('POST .../labels'), octokit.request('DELETE .../labels'), and octokit.request('PATCH .../labels'): in initializeRepositoryLabels

Roughly. I might have missed some.

@JoshuaKGoldberg
Copy link
Owner Author

Will tackle first: #1768.

@JoshuaKGoldberg JoshuaKGoldberg added status: blocked Waiting for something else to be resolved and removed area: tooling Managing the repository's maintenance labels Dec 15, 2024
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! status: blocked Waiting for something else to be resolved
Projects
None yet
Development

No branches or pull requests

1 participant