Skip to content

fix: move draft, automerge & labels fields to PullRequestItem #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/main/java/com/spotify/github/v3/prs/PullRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
import com.spotify.github.GithubStyle;
import com.spotify.github.v3.User;

import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

import com.spotify.github.v3.issues.Label;
import org.immutables.value.Value;

/**
Expand Down Expand Up @@ -81,13 +79,4 @@ public interface PullRequest extends PullRequestItem {
/** The mergeable state of this PR. */
@Nullable
String mergeableState();

/** Is it a draft PR? */
Optional<Boolean> draft();

@Nullable
List<Label> labels();

@Nullable
AutoMerge autoMerge();
}
16 changes: 15 additions & 1 deletion src/main/java/com/spotify/github/v3/prs/PullRequestItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@
import com.spotify.github.GithubStyle;
import com.spotify.github.v3.Milestone;
import com.spotify.github.v3.User;
import com.spotify.github.v3.issues.Label;

import javax.annotation.Nullable;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

import org.immutables.value.Value;

/** Pull request item resource represents data returned during pull request list operation */
Expand Down Expand Up @@ -130,4 +133,15 @@ public interface PullRequestItem extends PartialPullRequestItem {
/** Node ID. */
@Nullable
String nodeId();

/** Is Automerge Enabled */
@Nullable
AutoMerge autoMerge();

/** Is it a draft PR? */
Optional<Boolean> draft();

/** List of PR labels */
@Nullable
List<Label> labels();
}