1
我對TFS https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pull-requests https://www.visualstudio.com/en-us/docs/integrate/get-started/rest/basics建立在TFS 2017年使用捲曲(內部)
所以,我試圖通過使用下面的命令終端創建pull request
微軟文檔被以下拉請求。
curl -X POST -k -u myUser:<Personal_Access_Token> -H "Content-Type: application/json" -d '{"sourceRefName": "refs/heads/fte", "targetRefName": "refs/heads/dev", "title": "test api", "description": "another test for pr with rest api", "reviewers": [ { "id": { null } } ] }' https://<installname>/<Projects>/_apis/git/repositories/<git_repository>/pullRequests?api-version=3.0-preview
但沒有從服務器
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:05:00 --:--:-- 0
curl: (28) Operation timed out after 300453 milliseconds with 0 out of 0 bytes received
我雖然執行GET
resquest使用curl
命令TFS服務器上回來(的東西,如:列出項目/庫等)。但POST
似乎沒有工作。
注意:我不確定在哪裏可以找到tfs中的reviewer
id(guid),所以我將它分配爲null
。我希望這不會引起問題。
任何建議/解決方案表示讚賞。
澄清:我提到「但我可以使用curl命令在TFS服務器上執行GET resquest(例如:列出項目/存儲庫等),但POST似乎不起作用。」 ...查看我的終端歷史記錄,與POST不同,我使用正確的端點進行GET – OK999