Skip to content

Commit ea844c2

Browse files
fix: move draft, automerge & labels fields to PullRequestItem (#240)
* move draft & labels to PullRequestItem * move auto_merge to PullRequestItem
1 parent 59a85f6 commit ea844c2

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

src/main/java/com/spotify/github/v3/prs/PullRequest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
import com.spotify.github.GithubStyle;
2626
import com.spotify.github.v3.User;
2727

28-
import java.util.List;
2928
import java.util.Optional;
3029
import javax.annotation.Nullable;
3130

32-
import com.spotify.github.v3.issues.Label;
3331
import org.immutables.value.Value;
3432

3533
/**
@@ -81,13 +79,4 @@ public interface PullRequest extends PullRequestItem {
8179
/** The mergeable state of this PR. */
8280
@Nullable
8381
String mergeableState();
84-
85-
/** Is it a draft PR? */
86-
Optional<Boolean> draft();
87-
88-
@Nullable
89-
List<Label> labels();
90-
91-
@Nullable
92-
AutoMerge autoMerge();
9382
}

src/main/java/com/spotify/github/v3/prs/PullRequestItem.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
import com.spotify.github.GithubStyle;
2828
import com.spotify.github.v3.Milestone;
2929
import com.spotify.github.v3.User;
30+
import com.spotify.github.v3.issues.Label;
31+
32+
import javax.annotation.Nullable;
3033
import java.net.URI;
3134
import java.util.List;
3235
import java.util.Optional;
33-
import javax.annotation.Nullable;
36+
3437
import org.immutables.value.Value;
3538

3639
/** Pull request item resource represents data returned during pull request list operation */
@@ -130,4 +133,15 @@ public interface PullRequestItem extends PartialPullRequestItem {
130133
/** Node ID. */
131134
@Nullable
132135
String nodeId();
136+
137+
/** Is Automerge Enabled */
138+
@Nullable
139+
AutoMerge autoMerge();
140+
141+
/** Is it a draft PR? */
142+
Optional<Boolean> draft();
143+
144+
/** List of PR labels */
145+
@Nullable
146+
List<Label> labels();
133147
}

0 commit comments

Comments
 (0)