Polish gh-11183

Fixed typo in plugin for setting workflowId and added missing repository() closure
This commit is contained in:
Steve Riesenberg 2022-06-03 11:52:38 -05:00
parent ca0a6d9777
commit 1295b793b3
No known key found for this signature in database
GPG Key ID: 5F311AB48A55D521
2 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@
package org.springframework.gradle.github.release;
import org.gradle.api.Action;
import org.gradle.api.DefaultTask;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.TaskAction;
@ -49,6 +50,10 @@ public class DispatchGitHubWorkflowTask extends DefaultTask {
return repository;
}
public void repository(Action<RepositoryRef> repository) {
repository.execute(this.repository);
}
public void setRepository(RepositoryRef repository) {
this.repository = repository;
}

View File

@ -47,7 +47,7 @@ public class GitHubReleasePlugin implements Plugin<Project> {
dispatchGitHubWorkflow.setDescription("Create a workflow_dispatch event on a given branch");
dispatchGitHubWorkflow.setBranch((String) project.findProperty("branch"));
dispatchGitHubWorkflow.setBranch((String) project.findProperty("workflowId"));
dispatchGitHubWorkflow.setWorkflowId((String) project.findProperty("workflowId"));
dispatchGitHubWorkflow.setGitHubAccessToken((String) project.findProperty("gitHubAccessToken"));
});
}