Skip to content

Commit 7c3c19f

Browse files
authored
feat(API): add pr_branch param to repo-sync export #SCD-594 (#978)
1 parent ab33ed8 commit 7c3c19f

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

doc/compiled.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22893,6 +22893,24 @@
2289322893
"$ref": "#/components/parameters/id"
2289422894
}
2289522895
],
22896+
"requestBody": {
22897+
"required": false,
22898+
"content": {
22899+
"application/json": {
22900+
"schema": {
22901+
"type": "object",
22902+
"title": "repo_sync/export/parameters",
22903+
"properties": {
22904+
"pr_branch": {
22905+
"description": "Source branch to open a pull request from",
22906+
"type": "string",
22907+
"example": "my-feature-branch"
22908+
}
22909+
}
22910+
}
22911+
}
22912+
}
22913+
},
2289622914
"responses": {
2289722915
"200": {
2289822916
"description": "OK",
@@ -22928,11 +22946,11 @@
2292822946
"x-code-samples": [
2292922947
{
2293022948
"lang": "Curl",
22931-
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export\"\\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json'"
22949+
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json' \\\n -d '{\"pr_branch\":\"my-feature-branch\"}'"
2293222950
},
2293322951
{
2293422952
"lang": "CLI v2",
22935-
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--access_token <token>"
22953+
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--pr_branch my-feature-branch \\\n--access_token <token>"
2293622954
}
2293722955
],
2293822956
"x-cli-version": "2.24"

paths/repo_syncs/export.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ parameters:
1212
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
1313
- "$ref": "../../parameters.yaml#/account_id"
1414
- "$ref": "../../parameters.yaml#/id"
15+
requestBody:
16+
required: false
17+
content:
18+
application/json:
19+
schema:
20+
type: object
21+
title: repo_sync/export/parameters
22+
properties:
23+
pr_branch:
24+
description: Source branch to open a pull request from
25+
type: string
26+
example: my-feature-branch
1527
responses:
1628
'200':
1729
description: OK
@@ -35,13 +47,15 @@ responses:
3547
x-code-samples:
3648
- lang: Curl
3749
source: |-
38-
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export"\
50+
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export" \
3951
-u USERNAME_OR_ACCESS_TOKEN \
4052
-X POST \
41-
-H 'Content-Type: application/json'
53+
-H 'Content-Type: application/json' \
54+
-d '{"pr_branch":"my-feature-branch"}'
4255
- lang: CLI v2
4356
source: |-
4457
phrase repo_syncs export \
4558
--id <repo_sync_id> \
59+
--pr_branch my-feature-branch \
4660
--access_token <token>
4761
x-cli-version: '2.24'

0 commit comments

Comments
 (0)