更正PR描述

This commit is contained in:
yashin 2018-07-25 18:39:26 +08:00
parent d148c9b4ca
commit c2e44e0ef1
9 changed files with 22 additions and 22 deletions

View File

@ -49,7 +49,7 @@ public class GiteeAcceptPullRequestPublisher extends PullRequestNotifier {
protected void perform(Run<?, ?> build, TaskListener listener, GiteeClient client, PullRequest pullRequest) {
try {
if (build.getResult() == Result.SUCCESS) {
client.acceptPullRequest(pullRequest, "Merge Request accepted by jenkins build success", false);
client.acceptPullRequest(pullRequest, "Pull Request accepted by jenkins build success", false);
}
} catch (WebApplicationException | ProcessingException e) {
listener.getLogger().printf("Failed to accept pull request for project '%s': %s%n", pullRequest.getProjectId(), e.getMessage());

View File

@ -180,8 +180,8 @@ public class GiteeMessagePublisher extends PullRequestNotifier {
client.createPullRequestNote(pullRequest, getNote(build, listener));
}
} catch (WebApplicationException | ProcessingException e) {
listener.getLogger().printf("Failed to add comment on Merge Request for project '%s': %s%n", pullRequest.getProjectId(), e.getMessage());
LOGGER.log(Level.SEVERE, String.format("Failed to add comment on Merge Request for project '%s'", pullRequest.getProjectId()), e);
listener.getLogger().printf("Failed to add comment on Pull Request for project '%s': %s%n", pullRequest.getProjectId(), e.getMessage());
LOGGER.log(Level.SEVERE, String.format("Failed to add comment on Pull Request for project '%s'", pullRequest.getProjectId()), e);
}
}

View File

@ -108,7 +108,7 @@ class PullRequestHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<Pu
if (objectAttributes != null && objectAttributes.getMergeCommitSha() != null) {
Run<?, ?> mergeBuild = BuildUtil.getBuildBySHA1IncludingMergeBuilds(project, objectAttributes.getMergeCommitSha());
if (mergeBuild != null && StringUtils.equals(getTargetBranchFromBuild(mergeBuild), objectAttributes.getTargetBranch())) {
LOGGER.log(Level.INFO, "Last commit in Merge Request has already been built in build #" + mergeBuild.getNumber());
LOGGER.log(Level.INFO, "Last commit in Pull Request has already been built in build #" + mergeBuild.getNumber());
return true;
}
}
@ -209,7 +209,7 @@ class PullRequestHookTriggerHandlerImpl extends AbstractWebHookTriggerHandler<Pu
private boolean isNotSkipWorkInProgressPullRequest(PullRequestObjectAttributes objectAttributes) {
// Boolean workInProgress = objectAttributes.getWorkInProgress();
// if (skipWorkInProgressPullRequest && workInProgress != null && workInProgress) {
// LOGGER.log(Level.INFO, "Skip WIP Merge Request #{0} ({1})", toArray(objectAttributes.getNumber(), objectAttributes.getTitle()));
// LOGGER.log(Level.INFO, "Skip WIP Pull Request #{0} ({1})", toArray(objectAttributes.getNumber(), objectAttributes.getTitle()));
// return false;
// }
return true;

View File

@ -125,7 +125,7 @@ public class AcceptGiteePullRequestStep extends Step {
@Override
public String getDisplayName() {
return "Accept Gitee Merge Request";
return "Accept Gitee Pull Request";
}
@Override

View File

@ -83,8 +83,8 @@ public class AddGiteePullRequestCommentStep extends Step {
try {
client.createPullRequestNote(pullRequest, step.getComment());
} catch (WebApplicationException | ProcessingException e) {
printf("Failed to add comment on Merge Request for project '%s': %s%n", pullRequest.getProjectId(), e.getMessage());
LOGGER.log(Level.SEVERE, String.format("Failed to add comment on Merge Request for project '%s'", pullRequest.getProjectId()), e);
printf("Failed to add comment on Pull Request for project '%s': %s%n", pullRequest.getProjectId(), e.getMessage());
LOGGER.log(Level.SEVERE, String.format("Failed to add comment on Pull Request for project '%s'", pullRequest.getProjectId()), e);
}
}
}
@ -128,7 +128,7 @@ public class AddGiteePullRequestCommentStep extends Step {
@Override
public String getDisplayName() {
return "Add comment on Gitee Merge Request";
return "Add comment on Gitee Pull Request";
}
@Override

View File

@ -6,12 +6,12 @@ Enable.CI.Skip=Enable [ci-skip]
Enabled.Gitee.Triggers=Enabled Gitee triggers
Approved.Pull.Request=Approved Pull Requests
Tested.Pull.Request=Tested Pull Requests
Closed.Pull.Request=Closed Merge Request Events
Accepted.Pull.Request=Accepted Merge Request Events
Opened.Pull.Request=Opened Merge Request Events
Updated.Pull.Request=Updated Merge Request Events
Closed.Pull.Request=Closed Pull Requests Events
Accepted.Pull.Request=Accepted Pull Requests Events
Opened.Pull.Request=Opened Pull Requests Events
Updated.Pull.Request=Updated Pull Requests Events
Set.Build.Desctiption=Set build description to build cause (eg. Merge request or Git Push )
Ignore.WIP.Merge.Requests=Ignore WIP Merge Requests
Ignore.WIP.Merge.Requests=Ignore WIP Pull Requests
CommitNotifier.Success=Build {0} succeeded in {1}
CommitNotifier.Unstable=Build {0} found unstable in {1}
CommitNotifier.Failed=Build {0} failed in {1}

View File

@ -6,11 +6,11 @@ Enable.CI.Skip=\u652F\u6301 [ci-skip] \u6307\u4EE4
Enabled.Gitee.Triggers=Gitee \u89E6\u53D1\u6784\u5EFA\u7B56\u7565
Approved.Pull.Request=Pull Requests \u5BA1\u67E5\u901A\u8FC7
Tested.Pull.Request=Pull Requests \u6D4B\u8BD5\u901A\u8FC7
Closed.Pull.Request=\u5173\u95ED Pull Request
Accepted.Pull.Request=\u63A5\u53D7 Pull Request
Opened.Pull.Request=\u65B0\u5EFA Pull Request
Updated.Pull.Request=\u66F4\u65B0 Pull Request
Ignore.WIP.Merge.Requests=\u8FC7\u6EE4\u6B63\u5728\u8FDB\u884C\u6784\u5EFA\u7684Pull Request
Closed.Pull.Request=\u5173\u95ED Pull Requests
Accepted.Pull.Request=\u63A5\u53D7 Pull Requests
Opened.Pull.Request=\u65B0\u5EFA Pull Requests
Updated.Pull.Request=\u66F4\u65B0 Pull Requests
Ignore.WIP.Merge.Requests=\u8FC7\u6EE4\u6B63\u5728\u8FDB\u884C\u6784\u5EFA\u7684Pull Requests
Set.Build.Desctiption=\u8BBE\u7F6E\u6784\u5EFA\u63CF\u8FF0
CommitNotifier.Success=\u6784\u5EFA {0} \u6210\u529F\u4E8E {1}
CommitNotifier.Unstable=\u6784\u5EFA {0} \u53D1\u73B0 {1} \u4E0D\u7A33\u5B9A

View File

@ -1,5 +1,5 @@
<p>
Comma-separated list of source branches allowed to trigger a build from a <b>Push event</b> or a <b>Merge Request event</b>.
Comma-separated list of source branches allowed to trigger a build from a <b>Push event</b> or a <b>Pull Request event</b>.
If both fields are left empty, all branches are allowed to trigger this job.
For <b>Merge Request events</b> only the target branch name is filtered out by the include and exclude lists.
For <b>Pull Request events</b> only the target branch name is filtered out by the include and exclude lists.
</p>

View File

@ -1,3 +1,3 @@
<div>
Ignore WIP Merge Requests
Ignore WIP Pull Requests
</div>