Files
github-api/jacoco/org.kohsuke.github/GHCommitStatus.java.html
2021-06-02 11:09:28 -07:00

89 lines
3.7 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>GHCommitStatus.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> &gt; <a href="index.source.html" class="el_package">org.kohsuke.github</a> &gt; <span class="el_source">GHCommitStatus.java</span></div><h1>GHCommitStatus.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
import java.io.IOException;
import java.net.URL;
/**
* Represents a status of a commit.
*
* @author Kohsuke Kawaguchi
* @see GHRepository#getLastCommitStatus(String) GHRepository#getLastCommitStatus(String)
* @see GHCommit#getLastStatus() GHCommit#getLastStatus()
* @see GHRepository#createCommitStatus(String, GHCommitState, String, String) GHRepository#createCommitStatus(String,
* GHCommitState, String, String)
*/
<span class="fc" id="L15">public class GHCommitStatus extends GHObject {</span>
String state;
String target_url, description;
String context;
GHUser creator;
GHCommitStatus wrapUp(GitHub root) {
<span class="pc bpc" id="L22" title="1 of 2 branches missed."> if (creator != null)</span>
<span class="fc" id="L23"> creator.wrapUp(root);</span>
<span class="fc" id="L24"> this.root = root;</span>
<span class="fc" id="L25"> return this;</span>
}
/**
* Gets state.
*
* @return the state
*/
public GHCommitState getState() {
<span class="pc bpc" id="L34" title="1 of 2 branches missed."> for (GHCommitState s : GHCommitState.values()) {</span>
<span class="fc bfc" id="L35" title="All 2 branches covered."> if (s.name().equalsIgnoreCase(state))</span>
<span class="fc" id="L36"> return s;</span>
}
<span class="nc" id="L38"> throw new IllegalStateException(&quot;Unexpected state: &quot; + state);</span>
}
/**
* The URL that this status is linked to.
* &lt;p&gt;
* This is the URL specified when creating a commit status.
*
* @return the target url
*/
public String getTargetUrl() {
<span class="fc" id="L49"> return target_url;</span>
}
/**
* Gets description.
*
* @return the description
*/
public String getDescription() {
<span class="fc" id="L58"> return description;</span>
}
/**
* Gets creator.
*
* @return the creator
* @throws IOException
* the io exception
*/
public GHUser getCreator() throws IOException {
<span class="nc" id="L69"> return root.intern(creator);</span>
}
/**
* Gets context.
*
* @return the context
*/
public String getContext() {
<span class="fc" id="L78"> return context;</span>
}
/**
* @deprecated This object has no HTML URL.
*/
@Override
public URL getHtmlUrl() {
<span class="nc" id="L86"> return null;</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>