Synchronizing API and documentation updates

This commit is contained in:
gitnexbot
2026-01-02 16:34:01 +00:00
parent f5b5662a1e
commit c613a7badc
8 changed files with 228 additions and 26 deletions
+94
View File
@@ -183,6 +183,7 @@ Method | HTTP request | Description
[**repoTransfer**](RepositoryApi.md#repoTransfer) | **POST** repos/{owner}/{repo}/transfer | Transfer a repo ownership
[**repoUnDismissPullReview**](RepositoryApi.md#repoUnDismissPullReview) | **POST** repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request
[**repoUpdateAvatar**](RepositoryApi.md#repoUpdateAvatar) | **POST** repos/{owner}/{repo}/avatar | Update avatar
[**repoUpdateBranch**](RepositoryApi.md#repoUpdateBranch) | **PUT** repos/{owner}/{repo}/branches/{branch} | Update a branch reference to a new commit
[**repoUpdateBranchProtectionPriories**](RepositoryApi.md#repoUpdateBranchProtectionPriories) | **POST** repos/{owner}/{repo}/branch_protections/priority | Update the priorities of branch protections for a repository.
[**repoUpdateFile**](RepositoryApi.md#repoUpdateFile) | **PUT** repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository if SHA is set, or create the file if SHA is not set
[**repoUpdatePullRequest**](RepositoryApi.md#repoUpdatePullRequest) | **POST** repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch
@@ -16804,6 +16805,99 @@ Name | Type | Description | Notes
- **Content-Type**: application/json, text/plain
- **Accept**: Not defined
<a name="repoUpdateBranch"></a>
# **repoUpdateBranch**
> Void repoUpdateBranch(owner, repo, branch, body)
Update a branch reference to a new commit
### Example
```java
// Import classes:
//import org.gitnex.tea4j.v2.ApiClient;
//import org.gitnex.tea4j.v2.ApiException;
//import org.gitnex.tea4j.v2.Configuration;
//import org.gitnex.tea4j.v2.auth.*;
//import org.gitnex.tea4j.v2.apis.RepositoryApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: AccessToken
ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken");
AccessToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AccessToken.setApiKeyPrefix("Token");
// Configure API key authorization: AuthorizationHeaderToken
ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken");
AuthorizationHeaderToken.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//AuthorizationHeaderToken.setApiKeyPrefix("Token");
// Configure HTTP basic authorization: BasicAuth
HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
BasicAuth.setUsername("YOUR USERNAME");
BasicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: SudoHeader
ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader");
SudoHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoHeader.setApiKeyPrefix("Token");
// Configure API key authorization: SudoParam
ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam");
SudoParam.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//SudoParam.setApiKeyPrefix("Token");
// Configure API key authorization: TOTPHeader
ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader");
TOTPHeader.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TOTPHeader.setApiKeyPrefix("Token");
// Configure API key authorization: Token
ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token");
Token.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Token.setApiKeyPrefix("Token");
RepositoryApi apiInstance = new RepositoryApi();
String owner = "owner_example"; // String | owner of the repo
String repo = "repo_example"; // String | name of the repo
String branch = "branch_example"; // String | name of the branch
UpdateBranchRepoOption body = new UpdateBranchRepoOption(); // UpdateBranchRepoOption |
try {
Void result = apiInstance.repoUpdateBranch(owner, repo, branch, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RepositoryApi#repoUpdateBranch");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner** | **String**| owner of the repo |
**repo** | **String**| name of the repo |
**branch** | **String**| name of the branch |
**body** | [**UpdateBranchRepoOption**](UpdateBranchRepoOption.md)| | [optional]
### Return type
[**Void**](.md)
### Authorization
[AccessToken](../README.md#AccessToken)[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)[BasicAuth](../README.md#BasicAuth)[SudoHeader](../README.md#SudoHeader)[SudoParam](../README.md#SudoParam)[TOTPHeader](../README.md#TOTPHeader)[Token](../README.md#Token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
<a name="repoUpdateBranchProtectionPriories"></a>
# **repoUpdateBranchProtectionPriories**
> Void repoUpdateBranchProtectionPriories(owner, repo, body)