GitHub import: improve OAuth flow design and documentation
On the "new github import" page (/import/github/new), when GitHub OAuth is not enabled it looks like this:
2 problems with this stage:
-
The message links tohttps://staging-ref.gitlab.com/help/integration/github, which describes how to set up GitHub OAuth but is not specific to setting up GitHub for imports. Import requires some additional steps, as discussed in this issue: GitHub import rate limit: ensure we are using G... (#432970 - closed)✅ -
The "Authenticate" button makes a POST request to
/import/github/personal_access_token, which results in an error "Missing OAuth configuration for GitHub.".
Once GitHub OAuth is set up, the page shows 2 blue buttons, both for OAuth. Kind of unexpected. This 2 button thing comes up in this video showing a screenshare of GitHub OAuth for imports
Proposal
As for (2): Let's add frontend validation when the user clicks the Authenticate button under the PAT field (not targeting the Authenticate with GitHub button) and display an error Please enter a valid PAT when the field is empty.
