mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-20 08:21:21 +00:00
59 lines
2.9 KiB
HTML
59 lines
2.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>GitUser.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GitHub API for Java</a> > <a href="index.source.html" class="el_package">org.kohsuke.github</a> > <span class="el_source">GitUser.java</span></div><h1>GitUser.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
|
|
|
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|
|
|
import java.util.Date;
|
|
|
|
import javax.annotation.CheckForNull;
|
|
|
|
/**
|
|
* Represents a user in Git who authors/commits a commit.
|
|
* <p>
|
|
* In contrast, {@link GHUser} is an user of GitHub. Because Git allows a person to use multiple e-mail addresses and
|
|
* names when creating a commit, there's generally no meaningful mapping between {@link GHUser} and {@link GitUser}.
|
|
*
|
|
* @author Kohsuke Kawaguchi
|
|
*/
|
|
@SuppressFBWarnings(value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD" },
|
|
justification = "JSON API")
|
|
<span class="fc" id="L19">public class GitUser {</span>
|
|
private String name, email, date, username;
|
|
|
|
/**
|
|
* Gets the git user name for an author or committer on a git commit.
|
|
*
|
|
* @return Human readable name of the user, such as "Kohsuke Kawaguchi"
|
|
*/
|
|
public String getName() {
|
|
<span class="fc" id="L28"> return name;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets the git email for an author or committer on a git commit.
|
|
*
|
|
* @return E-mail address, such as "foo@example.com"
|
|
*/
|
|
public String getEmail() {
|
|
<span class="fc" id="L37"> return email;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets username. Note: it presents only in events.
|
|
*
|
|
* @return GitHub username
|
|
*/
|
|
@CheckForNull
|
|
public String getUsername() {
|
|
<span class="fc" id="L47"> return username;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets date.
|
|
*
|
|
* @return Commit Date.
|
|
*/
|
|
public Date getDate() {
|
|
<span class="fc" id="L56"> return GitHubClient.parseDate(date);</span>
|
|
}
|
|
}
|
|
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html> |