mappjzc opened a new pull request, #4435:
URL: https://github.com/apache/incubator-devlake/pull/4435

   ### Summary
   Add bamboo plugin
   Add connection for bamboo
   
   `.vscode/.bb_connection_post.sh`
   ```bash
   #!/bin/sh
   curl --location --request POST 'devlake:8080/plugins/bamboo/connections' \
   --header 'Content-Type: application/json' \
   --data-raw '
   {
       "name":"test-bamboo",
       "endpoint":"http://[shield]/rest/api/latest/";,
       "token":"[shield]"
   }
   '
   
   echo "\r\n"
   ```
   ```
   {
        "name": "test-bamboo",
        "id": 1,
        "createdAt": "2023-02-16T13:55:55.405Z",
        "updatedAt": "2023-02-16T13:55:55.405Z",
        "endpoint": "http://[shield]/rest/api/latest/";,
        "proxy": "",
        "rateLimitPerHour": 0,
        "token": "[shield]"
   }
   ```
   
   `.vscode/.bb_connection_patch.sh`
   ```bash
   #!/bin/sh
   curl --location --request PATCH 'devlake:8080/plugins/bamboo/connections/1' \
   --header 'Content-Type: application/json' \
   --data-raw '
   {
       "name":"test-bamboo",
       "endpoint":"http://[shield]/rest/api/latest/";,
       "token":"[shield]"
   }
   '
   
   echo "\r\n"
   ```
   ```
   {
        "name": "test-bamboo",
        "id": 1,
        "createdAt": "2023-02-16T13:55:55.405Z",
        "updatedAt": "2023-02-16T13:55:55.405Z",
        "endpoint": "http://[shield]/rest/api/latest/";,
        "proxy": "",
        "rateLimitPerHour": 0,
        "token": "[shield]"
   }
   ```
   
   `.vscode/.bb_connection_gets.sh`
   ```bash
   #!/bin/sh
   curl --location --request GET 'devlake:8080/plugins/bamboo/connections' \
   --header 'Content-Type: application/json' \
   --data-raw '
   {
   }
   '
   
   echo "\r\n"
   ```
   ```
   [{
        "name": "test-bamboo",
        "id": 1,
        "createdAt": "2023-02-16T13:55:55.405Z",
        "updatedAt": "2023-02-16T13:55:55.405Z",
        "endpoint": "http://[shield]/rest/api/latest/";,
        "proxy": "",
        "rateLimitPerHour": 0,
        "token": "[shield]"
   }]
   ```
   
   `.vscode/.bb_connection_get.sh`
   ```bash
   #!/bin/sh
   curl --location --request GET 'devlake:8080/plugins/bamboo/connections/1' \
   --header 'Content-Type: application/json' \
   --data-raw '
   {
   }
   '
   
   echo "\r\n"
   ```
   ```
   {
        "name": "test-bamboo",
        "id": 1,
        "createdAt": "2023-02-16T13:55:55.405Z",
        "updatedAt": "2023-02-16T13:55:55.405Z",
        "endpoint": "http://[shield]/rest/api/latest/";,
        "proxy": "",
        "rateLimitPerHour": 0,
        "token": "[shield]"
   }
   ```
   
   `.vscode/.bb_connection_test.sh` `ok`
   ```bash
   #!/bin/sh
   
   curl --location --request POST 'devlake:8080/plugins/bamboo/test' \
   --header 'Content-Type: application/json' \
   --data-raw \
   '{
       "endpoint":"http://[shield]/rest/api/latest/";,
       "token":"[shield]"
   }'
   
   echo "\r\n"
   ```
   
   ```json
   {
        "success": true,
        "message": "success",
        "causes": null,
        "Connection": {
                "endpoint": "http://[shield]/rest/api/latest/";,
                "proxy": "",
                "rateLimitPerHour": 0,
                "token": "[shield]"
        }
   }
   ```
   
   `.vscode/.bb_connection_test.sh` `fail`
   ```bash
   #!/bin/sh
   
   curl --location --request POST 'devlake:8080/plugins/bamboo/test' \
   --header 'Content-Type: application/json' \
   --data-raw \
   '{
       "endpoint":"http://[shield]/rest/api/latest/";,
       "token":"hello"
   }'
   
   echo "\r\n"
   ```
   
   ```json
   {
        "success": false,
        "message": "unexpected status code: 401 (401)",
        "causes": null
   }
   ```
   
   
   ### Screenshots
   
![6{%4}SL(3LNCDMJQDXR7(6C](https://user-images.githubusercontent.com/2921251/219386224-c7ff2f35-258d-46a1-854d-64cabd71c74a.png)
   
![image](https://user-images.githubusercontent.com/2921251/219387288-ad160d76-efb6-4ae7-80cf-3e5cbbac41ba.png)
   
![image](https://user-images.githubusercontent.com/2921251/219387839-d8eb1e3f-f35f-498e-a3d4-e5015986d3b5.png)
   
![image](https://user-images.githubusercontent.com/2921251/219388417-5d2492f7-e554-4c1c-a700-66e29c857ec5.png)
   
   
![image](https://user-images.githubusercontent.com/2921251/219389374-bf182f4a-2ec9-444d-949b-7ce3392fecca.png)
   
![image](https://user-images.githubusercontent.com/2921251/219389396-31740522-6b70-4676-98fe-040f8e9f763f.png)
   
   
![image](https://user-images.githubusercontent.com/2921251/219390017-9e81232b-4305-41c9-8e06-3aee0a03a80e.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390121-7c3eea89-461e-4739-8287-21de06c21973.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390163-ad6cd019-d596-4028-a4e5-a28bd42ea008.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390213-3de698e8-3da6-4718-b3f9-9ae9b9458c0f.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390268-4521e3ba-b268-4270-9180-825589655649.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390322-0065873b-d893-4917-bd45-e43bfac6c9b9.png)
   
![image](https://user-images.githubusercontent.com/2921251/219390403-1ac7ea0d-6f41-426f-9ef1-fef42920696d.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: [email protected]

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

Reply via email to