Advertisement
Guest User

testie

a guest
Oct 22nd, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.86 KB | None | 0 0
  1. #the winning command
  2.  
  3. curl http://<server>:<port>/rest/api/1.0/projects/<project>/repos/<repo>/pull-requests -H "Authorization: Basic <blob>" -H 'Content-Type: application/json' --data '{
  4.   "title": "<title>",
  5.   "state": "OPEN",
  6.   "open": "true",
  7.   "closed": false,
  8.   "fromRef": {
  9.      "id": "refs/heads/<source branch>",
  10.      "repository": {
  11.         "slug": "<repo>",
  12.         "name": null,
  13.         "project": {
  14.            "key": "<project>"
  15.         }
  16.      }
  17.   },
  18.   "toRef": {
  19.      "id": "refs/heads/<dest branch>",
  20.      "repository": {
  21.         "slug": "<repo>",
  22.         "name": null,
  23.         "project": {
  24.            "key": "<project>"
  25.         }
  26.      }
  27.   },
  28.   "locked": false,
  29.   "reviewers": [
  30.      {
  31.         "user": {
  32.            "name": "<reviewer1>"
  33.         }
  34.      }
  35.   ]
  36. }'
  37.  
  38. # I do something similar using python string template substitution
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement