node-gitlab-2-github icon indicating copy to clipboard operation
node-gitlab-2-github copied to clipboard

bug when deleting and recreating repo in GitHub

Open azliabdullah opened this issue 3 years ago • 2 comments

When I set recreateRepo to true, only the first time creation worked.

  github: {
    recreateRepo: true,
  },

And the re-creation always returned Something went wrong: HttpError: Repository creation failed.: {"resource":"Repository","code":"custom","field":"name","message":"name already exists on this account"}. While it is confirmed that the repo doesn't exist.

azliabdullah avatar Sep 08 '22 08:09 azliabdullah

I may have found the cause of the issue, will attempt to fix and open a PR

azliabdullah avatar Sep 08 '22 08:09 azliabdullah

PR #154 submitted to fix this issue.

Have to set github.ownerIsOrg to true in settings.ts if the repo belongs to an Organisation.

azliabdullah avatar Sep 08 '22 09:09 azliabdullah