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

Unable to copy labels over to new repo #9

Closed
0-vortex opened this issue Aug 2, 2021 · 5 comments
Closed

Unable to copy labels over to new repo #9

0-vortex opened this issue Aug 2, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@0-vortex
Copy link

0-vortex commented Aug 2, 2021

What happened?

Tried setting up a new repository for @open-sauced and got cryptic errors 😢

What did you expect to happen?

Copy all labels 🔥

What the problem might be

Think some part of the labels API has been sunset 🤔

Screenshot 2021-08-02 at 23 30 21

Content of /private/var/folders/34/fypnj9tx24gdkqxy8c7ys5l40000gn/T/6642120c1c521341f24e688af2ec78ef.ndjson.log:

{"msg":"Loading repositories ...","level":"info","time":1627939166993}
{"request":{"method":"GET","baseUrl":"https://api.github.com","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octoherd-cli/3.4.0 octoherd-cli/2.3.1 octokit-core.js/3.5.1 Node.js/16.6.0 (darwin; x64)"},"mediaType":{"format":"","previews":[]},"request":{},"url":"/repos/{owner}/{repo}","owner":"0-vortex","repo":"docs.opensauced.pizza","time":314},"msg":"GET /repos/0-vortex/docs.opensauced.pizza - 200 in 314ms","level":"debug","time":1627939167309}
{"octoherd":true,"msg":"Running on 0-vortex/docs.opensauced.pizza ...","level":"info","time":1627939167311}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"msg":"Load branch protection settings from template repository open-sauced/open-sauced","level":"debug","time":1627939167311}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"request":{"method":"GET","baseUrl":"https://api.github.com","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octoherd-cli/3.4.0 octoherd-cli/2.3.1 octokit-core.js/3.5.1 Node.js/16.6.0 (darwin; x64)"},"mediaType":{"format":"","previews":[]},"request":{},"url":"/repos/{owner}/{repo}/labels","owner":"open-sauced","repo":"open-sauced","time":302},"msg":"GET /repos/open-sauced/open-sauced/labels - 200 in 302ms","level":"debug","time":1627939167614}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"request":{"method":"GET","baseUrl":"https://api.github.com","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octoherd-cli/3.4.0 octoherd-cli/2.3.1 octokit-core.js/3.5.1 Node.js/16.6.0 (darwin; x64)"},"mediaType":{"format":"","previews":[]},"request":{"retryCount":1},"url":"/repos/{owner}/{repo}/labels/{name}","owner":"0-vortex","repo":"docs.opensauced.pizza","name":"🐛 bug","time":289},"msg":"GET /repos/0-vortex/docs.opensauced.pizza/labels/%F0%9F%90%9B%20bug - 404 in 289ms","level":"debug","time":1627939167903}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"msg":"🐛 bug label exists: false","level":"info","time":1627939167904}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"request":{"method":"POST","baseUrl":"https://api.github.com","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octoherd-cli/3.4.0 octoherd-cli/2.3.1 octokit-core.js/3.5.1 Node.js/16.6.0 (darwin; x64)"},"mediaType":{"format":"","previews":[]},"request":{"retryCount":4},"url":"/repos/{owner}/{repo}/labels","owner":"0-vortex","repo":"docs.opensauced.pizza","name":"🐛 bug","description":"","color":"ee0701","time":18361},"msg":"POST /repos/0-vortex/docs.opensauced.pizza/labels - 500 in 18361ms","level":"debug","time":1627939187793}
{"repository":{"id":392073567,"owner":{"login":"0-vortex","id":237133,"node_id":"MDQ6VXNlcjIzNzEzMw==","avatar_url":"https://avatars.githubusercontent.com/u/237133?v=4","gravatar_id":"","url":"https://api.github.com/users/0-vortex","html_url":"https://github.com/0-vortex","followers_url":"https://api.github.com/users/0-vortex/followers","following_url":"https://api.github.com/users/0-vortex/following{/other_user}","gists_url":"https://api.github.com/users/0-vortex/gists{/gist_id}","starred_url":"https://api.github.com/users/0-vortex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0-vortex/subscriptions","organizations_url":"https://api.github.com/users/0-vortex/orgs","repos_url":"https://api.github.com/users/0-vortex/repos","events_url":"https://api.github.com/users/0-vortex/events{/privacy}","received_events_url":"https://api.github.com/users/0-vortex/received_events","type":"User","site_admin":false},"name":"docs.opensauced.pizza"},"msg":"HttpError: invalid json response body at https://api.github.com/repos/0-vortex/docs.opensauced.pizza/labels reason: Unexpected end of JSON input\n    at /Users/tedvortex/.npm/_npx/66f91af82a3051a9/node_modules/@octokit/request/dist-node/index.js:108:11\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async Job.doExecute (/Users/tedvortex/.npm/_npx/66f91af82a3051a9/node_modules/bottleneck/light.js:405:18)","name":"HttpError","status":500,"request":{"method":"POST","url":"https://api.github.com/repos/0-vortex/docs.opensauced.pizza/labels","headers":{"accept":"application/vnd.github.v3+json","user-agent":"octoherd-cli/3.4.0 octoherd-cli/2.3.1 octokit-core.js/3.5.1 Node.js/16.6.0 (darwin; x64)","authorization":"token [REDACTED]","content-type":"application/json; charset=utf-8"},"body":"{\"name\":\"🐛 bug\",\"description\":\"\",\"color\":\"ee0701\"}","request":{"retryCount":3,"retries":3,"retryAfter":16}},"level":"error","time":1627939187795}
@0-vortex 0-vortex added the bug Something isn't working label Aug 2, 2021
@gr2m
Copy link
Contributor

gr2m commented Aug 2, 2021

A 500 error response can mean a server problem on GitHub's side. Can you replicate the problem when you run it again?

@0-vortex
Copy link
Author

0-vortex commented Aug 2, 2021

yes, it's like that for at least a couple of hours on my machine, ran it with a different repository a couple of days ago without issues with same template repo

@gr2m
Copy link
Contributor

gr2m commented Aug 2, 2021

Can you replicate the problem on other repositories with other labels? Maybe the emoji causes trouble? It shouldn't, I'm just guessing now

Could you please try to replicate the problem with curl? Because if you can, we can send it to GitHub support and they can check it out. There should never be a 500 response.

@0-vortex
Copy link
Author

0-vortex commented Aug 2, 2021

Can you replicate the problem on other repositories with other labels? Maybe the emoji causes trouble? It shouldn't, I'm just guessing now

Could you please try to replicate the problem with curl? Because if you can, we can send it to GitHub support and they can check it out. There should never be a 500 response.

Doesn't work for me right now for any repository. If memory is not failing me I might have successfully ran these commands last week:

npx octoherd-script-sync-repo-settings \
  --template "open-sauced/open-sauced" \
  -T $GH_TOKEN \
  -R "open-sauced/explore.opensauced.pizza"
npx octoherd-script-copy-labels \
  --template "open-sauced/open-sauced" \
  -T $GH_TOKEN \
  -R "open-sauced/explore.opensauced.pizza" 
npx @octoherd/script-sync-branch-protections \
  --template "open-sauced/open-sauced" \
  -T $GH_TOKEN \
  -R "open-sauced/explore.opensauced.pizza"

@0-vortex
Copy link
Author

0-vortex commented Aug 8, 2021

Closing via docs.opensauced.pizza#4

@0-vortex 0-vortex closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants