Forum Discussion

Stoplight's avatar
Stoplight
Community Manager
7 months ago

Stoplight just deleted all my GitHub projects. Now it's refusing to let me connect to GitHub. Help?

Originally posted by user Nananana to the Stoplight Community on 01/09/2024 at 07:46 ET.

Have created a ticket on the Support Portal but no idea when I'll hear back, and this is pretty urgent. Would appreciate anyone's advice with this.

I changed the GitHub integration settings in our workspace. This deleted all projects we had which were linked to GitHub. This was not desired and there was no warning.

Since these projects were backed by GitHub, I assumed I could get them back by re-creating projects from the GitHub repositories. However, Stoplight is throwing errors when I try to do this.

I set up a new GitHub Integration in Settings, using a GitHub OAuth App, as instructed in the docs. The Test Settings button tells me that Everything Looks Good!.

However when I go to "Create or Import a Project - Add from GitHub", it tells me I need to Connect GitHub. I had assumed that the GitHub integration would handle this automatically, but it doesn't seem to. I continued to authorize the connection with GitHub. However this returns an error message: "syntax error at or near \")\"". I have retried multiple times, but Stoplight refuses to connect my GitHub account. This means I have not been able to recreate our GitHub-backed Stoplight projects.

So basically all our production API docs are down, as I'm trying to onboard a new client to said API. Any advice?

  • Stoplight's avatar
    Stoplight
    Community Manager

    Nananana (OP) [01/09/2024 - 07:46 ET]

    I copied the request throwing the error from Chrome Inspect, so if anyone has an idea of how to edit it to make it work, I would appreciate that:

    curl 'https://tripstax.stoplight.io/graphql' \
    -H 'bunch of headers I'm removing for brevity'
    --data-raw $'{"query":"mutation ConnectIntegration($usernameOrEmail: String, $password: String, $code: String, $workspaceIntegrationId: Int\u0021) {\\n  connectExternalAccount(\\n    input: {workspaceIntegrationId: $workspaceIntegrationId, usernameOrEmail: $usernameOrEmail, password: $password, code: $code}\\n  ) {\\n    token\\n    userId\\n    __typename\\n  }\\n}","operationName":"ConnectIntegration","variables":{"code":"f6febb5360b3859161b1","workspaceIntegrationId":713378}}' \

    This returns the error:

    {
        "data": null,
        "errors": [
            {
                "extensions": {
                    "code": "INTERNAL_SERVER_ERROR"
                },
                "locations": [
                    {
                        "column": 140,
                        "line": 1
                    }
                ],
                "message": "syntax error at or near \")\"",
                "path": [
                    "connectExternalAccount"
                ]
            }
        ]
    }