diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index 37e61d9..efd9e28 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -190,6 +190,7 @@ Method | HTTP request | Description [**repoUpdatePullRequest**](RepositoryApi.md#repoUpdatePullRequest) | **POST** repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch [**repoUpdateTopics**](RepositoryApi.md#repoUpdateTopics) | **PUT** repos/{owner}/{repo}/topics | Replace list of topics for a repository [**repoValidateIssueConfig**](RepositoryApi.md#repoValidateIssueConfig) | **GET** repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config +[**rerunFailedWorkflowRun**](RepositoryApi.md#rerunFailedWorkflowRun) | **POST** repos/{owner}/{repo}/actions/runs/{run}/rerun-failed-jobs | Reruns all failed jobs in a workflow run [**rerunWorkflowJob**](RepositoryApi.md#rerunWorkflowJob) | **POST** repos/{owner}/{repo}/actions/runs/{run}/jobs/{job_id}/rerun | Reruns a specific workflow job in a run [**rerunWorkflowRun**](RepositoryApi.md#rerunWorkflowRun) | **POST** repos/{owner}/{repo}/actions/runs/{run}/rerun | Reruns an entire workflow run [**topicSearch**](RepositoryApi.md#topicSearch) | **GET** topics/search | search topics via keyword @@ -17458,6 +17459,97 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/json + +# **rerunFailedWorkflowRun** +> Void rerunFailedWorkflowRun(owner, repo, run) + +Reruns all failed jobs in a workflow run + +### 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 repository +Integer run = 56; // Integer | id of the run +try { + Void result = apiInstance.rerunFailedWorkflowRun(owner, repo, run); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#rerunFailedWorkflowRun"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repository | + **run** | **Integer**| id of the run | + +### 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**: Not defined + - **Accept**: Not defined + # **rerunWorkflowJob** > ActionWorkflowJob rerunWorkflowJob(owner, repo, run, jobId) diff --git a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java index 21ea793..1b01181 100644 --- a/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java +++ b/src/main/java/org/gitnex/tea4j/v2/apis/RepositoryApi.java @@ -3049,6 +3049,20 @@ public interface RepositoryApi { Call repoValidateIssueConfig( @retrofit2.http.Path("owner") String owner, @retrofit2.http.Path("repo") String repo); + /** + * Reruns all failed jobs in a workflow run + * + * @param owner owner of the repo (required) + * @param repo name of the repository (required) + * @param run id of the run (required) + * @return Call<Void> + */ + @POST("repos/{owner}/{repo}/actions/runs/{run}/rerun-failed-jobs") + Call rerunFailedWorkflowRun( + @retrofit2.http.Path("owner") String owner, + @retrofit2.http.Path("repo") String repo, + @retrofit2.http.Path("run") Integer run); + /** * Reruns a specific workflow job in a run *