Class UserIdentity

All Implemented Interfaces:
Describable<GitSCMExtension>

public class UserIdentity extends GitSCMExtension
GitSCMExtension that sets a different name and/or e-mail address for commits.
Author:
Andrew Bayer, Kohsuke Kawaguchi
  • Constructor Details

    • UserIdentity

      @DataBoundConstructor public UserIdentity(String name, String email)
  • Method Details

    • getName

      public String getName()
    • getEmail

      public String getEmail()
    • populateEnvironmentVariables

      public void populateEnvironmentVariables(GitSCM scm, Map<String,String> env)
      Contribute additional environment variables for the Git invocation.
      Overrides:
      populateEnvironmentVariables in class GitSCMExtension
      Parameters:
      scm - GitSCM used as reference
      env - environment variables to be added
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • decorate

      public org.jenkinsci.plugins.gitclient.GitClient decorate(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git) throws IOException, InterruptedException, hudson.plugins.git.GitException
      Called when GitClient is created to decorate its behaviour. This allows extensions to customize the behaviour of GitClient.
      Overrides:
      decorate in class GitSCMExtension
      Parameters:
      scm - GitSCM object
      git - GitClient
      Returns:
      GitClient to decorate
      Throws:
      IOException - on input or output error
      InterruptedException - when interrupted
      hudson.plugins.git.GitException - on git error