Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/cli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/phrase/phrase-go/v4 v4.9.0 h1:V+MWmNrxwrYNtmoY41dgrdWT902Er2hcohtQcpVvWmw=
github.com/phrase/phrase-go/v4 v4.9.0/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
github.com/phrase/phrase-go/v4 v4.15.0 h1:wKgYcItOMSD4Z8UjnTz1IWlDhCDYQY2QbsQfW+c20v8=
github.com/phrase/phrase-go/v4 v4.15.0/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
17 changes: 15 additions & 2 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -4886,6 +4886,16 @@
},
"example": "my-feature-branch"
},
"pr_branch": {
"name": "pr_branch",
"in": "query",
"description": "Branch name for the pull request",
"required": false,
"schema": {
"type": "string"
},
"example": "my-feature-branch"
},
"page": {
"in": "query",
"name": "page",
Expand Down Expand Up @@ -22603,6 +22613,9 @@
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/pr_branch"
}
],
"responses": {
Expand Down Expand Up @@ -22640,11 +22653,11 @@
"x-code-samples": [
{
"lang": "Curl",
"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'"
"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'"
},
{
"lang": "CLI v2",
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--access_token <token>"
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--pr_branch my-feature-branch \\\n--access_token <token>"
}
],
"x-cli-version": "2.24"
Expand Down
8 changes: 8 additions & 0 deletions parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ branch:
schema:
type: string
example: my-feature-branch
pr_branch:
name: pr_branch
in: query
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i presume rails would handle it regardless if it was passed through query, or through the JSON body (this is a POST request)?

description: Branch name for the pull request
required: false
schema:
type: string
example: my-feature-branch
page:
in: query
name: page
Expand Down
4 changes: 3 additions & 1 deletion paths/repo_syncs/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/id"
- "$ref": "../../parameters.yaml#/pr_branch"
responses:
'200':
description: OK
Expand All @@ -35,13 +36,14 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export"\
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export?pr_branch=my-feature-branch"\
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase repo_syncs export \
--id <repo_sync_id> \
--pr_branch my-feature-branch \
--access_token <token>
x-cli-version: '2.24'
Loading