Skip to content

Commit 42074bc

Browse files
committed
forking_policy renamed to fork_policy.
Parameter name was changed in API 2.0, on repository endpoint. Fixes #32
1 parent 81df65d commit 42074bc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/examples/repositories/repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $repo->create($account_name, $repo_slug, array(
4141
'description' => 'My super secret project.',
4242
'language' => 'php',
4343
'is_private' => true,
44-
'forking_policy' => 'no_public_forks',
44+
'fork_policy' => 'no_public_forks',
4545
));
4646
```
4747

lib/Bitbucket/API/Repositories/Repository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function create($account, $repo, $params = array())
6565
'name' => $repo,
6666
'is_private' => true,
6767
'description' => 'My secret repo',
68-
'forking_policy' => 'no_forks',
68+
'fork_policy' => 'no_forks',
6969
);
7070

7171
// allow developer to directly specify params as json if (s)he wants.

test/Bitbucket/Tests/API/Repositories/RepositoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testCreateRepositoryFromJSON()
7171
'name' => 'new-repo',
7272
'is_private' => true,
7373
'description' => 'My secret repo',
74-
'forking_policy' => 'no_public_forks',
74+
'fork_policy' => 'no_public_forks',
7575
));
7676

7777
$client = $this->getHttpClientMock();
@@ -93,7 +93,7 @@ public function testCreateRepositoryFromArray()
9393
'name' => 'new-repo',
9494
'is_private' => true,
9595
'description' => 'My secret repo',
96-
'forking_policy' => 'no_public_forks',
96+
'fork_policy' => 'no_public_forks',
9797
);
9898

9999
$client = $this->getHttpClientMock();
@@ -118,7 +118,7 @@ public function testCreateRepositoryWithDefaultParams()
118118
'name' => 'new-repo',
119119
'is_private' => true,
120120
'description' => 'My secret repo',
121-
'forking_policy' => 'no_forks',
121+
'fork_policy' => 'no_forks',
122122
);
123123

124124
$client = $this->getHttpClientMock();

0 commit comments

Comments
 (0)