2016-03-24 13 views

cevap

3

Bir komut satırı ile bir çekme isteği oluşturmak için Stash REST API kullanabilirsiniz. Curl ile

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests 

Örnek:

curl -u your_stash_user:your_stash_password -H "Content-Type: application/json" -X POST -d '{JSON CONTENT}' http://your_stash_url/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests 
(Atlassian doc kopyalanan)

Json dosyası:

{ 
    "title": "Talking Nerdy", 
    "description": "It’s a kludge, but put the tuple from the database in the cache.", 
    "state": "OPEN", 
    "open": true, 
    "closed": false, 
    "fromRef": { 
     "id": "refs/heads/feature-ABC-123", 
     "repository": { 
      "slug": "my-repo", 
      "name": null, 
      "project": { 
       "key": "PRJ" 
      } 
     } 
    }, 
    "toRef": { 
     "id": "refs/heads/master", 
     "repository": { 
      "slug": "my-repo", 
      "name": null, 
      "project": { 
       "key": "PRJ" 
      } 
     } 
    }, 
    "locked": false, 
    "reviewers": [ 
     { 
      "user": { 
       "name": "charlie" 
      } 
     } 
    ] 
} 

Bu URL'ye bir json sonrası isteği göndermek zorunda

İlgili konular