Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
cae5d741
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cae5d741
编写于
1月 03, 2012
作者:
S
Seiji Sogabe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FIXED JENKINS-12279] Link to user profile from console output should go to the user ID, not the
user name
上级
2ac1df4b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
13 deletion
+16
-13
changelog.html
changelog.html
+3
-0
core/src/main/java/hudson/model/Cause.java
core/src/main/java/hudson/model/Cause.java
+13
-13
未找到文件。
changelog.html
浏览文件 @
cae5d741
...
...
@@ -61,6 +61,9 @@ Upcoming changes</a>
<li
class=
'rfe'
>
Reduced overhead of maven jobs.
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-11883"
>
issue 11883
</a>
)
<li
class=
bug
>
Link to user profile from console output should go to the user ID, not the user name
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-12279"
>
issue 12279
</a>
)
</ul>
</div>
<!--=TRUNK-END=-->
...
...
core/src/main/java/hudson/model/Cause.java
浏览文件 @
cae5d741
...
...
@@ -36,7 +36,7 @@ import org.kohsuke.stapler.export.ExportedBean;
import
com.thoughtworks.xstream.converters.UnmarshallingContext
;
/**
* Cause object base class. This class hierarchy is used to keep track of why
* Cause object base class. This class hierarchy is used to keep track of why
* a given build was started. This object encapsulates the UI rendering of the cause,
* as well as providing more useful information in respective subypes.
*
...
...
@@ -89,13 +89,13 @@ public abstract class Cause {
public
LegacyCodeCause
()
{
stackTrace
=
new
Exception
().
getStackTrace
();
}
@Override
public
String
getShortDescription
()
{
return
Messages
.
Cause_LegacyCodeCause_ShortDescription
();
}
}
/**
* A build is triggered by the completion of another build (AKA upstream build.)
*/
...
...
@@ -116,7 +116,7 @@ public abstract class Cause {
public
UpstreamCause
(
AbstractBuild
<?,?>
up
)
{
this
((
Run
<?,?>)
up
);
}
public
UpstreamCause
(
Run
<?,
?>
up
)
{
upstreamBuild
=
up
.
getNumber
();
upstreamProject
=
up
.
getParent
().
getFullName
();
...
...
@@ -152,7 +152,7 @@ public abstract class Cause {
public
String
getUpstreamUrl
()
{
return
upstreamUrl
;
}
@Override
public
String
getShortDescription
()
{
return
Messages
.
Cause_UpstreamCause_ShortDescription
(
upstreamProject
,
upstreamBuild
);
...
...
@@ -182,7 +182,7 @@ public abstract class Cause {
/**
* A build is started by an user action.
*
*
* @deprecated 1.428
* use {@link UserIdCause}
*/
...
...
@@ -217,13 +217,13 @@ public abstract class Cause {
/**
* A build is started by an user action.
*
*
* @since 1.427
*/
public
static
class
UserIdCause
extends
Cause
{
private
String
userId
;
public
UserIdCause
()
{
User
user
=
User
.
current
();
this
.
userId
=
(
user
==
null
)
?
null
:
user
.
getId
();
...
...
@@ -233,13 +233,13 @@ public abstract class Cause {
public
String
getUserId
()
{
return
userId
;
}
@Exported
(
visibility
=
3
)
public
String
getUserName
()
{
String
userName
=
"anonymous"
;
if
(
userId
!=
null
)
{
User
user
=
User
.
get
(
userId
,
false
);
if
(
user
!=
null
)
if
(
user
!=
null
)
userName
=
user
.
getDisplayName
();
}
return
userName
;
...
...
@@ -249,13 +249,13 @@ public abstract class Cause {
public
String
getShortDescription
()
{
return
Messages
.
Cause_UserIdCause_ShortDescription
(
getUserName
());
}
@Override
public
void
print
(
TaskListener
listener
)
{
listener
.
getLogger
().
println
(
Messages
.
Cause_UserIdCause_ShortDescription
(
HyperlinkNote
.
encodeTo
(
"/user/"
+
getUser
Name
(),
getUserName
())));
HyperlinkNote
.
encodeTo
(
"/user/"
+
getUser
Id
(),
getUserName
())));
}
@Override
public
boolean
equals
(
Object
o
)
{
return
o
instanceof
UserIdCause
&&
Arrays
.
equals
(
new
Object
[]{
userId
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录