Package hudson.plugins.git
Class GitStatus
java.lang.Object
hudson.plugins.git.GitStatus
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
,RootAction
,UnprotectedRootAction
Root action that requests the plugin to poll for changes in remote repositories.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Handle standardSCMTriggerItem
instances with a standardSCMTrigger
.static class
Other plugins may be interested in listening for these updates.static class
A response contributor that just adds a simple message to the body.static class
Contributes to adoNotifyCommit(HttpServletRequest, String, String, String, String)
response.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.kohsuke.stapler.HttpResponse
doNotifyCommit
(jakarta.servlet.http.HttpServletRequest request, String url, String branches, String sha1, String token) static boolean
looselyMatches
(org.eclipse.jgit.transport.URIish lhs, org.eclipse.jgit.transport.URIish rhs) Used to test if what we have in the job configuration matches what was submitted to the notification endpoint.toString()
-
Field Details
-
SHA1_PATTERN
-
CLEANER_SHA1_PATTERN
-
ALLOW_NOTIFY_COMMIT_PARAMETERS
public static final boolean ALLOW_NOTIFY_COMMIT_PARAMETERSAllow arbitrary notify commit parameters. SECURITY-275 detected that allowing arbitrary parameters through the notifyCommit URL allows an unauthenticated user to set environment variables for a job. If this property is set to true, then the bug exposed by SECURITY-275 will be brought back. Only enable this if you trust all unauthenticated users to not pass harmful arguments to your jobs. -Dhudson.plugins.git.GitStatus.allowNotifyCommitParameters=true on command line Also honors the global Jenkins security setting "hudson.model.ParametersAction.keepUndefinedParameters" if it is set to true. -
SAFE_PARAMETERS
Allow specifically declared safe parameters. SECURITY-275 detected that allowing arbitrary parameters through the notifyCommit URL allows an unauthenticated user to set environment variables for a job. If this property is set to a comma separated list of parameters, then those parameters will be allowed for any job. Only set this value for parameters you trust in all the jobs in your system. -Dhudson.plugins.git.GitStatus.safeParameters=PARM1,PARM1 on command line Also honors the global Jenkins safe parameter list "hudson.model.ParametersAction.safeParameters" if set.
-
-
Constructor Details
-
GitStatus
public GitStatus()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
toString
-
doNotifyCommit
-
looselyMatches
public static boolean looselyMatches(org.eclipse.jgit.transport.URIish lhs, org.eclipse.jgit.transport.URIish rhs) Used to test if what we have in the job configuration matches what was submitted to the notification endpoint. It is better to match loosely and wastes a few polling calls than to be pedantic and miss the push notification, especially given that Git tends to support multiple access protocols.- Parameters:
lhs
- left-hand side of comparisonrhs
- right-hand side of comparison- Returns:
- true if left-hand side loosely matches right-hand side
-