You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "klesh (via GitHub)" <gi...@apache.org> on 2023/03/20 06:37:59 UTC

[GitHub] [incubator-devlake] klesh opened a new issue, #4712: [Feature][be/fe] Add warning message for TestConnection

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

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Use case
   
   As a user, when setting up Apache DevLake connection, I need a specific warning message when my token has limited access.
   
   ### Description
   
   With @jakezhu9 's great implementation from #4686, we notice that Github has [multiple levels of access for a PAT](https://devlake.apache.org/docs/next/Configuration/GitHub#github-personal-access-tokensrecommended).
   
   - For public repos, #4686 is sufficient for the case.
   - For private repos, we also need extra permissions in order to do so.
   
   However, it is hard to tell what is the intention when the connection is being tested. The reasonable way to solve the problem would be to prompt users about the extra permission and why they are needed for users to decide wisely.
   
   ## Solution
   
   For Github, when public repos checking is OK, but NOT private repos, the BE should output sth like the following
   ```
   200 OK
   {
     "success": true,
     "warning": true,
     "message": "`repo` is also required if you need to collect data from private repositories",
     "login", "whomai"
   }
   ```
   when token has all possible public/private permission we need, the API should output sth like the following:
   200 OK
   {
     "success": true,
     "warning": false,
     "message": "success",
     "login", "whomai"
   }
   ```
   if token has none of the permission we need:
   400 OK
   {
     "success": false,
     "warning": false,
     "message": "`repo:status`, `repo_deployment`, `read:user`, `read:org`  are required, `repo` is required for collecting data from private repositories",
     "login", "whomai"
   }
   ```
   
   
   The general idea is to add `warning` flag to indicate if the given `PAT` is limited, and detail would be described by the good old `message` field.
   
   The idea applies to other plugins as well and should be fine-tuned according to their API specification.
   
   ## Todo
   
   - Github
   - Jira
   - Gitlab
   - Bitbucket
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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: commits-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] likyh closed issue #4712: [Feature][be/fe] Add a warning message for TestConnection

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh closed issue #4712: [Feature][be/fe] Add a warning message for TestConnection
URL: https://github.com/apache/incubator-devlake/issues/4712


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] mintsweet commented on issue #4712: [Feature][be/fe] Add a warning message for TestConnection

Posted by "mintsweet (via GitHub)" <gi...@apache.org>.
mintsweet commented on issue #4712:
URL: https://github.com/apache/incubator-devlake/issues/4712#issuecomment-1539269778

   @tanninghan Could you please tell us the prototype link?


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on issue #4712: [Feature][be/fe] Add warning message for TestConnection

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on issue #4712:
URL: https://github.com/apache/incubator-devlake/issues/4712#issuecomment-1475698393

   @Startrekzky @yumengwang03 need prototype design.


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] tanninghan commented on issue #4712: [Feature][be/fe] Add a warning message for TestConnection

Posted by "tanninghan (via GitHub)" <gi...@apache.org>.
tanninghan commented on issue #4712:
URL: https://github.com/apache/incubator-devlake/issues/4712#issuecomment-1512639023

   The prototype is ready.
   See details in this link: https://www.figma.com/file/Eux4Dhorxp7M0TwzOnL6Yh/New-Config-UI?node-id=4925%3A37345&t=0NDQQ7WE5NonYlfq-1
   ![image](https://user-images.githubusercontent.com/102040651/232711788-28bc096a-0167-440c-90d2-ad7408d81f16.png)


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] tanninghan commented on issue #4712: [Feature][be/fe] Add a warning message for TestConnection

Posted by "tanninghan (via GitHub)" <gi...@apache.org>.
tanninghan commented on issue #4712:
URL: https://github.com/apache/incubator-devlake/issues/4712#issuecomment-1498809501

   prototype design


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org