mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-12 00:11:22 +00:00
167 lines
5.3 KiB
HTML
167 lines
5.3 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>GHIssueEvent.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">GHIssueEvent.java</span></div><h1>GHIssueEvent.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
|
|
|
|
import java.util.Date;
|
|
|
|
/**
|
|
* The type GHIssueEvent.
|
|
*
|
|
* @see <a href="https://developer.github.com/v3/issues/events/">Github documentation for issue events</a>
|
|
*
|
|
* @author Martin van Zijl
|
|
*/
|
|
<span class="fc" id="L12">public class GHIssueEvent extends GitHubInteractiveObject {</span>
|
|
private long id;
|
|
private String node_id;
|
|
private String url;
|
|
private GHUser actor;
|
|
private String event;
|
|
private String commit_id;
|
|
private String commit_url;
|
|
private String created_at;
|
|
private GHMilestone milestone;
|
|
private GHLabel label;
|
|
private GHUser assignee;
|
|
|
|
private GHIssue issue;
|
|
|
|
/**
|
|
* Gets id.
|
|
*
|
|
* @return the id
|
|
*/
|
|
public long getId() {
|
|
<span class="fc" id="L33"> return id;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets node id.
|
|
*
|
|
* @return the node id
|
|
*/
|
|
public String getNodeId() {
|
|
<span class="nc" id="L42"> return node_id;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets url.
|
|
*
|
|
* @return the url
|
|
*/
|
|
public String getUrl() {
|
|
<span class="nc" id="L51"> return url;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets actor.
|
|
*
|
|
* @return the actor
|
|
*/
|
|
public GHUser getActor() {
|
|
<span class="nc" id="L60"> return actor;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets event.
|
|
*
|
|
* @return the event
|
|
*/
|
|
public String getEvent() {
|
|
<span class="fc" id="L69"> return event;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets commit id.
|
|
*
|
|
* @return the commit id
|
|
*/
|
|
public String getCommitId() {
|
|
<span class="nc" id="L78"> return commit_id;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets commit url.
|
|
*
|
|
* @return the commit url
|
|
*/
|
|
public String getCommitUrl() {
|
|
<span class="nc" id="L87"> return commit_url;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets created at.
|
|
*
|
|
* @return the created at
|
|
*/
|
|
public Date getCreatedAt() {
|
|
<span class="fc" id="L96"> return GitHubClient.parseDate(created_at);</span>
|
|
}
|
|
|
|
/**
|
|
* Gets root.
|
|
*
|
|
* @return the root
|
|
*/
|
|
public GitHub getRoot() {
|
|
<span class="nc" id="L105"> return root;</span>
|
|
}
|
|
|
|
/**
|
|
* Gets issue.
|
|
*
|
|
* @return the issue
|
|
*/
|
|
public GHIssue getIssue() {
|
|
<span class="fc" id="L114"> return issue;</span>
|
|
}
|
|
|
|
/**
|
|
* Get the {@link GHMilestone} that this issue was added to or removed from. Only present for events "milestoned"
|
|
* and "demilestoned", <code>null</code> otherwise.
|
|
*
|
|
* @return the milestone
|
|
*/
|
|
public GHMilestone getMilestone() {
|
|
<span class="fc" id="L124"> return milestone;</span>
|
|
}
|
|
|
|
/**
|
|
* Get the {@link GHLabel} that was added to or removed from the issue. Only present for events "labeled" and
|
|
* "unlabeled", <code>null</code> otherwise.
|
|
*
|
|
* @return the label
|
|
*/
|
|
public GHLabel getLabel() {
|
|
<span class="fc" id="L134"> return label;</span>
|
|
}
|
|
|
|
/**
|
|
* Get the {@link GHUser} that was assigned or unassigned from the issue. Only present for events "assigned" and
|
|
* "unassigned", <code>null</code> otherwise.
|
|
*
|
|
* @return the user
|
|
*/
|
|
public GHUser getAssignee() {
|
|
<span class="fc" id="L144"> return assignee;</span>
|
|
}
|
|
|
|
GHIssueEvent wrapUp(GitHub root) {
|
|
<span class="fc" id="L148"> this.root = root;</span>
|
|
<span class="fc" id="L149"> return this;</span>
|
|
}
|
|
|
|
GHIssueEvent wrapUp(GHIssue parent) {
|
|
<span class="fc" id="L153"> this.issue = parent;</span>
|
|
<span class="fc" id="L154"> this.root = parent.root;</span>
|
|
<span class="fc" id="L155"> return this;</span>
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
<span class="nc" id="L160"> return String.format("Issue %d was %s by %s on %s",</span>
|
|
<span class="nc" id="L161"> getIssue().getNumber(),</span>
|
|
<span class="nc" id="L162"> getEvent(),</span>
|
|
<span class="nc" id="L163"> getActor().getLogin(),</span>
|
|
<span class="nc" id="L164"> getCreatedAt().toString());</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> |