e2corporation opened a new issue, #2497:
URL: https://github.com/apache/incubator-devlake/issues/2497

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   When performing a connection test for GitHub providers, the BE API does not 
respond with the proper response payload when a Valid Connection token is 
added, instead it only gives a username in the response body.
   
   ### What you expected to happen
   
   All Connection `Test` responses regardless of provider should respond with 
the following payload:
   
   ```
   {
     "success": true,
     "message": "success"
   }
   ```
   
   In the case of GitHub, when a single personal token is provided it's 
expected that username information also be included
   
   ```
   {
     "success": true,
     "message": "success",
     "login": [USERNAME]
   }
   ```
   
   In the case of GitHub, when **multiple** personal tokens are provided it's 
expected that username information also be included, along with errors if any 
of the tokens are invalid. Using a key called $login may not be ideal. 
Usernames need to be returned by Token Index
   
   ```
   {
     "success": true,
     "message": "Token #1 is invalid....",
     "usernames": {
       1: [USERNAME_TOKEN_ID_1],
       2: [USERNAME_TOKEN_ID_2]
     }
   }
   ```
   
   ### How to reproduce
   
   Test a GitHub Connection with 1 valid Connection Token.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   main
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to