You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/VCS/Adapter/Git/GitHub.php
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -179,4 +179,31 @@ public function downloadRepositoryZip(string $repoName, string $ref, string $pat
179
179
// Return the contents of the ZIP archive
180
180
return$response['body'];
181
181
}
182
+
183
+
/**
184
+
* Forks a repository on GitHub.
185
+
*
186
+
* @param string $owner The owner of the repository to fork.
187
+
* @param string $repo The name of the repository to fork.
188
+
* @param string|null $organization The name of the organization to fork the repository into. If not provided, the repository will be forked into the authenticated user's account.
189
+
* @param string|null $name The name of the new forked repository. If not provided, the name will be the same as the original repository.
190
+
* @param bool $defaultBranchOnly Whether to include only the default branch in the forked repository. Defaults to false.
191
+
*
192
+
* @return array|null The data of the newly forked repository, or null if the fork operation failed.
0 commit comments