Skip to content

Commit 714f3e6

Browse files
committed
feat(API): add pr_branch param to repo-sync export #SCD-594
1 parent ab33ed8 commit 714f3e6

3 files changed

Lines changed: 26 additions & 3 deletions

File tree

doc/compiled.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4961,6 +4961,16 @@
49614961
},
49624962
"example": "my-feature-branch"
49634963
},
4964+
"pr_branch": {
4965+
"name": "pr_branch",
4966+
"in": "query",
4967+
"description": "Source branch to open a pull request from",
4968+
"required": false,
4969+
"schema": {
4970+
"type": "string"
4971+
},
4972+
"example": "my-feature-branch"
4973+
},
49644974
"page": {
49654975
"in": "query",
49664976
"name": "page",
@@ -22891,6 +22901,9 @@
2289122901
},
2289222902
{
2289322903
"$ref": "#/components/parameters/id"
22904+
},
22905+
{
22906+
"$ref": "#/components/parameters/pr_branch"
2289422907
}
2289522908
],
2289622909
"responses": {
@@ -22928,11 +22941,11 @@
2292822941
"x-code-samples": [
2292922942
{
2293022943
"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'"
22944+
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export?pr_branch=my-feature-branch\"\\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json'"
2293222945
},
2293322946
{
2293422947
"lang": "CLI v2",
22935-
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--access_token <token>"
22948+
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--pr_branch my-feature-branch \\\n--access_token <token>"
2293622949
}
2293722950
],
2293822951
"x-cli-version": "2.24"

parameters.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ branch:
214214
schema:
215215
type: string
216216
example: my-feature-branch
217+
pr_branch:
218+
name: pr_branch
219+
in: query
220+
description: Source branch to open a pull request from
221+
required: false
222+
schema:
223+
type: string
224+
example: my-feature-branch
217225
page:
218226
in: query
219227
name: page

paths/repo_syncs/export.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ parameters:
1212
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
1313
- "$ref": "../../parameters.yaml#/account_id"
1414
- "$ref": "../../parameters.yaml#/id"
15+
- "$ref": "../../parameters.yaml#/pr_branch"
1516
responses:
1617
'200':
1718
description: OK
@@ -35,13 +36,14 @@ responses:
3536
x-code-samples:
3637
- lang: Curl
3738
source: |-
38-
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export"\
39+
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export?pr_branch=my-feature-branch"\
3940
-u USERNAME_OR_ACCESS_TOKEN \
4041
-X POST \
4142
-H 'Content-Type: application/json'
4243
- lang: CLI v2
4344
source: |-
4445
phrase repo_syncs export \
4546
--id <repo_sync_id> \
47+
--pr_branch my-feature-branch \
4648
--access_token <token>
4749
x-cli-version: '2.24'

0 commit comments

Comments
 (0)