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

🐛 Bug: --mode migrate crashes on editing an "accepting prs" label if "status: accepting prs" already exists #1427

Open
3 tasks done
JoshuaKGoldberg opened this issue Mar 27, 2024 · 1 comment
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: bug Something isn't working :(

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.

Expected

Regardless of how labels are set up in a repository, migrating should normalize them nicely.

Actual

Migrating https://github.com/JoshuaKGoldberg/Emojisplosion:

Error: Failed initializing GitHub repository
    at withSpinner (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/cli/spinners.js:16:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async migrateWithOptions (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:45:5)
    at async run (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/index.js:21:9)
    at async runOrRestore (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/runOrRestore.js:7:5)
    at async Object.migrate (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/index.js:19:11)
    at async bin (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/bin/index.js:67:36)
    at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/bin/index.js:4:20 {
  [cause]: Error: Command failed with exit code 1: gh label edit accepting prs --color 0E8A16 --description Please, send a pull request to resolve this! 🙏 --name status: accepting prs
  label with name "status: accepting prs" already exists
      at makeError (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/execa/lib/error.js:60:11)
      at handlePromise (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/execa/index.js:124:26)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async initializeRepositoryLabels (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/steps/initializeGitHubRepository/labels/initializeRepositoryLabels.js:25:9)
      at async initializeGitHubRepository (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/steps/initializeGitHubRepository/index.js:9:3)
      at async file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:46:7
      at async withSpinner (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/cli/spinners.js:11:20)
      at async migrateWithOptions (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/migrateWithOptions.js:45:5)
      at async run (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/migrate/index.js:21:9)
      at async runOrRestore (file:///Users/josh/.npm/_npx/a296d102f6ed205b/node_modules/create-typescript-app/lib/shared/runOrRestore.js:7:5) {
    shortMessage: 'Command failed with exit code 1: gh label edit accepting prs --color 0E8A16 --description Please, send a pull request to resolve this! 🙏 --name status: accepting prs',

Additional Info

I didn't think to check what the labels looked like in that repo ahead of time. 😬 so I don't know what the exact combo is that made this not work.

I have fixed some variation of this bug so many times... 😡. #529, #687, #735, #767... why is this so difficult to get right?!

@JoshuaKGoldberg JoshuaKGoldberg added type: bug Something isn't working :( status: accepting prs Please, send a pull request to resolve this! labels Mar 27, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Mar 27, 2024
@JoshuaKGoldberg
Copy link
Owner Author

I re-ran migration and everything passed. Sigh. Note that before re-running migration, both accepting prs and status: accepting prs existed.

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: bug Something isn't working :(
Projects
None yet
Development

No branches or pull requests

1 participant