Update to v1.109

This commit is contained in:
Liam Newman
2020-04-01 15:08:20 -07:00
parent 0df8c7b525
commit bf902ab5c8
1157 changed files with 48245 additions and 3521 deletions

View File

@@ -0,0 +1,102 @@
<?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>GHHook.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">GHHook.java</span></div><h1>GHHook.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
/**
* The type GHHook.
*
* @author Kohsuke Kawaguchi
*/
@SuppressFBWarnings(value = { &quot;UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD&quot;, &quot;UWF_UNWRITTEN_FIELD&quot;, &quot;NP_UNWRITTEN_FIELD&quot; },
justification = &quot;JSON API&quot;)
<span class="fc" id="L20">public abstract class GHHook extends GHObject {</span>
String name;
List&lt;String&gt; events;
boolean active;
Map&lt;String, String&gt; config;
/**
* Gets name.
*
* @return the name
*/
public String getName() {
<span class="nc" id="L32"> return name;</span>
}
/**
* Gets events.
*
* @return the events
*/
public EnumSet&lt;GHEvent&gt; getEvents() {
<span class="nc" id="L41"> EnumSet&lt;GHEvent&gt; s = EnumSet.noneOf(GHEvent.class);</span>
<span class="nc bnc" id="L42" title="All 2 branches missed."> for (String e : events) {</span>
<span class="nc bnc" id="L43" title="All 2 branches missed."> if (e.equals(&quot;*&quot;))</span>
<span class="nc" id="L44"> s.add(GHEvent.ALL);</span>
else
<span class="nc" id="L46"> s.add(Enum.valueOf(GHEvent.class, e.toUpperCase(Locale.ENGLISH)));</span>
<span class="nc" id="L47"> }</span>
<span class="nc" id="L48"> return s;</span>
}
/**
* Is active boolean.
*
* @return the boolean
*/
public boolean isActive() {
<span class="nc" id="L57"> return active;</span>
}
/**
* Gets config.
*
* @return the config
*/
public Map&lt;String, String&gt; getConfig() {
<span class="nc" id="L66"> return Collections.unmodifiableMap(config);</span>
}
/**
* Ping.
*
* @throws IOException
* the io exception
* @see &lt;a href=&quot;https://developer.github.com/v3/repos/hooks/#ping-a-hook&quot;&gt;Ping hook&lt;/a&gt;
*/
public void ping() throws IOException {
<span class="nc" id="L77"> getRoot().createRequest().method(&quot;POST&quot;).withUrlPath(getApiRoute() + &quot;/pings&quot;).send();</span>
<span class="nc" id="L78"> }</span>
/**
* Deletes this hook.
*
* @throws IOException
* the io exception
*/
public void delete() throws IOException {
<span class="nc" id="L87"> getRoot().createRequest().method(&quot;DELETE&quot;).withUrlPath(getApiRoute()).send();</span>
<span class="nc" id="L88"> }</span>
/**
* @deprecated This object has no HTML URL.
*/
@Override
public URL getHtmlUrl() {
<span class="nc" id="L95"> return null;</span>
}
abstract GitHub getRoot();
abstract String getApiRoute();
}
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.5.201910111838</span></div></body></html>