本文整理汇总了Java中org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted类的典型用法代码示例。如果您正苦于以下问题:Java Whitelisted类的具体用法?Java Whitelisted怎么用?Java Whitelisted使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Whitelisted类属于org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists包,在下文中一共展示了Whitelisted类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createStatus
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public CommitStatusGroovyObject createStatus(final String status,
final String context,
final String description,
final String targetUrl) {
Objects.requireNonNull(status, "status is a required argument");
CommitStatus commitStatus = new CommitStatus();
commitStatus.setState(status);
commitStatus.setContext(context);
commitStatus.setDescription(description);
commitStatus.setTargetUrl(targetUrl);
try {
return new CommitStatusGroovyObject(
commitService.createStatus(base, commit.getSha(), commitStatus));
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:20,代码来源:CommitGroovyObject.java
示例2: createStatus
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public CommitStatusGroovyObject createStatus(final String status,
final String context,
final String description,
final String targetUrl) {
Objects.requireNonNull(status, "status is a required argument");
CommitStatus commitStatus = new CommitStatus();
commitStatus.setState(status);
commitStatus.setContext(context);
commitStatus.setDescription(description);
commitStatus.setTargetUrl(targetUrl);
try {
return new CommitStatusGroovyObject(
commitService.createStatus(head, pullRequest.getHead().getSha(), commitStatus));
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:20,代码来源:PullRequestGroovyObject.java
示例3: reviewComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject reviewComment(final String commitId,
final String path,
final int position,
final String body) {
Objects.requireNonNull(commitId, "commitId is a required argument");
Objects.requireNonNull(path, "path is a required argument");
Objects.requireNonNull(body, "body is a required argument");
ExtendedCommitComment comment = new ExtendedCommitComment();
comment.setCommitId(commitId);
comment.setPath(path);
comment.setPosition(position);
comment.setBody(body);
try {
return new ReviewCommentGroovyObject(
pullRequestService.createComment2(base, pullRequestHead.getNumber(), comment),
base,
commitService);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:24,代码来源:PullRequestGroovyObject.java
示例4: editComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public IssueCommentGroovyObject editComment(final long commentId, final String body) {
Objects.requireNonNull(body, "body is a required argument");
Comment comment = new Comment();
comment.setId(commentId);
comment.setBody(body);
try {
return new IssueCommentGroovyObject(
issueService.editComment(base, comment),
base,
issueService);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:17,代码来源:PullRequestGroovyObject.java
示例5: merge
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public String merge(final String commitTitle,
final String commitMessage,
final String sha,
final String mergeMethod) {
try {
ExtendedMergeStatus status = pullRequestService.merge(base,
pullRequestHead.getNumber(),
commitTitle,
commitMessage,
sha,
mergeMethod);
if (status.isMerged()) {
return status.getSha();
} else {
throw new RuntimeException(status.getMessage());
}
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:22,代码来源:PullRequestGroovyObject.java
示例6: delete
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void delete() {
try {
commitService.deleteComment(base, commitComment.getId());
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:ReviewCommentGroovyObject.java
示例7: delete
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void delete() {
try {
issueService.deleteComment(base, comment.getId());
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:IssueCommentGroovyObject.java
示例8: createReviewRequests
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void createReviewRequests(final String...reviewers) {
Objects.requireNonNull(reviewers, "reviewers cannot be null");
try {
pullRequestService.createReviewRequests(base, pullRequest.getNumber(), reviewers);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例9: deleteReviewRequests
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteReviewRequests(final String...reviewers) {
Objects.requireNonNull(reviewers, "reviewers cannot be null");
try {
pullRequestService.deleteReviewRequests(base, pullRequest.getNumber(), reviewers);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例10: addLabels
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void addLabels(final String...labels) {
Objects.requireNonNull(labels, "labels is a required argument");
try {
issueService.addLabels(base, pullRequest.getNumber(), labels);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例11: removeLabel
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void removeLabel(final String label) {
Objects.requireNonNull(label, "label is a required argument");
try {
issueService.removeLabel(base, pullRequest.getNumber(), label);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例12: addAssignees
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void addAssignees(final String...assignees) {
Objects.requireNonNull(assignees, "assignees is a required argument");
try {
issueService.addAssignees(base, pullRequest.getNumber(), assignees);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例13: removeAssignees
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void removeAssignees(final String...assignees) {
Objects.requireNonNull(assignees, "assignees is a required argument");
try {
issueService.removeAssignees(base, pullRequest.getNumber(), assignees);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:10,代码来源:PullRequestGroovyObject.java
示例14: replyToReviewComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject replyToReviewComment(final long commentId, final String body) {
Objects.requireNonNull(body, "body is a required argument");
try {
return new ReviewCommentGroovyObject(
pullRequestService.replyToComment2(base, pullRequestHead.getNumber(), (int) commentId, body),
base,
commitService);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:13,代码来源:PullRequestGroovyObject.java
示例15: deleteReviewComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteReviewComment(final long commentId) {
try {
pullRequestService.deleteComment(base, commentId);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java
示例16: editReviewComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public ReviewCommentGroovyObject editReviewComment(final long commentId, final String body) {
Objects.requireNonNull(body, "body is a required argument");
ExtendedCommitComment comment = new ExtendedCommitComment();
comment.setId(commentId);
comment.setBody(body);
try {
return new ReviewCommentGroovyObject(pullRequestService.editComment2(base, comment), base, commitService);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:14,代码来源:PullRequestGroovyObject.java
示例17: comment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public IssueCommentGroovyObject comment(final String body) {
Objects.requireNonNull(body, "body is a required argument");
try {
return new IssueCommentGroovyObject(
issueService.createComment(base, pullRequestHead.getNumber(), body),
base,
issueService);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:14,代码来源:PullRequestGroovyObject.java
示例18: deleteComment
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void deleteComment(final long commentId) {
try {
issueService.deleteComment(base, commentId);
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java
示例19: refresh
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
@Whitelisted
public void refresh() {
try {
pullRequest = pullRequestService.getPullRequest(base, pullRequest.getNumber());
} catch (final IOException e) {
throw new UncheckedIOException(e);
}
}
开发者ID:aaronjwhiteside,项目名称:pipeline-github,代码行数:9,代码来源:PullRequestGroovyObject.java
示例20: getHostClusterApiServerUrl
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted; //导入依赖的package包/类
/**
* @return Returns a URL to contact the API server of the OpenShift cluster
* running this node or throws an Exception if it cannot be
* determined.
*/
@Whitelisted
public static String getHostClusterApiServerUrl() {
String serviceHost = System.getenv("KUBERNETES_SERVICE_HOST");
if (serviceHost == null) {
throw new IllegalStateException(
"No clusterName information specified and unable to find `KUBERNETES_SERVICE_HOST` environment variable.");
}
String servicePort = System.getenv("KUBERNETES_SERVICE_PORT_HTTPS");
if (servicePort == null) {
throw new IllegalStateException(
"No clusterName information specified and unable to find `KUBERNETES_SERVICE_PORT_HTTPS` environment variable.");
}
return "https://" + serviceHost + ":" + servicePort;
}
开发者ID:openshift,项目名称:jenkins-client-plugin,代码行数:20,代码来源:ClusterConfig.java
注:本文中的org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论