Class DefaultMcpServer.MCPCause
java.lang.Object
hudson.model.Cause
io.jenkins.plugins.mcp.server.extensions.DefaultMcpServer.MCPCause
- Enclosing class:
DefaultMcpServer
A
Cause that indicates a Jenkins build was triggered via MCP call.
This is useful for the end user to understand that the call was trigger through this plugin's code and not some manual user intervention.
And among others, it allows plugins like ... to offer custom badges
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Cause
Cause.LegacyCodeCause, Cause.RemoteCause, Cause.UpstreamCause, Cause.UserCause, Cause.UserIdCause -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAddr()The Jenkins user who initiated the MCP request, when available.The initiating user's current Jenkins display name, when available.
-
Constructor Details
-
MCPCause
-
-
Method Details
-
getAddr
-
getUserId
The Jenkins user who initiated the MCP request, when available.The MCP cause precedes the standard
Cause.UserIdCausein the build's cause list. Exporting the same user ID here preserves the identity expected by existing Pipelines that inspect the first cause, without changing cause ordering or removing the dedicated user cause. -
getUserName
The initiating user's current Jenkins display name, when available. -
getShortDescription
- Specified by:
getShortDescriptionin classCause
-