From 0ebcf9701cda9d6b72ccc199d7532e982323fc8c Mon Sep 17 00:00:00 2001 From: kosh Date: Wed, 26 Jul 2017 23:24:32 +0800 Subject: [PATCH 01/67] revamping of timeline to use different and more efficient api --- .../fastaccess/data/dao/IssuesPageable.java | 53 +++ .../data/dao/PullRequestStatusModel.java | 3 +- .../data/dao/ReviewCommentModel.java | 3 +- .../fastaccess/data/dao/TimelineModel.java | 313 +++++------------- .../data/dao/timeline/AuthorModel.java | 38 +++ .../data/dao/timeline/CommentEvent.java | 126 +++++++ .../data/dao/timeline/GenericEvent.java | 119 +++++++ .../data/dao/timeline/ParentsModel.java | 35 ++ .../data/dao/timeline/SourceModel.java | 47 +++ .../data/dao/timeline/Timeline.java | 73 ++++ .../data/dao/types/IssueEventType.java | 18 +- .../fastaccess/data/service/IssueService.java | 10 +- .../NotificationSchedulerJobTask.java | 4 +- .../provider/timeline/TimelineConverter.java | 68 ++++ .../provider/timeline/TimelineProvider.java | 56 +++- .../handler/drawable/DrawableGetter.java | 23 +- .../ui/adapter/IssuePullsTimelineAdapter.java | 29 +- .../viewholder/GroupedReviewsViewHolder.java | 30 +- .../viewholder/IssueTimelineViewHolder.java | 39 +-- .../adapter/viewholder/ReviewsViewHolder.java | 56 ++-- .../com/fastaccess/ui/base/BaseActivity.java | 47 +-- .../ui/base/mvp/presenter/BasePresenter.java | 5 +- .../comments/CommitCommentsPresenter.java | 13 +- .../timeline/IssueTimelinePresenter.java | 32 +- .../timeline/PullRequestTimelineFragment.java | 54 +-- .../timeline/PullRequestTimelineMvp.java | 2 + .../PullRequestTimelinePresenter.java | 219 ++++++------ .../fastaccess/ui/widgets/AvatarLayout.java | 13 +- .../row_layouts/layout/label_row_item.xml | 2 +- app/src/main/res/xml/behaviour_settings.xml | 17 +- build.gradle | 7 +- 31 files changed, 961 insertions(+), 593 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/data/dao/IssuesPageable.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java create mode 100644 app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java diff --git a/app/src/main/java/com/fastaccess/data/dao/IssuesPageable.java b/app/src/main/java/com/fastaccess/data/dao/IssuesPageable.java new file mode 100644 index 00000000..99e8b365 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/IssuesPageable.java @@ -0,0 +1,53 @@ +package com.fastaccess.data.dao; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.List; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * Created by Kosh on 15 Nov 2016, 7:04 PM + */ + + +@Getter @Setter @NoArgsConstructor +public class IssuesPageable implements Parcelable { + + public int first; + public int next; + public int prev; + public int last; + public int totalCount; + public boolean incompleteResults; + public List items; + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(this.first); + dest.writeInt(this.next); + dest.writeInt(this.prev); + dest.writeInt(this.last); + dest.writeInt(this.totalCount); + dest.writeByte(this.incompleteResults ? (byte) 1 : (byte) 0); + } + + @SuppressWarnings("WeakerAccess") protected IssuesPageable(Parcel in) { + this.first = in.readInt(); + this.next = in.readInt(); + this.prev = in.readInt(); + this.last = in.readInt(); + this.totalCount = in.readInt(); + this.incompleteResults = in.readByte() != 0; + } + + public static final Creator CREATOR = new Creator() { + @Override public IssuesPageable createFromParcel(Parcel source) {return new IssuesPageable(source);} + + @Override public IssuesPageable[] newArray(int size) {return new IssuesPageable[size];} + }; +} diff --git a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java index bf37f119..4cb407b1 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java @@ -3,6 +3,7 @@ package com.fastaccess.data.dao; import android.os.Parcel; import android.os.Parcelable; +import com.fastaccess.data.dao.timeline.Timeline; import com.fastaccess.data.dao.types.StatusStateType; import java.util.Date; @@ -15,7 +16,7 @@ import lombok.Setter; * Created by Kosh on 10 Apr 2017, 3:15 AM */ -@Getter @Setter public class PullRequestStatusModel implements Parcelable { +@Getter @Setter public class PullRequestStatusModel extends Timeline implements Parcelable { private StatusStateType state; private String sha; diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java index 9c253401..b9a60ccf 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java @@ -4,6 +4,7 @@ import android.os.Parcel; import android.os.Parcelable; import com.fastaccess.data.dao.model.User; +import com.fastaccess.data.dao.timeline.Timeline; import java.util.Date; @@ -14,7 +15,7 @@ import lombok.Setter; * Created by Kosh on 04 May 2017, 7:10 PM */ -@Getter @Setter public class ReviewCommentModel implements Parcelable { +@Getter @Setter public class ReviewCommentModel extends Timeline implements Parcelable { private long id; private String url; diff --git a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java index 5cbabdc8..adb7e778 100644 --- a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java @@ -2,289 +2,96 @@ package com.fastaccess.data.dao; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; import android.support.annotation.Nullable; -import com.annimon.stream.Collectors; -import com.annimon.stream.Stream; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Issue; -import com.fastaccess.data.dao.model.IssueEvent; import com.fastaccess.data.dao.model.PullRequest; +import com.fastaccess.data.dao.timeline.GenericEvent; import com.fastaccess.data.dao.types.IssueEventType; -import com.fastaccess.data.dao.types.ReviewStateType; -import com.fastaccess.helper.InputHelper; -import java.util.ArrayList; -import java.util.Date; -import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; +import io.reactivex.Observable; import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.NonNull; import lombok.Setter; -import static com.annimon.stream.Collectors.toList; - /** * Created by Kosh on 30 Mar 2017, 9:03 PM */ @Getter @Setter @NoArgsConstructor public class TimelineModel implements Parcelable { public static final int HEADER = 0; - public static final int STATUS = 1; - public static final int REVIEW = 2; - public static final int GROUPED_REVIEW = 3; - public static final int EVENT = 4; - public static final int COMMENT = 5; + public static final int LINE_COMMENT = 1; + public static final int EVENT = 2; + public static final int COMMENT = 3; + public static final int STATUS = 4; - private int type; - private Issue issue; + private IssueEventType event; private Comment comment; - private IssueEvent event; - private PullRequest pullRequest; - private PullRequestStatusModel status; - private ReviewModel review; - private GroupedReviewModel groupedReview; + private GenericEvent genericEvent; private ReviewCommentModel reviewComment; - private Date sortedDate; + private PullRequestStatusModel status; + private Issue issue; + private PullRequest pullRequest; - private TimelineModel(Issue issue) { - this.type = HEADER; + public TimelineModel(Issue issue) { this.issue = issue; - this.sortedDate = issue.getCreatedAt(); } - private TimelineModel(PullRequest pullRequest) { - this.type = HEADER; + public TimelineModel(PullRequest pullRequest) { this.pullRequest = pullRequest; - this.sortedDate = pullRequest.getCreatedAt(); } - private TimelineModel(Comment comment) { - this.type = COMMENT; + public TimelineModel(Comment comment) { this.comment = comment; - this.sortedDate = comment.getCreatedAt() == null ? new Date() : comment.getCreatedAt(); + this.event = IssueEventType.commented; } - private TimelineModel(IssueEvent event) { - this.type = EVENT; - this.event = event; - this.sortedDate = event.getCreatedAt(); + public TimelineModel(PullRequestStatusModel statusModel) { + this.status = statusModel; } - private TimelineModel(PullRequestStatusModel status) { - this.type = STATUS; - this.status = status; - this.sortedDate = status.getCreatedAt(); - } - - private TimelineModel(ReviewModel review) { - this.type = REVIEW; - this.review = review; - this.sortedDate = review.getSubmittedAt(); - } - - private TimelineModel(GroupedReviewModel groupedReview) { - this.type = GROUPED_REVIEW; - this.groupedReview = groupedReview; - this.sortedDate = groupedReview.getDate(); - } - - @NonNull public static TimelineModel constructHeader(@NonNull Issue issue) { - return new TimelineModel(issue); - } - - @NonNull public static TimelineModel constructHeader(@NonNull PullRequest pullRequest) { - return new TimelineModel(pullRequest); - } - - @NonNull public static TimelineModel constructComment(@NonNull Comment comment) { - return new TimelineModel(comment); - } - - @NonNull public static List construct(@Nullable List commentList) { - ArrayList list = new ArrayList<>(); - if (commentList != null && !commentList.isEmpty()) { - list.addAll(Stream.of(commentList) - .map(TimelineModel::new) - .collect(Collectors.toList())); - } - return list; - } - - @NonNull public static List construct(@Nullable List commentList, @Nullable List eventList) { - ArrayList list = new ArrayList<>(); - if (commentList != null && !commentList.isEmpty()) { - list.addAll(Stream.of(commentList) - .map(TimelineModel::new) - .collect(Collectors.toList())); - } - if (eventList != null && !eventList.isEmpty()) { - list.addAll(constructLabels(eventList)); - } - - return Stream.of(list).sorted((o1, o2) -> { - if (o1.getEvent() != null && o2.getComment() != null) { - return o1.getEvent().getCreatedAt().compareTo(o2.getComment().getCreatedAt()); - } else if (o1.getComment() != null && o2.getEvent() != null) { - return o1.getComment().getCreatedAt().compareTo(o2.getEvent().getCreatedAt()); - } else { - return Integer.valueOf(o1.getType()).compareTo(o2.getType()); + public int getType() { + if (getEvent() != null) { + switch (getEvent()) { + case commented: + return COMMENT; + case line_commented: + return LINE_COMMENT; + default: + return EVENT; } - }).collect(Collectors.toList()); - } - - @NonNull public static List construct(@Nullable List commentList, @Nullable List eventList, - @Nullable PullRequestStatusModel status, @Nullable List reviews, - @Nullable List reviewComments) { - ArrayList list = new ArrayList<>(); - if (status != null) { - list.add(new TimelineModel(status)); + } else { + if (issue != null || pullRequest != null) return HEADER; + if (status != null) return STATUS; + return EVENT; } - if (reviews != null && !reviews.isEmpty()) { - list.addAll(constructReviews(reviews, reviewComments)); - } - if (commentList != null && !commentList.isEmpty()) { - list.addAll(Stream.of(commentList) - .map(TimelineModel::new) - .collect(Collectors.toList())); - } - if (eventList != null && !eventList.isEmpty()) { - list.addAll(constructLabels(eventList)); - } - - return Stream.of(list).sortBy(model -> { - if (model.getSortedDate() != null) { - return model.getSortedDate().getTime(); - } else { - return (long) model.getType(); - } - }).collect(Collectors.toList()); - } - - @NonNull private static List constructLabels(@NonNull List eventList) { - List models = new ArrayList<>(); - Map> issueEventMap = Stream.of(eventList) - .filter(value -> value.getEvent() != null && value.getEvent() != IssueEventType.subscribed && - value.getEvent() != IssueEventType.unsubscribed && value.getEvent() != IssueEventType.mentioned) - .collect(Collectors.groupingBy(issueEvent -> { - if (issueEvent.getAssigner() != null && issueEvent.getAssignee() != null) { - return issueEvent.getAssigner().getLogin(); - } - return issueEvent.getActor().getLogin(); - })); - if (issueEventMap != null && !issueEventMap.isEmpty()) { - for (Map.Entry> stringListEntry : issueEventMap.entrySet()) { - List labelModels = new ArrayList<>(); - List events = stringListEntry.getValue(); - IssueEvent toAdd = null; - for (IssueEvent event : events) { - if (event.getEvent() == IssueEventType.labeled || event.getEvent() == IssueEventType.unlabeled) { - if (toAdd == null) { - toAdd = event; - } - long time = toAdd.getCreatedAt().after(event.getCreatedAt()) ? (toAdd.getCreatedAt().getTime() - event - .getCreatedAt().getTime()) : (event.getCreatedAt().getTime() - toAdd.getCreatedAt().getTime()); - if (TimeUnit.MINUTES.toMinutes(time) <= 2 && toAdd.getEvent() == event.getEvent()) { - labelModels.add(event.getLabel()); - } else { - models.add(new TimelineModel(event)); - } - } else { - models.add(new TimelineModel(event)); - } - } - if (toAdd != null) { - toAdd.setLabels(labelModels); - models.add(new TimelineModel(toAdd)); - } - } - } - return Stream.of(models) - .sortBy(TimelineModel::getSortedDate) - .toList(); - } - - @NonNull private static List constructReviews - (@NonNull List reviews, @Nullable List comments) { - List models = new ArrayList<>(); - if (comments == null || comments.isEmpty()) { - models.addAll(Stream.of(reviews) - .map(TimelineModel::new) - .collect(Collectors.toList())); - } else { // this is how bad github API is. - Map> mappedComments = Stream.of(comments) - .collect(Collectors.groupingBy(ReviewCommentModel::getOriginalPosition, LinkedHashMap::new, - Collectors.mapping(o -> o, toList()))); - for (Map.Entry> entry : mappedComments.entrySet()) { - List reviewCommentModels = entry.getValue(); - GroupedReviewModel groupedReviewModel = new GroupedReviewModel(); - if (!reviewCommentModels.isEmpty()) { - ReviewCommentModel reviewCommentModel = reviewCommentModels.get(0); - groupedReviewModel.setPath(reviewCommentModel.getPath()); - groupedReviewModel.setDiffText(reviewCommentModel.getDiffHunk()); - groupedReviewModel.setDate(reviewCommentModel.getCreatedAt()); - groupedReviewModel.setPosition(reviewCommentModel.getOriginalPosition()); - groupedReviewModel.setId(reviewCommentModel.getId()); - } - for (ReviewCommentModel reviewCommentModel : reviewCommentModels) { - if (reviewCommentModel.getCreatedAt() != null) { - groupedReviewModel.setDate(reviewCommentModel.getCreatedAt()); - break; - } - } - groupedReviewModel.setComments(reviewCommentModels); - models.add(new TimelineModel(groupedReviewModel)); - } - models.addAll(Stream.of(reviews) - .filter(reviewModel -> !InputHelper.isEmpty(reviewModel.getBody()) || reviewModel.getState() == ReviewStateType.APPROVED) - .map(TimelineModel::new) - .collect(Collectors.toList())); - } - return models; - } - - @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - TimelineModel model = (TimelineModel) o; - return (comment != null && model.getComment() != null) && (comment.getId() == model.comment.getId()); - } - - @Override public int hashCode() { - return comment != null ? (int) comment.getId() : 0; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(this.type); - dest.writeParcelable(this.issue, flags); + dest.writeInt(this.event == null ? -1 : this.event.ordinal()); dest.writeParcelable(this.comment, flags); - dest.writeParcelable(this.event, flags); - dest.writeParcelable(this.pullRequest, flags); - dest.writeParcelable(this.status, flags); - dest.writeParcelable(this.review, flags); - dest.writeParcelable(this.groupedReview, flags); + dest.writeParcelable(this.genericEvent, flags); dest.writeParcelable(this.reviewComment, flags); - dest.writeLong(this.sortedDate != null ? this.sortedDate.getTime() : -1); + dest.writeParcelable(this.status, flags); + dest.writeParcelable(this.issue, flags); + dest.writeParcelable(this.pullRequest, flags); } protected TimelineModel(Parcel in) { - this.type = in.readInt(); - this.issue = in.readParcelable(Issue.class.getClassLoader()); + int tmpEvent = in.readInt(); + this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; this.comment = in.readParcelable(Comment.class.getClassLoader()); - this.event = in.readParcelable(IssueEvent.class.getClassLoader()); - this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); - this.status = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); - this.review = in.readParcelable(ReviewModel.class.getClassLoader()); - this.groupedReview = in.readParcelable(GroupedReviewModel.class.getClassLoader()); + this.genericEvent = in.readParcelable(GenericEvent.class.getClassLoader()); this.reviewComment = in.readParcelable(ReviewCommentModel.class.getClassLoader()); - long tmpSortedDate = in.readLong(); - this.sortedDate = tmpSortedDate == -1 ? null : new Date(tmpSortedDate); + this.status = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); + this.issue = in.readParcelable(Issue.class.getClassLoader()); + this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); } public static final Creator CREATOR = new Creator() { @@ -292,4 +99,40 @@ import static com.annimon.stream.Collectors.toList; @Override public TimelineModel[] newArray(int size) {return new TimelineModel[size];} }; + + public static TimelineModel constructHeader(Issue issue) { + return new TimelineModel(issue); + } + + public static TimelineModel constructHeader(PullRequest pullRequest) { + return new TimelineModel(pullRequest); + } + + public static TimelineModel constructComment(Comment comment) { + return new TimelineModel(comment); + } + + @NonNull public static Observable> construct(@Nullable List comments) { + if (comments == null || comments.isEmpty()) return Observable.empty(); + return Observable.fromIterable(comments) + .map(TimelineModel::new) + .toList() + .toObservable(); + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TimelineModel that = (TimelineModel) o; + if (comment != null) { + return comment.equals(that.comment); + } else if (reviewComment != null) { + return reviewComment.equals(that.reviewComment); + } + return false; + } + + @Override public int hashCode() { + return comment != null ? comment.hashCode() : reviewComment != null ? reviewComment.hashCode() : -1; + } } diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java new file mode 100644 index 00000000..68713dc9 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java @@ -0,0 +1,38 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import java.util.Date; + +import lombok.Getter; +import lombok.Setter; + +@Getter @Setter public class AuthorModel implements Parcelable { + private String name; + private String email; + private Date date; + + public AuthorModel() {} + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeString(this.name); + dest.writeString(this.email); + dest.writeLong(this.date != null ? this.date.getTime() : -1); + } + + protected AuthorModel(Parcel in) { + this.name = in.readString(); + this.email = in.readString(); + long tmpDate = in.readLong(); + this.date = tmpDate == -1 ? null : new Date(tmpDate); + } + + public static final Creator CREATOR = new Creator() { + @Override public AuthorModel createFromParcel(Parcel source) {return new AuthorModel(source);} + + @Override public AuthorModel[] newArray(int size) {return new AuthorModel[size];} + }; +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java b/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java new file mode 100644 index 00000000..837576c6 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java @@ -0,0 +1,126 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import com.fastaccess.data.dao.ReactionsModel; +import com.fastaccess.data.dao.model.Comment; +import com.fastaccess.data.dao.model.User; + +import java.util.Date; + +import lombok.Getter; +import lombok.Setter; + +/** + * Created by Kosh on 16 Mar 2017, 7:24 PM + */ +@Getter @Setter public class CommentEvent implements Parcelable { + private long id; + private User user; + private String url; + private String body; + private String bodyHtml; + private String htmlUrl; + private Date createdAt; + private Date updatedAt; + private int position; + private int line; + private String path; + private String commitId; + private String repoId; + private String login; + private String gistId; + private String issueId; + private String pullRequestId; + private ReactionsModel reactions; + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Comment that = (Comment) o; + return id == that.getId(); + + } + + @Override public int hashCode() { + return (int) (id ^ (id >>> 32)); + } + + public CommentEvent() {} + + @Override public String toString() { + return "CommentEvent{" + + "id=" + id + + ", user=" + user + + ", url='" + url + '\'' + + ", body='" + body + '\'' + + ", bodyHtml='" + bodyHtml + '\'' + + ", htmlUrl='" + htmlUrl + '\'' + + ", createdAt=" + createdAt + + ", updatedAt=" + updatedAt + + ", position=" + position + + ", line=" + line + + ", path='" + path + '\'' + + ", commitId='" + commitId + '\'' + + ", repoId='" + repoId + '\'' + + ", login='" + login + '\'' + + ", gistId='" + gistId + '\'' + + ", issueId='" + issueId + '\'' + + ", pullRequestId='" + pullRequestId + '\'' + + ", reactions=" + reactions + + '}'; + } + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(this.id); + dest.writeParcelable(this.user, flags); + dest.writeString(this.url); + dest.writeString(this.body); + dest.writeString(this.bodyHtml); + dest.writeString(this.htmlUrl); + dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1); + dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1); + dest.writeInt(this.position); + dest.writeInt(this.line); + dest.writeString(this.path); + dest.writeString(this.commitId); + dest.writeString(this.repoId); + dest.writeString(this.login); + dest.writeString(this.gistId); + dest.writeString(this.issueId); + dest.writeString(this.pullRequestId); + dest.writeParcelable(this.reactions, flags); + } + + protected CommentEvent(Parcel in) { + this.id = in.readLong(); + this.user = in.readParcelable(User.class.getClassLoader()); + this.url = in.readString(); + this.body = in.readString(); + this.bodyHtml = in.readString(); + this.htmlUrl = in.readString(); + long tmpCreatedAt = in.readLong(); + this.createdAt = tmpCreatedAt == -1 ? null : new Date(tmpCreatedAt); + long tmpUpdatedAt = in.readLong(); + this.updatedAt = tmpUpdatedAt == -1 ? null : new Date(tmpUpdatedAt); + this.position = in.readInt(); + this.line = in.readInt(); + this.path = in.readString(); + this.commitId = in.readString(); + this.repoId = in.readString(); + this.login = in.readString(); + this.gistId = in.readString(); + this.issueId = in.readString(); + this.pullRequestId = in.readString(); + this.reactions = in.readParcelable(ReactionsModel.class.getClassLoader()); + } + + public static final Creator CREATOR = new Creator() { + @Override public CommentEvent createFromParcel(Parcel source) {return new CommentEvent(source);} + + @Override public CommentEvent[] newArray(int size) {return new CommentEvent[size];} + }; +} diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java new file mode 100644 index 00000000..fe7807b0 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java @@ -0,0 +1,119 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import com.fastaccess.data.dao.LabelModel; +import com.fastaccess.data.dao.MilestoneModel; +import com.fastaccess.data.dao.RenameModel; +import com.fastaccess.data.dao.TeamsModel; +import com.fastaccess.data.dao.model.Issue; +import com.fastaccess.data.dao.model.PullRequest; +import com.fastaccess.data.dao.model.User; +import com.fastaccess.data.dao.types.IssueEventType; + +import java.util.Date; +import java.util.List; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * Created by kosh on 25/07/2017. + */ + +@NoArgsConstructor @Getter @Setter public class GenericEvent implements Parcelable { + + private long id; + private String url; + private String commitId; + private String commitUrl; + private String message; + private String sha; + private String htmlUrl; + private Date createdAt; + private User actor; + private User requestedReviewer; + private User reviewRequester; + private User assigner; + private User assignee; + private User author; + private User committer; + private LabelModel label; + private TeamsModel requestedTeam; + private MilestoneModel milestone; + private RenameModel rename; + private SourceModel source; + private Issue issue; + private PullRequest pullRequest; + private ParentsModel tree; + private List parents; + private IssueEventType event; + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(this.id); + dest.writeString(this.url); + dest.writeString(this.commitId); + dest.writeString(this.commitUrl); + dest.writeString(this.message); + dest.writeString(this.sha); + dest.writeString(this.htmlUrl); + dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1); + dest.writeParcelable(this.actor, flags); + dest.writeParcelable(this.requestedReviewer, flags); + dest.writeParcelable(this.reviewRequester, flags); + dest.writeParcelable(this.assigner, flags); + dest.writeParcelable(this.assignee, flags); + dest.writeParcelable(this.author, flags); + dest.writeParcelable(this.committer, flags); + dest.writeParcelable(this.label, flags); + dest.writeParcelable(this.requestedTeam, flags); + dest.writeParcelable(this.milestone, flags); + dest.writeParcelable(this.rename, flags); + dest.writeParcelable(this.source, flags); + dest.writeParcelable(this.issue, flags); + dest.writeParcelable(this.pullRequest, flags); + dest.writeParcelable(this.tree, flags); + dest.writeTypedList(this.parents); + dest.writeInt(this.event == null ? -1 : this.event.ordinal()); + } + + protected GenericEvent(Parcel in) { + this.id = in.readLong(); + this.url = in.readString(); + this.commitId = in.readString(); + this.commitUrl = in.readString(); + this.message = in.readString(); + this.sha = in.readString(); + this.htmlUrl = in.readString(); + long tmpCreatedAt = in.readLong(); + this.createdAt = tmpCreatedAt == -1 ? null : new Date(tmpCreatedAt); + this.actor = in.readParcelable(User.class.getClassLoader()); + this.requestedReviewer = in.readParcelable(User.class.getClassLoader()); + this.reviewRequester = in.readParcelable(User.class.getClassLoader()); + this.assigner = in.readParcelable(User.class.getClassLoader()); + this.assignee = in.readParcelable(User.class.getClassLoader()); + this.author = in.readParcelable(User.class.getClassLoader()); + this.committer = in.readParcelable(User.class.getClassLoader()); + this.label = in.readParcelable(LabelModel.class.getClassLoader()); + this.requestedTeam = in.readParcelable(TeamsModel.class.getClassLoader()); + this.milestone = in.readParcelable(MilestoneModel.class.getClassLoader()); + this.rename = in.readParcelable(RenameModel.class.getClassLoader()); + this.source = in.readParcelable(SourceModel.class.getClassLoader()); + this.issue = in.readParcelable(Issue.class.getClassLoader()); + this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); + this.tree = in.readParcelable(ParentsModel.class.getClassLoader()); + this.parents = in.createTypedArrayList(ParentsModel.CREATOR); + int tmpEvent = in.readInt(); + this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; + } + + public static final Creator CREATOR = new Creator() { + @Override public GenericEvent createFromParcel(Parcel source) {return new GenericEvent(source);} + + @Override public GenericEvent[] newArray(int size) {return new GenericEvent[size];} + }; +} diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java new file mode 100644 index 00000000..a0e546f6 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java @@ -0,0 +1,35 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import lombok.Getter; +import lombok.Setter; + +@Getter @Setter public class ParentsModel implements Parcelable { + private String sha; + private String url; + private String htmlUrl; + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeString(this.sha); + dest.writeString(this.url); + dest.writeString(this.htmlUrl); + } + + public ParentsModel() {} + + protected ParentsModel(Parcel in) { + this.sha = in.readString(); + this.url = in.readString(); + this.htmlUrl = in.readString(); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override public ParentsModel createFromParcel(Parcel source) {return new ParentsModel(source);} + + @Override public ParentsModel[] newArray(int size) {return new ParentsModel[size];} + }; +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java new file mode 100644 index 00000000..821b4958 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java @@ -0,0 +1,47 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import com.fastaccess.data.dao.model.Commit; +import com.fastaccess.data.dao.model.Issue; +import com.fastaccess.data.dao.model.PullRequest; + +import lombok.Getter; +import lombok.Setter; + +/** + * Created by kosh on 26/07/2017. + */ + +@Getter @Setter public class SourceModel implements Parcelable { + + private String type; + private Issue issue; + private PullRequest pullRequest; + private Commit commit; + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeString(this.type); + dest.writeParcelable(this.issue, flags); + dest.writeParcelable(this.pullRequest, flags); + dest.writeParcelable(this.commit, flags); + } + + public SourceModel() {} + + protected SourceModel(Parcel in) { + this.type = in.readString(); + this.issue = in.readParcelable(Issue.class.getClassLoader()); + this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); + this.commit = in.readParcelable(Commit.class.getClassLoader()); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override public SourceModel createFromParcel(Parcel source) {return new SourceModel(source);} + + @Override public SourceModel[] newArray(int size) {return new SourceModel[size];} + }; +} diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java b/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java new file mode 100644 index 00000000..e5a49527 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java @@ -0,0 +1,73 @@ +package com.fastaccess.data.dao.timeline; + +import android.os.Parcel; +import android.os.Parcelable; + +import com.fastaccess.data.dao.PullRequestStatusModel; +import com.fastaccess.data.dao.ReviewCommentModel; +import com.fastaccess.data.dao.model.Comment; +import com.fastaccess.data.dao.types.IssueEventType; + +import lombok.Getter; +import lombok.Setter; + +/** + * Created by kosh on 25/07/2017. + */ + +@Getter @Setter public class Timeline implements Parcelable { + public static final int HEADER = 0; + public static final int LINE_COMMENT = 1; + public static final int EVENT = 2; + public static final int COMMENT = 3; + public static final int STATUS = 4; + + private IssueEventType event; + private Comment comment; + private GenericEvent genericEvent; + private ReviewCommentModel reviewComment; + private PullRequestStatusModel statusModel; + + public int getType() { + if (getEvent() != null) { + switch (getEvent()) { + case commented: + return COMMENT; + case line_commented: + return LINE_COMMENT; + default: + return EVENT; + } + } else { + if (statusModel != null) return STATUS; + return EVENT; + } + } + + public Timeline() {} + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(this.event == null ? -1 : this.event.ordinal()); + dest.writeParcelable(this.comment, flags); + dest.writeParcelable(this.genericEvent, flags); + dest.writeParcelable(this.reviewComment, flags); + dest.writeParcelable(this.statusModel, flags); + } + + protected Timeline(Parcel in) { + int tmpEvent = in.readInt(); + this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; + this.comment = in.readParcelable(Comment.class.getClassLoader()); + this.genericEvent = in.readParcelable(GenericEvent.class.getClassLoader()); + this.reviewComment = in.readParcelable(ReviewCommentModel.class.getClassLoader()); + this.statusModel = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); + } + + public static final Creator CREATOR = new Creator() { + @Override public Timeline createFromParcel(Parcel source) {return new Timeline(source);} + + @Override public Timeline[] newArray(int size) {return new Timeline[size];} + }; +} diff --git a/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java b/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java index b841e2c2..667c2114 100644 --- a/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java +++ b/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java @@ -1,5 +1,9 @@ package com.fastaccess.data.dao.types; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +import com.annimon.stream.Stream; import com.fastaccess.R; import com.google.gson.annotations.SerializedName; @@ -7,7 +11,7 @@ public enum IssueEventType { assigned(R.drawable.ic_profile), closed(R.drawable.ic_issue_closed), commented(R.drawable.ic_comment), - committed(R.drawable.ic_announcement), + committed(R.drawable.ic_push), demilestoned(R.drawable.ic_milestone), head_ref_deleted(R.drawable.ic_trash), head_ref_restored(R.drawable.ic_redo), @@ -27,7 +31,9 @@ public enum IssueEventType { review_requested(R.drawable.ic_eye), review_dismissed(R.drawable.ic_eye_off), review_request_removed(R.drawable.ic_eye_off), - @SerializedName("cross-referenced")crossReferenced(R.drawable.ic_format_quote); + @SerializedName("cross-referenced")cross_referenced(R.drawable.ic_format_quote), + @SerializedName("line-commented")line_commented(R.drawable.ic_comment), + reviewed(R.drawable.ic_eye); int iconResId; @@ -36,4 +42,12 @@ public enum IssueEventType { public int getIconResId() { return iconResId == 0 ? R.drawable.ic_label : iconResId; } + + @Nullable public static IssueEventType getType(@NonNull String type) { + return Stream.of(values()) + .filter(value -> value.name().toLowerCase().equalsIgnoreCase(type.toLowerCase() + .replaceAll("-", "_"))) + .findFirst() + .orElse(null); + } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/data/service/IssueService.java b/app/src/main/java/com/fastaccess/data/service/IssueService.java index 82767c18..6a8835db 100644 --- a/app/src/main/java/com/fastaccess/data/service/IssueService.java +++ b/app/src/main/java/com/fastaccess/data/service/IssueService.java @@ -7,14 +7,17 @@ import com.fastaccess.data.dao.AssigneesRequestModel; import com.fastaccess.data.dao.CommentRequestModel; import com.fastaccess.data.dao.CreateIssueModel; import com.fastaccess.data.dao.IssueRequestModel; +import com.fastaccess.data.dao.IssuesPageable; import com.fastaccess.data.dao.LabelModel; import com.fastaccess.data.dao.Pageable; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Issue; import com.fastaccess.data.dao.model.IssueEvent; +import com.google.gson.JsonObject; import java.util.List; +import io.reactivex.Observable; import retrofit2.Response; import retrofit2.http.Body; import retrofit2.http.DELETE; @@ -25,7 +28,6 @@ import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Path; import retrofit2.http.Query; -import io.reactivex.Observable; public interface IssueService { @@ -49,6 +51,12 @@ public interface IssueService { Observable> getTimeline(@Path("owner") String owner, @Path("repo") String repo, @Path("issue_number") int issue_number); + @GET("repos/{owner}/{repo}/issues/{issue_number}/timeline") + @Headers("Accept: application/vnd.github.mockingbird-preview,application/vnd.github.VERSION.full+json," + + " application/vnd.github.squirrel-girl-preview") + Observable> getTimeline(@Path("owner") String owner, @Path("repo") String repo, + @Path("issue_number") int issue_number, @Query("page") int page); + @POST("repos/{owner}/{repo}/issues") Observable createIssue(@Path("owner") String owner, @Path("repo") String repo, @Body IssueRequestModel issue); diff --git a/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java b/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java index 3d1eccbf..aea0a71c 100644 --- a/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java +++ b/app/src/main/java/com/fastaccess/provider/tasks/notification/NotificationSchedulerJobTask.java @@ -6,6 +6,7 @@ import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; +import android.media.AudioManager; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.NotificationCompat; @@ -91,6 +92,7 @@ public class NotificationSchedulerJobTask extends JobService { public static void scheduleJob(@NonNull Context context, int duration, boolean cancel) { if (AppHelper.isGoogleAvailable(context)) { FirebaseJobDispatcher dispatcher = new FirebaseJobDispatcher(new GooglePlayDriver(context)); + dispatcher.cancel(SINGLE_JOB_ID); if (cancel) dispatcher.cancel(JOB_ID); if (duration == -1) { dispatcher.cancel(JOB_ID); @@ -254,7 +256,7 @@ public class NotificationSchedulerJobTask extends JobService { new Intent(getApplicationContext(), NotificationActivity.class), PendingIntent.FLAG_UPDATE_CURRENT); return getNotification(thread.getSubject().getTitle(), thread.getRepository().getFullName()) .setDefaults(PrefGetter.isNotificationSoundEnabled() ? NotificationCompat.DEFAULT_ALL : 0) - .setSound(PrefGetter.getNotificationSound()) + .setSound(PrefGetter.getNotificationSound(), AudioManager.STREAM_NOTIFICATION) .setContentIntent(toNotificationActivity ? pendingIntent : getPendingIntent(thread.getId(), thread.getSubject().getUrl())) .addAction(R.drawable.ic_github, getString(R.string.open), getPendingIntent(thread.getId(), thread .getSubject().getUrl())) diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java new file mode 100644 index 00000000..b84a39a4 --- /dev/null +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java @@ -0,0 +1,68 @@ +package com.fastaccess.provider.timeline; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; + +import com.fastaccess.data.dao.ReviewCommentModel; +import com.fastaccess.data.dao.TimelineModel; +import com.fastaccess.data.dao.model.Comment; +import com.fastaccess.data.dao.timeline.GenericEvent; +import com.fastaccess.data.dao.types.IssueEventType; +import com.fastaccess.helper.InputHelper; +import com.fastaccess.provider.rest.RestProvider; +import com.google.gson.Gson; +import com.google.gson.JsonObject; + +import java.util.List; + +import io.reactivex.Observable; + +/** + * Created by kosh on 26/07/2017. + */ + +public class TimelineConverter { + + @NonNull public static Observable convert(@Nullable List jsonObjects) { + if (jsonObjects == null) return Observable.empty(); + Gson gson = RestProvider.gson; + return Observable.fromIterable(jsonObjects) + .map(jsonObject -> { + String event = jsonObject.get("event").getAsString(); + TimelineModel timeline = new TimelineModel(); + if (!InputHelper.isEmpty(event)) { + IssueEventType type = IssueEventType.getType(event); + timeline.setEvent(type); + if (type != null) { + if (type == IssueEventType.commented) { + timeline.setComment(getComment(jsonObject, gson)); + } else if (type == IssueEventType.line_commented) { + timeline.setReviewComment(getReviewComment(jsonObject, gson)); + } else { + timeline.setGenericEvent(getGenericEvent(jsonObject, gson)); + } + } + } else { + timeline.setGenericEvent(getGenericEvent(jsonObject, gson)); + } + return timeline; + }) + .filter(timeline -> timeline != null && filterEvents(timeline.getEvent())); + } + + private static GenericEvent getGenericEvent(@NonNull JsonObject object, @NonNull Gson gson) { + return gson.fromJson(object, GenericEvent.class); + } + + private static ReviewCommentModel getReviewComment(@NonNull JsonObject object, @NonNull Gson gson) { + return gson.fromJson(object, ReviewCommentModel.class); + } + + private static Comment getComment(@NonNull JsonObject object, @NonNull Gson gson) { + return gson.fromJson(object, Comment.class); + } + + private static boolean filterEvents(@Nullable IssueEventType type) { + return type != IssueEventType.subscribed && type != IssueEventType.unsubscribed && type != IssueEventType.mentioned; + } +} diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java index 7f295e82..be361ba9 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java @@ -8,14 +8,14 @@ import android.text.style.BackgroundColorSpan; import com.fastaccess.R; import com.fastaccess.data.dao.LabelModel; -import com.fastaccess.data.dao.model.IssueEvent; import com.fastaccess.data.dao.model.User; +import com.fastaccess.data.dao.timeline.GenericEvent; +import com.fastaccess.data.dao.timeline.SourceModel; import com.fastaccess.data.dao.types.IssueEventType; import com.fastaccess.helper.InputHelper; import com.fastaccess.helper.ParseDateFormat; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.ViewHelper; -import com.fastaccess.ui.widgets.LabelSpan; import com.fastaccess.ui.widgets.SpannableBuilder; import com.zzhoujay.markdown.style.CodeSpan; @@ -27,9 +27,14 @@ import java.util.Date; public class TimelineProvider { - @NonNull public static SpannableBuilder getStyledEvents(@NonNull IssueEvent issueEventModel, @NonNull Context context, boolean isMerged) { + @NonNull public static SpannableBuilder getStyledEvents(@NonNull GenericEvent issueEventModel, + @NonNull Context context, boolean isMerged) { IssueEventType event = issueEventModel.getEvent(); SpannableBuilder spannableBuilder = SpannableBuilder.builder(); + Date date = issueEventModel.getCreatedAt() != null + ? issueEventModel.getCreatedAt() + : issueEventModel.getAuthor() != null + ? issueEventModel.getAuthor().getDate() : null; if (event != null) { String to = context.getString(R.string.to); String from = context.getString(R.string.from); @@ -46,20 +51,25 @@ public class TimelineProvider { int color = Color.parseColor("#" + labelModel.getColor()); spannableBuilder.append(" ").append(" " + labelModel.getName() + " ", new CodeSpan(color, ViewHelper.generateTextColor(color), 5)); spannableBuilder.append(" ").append(getDate(issueEventModel.getCreatedAt())); + } else if (event == IssueEventType.committed) { + spannableBuilder.append(issueEventModel.getMessage().replaceAll("\n", " ")) + .append(" ") + .url(substring(issueEventModel.getSha())); } else { User user = null; if (issueEventModel.getAssignee() != null && issueEventModel.getAssigner() != null) { user = issueEventModel.getAssigner(); } else if (issueEventModel.getActor() != null) { user = issueEventModel.getActor(); + } else if (issueEventModel.getAuthor() != null) { + user = issueEventModel.getAuthor(); } if (user != null) { spannableBuilder.bold(user.getLogin()); } - if ((event == IssueEventType.review_requested || (event == IssueEventType.review_dismissed || event == IssueEventType.review_request_removed)) && user != null) { - appendReviews(issueEventModel, event, spannableBuilder, from, user); + appendReviews(issueEventModel, event, spannableBuilder, from, issueEventModel.getReviewRequester()); } else if (event == IssueEventType.closed || event == IssueEventType.reopened) { if (isMerged) { spannableBuilder.append(" ").append(IssueEventType.merged.name()); @@ -76,7 +86,6 @@ public class TimelineProvider { .append(in) .append(" ") .url(substring(issueEventModel.getCommitId())); - } } else if (event == IssueEventType.assigned || event == IssueEventType.unassigned) { spannableBuilder @@ -123,18 +132,38 @@ public class TimelineProvider { .append("commit") .append(" ") .url(substring(issueEventModel.getCommitId())); + } else if (event == IssueEventType.cross_referenced) { + SourceModel sourceModel = issueEventModel.getSource(); + if (sourceModel != null) { + SpannableBuilder title = SpannableBuilder.builder(); + if (sourceModel.getIssue() != null) { + title.url("#" + sourceModel.getIssue().getNumber()); + } else if (sourceModel.getPullRequest() != null) { + title.url("#" + sourceModel.getPullRequest().getNumber()); + } else if (sourceModel.getCommit() != null) { + title.url(substring(sourceModel.getCommit().getSha())); + } + if (!InputHelper.isEmpty(title)) { + spannableBuilder.append(" ") + .append(thisString) + .append(" in ") + .append(sourceModel.getType()) + .append(" ") + .append(title); + } + } } - spannableBuilder.append(" ").append(getDate(issueEventModel.getCreatedAt())); + spannableBuilder.append(" ").append(getDate(date)); } } return spannableBuilder; } - private static void appendReviews(@NonNull IssueEvent issueEventModel, @NonNull IssueEventType event, - @NonNull SpannableBuilder spannableBuilder, @NonNull String from, @NonNull User user) { + private static void appendReviews(@NonNull GenericEvent issueEventModel, @NonNull IssueEventType event, + @NonNull SpannableBuilder spannableBuilder, @NonNull String from, + @NonNull User user) { spannableBuilder.append(" "); - User reviewer = issueEventModel.getRequestedReviewer() != null - ? issueEventModel.getRequestedReviewer() : issueEventModel.getIssue() != null ? issueEventModel.getIssue().getUser() : null; + User reviewer = issueEventModel.getRequestedReviewer(); if (reviewer != null && user.getLogin().equalsIgnoreCase(reviewer.getLogin())) { spannableBuilder .append(event == IssueEventType.review_requested @@ -158,11 +187,6 @@ public class TimelineProvider { } } - public static void appendLabels(@NonNull LabelModel labelModel, @NonNull SpannableBuilder spannableBuilder) { - int color = Color.parseColor("#" + labelModel.getColor()); - spannableBuilder.append(" ").append(" " + labelModel.getName() + " ", new LabelSpan(color)); - } - @NonNull private static CharSequence getDate(@Nullable Date date) { return ParseDateFormat.getTimeAgo(date); } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java index e461c72a..9d421232 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java @@ -3,14 +3,12 @@ package com.fastaccess.provider.timeline.handler.drawable; import android.content.Context; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; -import android.support.v4.content.ContextCompat; import android.text.Html; import android.widget.TextView; import com.bumptech.glide.GenericRequestBuilder; import com.bumptech.glide.Glide; import com.fastaccess.R; -import com.fastaccess.helper.Logger; import java.lang.ref.WeakReference; import java.util.HashSet; @@ -30,23 +28,10 @@ public class DrawableGetter implements Html.ImageGetter, Drawable.Callback { this.cachedTargets = new HashSet<>(); } - public void clear(@NonNull DrawableGetter drawableGetter) { - if (drawableGetter.cachedTargets != null) { - for (GifBitmapTarget target : drawableGetter.cachedTargets) { - Logger.e("is clearing"); - Glide.clear(target); - } - } - } - @Override public Drawable getDrawable(@NonNull String url) { final UrlDrawable urlDrawable = new UrlDrawable(); if (container != null && container.get() != null) { Context context = container.get().getContext(); - Drawable drawable = ContextCompat.getDrawable(context, R.drawable.ic_image); - urlDrawable.setDrawable(drawable); - container.get().setText(container.get().getText()); - container.get().invalidate(); final GenericRequestBuilder load = Glide.with(context) .load(url) .dontAnimate(); @@ -66,4 +51,12 @@ public class DrawableGetter implements Html.ImageGetter, Drawable.Callback { @Override public void scheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable, long l) {} @Override public void unscheduleDrawable(@NonNull Drawable drawable, @NonNull Runnable runnable) {} + + public void clear(@NonNull DrawableGetter drawableGetter) { + if (drawableGetter.cachedTargets != null) { + for (GifBitmapTarget target : drawableGetter.cachedTargets) { + Glide.clear(target); + } + } + } } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java index f6ec0f3f..e83d2d77 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java @@ -7,11 +7,10 @@ import android.view.ViewGroup; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.ui.adapter.callback.OnToggleView; import com.fastaccess.ui.adapter.callback.ReactionsCallback; -import com.fastaccess.ui.adapter.viewholder.GroupedReviewsViewHolder; import com.fastaccess.ui.adapter.viewholder.IssueDetailsViewHolder; import com.fastaccess.ui.adapter.viewholder.IssueTimelineViewHolder; import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder; -import com.fastaccess.ui.adapter.viewholder.ReviewsViewHolder; +import com.fastaccess.ui.adapter.viewholder.ReviewCommentsViewHolder; import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder; import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineMvp.ReviewCommentCallback; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; @@ -59,12 +58,14 @@ public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter impl } @Override public void bind(@NonNull TimelineModel model) { - GroupedReviewModel groupedReviewModel = model.getGroupedReview(); - this.pathText = groupedReviewModel.getDiffText(); - name.setText(groupedReviewModel.getPath()); - stateImage.setImageResource(R.drawable.ic_eye); - if (groupedReviewModel.getComments() == null || groupedReviewModel.getComments().isEmpty()) { - nestedRecyclerView.setVisibility(View.GONE); - nestedRecyclerView.setAdapter(null); - } else { - nestedRecyclerView.setVisibility(View.VISIBLE); - nestedRecyclerView.setAdapter(new ReviewCommentsAdapter(groupedReviewModel.getComments(), this, - onToggleView, reactionsCallback, repoOwner, poster)); - nestedRecyclerView.addDivider(); - } - onToggle(onToggleView.isCollapsed(getId()), false); +// GroupedReviewModel groupedReviewModel = model.getGroupedReview(); +// this.pathText = groupedReviewModel.getDiffText(); +// name.setText(groupedReviewModel.getPath()); +// stateImage.setImageResource(R.drawable.ic_eye); +// if (groupedReviewModel.getComments() == null || groupedReviewModel.getComments().isEmpty()) { +// nestedRecyclerView.setVisibility(View.GONE); +// nestedRecyclerView.setAdapter(null); +// } else { +// nestedRecyclerView.setVisibility(View.VISIBLE); +// nestedRecyclerView.setAdapter(new ReviewCommentsAdapter(groupedReviewModel.getComments(), this, +// onToggleView, reactionsCallback, repoOwner, poster)); +// nestedRecyclerView.addDivider(); +// } +// onToggle(onToggleView.isCollapsed(getId()), false); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueTimelineViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueTimelineViewHolder.java index 93da8528..7a72f9a7 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueTimelineViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueTimelineViewHolder.java @@ -1,27 +1,21 @@ package com.fastaccess.ui.adapter.viewholder; -import android.graphics.Color; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.View; import android.view.ViewGroup; import com.fastaccess.R; -import com.fastaccess.data.dao.LabelModel; import com.fastaccess.data.dao.TimelineModel; -import com.fastaccess.data.dao.model.IssueEvent; +import com.fastaccess.data.dao.timeline.GenericEvent; import com.fastaccess.data.dao.types.IssueEventType; import com.fastaccess.helper.InputHelper; -import com.fastaccess.helper.Logger; -import com.fastaccess.helper.ParseDateFormat; import com.fastaccess.provider.scheme.LinkParserHelper; import com.fastaccess.provider.timeline.TimelineProvider; import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; import com.fastaccess.ui.widgets.AvatarLayout; import com.fastaccess.ui.widgets.FontTextView; import com.fastaccess.ui.widgets.ForegroundImageView; -import com.fastaccess.ui.widgets.LabelSpan; -import com.fastaccess.ui.widgets.SpannableBuilder; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; @@ -48,7 +42,7 @@ public class IssueTimelineViewHolder extends BaseViewHolder { } @Override public void bind(@NonNull TimelineModel timelineModel) { - IssueEvent issueEventModel = timelineModel.getEvent(); + GenericEvent issueEventModel = timelineModel.getGenericEvent(); IssueEventType event = issueEventModel.getEvent(); if (issueEventModel.getAssignee() != null && issueEventModel.getAssigner() != null) { avatarLayout.setUrl(issueEventModel.getAssigner().getAvatarUrl(), issueEventModel.getAssigner().getLogin(), @@ -57,35 +51,20 @@ public class IssueTimelineViewHolder extends BaseViewHolder { if (issueEventModel.getActor() != null) { avatarLayout.setUrl(issueEventModel.getActor().getAvatarUrl(), issueEventModel.getActor().getLogin(), false, LinkParserHelper.isEnterprise(issueEventModel.getUrl())); + } else if (issueEventModel.getAuthor() != null) { + avatarLayout.setUrl(issueEventModel.getAuthor().getAvatarUrl(), issueEventModel.getAuthor().getLogin(), + false, LinkParserHelper.isEnterprise(issueEventModel.getUrl())); } } if (event != null) { stateImage.setContentDescription(event.name()); stateImage.setImageResource(event.getIconResId()); } - if (issueEventModel.getLabels() == null || issueEventModel.getLabels().isEmpty()) { - if (event != null) { - stateText.setText(TimelineProvider.getStyledEvents(issueEventModel, itemView.getContext(), isMerged)); - } else { - stateText.setText(""); - stateImage.setImageResource(R.drawable.ic_label); - } + if (event != null) { + stateText.setText(TimelineProvider.getStyledEvents(issueEventModel, itemView.getContext(), isMerged)); } else { - if (event != null) { - SpannableBuilder spannableBuilder = SpannableBuilder.builder(); - if (issueEventModel.getAssignee() != null && issueEventModel.getAssigner() != null) { - spannableBuilder.bold(issueEventModel.getAssigner().getLogin(), new LabelSpan(Color.TRANSPARENT)); - } else if (issueEventModel.getActor() != null) { - spannableBuilder.bold(issueEventModel.getActor().getLogin(), new LabelSpan(Color.TRANSPARENT)); - } - spannableBuilder.append(" ").append(event.name().replaceAll("_", " "), new LabelSpan(Color.TRANSPARENT)); - for (LabelModel labelModel : issueEventModel.getLabels()) { - TimelineProvider.appendLabels(labelModel, spannableBuilder); - } - spannableBuilder.append(" ").append(ParseDateFormat.getTimeAgo(issueEventModel.getCreatedAt()), new LabelSpan(Color.TRANSPARENT)); - stateText.setText(spannableBuilder); - stateImage.setImageResource(R.drawable.ic_label); - } + stateText.setText(""); + stateImage.setImageResource(R.drawable.ic_label); } itemView.setEnabled(!InputHelper.isEmpty(issueEventModel.getCommitUrl())); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java index bba23357..f4a0b35d 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java @@ -6,17 +6,11 @@ import android.view.View; import android.view.ViewGroup; import com.fastaccess.R; -import com.fastaccess.data.dao.ReviewModel; import com.fastaccess.data.dao.TimelineModel; -import com.fastaccess.helper.InputHelper; -import com.fastaccess.helper.ParseDateFormat; -import com.fastaccess.provider.scheme.LinkParserHelper; -import com.fastaccess.provider.timeline.HtmlHelper; import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; import com.fastaccess.ui.widgets.AvatarLayout; import com.fastaccess.ui.widgets.FontTextView; import com.fastaccess.ui.widgets.ForegroundImageView; -import com.fastaccess.ui.widgets.SpannableBuilder; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; @@ -44,31 +38,31 @@ public class ReviewsViewHolder extends BaseViewHolder { } @Override public void bind(@NonNull TimelineModel model) { - ReviewModel review = model.getReview(); - if (review != null) { - if (review.getUser() != null) { - avatarLayout.setUrl(review.getUser().getAvatarUrl(), review.getUser().getLogin(), false, - LinkParserHelper.isEnterprise(review.getUser().getHtmlUrl())); - } else { - avatarLayout.setUrl(null, null, false, false); - } - if (review.getState() != null) { - stateImage.setImageResource(review.getState().getDrawableRes()); - } - if (review.getUser() != null) { - stateText.setText(SpannableBuilder.builder().append(review.getUser().getLogin()) - .append(" ") - .append(review.getState() != null ? stateText.getResources().getString(review.getState().getStringRes()) : "") - .append(" ") - .append(ParseDateFormat.getTimeAgo(review.getSubmittedAt()))); - } - if (!InputHelper.isEmpty(review.getBody())) { - body.setVisibility(View.VISIBLE); - HtmlHelper.htmlIntoTextView(body, review.getBody()); - } else { - body.setVisibility(View.GONE); - } - } +// ReviewModel review = model.getReview(); +// if (review != null) { +// if (review.getUser() != null) { +// avatarLayout.setUrl(review.getUser().getAvatarUrl(), review.getUser().getLogin(), false, +// LinkParserHelper.isEnterprise(review.getUser().getHtmlUrl())); +// } else { +// avatarLayout.setUrl(null, null, false, false); +// } +// if (review.getState() != null) { +// stateImage.setImageResource(review.getState().getDrawableRes()); +// } +// if (review.getUser() != null) { +// stateText.setText(SpannableBuilder.builder().append(review.getUser().getLogin()) +// .append(" ") +// .append(review.getState() != null ? stateText.getResources().getString(review.getState().getStringRes()) : "") +// .append(" ") +// .append(ParseDateFormat.getTimeAgo(review.getSubmittedAt()))); +// } +// if (!InputHelper.isEmpty(review.getBody())) { +// body.setVisibility(View.VISIBLE); +// HtmlHelper.htmlIntoTextView(body, review.getBody()); +// } else { +// body.setVisibility(View.GONE); +// } +// } } @Override protected void onViewIsDetaching() { diff --git a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java index a9cb1cda..cd8c00c8 100644 --- a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java +++ b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java @@ -22,6 +22,7 @@ import android.view.View; import android.view.ViewTreeObserver; import android.widget.Toast; +import com.bumptech.glide.Glide; import com.evernote.android.state.State; import com.evernote.android.state.StateSaver; import com.fastaccess.App; @@ -70,7 +71,6 @@ public abstract class BaseActivity extends TiPresenter impl manageDisposable( RxHelper.getObservable(observable) .doOnSubscribe(disposable -> onSubscribed(cancelable)) - .subscribe(onNext, this::onError, () -> apiCalled = true) + .subscribe(onNext, this::onError, () -> { + apiCalled = true; + sendToView(BaseMvp.FAView::hideProgress); + }) ); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java index 4859da76..40f15f4a 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java @@ -17,6 +17,7 @@ import com.fastaccess.helper.RxHelper; import com.fastaccess.provider.rest.RestProvider; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.ReactionsProvider; +import com.fastaccess.ui.base.mvp.BaseMvp; import com.fastaccess.ui.base.mvp.presenter.BasePresenter; import java.util.ArrayList; @@ -65,10 +66,12 @@ class CommitCommentsPresenter extends BasePresenter impl } setCurrentPage(page); makeRestCall(RestProvider.getRepoService(isEnterprise()).getCommitComments(login, repoId, sha, page) - .flatMap(listResponse -> { - lastPage = listResponse.getLast(); - return Observable.just(TimelineModel.construct(listResponse.getItems())); - }), listResponse -> sendToView(view -> view.onNotifyAdapter(listResponse, page))); + .flatMap(listResponse -> { + lastPage = listResponse.getLast(); + return TimelineModel.construct(listResponse.getItems()); + }) + .doFinally(() -> sendToView(BaseMvp.FAView::hideProgress)), + listResponse -> sendToView(view -> view.onNotifyAdapter(listResponse, page))); } @Override public void onFragmentCreated(@Nullable Bundle bundle) { @@ -103,7 +106,7 @@ class CommitCommentsPresenter extends BasePresenter impl @Override public void onWorkOffline() { if (comments.isEmpty()) { manageDisposable(RxHelper.getObservable(Comment.getCommitComments(repoId(), login(), sha).toObservable()) - .flatMap(comments -> Observable.just(TimelineModel.construct(comments))) + .flatMap(TimelineModel::construct) .subscribe(models -> sendToView(view -> view.onNotifyAdapter(models, 1)))); } else { sendToView(CommitCommentsMvp.View::hideProgress); diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index 3f8a805b..533dff6b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -12,8 +12,8 @@ import com.fastaccess.R; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Issue; -import com.fastaccess.data.dao.model.IssueEvent; import com.fastaccess.data.dao.model.Login; +import com.fastaccess.data.dao.timeline.GenericEvent; import com.fastaccess.data.dao.types.ReactionTypes; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; @@ -22,6 +22,7 @@ import com.fastaccess.provider.rest.RestProvider; import com.fastaccess.provider.scheme.SchemeParser; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.ReactionsProvider; +import com.fastaccess.provider.timeline.TimelineConverter; import com.fastaccess.ui.base.mvp.BaseMvp; import com.fastaccess.ui.base.mvp.presenter.BasePresenter; import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity; @@ -77,7 +78,7 @@ import lombok.Getter; onHandleReaction(v.getId(), item.getComment().getId(), ReactionsProvider.COMMENT); } } else if (item.getType() == TimelineModel.EVENT) { - IssueEvent issueEventModel = item.getEvent(); + GenericEvent issueEventModel = item.getGenericEvent(); if (issueEventModel.getCommitUrl() != null) { SchemeParser.launchUri(v.getContext(), Uri.parse(issueEventModel.getCommitUrl())); } @@ -215,22 +216,15 @@ import lombok.Getter; String login = parameter.getLogin(); String repoId = parameter.getRepoId(); int number = parameter.getNumber(); - Observable> observable; - if (page > 1) { - observable = RestProvider.getIssueService(isEnterprise()).getIssueComments(login, repoId, number, page) - .map(comments -> { - lastPage = comments != null ? comments.getLast() : 0; - return TimelineModel.construct(comments != null ? comments.getItems() : null); - }); - } else { - observable = Observable.zip(RestProvider.getIssueService(isEnterprise()).getTimeline(login, repoId, number), - RestProvider.getIssueService(isEnterprise()).getIssueComments(login, repoId, number, page), - (issueEventPageable, commentPageable) -> { - lastPage = commentPageable != null ? commentPageable.getLast() : 0; - return TimelineModel.construct(commentPageable != null ? commentPageable.getItems() : null, - issueEventPageable != null ? issueEventPageable.getItems() : null); - }); - } - makeRestCall(observable, models -> sendToView(view -> view.onNotifyAdapter(models, page))); + Observable> observable = RestProvider.getIssueService(isEnterprise()) + .getTimeline(login, repoId, number, page) + .flatMap(response -> { + if (response != null) { + lastPage = response.getLast(); + } + return TimelineConverter.convert(response != null ? response.getItems() : null); + }).toList() + .toObservable(); + makeRestCall(observable, timeline -> sendToView(view -> view.onNotifyAdapter(timeline, page))); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java index 794c1030..18019dd3 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java @@ -305,16 +305,16 @@ public class PullRequestTimelineFragment extends BaseFragment, diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index f607b4ab..4b9a52ef 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -1,7 +1,5 @@ package com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline; -import android.app.Activity; -import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; @@ -10,11 +8,10 @@ import android.widget.PopupMenu; import com.fastaccess.R; import com.fastaccess.data.dao.EditReviewCommentModel; -import com.fastaccess.data.dao.GroupedReviewModel; +import com.fastaccess.data.dao.PullRequestStatusModel; import com.fastaccess.data.dao.ReviewCommentModel; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; -import com.fastaccess.data.dao.model.IssueEvent; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.PullRequest; import com.fastaccess.data.dao.types.ReactionTypes; @@ -22,12 +19,11 @@ import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; import com.fastaccess.helper.InputHelper; import com.fastaccess.provider.rest.RestProvider; -import com.fastaccess.provider.scheme.SchemeParser; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.ReactionsProvider; +import com.fastaccess.provider.timeline.TimelineConverter; import com.fastaccess.ui.base.mvp.BaseMvp; import com.fastaccess.ui.base.mvp.presenter.BasePresenter; -import com.fastaccess.ui.modules.repos.issues.create.CreateIssueActivity; import java.util.ArrayList; import java.util.List; @@ -46,99 +42,99 @@ public class PullRequestTimelinePresenter extends BasePresenter { - if (getView() == null) return false; - if (item1.getItemId() == R.id.delete) { - getView().onShowDeleteMsg(item.getComment().getId()); - } else if (item1.getItemId() == R.id.reply) { - getView().onReply(item.getComment().getUser(), item.getComment().getBody()); - } else if (item1.getItemId() == R.id.edit) { - getView().onEditComment(item.getComment()); - } else if (item1.getItemId() == R.id.share) { - ActivityHelper.shareUrl(v.getContext(), item.getComment().getHtmlUrl()); - } - return true; - }); - popupMenu.show(); - } else { - onHandleReaction(v.getId(), item.getComment().getId(), ReactionsProvider.COMMENT); - } - } else if (item.getType() == TimelineModel.EVENT) { - IssueEvent issueEventModel = item.getEvent(); - if (issueEventModel.getCommitUrl() != null) { - SchemeParser.launchUri(v.getContext(), Uri.parse(issueEventModel.getCommitUrl())); - } - } else if (item.getType() == TimelineModel.HEADER) { - if (v.getId() == R.id.commentMenu) { - PopupMenu popupMenu = new PopupMenu(v.getContext(), v); - popupMenu.inflate(R.menu.comments_menu); - String username = Login.getUser().getLogin(); - boolean isOwner = CommentsHelper.isOwner(username, item.getPullRequest().getLogin(), - item.getPullRequest().getUser().getLogin()); - popupMenu.getMenu().findItem(R.id.edit).setVisible(isOwner); - popupMenu.setOnMenuItemClickListener(item1 -> { - if (getView() == null) return false; - if (item1.getItemId() == R.id.reply) { - getView().onReply(item.getPullRequest().getUser(), item.getPullRequest().getBody()); - } else if (item1.getItemId() == R.id.edit) { - Activity activity = ActivityHelper.getActivity(v.getContext()); - if (activity == null) return false; - CreateIssueActivity.startForResult(activity, - item.getPullRequest().getLogin(), item.getPullRequest().getRepoId(), - item.getPullRequest(), isEnterprise()); - } else if (item1.getItemId() == R.id.share) { - ActivityHelper.shareUrl(v.getContext(), item.getPullRequest().getHtmlUrl()); - } - return true; - }); - popupMenu.show(); - } else { - onHandleReaction(v.getId(), item.getPullRequest().getNumber(), ReactionsProvider.HEADER); - } - } else if (item.getType() == TimelineModel.GROUPED_REVIEW) { - GroupedReviewModel reviewModel = item.getGroupedReview(); - if (v.getId() == R.id.addCommentPreview) { - EditReviewCommentModel model = new EditReviewCommentModel(); - model.setCommentPosition(-1); - model.setGroupPosition(position); - model.setInReplyTo(reviewModel.getId()); - getView().onReplyOrCreateReview(null, null, position, -1, model); - } - } - } +// if (getView() != null && getView().getPullRequest() != null) { +// if (item.getType() == TimelineModel.COMMENT) { +// PullRequest pullRequest = getView().getPullRequest(); +// if (v.getId() == R.id.commentMenu) { +// PopupMenu popupMenu = new PopupMenu(v.getContext(), v); +// popupMenu.inflate(R.menu.comments_menu); +// String username = Login.getUser().getLogin(); +// boolean isOwner = CommentsHelper.isOwner(username, pullRequest.getLogin(), item.getComment().getUser().getLogin()); +// popupMenu.getMenu().findItem(R.id.delete).setVisible(isOwner); +// popupMenu.getMenu().findItem(R.id.edit).setVisible(isOwner); +// popupMenu.setOnMenuItemClickListener(item1 -> { +// if (getView() == null) return false; +// if (item1.getItemId() == R.id.delete) { +// getView().onShowDeleteMsg(item.getComment().getId()); +// } else if (item1.getItemId() == R.id.reply) { +// getView().onReply(item.getComment().getUser(), item.getComment().getBody()); +// } else if (item1.getItemId() == R.id.edit) { +// getView().onEditComment(item.getComment()); +// } else if (item1.getItemId() == R.id.share) { +// ActivityHelper.shareUrl(v.getContext(), item.getComment().getHtmlUrl()); +// } +// return true; +// }); +// popupMenu.show(); +// } else { +// onHandleReaction(v.getId(), item.getComment().getId(), ReactionsProvider.COMMENT); +// } +// } else if (item.getType() == TimelineModel.EVENT) { +// IssueEvent issueEventModel = item.getEvent(); +// if (issueEventModel.getCommitUrl() != null) { +// SchemeParser.launchUri(v.getContext(), Uri.parse(issueEventModel.getCommitUrl())); +// } +// } else if (item.getType() == TimelineModel.HEADER) { +// if (v.getId() == R.id.commentMenu) { +// PopupMenu popupMenu = new PopupMenu(v.getContext(), v); +// popupMenu.inflate(R.menu.comments_menu); +// String username = Login.getUser().getLogin(); +// boolean isOwner = CommentsHelper.isOwner(username, item.getPullRequest().getLogin(), +// item.getPullRequest().getUser().getLogin()); +// popupMenu.getMenu().findItem(R.id.edit).setVisible(isOwner); +// popupMenu.setOnMenuItemClickListener(item1 -> { +// if (getView() == null) return false; +// if (item1.getItemId() == R.id.reply) { +// getView().onReply(item.getPullRequest().getUser(), item.getPullRequest().getBody()); +// } else if (item1.getItemId() == R.id.edit) { +// Activity activity = ActivityHelper.getActivity(v.getContext()); +// if (activity == null) return false; +// CreateIssueActivity.startForResult(activity, +// item.getPullRequest().getLogin(), item.getPullRequest().getRepoId(), +// item.getPullRequest(), isEnterprise()); +// } else if (item1.getItemId() == R.id.share) { +// ActivityHelper.shareUrl(v.getContext(), item.getPullRequest().getHtmlUrl()); +// } +// return true; +// }); +// popupMenu.show(); +// } else { +// onHandleReaction(v.getId(), item.getPullRequest().getNumber(), ReactionsProvider.HEADER); +// } +// } else if (item.getType() == TimelineModel.GROUPED_REVIEW) { +// GroupedReviewModel reviewModel = item.getGroupedReview(); +// if (v.getId() == R.id.addCommentPreview) { +// EditReviewCommentModel model = new EditReviewCommentModel(); +// model.setCommentPosition(-1); +// model.setGroupPosition(position); +// model.setInReplyTo(reviewModel.getId()); +// getView().onReplyOrCreateReview(null, null, position, -1, model); +// } +// } +// } } @Override public void onItemLongClick(int position, View v, TimelineModel item) { - if (getView() == null || getView().getPullRequest() == null) return; - if (item.getType() == TimelineModel.COMMENT || item.getType() == TimelineModel.HEADER) { - PullRequest pullRequest = getView().getPullRequest(); - String login = pullRequest.getLogin(); - String repoId = pullRequest.getRepoId(); - if (!InputHelper.isEmpty(login) && !InputHelper.isEmpty(repoId)) { - ReactionTypes type = ReactionTypes.get(v.getId()); - if (type != null) { - if (item.getType() == TimelineModel.HEADER) { - getView().showReactionsPopup(type, login, repoId, item.getPullRequest().getNumber(), ReactionsProvider.HEADER); - } else { - getView().showReactionsPopup(type, login, repoId, item.getComment().getId(), ReactionsProvider.COMMENT); - } - } else { - onItemClick(position, v, item); - } - } - } else { - onItemClick(position, v, item); - } +// if (getView() == null || getView().getPullRequest() == null) return; +// if (item.getType() == TimelineModel.COMMENT || item.getType() == TimelineModel.HEADER) { +// PullRequest pullRequest = getView().getPullRequest(); +// String login = pullRequest.getLogin(); +// String repoId = pullRequest.getRepoId(); +// if (!InputHelper.isEmpty(login) && !InputHelper.isEmpty(repoId)) { +// ReactionTypes type = ReactionTypes.get(v.getId()); +// if (type != null) { +// if (item.getType() == TimelineModel.HEADER) { +// getView().showReactionsPopup(type, login, repoId, item.getPullRequest().getNumber(), ReactionsProvider.HEADER); +// } else { +// getView().showReactionsPopup(type, login, repoId, item.getComment().getId(), ReactionsProvider.COMMENT); +// } +// } else { +// onItemClick(position, v, item); +// } +// } +// } else { +// onItemClick(position, v, item); +// } } @NonNull @Override public ArrayList getEvents() { @@ -298,28 +294,23 @@ public class PullRequestTimelinePresenter extends BasePresenter> observable; - if (page > 1) { - observable = RestProvider.getIssueService(isEnterprise()).getIssueComments(login, repoId, number, page) - .map(comments -> { - lastPage = comments != null ? comments.getLast() : 0; - return TimelineModel.construct(comments != null ? comments.getItems() : null); - }); - } else { - observable = Observable.zip(RestProvider.getIssueService(isEnterprise()).getTimeline(login, repoId, number), - RestProvider.getIssueService(isEnterprise()).getIssueComments(login, repoId, number, page), - RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha), - RestProvider.getReviewService(isEnterprise()).getReviews(login, repoId, number), - RestProvider.getReviewService(isEnterprise()).getPrReviewComments(login, repoId, number), - (issueEventPageable, commentPageable, statuses, reviews, reviewComments) -> { + Observable> timeline = RestProvider.getIssueService(isEnterprise()).getTimeline(login, repoId, number, page) + .flatMap(response -> { + lastPage = response != null ? response.getLast() : 0; + return TimelineConverter.convert(response != null ? response.getItems() : null); + }) + .toList() + .toObservable(); + if (page == 1) { + Observable status = RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) + .map(statuses -> { if (statuses != null) { statuses.setMergable(isMergeable); } - lastPage = commentPageable != null ? commentPageable.getLast() : 0; - return TimelineModel.construct(commentPageable != null ? commentPageable.getItems() : null, - issueEventPageable.getItems(), statuses, reviews.getItems(), reviewComments.getItems()); + return statuses; }); + makeRestCall(status.map(TimelineModel::new), timelineModel -> sendToView(view -> view.onAddStatus(timelineModel))); } - makeRestCall(observable, models -> sendToView(view -> view.onNotifyAdapter(models, page))); + makeRestCall(timeline, timelineModels -> sendToView(view -> view.onNotifyAdapter(timelineModels, page))); } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/AvatarLayout.java b/app/src/main/java/com/fastaccess/ui/widgets/AvatarLayout.java index fa17830b..fd561761 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/AvatarLayout.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/AvatarLayout.java @@ -75,15 +75,11 @@ public class AvatarLayout extends FrameLayout { this.isOrg = isOrg; this.isEnterprise = isEnterprise; avatar.setContentDescription(login); - if (url != null) { - if (login != null) { - TooltipCompat.setTooltipText(avatar, login); - } + if (login != null) { + TooltipCompat.setTooltipText(avatar, login); } else { avatar.setOnClickListener(null); - if (login != null) { - avatar.setOnLongClickListener(null); - } + avatar.setOnLongClickListener(null); } Glide.with(getContext()) .load(url) @@ -92,8 +88,7 @@ public class AvatarLayout extends FrameLayout { .dontAnimate() .into(avatar); } - - + private void setBackground() { if (PrefGetter.isRectAvatar()) { setBackgroundResource(R.drawable.rect_shape); diff --git a/app/src/main/res/layouts/row_layouts/layout/label_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/label_row_item.xml index 62e3b0e5..0ba7da09 100644 --- a/app/src/main/res/layouts/row_layouts/layout/label_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/label_row_item.xml @@ -29,7 +29,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginStart="@dimen/spacing_xs_large" - android:ellipsize="end" + android:ellipsize="middle" android:maxLines="3" android:textColor="?android:textColorPrimary" android:transitionName="@string/title_transition" diff --git a/app/src/main/res/xml/behaviour_settings.xml b/app/src/main/res/xml/behaviour_settings.xml index 276a3bbf..7b5467a9 100644 --- a/app/src/main/res/xml/behaviour_settings.xml +++ b/app/src/main/res/xml/behaviour_settings.xml @@ -1,45 +1,38 @@ - - - diff --git a/build.gradle b/build.gradle index 7e5021a5..e389f670 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,7 @@ buildscript { butterKnifeVersion = '8.5.1' state_version = '1.1.0' lombokVersion = '1.12.6' - supportVersion = "26.0.0-beta2" -// supportVersion = "25.4.0" + supportVersion = "26.0.0" gms = "11.0.2" thirtyinchVersion = '0.8.0' retrofit = '2.3.0' @@ -24,10 +23,10 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0-alpha7' + classpath 'com.android.tools.build:gradle:3.0.0-alpha8' classpath 'com.google.gms:google-services:3.0.0' classpath 'com.novoda:gradle-build-properties-plugin:0.3' - classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1' + classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2' classpath 'io.fabric.tools:gradle:1.22.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } From ac7b0ef1fcb72eb833227cfce584a6da5b91448f Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 27 Jul 2017 12:02:31 +0800 Subject: [PATCH 02/67] this commit enhance images & fixes some observables --- .../data/dao/timeline/SourceModel.java | 10 +++++--- .../provider/timeline/TimelineProvider.java | 2 ++ .../timeline/handler/DrawableHandler.java | 6 ++--- .../handler/drawable/DrawableGetter.java | 6 ++--- ...apTarget.java => GlideDrawableTarget.java} | 6 ++--- .../com/fastaccess/ui/base/MainNavDrawer.kt | 4 +-- .../login/chooser/LoginChooserActivity.kt | 3 +-- .../modules/main/premium/PremiumPresenter.kt | 2 +- .../all/AllNotificationsPresenter.java | 2 +- .../comments/CommitCommentsPresenter.java | 2 +- .../details/files/CommitFilesPresenter.java | 2 +- .../PullRequestTimelinePresenter.java | 25 +++++++++++-------- 12 files changed, 39 insertions(+), 31 deletions(-) rename app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/{GifBitmapTarget.java => GlideDrawableTarget.java} (88%) diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java index 821b4958..5eadd86d 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java @@ -6,6 +6,7 @@ import android.os.Parcelable; import com.fastaccess.data.dao.model.Commit; import com.fastaccess.data.dao.model.Issue; import com.fastaccess.data.dao.model.PullRequest; +import com.fastaccess.data.dao.model.Repo; import lombok.Getter; import lombok.Setter; @@ -20,6 +21,9 @@ import lombok.Setter; private Issue issue; private PullRequest pullRequest; private Commit commit; + private Repo repository; + + public SourceModel() {} @Override public int describeContents() { return 0; } @@ -28,18 +32,18 @@ import lombok.Setter; dest.writeParcelable(this.issue, flags); dest.writeParcelable(this.pullRequest, flags); dest.writeParcelable(this.commit, flags); + dest.writeParcelable(this.repository, flags); } - public SourceModel() {} - protected SourceModel(Parcel in) { this.type = in.readString(); this.issue = in.readParcelable(Issue.class.getClassLoader()); this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); this.commit = in.readParcelable(Commit.class.getClassLoader()); + this.repository = in.readParcelable(Repo.class.getClassLoader()); } - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + public static final Creator CREATOR = new Creator() { @Override public SourceModel createFromParcel(Parcel source) {return new SourceModel(source);} @Override public SourceModel[] newArray(int size) {return new SourceModel[size];} diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java index be361ba9..9a17fe14 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java @@ -142,6 +142,8 @@ public class TimelineProvider { title.url("#" + sourceModel.getPullRequest().getNumber()); } else if (sourceModel.getCommit() != null) { title.url(substring(sourceModel.getCommit().getSha())); + } else if (sourceModel.getRepository() != null) { + title.url(sourceModel.getRepository().getName()); } if (!InputHelper.isEmpty(title)) { spannableBuilder.append(" ") diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java index 436f13f5..0cbd0d62 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java @@ -5,10 +5,10 @@ import android.text.style.ImageSpan; import android.widget.TextView; import com.fastaccess.helper.InputHelper; -import com.fastaccess.helper.Logger; import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; import net.nightwhistler.htmlspanner.TagNodeHandler; +import net.nightwhistler.htmlspanner.spans.CenterSpan; import org.htmlcleaner.TagNode; @@ -30,12 +30,12 @@ import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; @Override public void handleTagNode(TagNode node, SpannableStringBuilder builder, int start, int end) { String src = node.getAttributeByName("src"); - boolean isGif = "gif".equalsIgnoreCase(node.getAttributeByName("alt")); - Logger.e(isGif); if (!InputHelper.isEmpty(src)) { builder.append(""); if (isNull()) return; + CenterSpan centerSpan = new CenterSpan(); DrawableGetter imageGetter = new DrawableGetter(textView); + builder.setSpan(centerSpan, start, builder.length(), SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan(new ImageSpan(imageGetter.getDrawable(src)), start, builder.length(), SPAN_EXCLUSIVE_EXCLUSIVE); appendNewLine(builder); } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java index 9d421232..759fe787 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/DrawableGetter.java @@ -20,7 +20,7 @@ import java.util.Set; public class DrawableGetter implements Html.ImageGetter, Drawable.Callback { private WeakReference container; - private final Set cachedTargets; + private final Set cachedTargets; public DrawableGetter(TextView tv) { tv.setTag(R.id.drawable_callback, this); @@ -35,7 +35,7 @@ public class DrawableGetter implements Html.ImageGetter, Drawable.Callback { final GenericRequestBuilder load = Glide.with(context) .load(url) .dontAnimate(); - final GifBitmapTarget target = new GifBitmapTarget(urlDrawable, container); + final GlideDrawableTarget target = new GlideDrawableTarget(urlDrawable, container); load.into(target); cachedTargets.add(target); } @@ -54,7 +54,7 @@ public class DrawableGetter implements Html.ImageGetter, Drawable.Callback { public void clear(@NonNull DrawableGetter drawableGetter) { if (drawableGetter.cachedTargets != null) { - for (GifBitmapTarget target : drawableGetter.cachedTargets) { + for (GlideDrawableTarget target : drawableGetter.cachedTargets) { Glide.clear(target); } } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GifBitmapTarget.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java similarity index 88% rename from app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GifBitmapTarget.java rename to app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java index 62df871c..ed742559 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GifBitmapTarget.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java @@ -11,11 +11,11 @@ import com.fastaccess.R; import java.lang.ref.WeakReference; -class GifBitmapTarget extends SimpleTarget { +class GlideDrawableTarget extends SimpleTarget { private final UrlDrawable urlDrawable; private final WeakReference container; - GifBitmapTarget(UrlDrawable urlDrawable, WeakReference container) { + GlideDrawableTarget(UrlDrawable urlDrawable, WeakReference container) { this.urlDrawable = urlDrawable; this.container = container; } @@ -34,7 +34,7 @@ class GifBitmapTarget extends SimpleTarget { width = (float) resource.getIntrinsicWidth() * multiplier; height = (float) resource.getIntrinsicHeight() * multiplier; } - Rect rect = new Rect(0, 0, Math.round(width), Math.round(height)); + Rect rect = new Rect(0, 0, (int) Math.round(width / 1.5), (int) Math.round(height / 1.5)); resource.setBounds(rect); urlDrawable.setBounds(rect); urlDrawable.setDrawable(resource); diff --git a/app/src/main/java/com/fastaccess/ui/base/MainNavDrawer.kt b/app/src/main/java/com/fastaccess/ui/base/MainNavDrawer.kt index 968207cd..cf2388d5 100644 --- a/app/src/main/java/com/fastaccess/ui/base/MainNavDrawer.kt +++ b/app/src/main/java/com/fastaccess/ui/base/MainNavDrawer.kt @@ -113,7 +113,7 @@ class MainNavDrawer(val view: BaseActivity<*, *>, val extraNav: NavigationView?, } val adapter = LoginAdapter(true) view.getPresenter().manageViewDisposable(Login.getAccounts() - .doFinally { + .doOnComplete { when (!adapter.isEmpty) { true -> { toggleAccountsLayout.visibility = View.VISIBLE @@ -190,7 +190,7 @@ class MainNavDrawer(val view: BaseActivity<*, *>, val extraNav: NavigationView?, override fun onItemClick(position: Int, v: View, item: Login) { view.getPresenter().manageViewDisposable(RxHelper.getObservable(Login.onMultipleLogin(item, item.isIsEnterprise, false)) .doOnSubscribe { view.showProgress(0) } - .doFinally { view.hideProgress() } + .doOnComplete { view.hideProgress() } .subscribe({ view.onRestartApp() }, ::println)) } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt index 6e9a8303..da839eff 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt @@ -16,7 +16,6 @@ import com.fastaccess.helper.PrefGetter import com.fastaccess.ui.adapter.LoginAdapter import com.fastaccess.ui.base.BaseActivity import com.fastaccess.ui.modules.login.LoginActivity -import com.fastaccess.ui.modules.main.donation.CheckPurchaseActivity import com.fastaccess.ui.modules.main.premium.PremiumActivity import com.fastaccess.ui.modules.settings.LanguageBottomSheetDialog import com.fastaccess.ui.widgets.bindView @@ -123,7 +122,7 @@ class LoginChooserActivity : BaseActivity(), PremiumMvp.Presenter Logger.e(it.children, it.childrenCount, exists) return@flatMap Observable.just(exists) } - .doFinally { sendToView { it.hideProgress() } } + .doOnComplete { sendToView { it.hideProgress() } } .subscribe({ when (it) { true -> sendToView { it.onSuccessfullyActivated() } diff --git a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java index fa60a0e0..7550e035 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java @@ -111,7 +111,7 @@ public class AllNotificationsPresenter extends BasePresenter sendToView(BaseMvp.FAView::hideProgress)), response -> sendToView(view -> view.onNotifyAdapter + makeRestCall(observable.doOnComplete(() -> sendToView(BaseMvp.FAView::hideProgress)), response -> sendToView(view -> view.onNotifyAdapter (response))); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java index 40f15f4a..c1cffffc 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java @@ -70,7 +70,7 @@ class CommitCommentsPresenter extends BasePresenter impl lastPage = listResponse.getLast(); return TimelineModel.construct(listResponse.getItems()); }) - .doFinally(() -> sendToView(BaseMvp.FAView::hideProgress)), + .doOnComplete(() -> sendToView(BaseMvp.FAView::hideProgress)), listResponse -> sendToView(view -> view.onNotifyAdapter(listResponse, page))); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesPresenter.java index 8ea90040..f1105f15 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesPresenter.java @@ -76,7 +76,7 @@ class CommitFilesPresenter extends BasePresenter implements .map(CommitFileChanges::construct) .doOnSubscribe(disposable -> sendToView(CommitFilesMvp.View::clearAdapter)) .doOnNext(commitFileChanges -> sendToView(view -> view.onNotifyAdapter(commitFileChanges))) - .doFinally(() -> sendToView(BaseMvp.FAView::hideProgress))); + .doOnComplete(() -> sendToView(BaseMvp.FAView::hideProgress))); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 4b9a52ef..a6cb6a0e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -294,23 +294,26 @@ public class PullRequestTimelinePresenter extends BasePresenter status = RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) + .map(statuses -> { + if (statuses != null) { + statuses.setMergable(isMergeable); + } + return statuses; + }); Observable> timeline = RestProvider.getIssueService(isEnterprise()).getTimeline(login, repoId, number, page) .flatMap(response -> { lastPage = response != null ? response.getLast() : 0; return TimelineConverter.convert(response != null ? response.getItems() : null); }) .toList() - .toObservable(); - if (page == 1) { - Observable status = RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) - .map(statuses -> { - if (statuses != null) { - statuses.setMergable(isMergeable); - } - return statuses; - }); - makeRestCall(status.map(TimelineModel::new), timelineModel -> sendToView(view -> view.onAddStatus(timelineModel))); - } + .toObservable() + .doOnComplete(() -> { + if (page == 1) { + manageObservable(status.map(TimelineModel::new) + .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); + } + }); makeRestCall(timeline, timelineModels -> sendToView(view -> view.onNotifyAdapter(timelineModels, page))); } } From 0a9b65fade99b300bc7055c2955146ff782b0e93 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 27 Jul 2017 16:19:47 +0800 Subject: [PATCH 03/67] added clicking event for cross reference and displaying PRs (WIP) --- .../data/dao/ReviewCommentModel.java | 13 ++++ .../com/fastaccess/data/dao/ReviewModel.java | 26 ++++--- .../fastaccess/data/dao/TimelineModel.java | 76 +++++++++++-------- .../data/dao/types/ReviewStateType.java | 12 ++- .../provider/timeline/TimelineConverter.java | 7 ++ .../timeline/handler/DrawableHandler.java | 1 - .../handler/drawable/GlideDrawableTarget.java | 2 +- .../ui/adapter/IssuePullsTimelineAdapter.java | 9 ++- .../viewholder/IssueTimelineViewHolder.java | 2 +- .../adapter/viewholder/ReviewsViewHolder.java | 58 ++++++++------ .../ui/base/mvp/presenter/BasePresenter.java | 5 +- .../timeline/IssueTimelinePresenter.java | 14 ++++ .../PullRequestTimelinePresenter.java | 33 ++++---- .../layout/review_timeline_row_item.xml | 4 +- app/src/main/res/values/strings.xml | 1 + 15 files changed, 171 insertions(+), 92 deletions(-) diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java index b9a60ccf..68e80baf 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java @@ -86,4 +86,17 @@ import lombok.Setter; @Override public ReviewCommentModel[] newArray(int size) {return new ReviewCommentModel[size];} }; + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + ReviewCommentModel that = (ReviewCommentModel) o; + + return id == that.id; + } + + @Override public int hashCode() { + return (int) (id ^ (id >>> 32)); + } } diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java index 5c0392e1..01636b73 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java @@ -4,8 +4,6 @@ import android.os.Parcel; import android.os.Parcelable; import com.fastaccess.data.dao.model.User; -import com.fastaccess.data.dao.types.ReviewStateType; -import com.google.gson.annotations.SerializedName; import java.util.Date; import java.util.List; @@ -21,8 +19,8 @@ import lombok.Setter; private long id; private User user; - @SerializedName("body_html") private String body; - private ReviewStateType state; + private String bodyHtml; + private String state; private Date submittedAt; private String commitId; private String diffText; @@ -36,8 +34,8 @@ import lombok.Setter; @Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(this.id); dest.writeParcelable(this.user, flags); - dest.writeString(this.body); - dest.writeInt(this.state == null ? -1 : this.state.ordinal()); + dest.writeString(this.bodyHtml); + dest.writeString(this.state); dest.writeLong(this.submittedAt != null ? this.submittedAt.getTime() : -1); dest.writeString(this.commitId); dest.writeString(this.diffText); @@ -48,9 +46,8 @@ import lombok.Setter; protected ReviewModel(Parcel in) { this.id = in.readLong(); this.user = in.readParcelable(User.class.getClassLoader()); - this.body = in.readString(); - int tmpState = in.readInt(); - this.state = tmpState == -1 ? null : ReviewStateType.values()[tmpState]; + this.bodyHtml = in.readString(); + this.state = in.readString(); long tmpSubmittedAt = in.readLong(); this.submittedAt = tmpSubmittedAt == -1 ? null : new Date(tmpSubmittedAt); this.commitId = in.readString(); @@ -64,4 +61,15 @@ import lombok.Setter; @Override public ReviewModel[] newArray(int size) {return new ReviewModel[size];} }; + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReviewModel that = (ReviewModel) o; + return id == that.id; + } + + @Override public int hashCode() { + return (int) (id ^ (id >>> 32)); + } } diff --git a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java index adb7e778..d53ed236 100644 --- a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java @@ -28,6 +28,7 @@ import lombok.Setter; public static final int EVENT = 2; public static final int COMMENT = 3; public static final int STATUS = 4; + public static final int REVIEW = 5; private IssueEventType event; private Comment comment; @@ -36,6 +37,7 @@ import lombok.Setter; private PullRequestStatusModel status; private Issue issue; private PullRequest pullRequest; + private ReviewModel review; public TimelineModel(Issue issue) { this.issue = issue; @@ -54,6 +56,11 @@ import lombok.Setter; this.status = statusModel; } + public TimelineModel(ReviewCommentModel reviewCommentModel) { + this.reviewComment = reviewCommentModel; + this.event = IssueEventType.line_commented; + } + public int getType() { if (getEvent() != null) { switch (getEvent()) { @@ -61,6 +68,8 @@ import lombok.Setter; return COMMENT; case line_commented: return LINE_COMMENT; + case reviewed: + return REVIEW; default: return EVENT; } @@ -71,35 +80,6 @@ import lombok.Setter; } } - @Override public int describeContents() { return 0; } - - @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(this.event == null ? -1 : this.event.ordinal()); - dest.writeParcelable(this.comment, flags); - dest.writeParcelable(this.genericEvent, flags); - dest.writeParcelable(this.reviewComment, flags); - dest.writeParcelable(this.status, flags); - dest.writeParcelable(this.issue, flags); - dest.writeParcelable(this.pullRequest, flags); - } - - protected TimelineModel(Parcel in) { - int tmpEvent = in.readInt(); - this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; - this.comment = in.readParcelable(Comment.class.getClassLoader()); - this.genericEvent = in.readParcelable(GenericEvent.class.getClassLoader()); - this.reviewComment = in.readParcelable(ReviewCommentModel.class.getClassLoader()); - this.status = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); - this.issue = in.readParcelable(Issue.class.getClassLoader()); - this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); - } - - public static final Creator CREATOR = new Creator() { - @Override public TimelineModel createFromParcel(Parcel source) {return new TimelineModel(source);} - - @Override public TimelineModel[] newArray(int size) {return new TimelineModel[size];} - }; - public static TimelineModel constructHeader(Issue issue) { return new TimelineModel(issue); } @@ -128,11 +108,47 @@ import lombok.Setter; return comment.equals(that.comment); } else if (reviewComment != null) { return reviewComment.equals(that.reviewComment); + } else if (review != null) { + return review.equals(that.review); } return false; } @Override public int hashCode() { - return comment != null ? comment.hashCode() : reviewComment != null ? reviewComment.hashCode() : -1; + if (comment != null) return comment.hashCode(); + else if (reviewComment != null) return reviewComment.hashCode(); + else if (review != null) return review.hashCode(); + else return -1; } + + @Override public int describeContents() { return 0; } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(this.event == null ? -1 : this.event.ordinal()); + dest.writeParcelable(this.comment, flags); + dest.writeParcelable(this.genericEvent, flags); + dest.writeParcelable(this.reviewComment, flags); + dest.writeParcelable(this.status, flags); + dest.writeParcelable(this.issue, flags); + dest.writeParcelable(this.pullRequest, flags); + dest.writeParcelable(this.review, flags); + } + + protected TimelineModel(Parcel in) { + int tmpEvent = in.readInt(); + this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; + this.comment = in.readParcelable(Comment.class.getClassLoader()); + this.genericEvent = in.readParcelable(GenericEvent.class.getClassLoader()); + this.reviewComment = in.readParcelable(ReviewCommentModel.class.getClassLoader()); + this.status = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); + this.issue = in.readParcelable(Issue.class.getClassLoader()); + this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); + this.review = in.readParcelable(ReviewModel.class.getClassLoader()); + } + + public static final Creator CREATOR = new Creator() { + @Override public TimelineModel createFromParcel(Parcel source) {return new TimelineModel(source);} + + @Override public TimelineModel[] newArray(int size) {return new TimelineModel[size];} + }; } diff --git a/app/src/main/java/com/fastaccess/data/dao/types/ReviewStateType.java b/app/src/main/java/com/fastaccess/data/dao/types/ReviewStateType.java index 76f83ca9..da91a590 100644 --- a/app/src/main/java/com/fastaccess/data/dao/types/ReviewStateType.java +++ b/app/src/main/java/com/fastaccess/data/dao/types/ReviewStateType.java @@ -1,8 +1,11 @@ package com.fastaccess.data.dao.types; import android.support.annotation.DrawableRes; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.StringRes; +import com.annimon.stream.Stream; import com.fastaccess.R; /** @@ -11,7 +14,7 @@ import com.fastaccess.R; public enum ReviewStateType { COMMENTED(R.string.reviewed, R.drawable.ic_eye), - CHANGES_REQUESTED(R.string.reviewed, R.drawable.ic_eye), + CHANGES_REQUESTED(R.string.request_changes, R.drawable.ic_clear), REQUEST_CHANGES(R.string.reviewed, R.drawable.ic_eye), DISMISSED(R.string.dismissed_review, R.drawable.ic_clear), APPROVED(R.string.approved_these_changes, R.drawable.ic_done), @@ -32,4 +35,11 @@ public enum ReviewStateType { @DrawableRes public int getDrawableRes() { return drawableRes > 0 ? drawableRes : R.drawable.ic_eye; } + + @Nullable public static ReviewStateType getType(@NonNull String state) { + return Stream.of(values()) + .filter(value -> value.name().toLowerCase().equalsIgnoreCase(state.toLowerCase())) + .findFirst() + .orElse(null); + } } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java index b84a39a4..47081713 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java @@ -4,6 +4,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.fastaccess.data.dao.ReviewCommentModel; +import com.fastaccess.data.dao.ReviewModel; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.timeline.GenericEvent; @@ -38,6 +39,8 @@ public class TimelineConverter { timeline.setComment(getComment(jsonObject, gson)); } else if (type == IssueEventType.line_commented) { timeline.setReviewComment(getReviewComment(jsonObject, gson)); + } else if (type == IssueEventType.reviewed) { + timeline.setReview(getReview(jsonObject, gson)); } else { timeline.setGenericEvent(getGenericEvent(jsonObject, gson)); } @@ -50,6 +53,10 @@ public class TimelineConverter { .filter(timeline -> timeline != null && filterEvents(timeline.getEvent())); } + private static ReviewModel getReview(@NonNull JsonObject object, @NonNull Gson gson) { + return gson.fromJson(object, ReviewModel.class); + } + private static GenericEvent getGenericEvent(@NonNull JsonObject object, @NonNull Gson gson) { return gson.fromJson(object, GenericEvent.class); } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java index 0cbd0d62..ad479246 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/DrawableHandler.java @@ -40,5 +40,4 @@ import static android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE; appendNewLine(builder); } } - } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java index ed742559..428bab2d 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/drawable/GlideDrawableTarget.java @@ -34,7 +34,7 @@ class GlideDrawableTarget extends SimpleTarget { width = (float) resource.getIntrinsicWidth() * multiplier; height = (float) resource.getIntrinsicHeight() * multiplier; } - Rect rect = new Rect(0, 0, (int) Math.round(width / 1.5), (int) Math.round(height / 1.5)); + Rect rect = new Rect(0, 0, (int) Math.round(width / 1.3), (int) Math.round(height / 1.3)); resource.setBounds(rect); urlDrawable.setBounds(rect); urlDrawable.setDrawable(resource); diff --git a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java index e83d2d77..b48a1211 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java @@ -11,6 +11,7 @@ import com.fastaccess.ui.adapter.viewholder.IssueDetailsViewHolder; import com.fastaccess.ui.adapter.viewholder.IssueTimelineViewHolder; import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder; import com.fastaccess.ui.adapter.viewholder.ReviewCommentsViewHolder; +import com.fastaccess.ui.adapter.viewholder.ReviewsViewHolder; import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder; import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineMvp.ReviewCommentCallback; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; @@ -61,6 +62,8 @@ public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter { stateText.setText(""); stateImage.setImageResource(R.drawable.ic_label); } - itemView.setEnabled(!InputHelper.isEmpty(issueEventModel.getCommitUrl())); + itemView.setEnabled(!InputHelper.isEmpty(issueEventModel.getCommitUrl()) || issueEventModel.getSource() != null); } @Override protected void onViewIsDetaching() { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java index f4a0b35d..81024420 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java @@ -6,11 +6,18 @@ import android.view.View; import android.view.ViewGroup; import com.fastaccess.R; +import com.fastaccess.data.dao.ReviewModel; import com.fastaccess.data.dao.TimelineModel; +import com.fastaccess.data.dao.types.ReviewStateType; +import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.ParseDateFormat; +import com.fastaccess.provider.scheme.LinkParserHelper; +import com.fastaccess.provider.timeline.HtmlHelper; import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; import com.fastaccess.ui.widgets.AvatarLayout; import com.fastaccess.ui.widgets.FontTextView; import com.fastaccess.ui.widgets.ForegroundImageView; +import com.fastaccess.ui.widgets.SpannableBuilder; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; @@ -38,31 +45,32 @@ public class ReviewsViewHolder extends BaseViewHolder { } @Override public void bind(@NonNull TimelineModel model) { -// ReviewModel review = model.getReview(); -// if (review != null) { -// if (review.getUser() != null) { -// avatarLayout.setUrl(review.getUser().getAvatarUrl(), review.getUser().getLogin(), false, -// LinkParserHelper.isEnterprise(review.getUser().getHtmlUrl())); -// } else { -// avatarLayout.setUrl(null, null, false, false); -// } -// if (review.getState() != null) { -// stateImage.setImageResource(review.getState().getDrawableRes()); -// } -// if (review.getUser() != null) { -// stateText.setText(SpannableBuilder.builder().append(review.getUser().getLogin()) -// .append(" ") -// .append(review.getState() != null ? stateText.getResources().getString(review.getState().getStringRes()) : "") -// .append(" ") -// .append(ParseDateFormat.getTimeAgo(review.getSubmittedAt()))); -// } -// if (!InputHelper.isEmpty(review.getBody())) { -// body.setVisibility(View.VISIBLE); -// HtmlHelper.htmlIntoTextView(body, review.getBody()); -// } else { -// body.setVisibility(View.GONE); -// } -// } + ReviewModel review = model.getReview(); + if (review != null) { + if (review.getUser() != null) { + avatarLayout.setUrl(review.getUser().getAvatarUrl(), review.getUser().getLogin(), false, + LinkParserHelper.isEnterprise(review.getUser().getHtmlUrl())); + } else { + avatarLayout.setUrl(null, null, false, false); + } + ReviewStateType stateType = ReviewStateType.getType(review.getState()); + if (stateType != null) { + stateImage.setImageResource(stateType.getDrawableRes()); + } + if (review.getUser() != null && stateType != null) { + stateText.setText(SpannableBuilder.builder().append(review.getUser().getLogin()) + .append(" ") + .append(stateText.getResources().getString(stateType.getStringRes())) + .append(" ") + .append(ParseDateFormat.getTimeAgo(review.getSubmittedAt()))); + } + if (!InputHelper.isEmpty(review.getBodyHtml())) { + body.setVisibility(View.VISIBLE); + HtmlHelper.htmlIntoTextView(body, review.getBodyHtml()); + } else { + body.setVisibility(View.GONE); + } + } } @Override protected void onViewIsDetaching() { diff --git a/app/src/main/java/com/fastaccess/ui/base/mvp/presenter/BasePresenter.java b/app/src/main/java/com/fastaccess/ui/base/mvp/presenter/BasePresenter.java index dd909c3e..8ba579e3 100644 --- a/app/src/main/java/com/fastaccess/ui/base/mvp/presenter/BasePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/base/mvp/presenter/BasePresenter.java @@ -101,10 +101,7 @@ public class BasePresenter extends TiPresenter impl manageDisposable( RxHelper.getObservable(observable) .doOnSubscribe(disposable -> onSubscribed(cancelable)) - .subscribe(onNext, this::onError, () -> { - apiCalled = true; - sendToView(BaseMvp.FAView::hideProgress); - }) + .subscribe(onNext, this::onError, () -> apiCalled = true) ); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index 533dff6b..6802b56a 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -14,6 +14,7 @@ import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Issue; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.timeline.GenericEvent; +import com.fastaccess.data.dao.timeline.SourceModel; import com.fastaccess.data.dao.types.ReactionTypes; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; @@ -81,6 +82,19 @@ import lombok.Getter; GenericEvent issueEventModel = item.getGenericEvent(); if (issueEventModel.getCommitUrl() != null) { SchemeParser.launchUri(v.getContext(), Uri.parse(issueEventModel.getCommitUrl())); + } else { + SourceModel sourceModel = issueEventModel.getSource(); + if (sourceModel != null) { + if (sourceModel.getCommit() != null) { + SchemeParser.launchUri(v.getContext(), Uri.parse(sourceModel.getCommit().getUrl())); + } else if (sourceModel.getIssue() != null) { + SchemeParser.launchUri(v.getContext(), Uri.parse(sourceModel.getIssue().getUrl())); + } else if (sourceModel.getPullRequest() != null) { + SchemeParser.launchUri(v.getContext(), Uri.parse(sourceModel.getPullRequest().getUrl())); + } else if (sourceModel.getRepository() != null) { + SchemeParser.launchUri(v.getContext(), Uri.parse(sourceModel.getRepository().getUrl())); + } + } } } else if (item.getType() == TimelineModel.HEADER) { if (v.getId() == R.id.commentMenu) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index a6cb6a0e..2f2c41e8 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -8,7 +8,6 @@ import android.widget.PopupMenu; import com.fastaccess.R; import com.fastaccess.data.dao.EditReviewCommentModel; -import com.fastaccess.data.dao.PullRequestStatusModel; import com.fastaccess.data.dao.ReviewCommentModel; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; @@ -57,7 +56,7 @@ public class PullRequestTimelinePresenter extends BasePresenter { // if (getView() == null) return false; // if (item1.getItemId() == R.id.reply) { -// getView().onReply(item.getPullRequest().getUser(), item.getPullRequest().getBody()); +// getView().onReply(item.getPullRequest().getUser(), item.getPullRequest().getBodyHtml()); // } else if (item1.getItemId() == R.id.edit) { // Activity activity = ActivityHelper.getActivity(v.getContext()); // if (activity == null) return false; @@ -293,15 +292,11 @@ public class PullRequestTimelinePresenter extends BasePresenter status = RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) - .map(statuses -> { - if (statuses != null) { - statuses.setMergable(isMergeable); - } - return statuses; - }); - Observable> timeline = RestProvider.getIssueService(isEnterprise()).getTimeline(login, repoId, number, page) + private void loadEverything(@NonNull String login, @NonNull String repoId, int number, + @NonNull String sha, boolean isMergeable, int page) { + + Observable> timeline = RestProvider.getIssueService(isEnterprise()) + .getTimeline(login, repoId, number, page) .flatMap(response -> { lastPage = response != null ? response.getLast() : 0; return TimelineConverter.convert(response != null ? response.getItems() : null); @@ -310,10 +305,20 @@ public class PullRequestTimelinePresenter extends BasePresenter { if (page == 1) { - manageObservable(status.map(TimelineModel::new) - .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); + loadStatus(login, repoId, sha, isMergeable); } }); makeRestCall(timeline, timelineModels -> sendToView(view -> view.onNotifyAdapter(timelineModels, page))); } + + private void loadStatus(@NonNull String login, @NonNull String repoId, @NonNull String sha, boolean isMergeable) { + manageObservable(RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) + .map(statuses -> { + if (statuses != null) { + statuses.setMergable(isMergeable); + } + return statuses; + }).map(TimelineModel::new) + .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); + } } diff --git a/app/src/main/res/layouts/row_layouts/layout/review_timeline_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/review_timeline_row_item.xml index 5986abf3..798bd9b1 100644 --- a/app/src/main/res/layouts/row_layouts/layout/review_timeline_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/review_timeline_row_item.xml @@ -7,9 +7,7 @@ android:layout_marginBottom="@dimen/spacing_normal" android:layout_marginEnd="@dimen/layout_margin" android:layout_marginStart="@dimen/layout_margin" - android:layout_marginTop="@dimen/spacing_normal" - android:clipChildren="false" - android:foreground="?selectableItemBackground"> + android:layout_marginTop="@dimen/spacing_normal"> Choose Notification Sound Disable auto playing GIFs Disable Playing GIF + requested changes From 20fb10738b7b7f5eaac1b0e938166ca1c54a973d Mon Sep 17 00:00:00 2001 From: kosh Date: Fri, 28 Jul 2017 17:01:55 +0800 Subject: [PATCH 04/67] this commit fixes #799 , fixes #794 and improves readme parsing --- README.md | 2 +- .../data/dao/PullRequestStatusModel.java | 16 ++-- .../data/dao/ReviewCommentModel.java | 34 ++++---- .../com/fastaccess/data/dao/ReviewModel.java | 18 ++--- .../fastaccess/data/dao/TimelineModel.java | 21 ++--- .../data/dao/timeline/GenericEvent.java | 50 ++++++------ .../provider/timeline/TimelineConverter.java | 75 ----------------- .../provider/timeline/TimelineConverter.kt | 70 ++++++++++++++++ .../timeline/IssueTimelinePresenter.java | 2 +- .../PullRequestTimelinePresenter.java | 2 +- .../ui/modules/repos/wiki/WikiActivity.kt | 13 ++- .../ui/modules/repos/wiki/WikiPresenter.kt | 1 + .../category/SettingsCategoryFragment.java | 4 - .../prettifier/pretty/PrettifyWebView.java | 8 +- .../pretty/helper/GithubHelper.java | 81 +++++++++++-------- 15 files changed, 210 insertions(+), 187 deletions(-) delete mode 100644 app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java create mode 100644 app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt diff --git a/README.md b/README.md index 930b7af7..add1625b 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ Read the [**contribution guide**](.github/CONTRIBUTING.md) for more detailed inf [Google+](https://plus.google.com/+CookiconsDesign) | [Twitter](https://twitter.com/mcookie) Designer website [Cookicons](https://cookicons.co/). -**OLD FastHub** logo is designed by **Kevin Aguilar**. +**OLD FastHub** logo was designed by **Kevin Aguilar**. [Google+](https://plus.google.com/+KevinAguilarC) | [Twitter](https://twitter.com/kevttob) Designer at [221 Pixels](https://www.221pixels.com/). Laus Deo Semper diff --git a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java index 4cb407b1..7a419273 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java @@ -18,14 +18,14 @@ import lombok.Setter; @Getter @Setter public class PullRequestStatusModel extends Timeline implements Parcelable { - private StatusStateType state; - private String sha; - private int totalCount; - private List statuses; - private String commitUrl; - private String url; - private boolean mergable; - private Date createdAt; + StatusStateType state; + String sha; + int totalCount; + List statuses; + String commitUrl; + String url; + boolean mergable; + Date createdAt; public PullRequestStatusModel() {} diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java index 68e80baf..c3916f1e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java @@ -17,23 +17,23 @@ import lombok.Setter; @Getter @Setter public class ReviewCommentModel extends Timeline implements Parcelable { - private long id; - private String url; - private long pullRequestReviewId; - private String diffHunk; - private String path; - private int position; - private int originalPosition; - private String commitId; - private String originalCommitId; - private User user; - private String bodyHtml; - private String body; - private Date createdAt; - private Date updatedAt; - private String htmlUrl; - private String pullRequestUrl; - private ReactionsModel reactions; + long id; + String url; + long pullRequestReviewId; + String diffHunk; + String path; + int position; + int originalPosition; + String commitId; + String originalCommitId; + User user; + String bodyHtml; + String body; + Date createdAt; + Date updatedAt; + String htmlUrl; + String pullRequestUrl; + ReactionsModel reactions; public ReviewCommentModel() {} diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java index 01636b73..f28e57c5 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java @@ -17,15 +17,15 @@ import lombok.Setter; @Getter @Setter public class ReviewModel implements Parcelable { - private long id; - private User user; - private String bodyHtml; - private String state; - private Date submittedAt; - private String commitId; - private String diffText; - private List comments; - private ReactionsModel reactions; + long id; + User user; + String bodyHtml; + String state; + Date submittedAt; + String commitId; + String diffText; + List comments; + ReactionsModel reactions; public ReviewModel() {} diff --git a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java index d53ed236..176c4b27 100644 --- a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java @@ -14,7 +14,6 @@ import java.util.List; import io.reactivex.Observable; import lombok.Getter; -import lombok.NoArgsConstructor; import lombok.NonNull; import lombok.Setter; @@ -22,7 +21,7 @@ import lombok.Setter; * Created by Kosh on 30 Mar 2017, 9:03 PM */ -@Getter @Setter @NoArgsConstructor public class TimelineModel implements Parcelable { +@Getter @Setter public class TimelineModel implements Parcelable { public static final int HEADER = 0; public static final int LINE_COMMENT = 1; public static final int EVENT = 2; @@ -30,14 +29,14 @@ import lombok.Setter; public static final int STATUS = 4; public static final int REVIEW = 5; - private IssueEventType event; - private Comment comment; - private GenericEvent genericEvent; - private ReviewCommentModel reviewComment; - private PullRequestStatusModel status; - private Issue issue; - private PullRequest pullRequest; - private ReviewModel review; + public IssueEventType event; + public Comment comment; + public GenericEvent genericEvent; + public ReviewCommentModel reviewComment; + public PullRequestStatusModel status; + public Issue issue; + public PullRequest pullRequest; + public ReviewModel review; public TimelineModel(Issue issue) { this.issue = issue; @@ -61,6 +60,8 @@ import lombok.Setter; this.event = IssueEventType.line_commented; } + public TimelineModel() {} + public int getType() { if (getEvent() != null) { switch (getEvent()) { diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java index fe7807b0..b1af219e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java @@ -25,31 +25,31 @@ import lombok.Setter; @NoArgsConstructor @Getter @Setter public class GenericEvent implements Parcelable { - private long id; - private String url; - private String commitId; - private String commitUrl; - private String message; - private String sha; - private String htmlUrl; - private Date createdAt; - private User actor; - private User requestedReviewer; - private User reviewRequester; - private User assigner; - private User assignee; - private User author; - private User committer; - private LabelModel label; - private TeamsModel requestedTeam; - private MilestoneModel milestone; - private RenameModel rename; - private SourceModel source; - private Issue issue; - private PullRequest pullRequest; - private ParentsModel tree; - private List parents; - private IssueEventType event; + long id; + String url; + String commitId; + String commitUrl; + String message; + String sha; + String htmlUrl; + Date createdAt; + User actor; + User requestedReviewer; + User reviewRequester; + User assigner; + User assignee; + User author; + User committer; + LabelModel label; + TeamsModel requestedTeam; + MilestoneModel milestone; + RenameModel rename; + SourceModel source; + Issue issue; + PullRequest pullRequest; + ParentsModel tree; + List parents; + IssueEventType event; @Override public int describeContents() { return 0; } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java deleted file mode 100644 index 47081713..00000000 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.fastaccess.provider.timeline; - -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; - -import com.fastaccess.data.dao.ReviewCommentModel; -import com.fastaccess.data.dao.ReviewModel; -import com.fastaccess.data.dao.TimelineModel; -import com.fastaccess.data.dao.model.Comment; -import com.fastaccess.data.dao.timeline.GenericEvent; -import com.fastaccess.data.dao.types.IssueEventType; -import com.fastaccess.helper.InputHelper; -import com.fastaccess.provider.rest.RestProvider; -import com.google.gson.Gson; -import com.google.gson.JsonObject; - -import java.util.List; - -import io.reactivex.Observable; - -/** - * Created by kosh on 26/07/2017. - */ - -public class TimelineConverter { - - @NonNull public static Observable convert(@Nullable List jsonObjects) { - if (jsonObjects == null) return Observable.empty(); - Gson gson = RestProvider.gson; - return Observable.fromIterable(jsonObjects) - .map(jsonObject -> { - String event = jsonObject.get("event").getAsString(); - TimelineModel timeline = new TimelineModel(); - if (!InputHelper.isEmpty(event)) { - IssueEventType type = IssueEventType.getType(event); - timeline.setEvent(type); - if (type != null) { - if (type == IssueEventType.commented) { - timeline.setComment(getComment(jsonObject, gson)); - } else if (type == IssueEventType.line_commented) { - timeline.setReviewComment(getReviewComment(jsonObject, gson)); - } else if (type == IssueEventType.reviewed) { - timeline.setReview(getReview(jsonObject, gson)); - } else { - timeline.setGenericEvent(getGenericEvent(jsonObject, gson)); - } - } - } else { - timeline.setGenericEvent(getGenericEvent(jsonObject, gson)); - } - return timeline; - }) - .filter(timeline -> timeline != null && filterEvents(timeline.getEvent())); - } - - private static ReviewModel getReview(@NonNull JsonObject object, @NonNull Gson gson) { - return gson.fromJson(object, ReviewModel.class); - } - - private static GenericEvent getGenericEvent(@NonNull JsonObject object, @NonNull Gson gson) { - return gson.fromJson(object, GenericEvent.class); - } - - private static ReviewCommentModel getReviewComment(@NonNull JsonObject object, @NonNull Gson gson) { - return gson.fromJson(object, ReviewCommentModel.class); - } - - private static Comment getComment(@NonNull JsonObject object, @NonNull Gson gson) { - return gson.fromJson(object, Comment.class); - } - - private static boolean filterEvents(@Nullable IssueEventType type) { - return type != IssueEventType.subscribed && type != IssueEventType.unsubscribed && type != IssueEventType.mentioned; - } -} diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt new file mode 100644 index 00000000..67a3ae2a --- /dev/null +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt @@ -0,0 +1,70 @@ +package com.fastaccess.provider.timeline + +import com.fastaccess.data.dao.ReviewCommentModel +import com.fastaccess.data.dao.ReviewModel +import com.fastaccess.data.dao.TimelineModel +import com.fastaccess.data.dao.model.Comment +import com.fastaccess.data.dao.timeline.GenericEvent +import com.fastaccess.data.dao.types.IssueEventType +import com.fastaccess.helper.InputHelper +import com.fastaccess.provider.rest.RestProvider +import com.google.gson.Gson +import com.google.gson.JsonObject + +import io.reactivex.Observable + +/** + * Created by kosh on 26/07/2017. + */ + +object TimelineConverter { + + fun convert(jsonObjects: List?): Observable { + if (jsonObjects == null) return Observable.empty() + val gson = RestProvider.gson + return Observable.fromIterable(jsonObjects) + .map { jsonObject -> + val event = jsonObject.get("event").asString + val timeline = TimelineModel() + if (!InputHelper.isEmpty(event)) { + val type = IssueEventType.getType(event) + timeline.event = type + if (type != null) { + if (type == IssueEventType.commented) { + timeline.comment = getComment(jsonObject, gson) + } else if (type == IssueEventType.line_commented) { + timeline.reviewComment = getReviewComment(jsonObject, gson) + } else if (type == IssueEventType.reviewed) { + timeline.review = getReview(jsonObject, gson) + } else { + timeline.genericEvent = getGenericEvent(jsonObject, gson) + } + } + } else { + timeline.genericEvent = getGenericEvent(jsonObject, gson) + } + timeline + } + .filter { filterEvents(it.event) } + } + + private fun getReview(jsonObject: JsonObject, gson: Gson): ReviewModel { + return gson.fromJson(jsonObject, ReviewModel::class.java) + } + + private fun getGenericEvent(jsonObject: JsonObject, gson: Gson): GenericEvent { + return gson.fromJson(jsonObject, GenericEvent::class.java) + } + + private fun getReviewComment(jsonObject: JsonObject, gson: Gson): ReviewCommentModel { + return gson.fromJson(jsonObject, ReviewCommentModel::class.java) + } + + private fun getComment(jsonObject: JsonObject, gson: Gson): Comment { + return gson.fromJson(jsonObject, Comment::class.java) + } + + private fun filterEvents(type: IssueEventType?): Boolean { + return type != IssueEventType.subscribed && type != IssueEventType.unsubscribed && type != IssueEventType.mentioned + } +} diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index 6802b56a..d9e44c7d 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -236,7 +236,7 @@ import lombok.Getter; if (response != null) { lastPage = response.getLast(); } - return TimelineConverter.convert(response != null ? response.getItems() : null); + return TimelineConverter.INSTANCE.convert(response != null ? response.getItems() : null); }).toList() .toObservable(); makeRestCall(observable, timeline -> sendToView(view -> view.onNotifyAdapter(timeline, page))); diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 2f2c41e8..f723677c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -299,7 +299,7 @@ public class PullRequestTimelinePresenter extends BasePresenter { lastPage = response != null ? response.getLast() : 0; - return TimelineConverter.convert(response != null ? response.getItems() : null); + return TimelineConverter.INSTANCE.convert(response != null ? response.getItems() : null); }) .toList() .toObservable() diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt index 7278f2c4..10faabeb 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt @@ -2,6 +2,7 @@ package com.fastaccess.ui.modules.repos.wiki import android.content.Context import android.content.Intent +import android.net.Uri import android.os.Bundle import android.support.design.widget.NavigationView import android.support.v4.widget.DrawerLayout @@ -16,6 +17,8 @@ import com.fastaccess.data.dao.NameParser import com.fastaccess.data.dao.wiki.WikiContentModel import com.fastaccess.helper.BundleConstant import com.fastaccess.helper.Bundler +import com.fastaccess.helper.Logger +import com.fastaccess.provider.scheme.LinkParserHelper import com.fastaccess.ui.base.BaseActivity import com.fastaccess.ui.modules.repos.RepoPagerActivity import com.fastaccess.ui.widgets.StateLayout @@ -50,7 +53,15 @@ class WikiActivity : BaseActivity(), WikiMvp.View { loadMenu() } if (wiki.content != null) { - webView.setGithubContent(wiki.content, null, true) + val baseUrl = Uri.Builder().scheme("https") + .authority(LinkParserHelper.HOST_DEFAULT) + .appendPath(presenter.login) + .appendPath(presenter.repoId) + .appendPath("wiki") + .build() + .toString() + Logger.e(baseUrl) + webView.setWikiContent(wiki.content, baseUrl) } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiPresenter.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiPresenter.kt index a24b6ee3..ade9458a 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiPresenter.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiPresenter.kt @@ -59,6 +59,7 @@ class WikiPresenter : BasePresenter(), WikiMvp.Presenter { if (revision.isNotEmpty()) { revision.remove() } + wikiWrapper.select(".js-wiki-more-pages-link").remove() val header = "
${headerHtml.html()}
" val wikiContent = wikiWrapper.select(".wiki-content") val content = header + wikiContent.select(".markdown-body").html() diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java index 77b53600..0db19933 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java @@ -147,9 +147,6 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement else getPreferenceScreen().addPreference(signatureVia); return true; - } else if (preference.getKey().equalsIgnoreCase("enable_ads")) { - callback.onThemeChanged(); - return true; } return false; } @@ -274,7 +271,6 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement private void addBehaviour() { addPreferencesFromResource(R.xml.behaviour_settings); findPreference("sent_via_enabled").setOnPreferenceChangeListener(this); - findPreference("enable_ads").setOnPreferenceChangeListener(this); signatureVia = findPreference("sent_via"); if (PrefHelper.getBoolean("sent_via_enabled")) { signatureVia.setDefaultValue(false); diff --git a/app/src/main/java/com/prettifier/pretty/PrettifyWebView.java b/app/src/main/java/com/prettifier/pretty/PrettifyWebView.java index 1aedc34d..ee0bbfd2 100644 --- a/app/src/main/java/com/prettifier/pretty/PrettifyWebView.java +++ b/app/src/main/java/com/prettifier/pretty/PrettifyWebView.java @@ -178,9 +178,15 @@ public class PrettifyWebView extends NestedWebView { setGithubContent(source, baseUrl, toggleNestScrolling, true); } + public void setWikiContent(@NonNull String source, @Nullable String baseUrl) { + addJavascriptInterface(new MarkDownInterceptorInterface(this, true), "Android"); + String page = GithubHelper.generateContent(getContext(), source, baseUrl, AppHelper.isNightMode(getResources()), true); + post(() -> loadDataWithBaseURL("file:///android_asset/md/", page, "text/html", "utf-8", null)); + } + public void setGithubContent(@NonNull String source, @Nullable String baseUrl, boolean toggleNestScrolling, boolean enableBridge) { if (enableBridge) addJavascriptInterface(new MarkDownInterceptorInterface(this, toggleNestScrolling), "Android"); - String page = GithubHelper.generateContent(getContext(), source, baseUrl, AppHelper.isNightMode(getResources())); + String page = GithubHelper.generateContent(getContext(), source, baseUrl, AppHelper.isNightMode(getResources()), false); post(() -> loadDataWithBaseURL("file:///android_asset/md/", page, "text/html", "utf-8", null)); } diff --git a/app/src/main/java/com/prettifier/pretty/helper/GithubHelper.java b/app/src/main/java/com/prettifier/pretty/helper/GithubHelper.java index e9bf8bca..7dbee765 100644 --- a/app/src/main/java/com/prettifier/pretty/helper/GithubHelper.java +++ b/app/src/main/java/com/prettifier/pretty/helper/GithubHelper.java @@ -9,27 +9,29 @@ import com.fastaccess.data.dao.NameParser; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.ViewHelper; +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; +import org.jsoup.select.Elements; + import java.util.ArrayList; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /** * Created by Kosh on 25 Dec 2016, 9:12 PM */ public class GithubHelper { - private static Pattern LINK_TAG_MATCHER = Pattern.compile("href=\"(.*?)\""); - private static Pattern IMAGE_TAG_MATCHER = Pattern.compile("src=\"(.*?)\""); - @NonNull public static String generateContent(@NonNull Context context, @NonNull String source, @Nullable String baseUrl, boolean dark) { + @NonNull public static String generateContent(@NonNull Context context, @NonNull String source, + @Nullable String baseUrl, boolean dark, boolean isWiki) { if (baseUrl == null) { return mergeContent(context, source, dark); } else { - return mergeContent(context, validateImageBaseUrl(source, baseUrl), dark); + return mergeContent(context, parseReadme(source, baseUrl, isWiki), dark); } } - @NonNull private static String validateImageBaseUrl(@NonNull String source, @NonNull String baseUrl) { + @NonNull private static String parseReadme(@NonNull String source, @NonNull String baseUrl, boolean isWiki) { NameParser nameParser = new NameParser(baseUrl); String owner = nameParser.getUsername(); String repoName = nameParser.getName(); @@ -50,29 +52,48 @@ public class GithubHelper { builder.append(path).append("/"); } } - Matcher matcher = IMAGE_TAG_MATCHER.matcher(source); - while (matcher.find()) { - String src = matcher.group(1).trim(); - if (src.startsWith("http://") || src.startsWith("https://")) { - continue; - } - String finalSrc; - if (src.startsWith("/" + owner + "/" + repoName)) { - finalSrc = "https://raw.githubusercontent.com/" + src; - } else { - finalSrc = "https://raw.githubusercontent.com/" + builder.toString() + src; - } - source = source.replace("src=\"" + src + "\"", "src=\"" + finalSrc - .replace("raw/", "master/").replaceAll("//", "/") + "\""); - } - return validateLinks(source, baseUrl); + String baseLinkUrl = !isWiki ? getLinkBaseUrl(baseUrl) : baseUrl; + return getParsedHtml(source, owner, repoName, !isWiki ? builder.toString() : baseUrl, baseLinkUrl, isWiki); } - @NonNull private static String validateLinks(@NonNull String source, @NonNull String baseUrl) { + @NonNull private static String getParsedHtml(@NonNull String source, String owner, String repoName, + String builder, String baseLinkUrl, boolean isWiki) { + Document document = Jsoup.parse(source + .replaceAll("<", "<") + .replaceAll(">", ">"), ""); + Elements imageElements = document.getElementsByTag("img"); + if (imageElements != null && !imageElements.isEmpty()) { + for (Element element : imageElements) { + String src = element.attr("src"); + if (src != null && !(src.startsWith("http://") || src.startsWith("https://"))) { + String finalSrc; + if (src.startsWith("/" + owner + "/" + repoName)) { + finalSrc = "https://raw.githubusercontent.com/" + src; + } else { + finalSrc = "https://raw.githubusercontent.com/" + builder + src; + } + element.attr("src", finalSrc); + } + } + } + Elements linkElements = document.getElementsByTag("a"); + if (linkElements != null && !linkElements.isEmpty()) { + for (Element element : linkElements) { + String href = element.attr("href"); + if (href.startsWith("#") || href.startsWith("http://") || href.startsWith("https://") || href.startsWith("mailto:")) { + continue; + } + element.attr("href", baseLinkUrl + (isWiki && href.startsWith("wiki") + ? href.replaceFirst("wiki", "") : href)); + } + } + return document.html(); + } + + @NonNull private static String getLinkBaseUrl(@NonNull String baseUrl) { NameParser nameParser = new NameParser(baseUrl); String owner = nameParser.getUsername(); String repoName = nameParser.getName(); - Matcher matcher = LINK_TAG_MATCHER.matcher(source); Uri uri = Uri.parse(baseUrl); ArrayList paths = new ArrayList<>(uri.getPathSegments()); StringBuilder builder = new StringBuilder(); @@ -88,15 +109,7 @@ public class GithubHelper { builder.append(path).append("/"); } } - while (matcher.find()) { - String href = matcher.group(1).trim(); - if (href.startsWith("#") || href.startsWith("http://") || href.startsWith("https://") || href.startsWith("mailto:")) { - continue; - } - String link = builder.toString() + "" + href; - source = source.replace("href=\"" + href + "\"", "href=\"" + link + "\""); - } - return source; + return builder.toString(); } @NonNull private static String mergeContent(@NonNull Context context, @NonNull String source, boolean dark) { From 6d4fc1e6efd7e8926303a881138452ed0f600244 Mon Sep 17 00:00:00 2001 From: kosh Date: Sat, 29 Jul 2017 13:35:27 +0800 Subject: [PATCH 05/67] this commit fixes #635 , fixes #808, fixes #802 this commit adds a faster way of replying by long pressing on the menu icon this commit also adds wiki footer. --- .../data/dao/types/ReactionTypes.java | 10 ++-- .../viewholder/CommentsViewHolder.java | 1 + .../TimelineCommentsViewHolder.java | 1 + .../filter/issues/FilterIssuesActivity.java | 52 +++++++++--------- .../gist/comments/GistCommentsPresenter.java | 10 +++- .../comments/CommitCommentsPresenter.java | 15 +++-- .../details/files/CommitFilesSingleton.java | 2 +- .../issue/details/IssuePagerPresenter.java | 7 +-- .../timeline/IssueTimelinePresenter.java | 29 ++++++---- .../PullRequestTimelinePresenter.java | 6 ++ .../ui/modules/repos/wiki/WikiPresenter.kt | 13 ++--- .../ui/modules/search/SearchActivity.java | 6 +- .../repos/files/SearchFileActivity.java | 53 +++++++++--------- .../modules/theme/fragment/ThemeFragment.kt | 55 ++++++++----------- .../layout/activity_search_file.xml | 20 +++++-- .../layout/filter_issues_prs_layout.xml | 20 +++++-- .../main_layouts/layout/search_layout.xml | 18 ++++-- .../row_layouts/layout/comments_row_item.xml | 2 +- .../layout/no_emojies_comments_row_item.xml | 1 + .../layout/review_comments_row_item.xml | 2 +- 20 files changed, 179 insertions(+), 144 deletions(-) diff --git a/app/src/main/java/com/fastaccess/data/dao/types/ReactionTypes.java b/app/src/main/java/com/fastaccess/data/dao/types/ReactionTypes.java index bc2c0c09..306bbf3a 100644 --- a/app/src/main/java/com/fastaccess/data/dao/types/ReactionTypes.java +++ b/app/src/main/java/com/fastaccess/data/dao/types/ReactionTypes.java @@ -3,6 +3,7 @@ package com.fastaccess.data.dao.types; import android.support.annotation.IdRes; import android.support.annotation.Nullable; +import com.annimon.stream.Stream; import com.fastaccess.R; /** @@ -35,10 +36,9 @@ public enum ReactionTypes { } @Nullable public static ReactionTypes get(@IdRes int vId) { - for (ReactionTypes type : ReactionTypes.values()) { - if (type.vId == vId) return type; - } - - return null; + return Stream.of(values()) + .filter(value -> value.getvId() == vId) + .findFirst() + .orElse(null); } } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java index ec13039b..f6460677 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java @@ -46,6 +46,7 @@ public class CommentsViewHolder extends BaseViewHolder { itemView.setOnLongClickListener(null); toggleHolder.setOnClickListener(this); toggle.setOnClickListener(this); + toggle.setOnLongClickListener(this); } public static CommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter) { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java index 7edd793f..1d4efa42 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java @@ -89,6 +89,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder { itemView.setOnClickListener(null); itemView.setOnLongClickListener(null); commentMenu.setOnClickListener(this); + commentMenu.setOnLongClickListener(this); toggleHolder.setOnClickListener(this); toggle.setOnClickListener(this); laugh.setOnClickListener(this); diff --git a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java index e4515912..37e85897 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java @@ -9,10 +9,8 @@ import android.os.Bundle; import android.os.Handler; import android.support.annotation.NonNull; import android.text.Editable; -import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; -import android.view.inputmethod.EditorInfo; import android.widget.PopupWindow; import android.widget.Toast; @@ -226,6 +224,31 @@ public class FilterIssuesActivity extends BaseActivity implemen } @Override public void onItemLongClick(int position, View v, Comment item) { - if (item.getUser() != null && TextUtils.equals(item.getUser().getLogin(), Login.getUser().getLogin())) { - if (getView() != null) getView().onShowDeleteMsg(item.getId()); + if (v.getId() == R.id.toggle) { + if (getView() != null) getView().onReply(item.getUser(), item.getBody()); } else { - onItemClick(position, v, item); + if (item.getUser() != null && TextUtils.equals(item.getUser().getLogin(), Login.getUser().getLogin())) { + if (getView() != null) getView().onShowDeleteMsg(item.getId()); + } else { + onItemClick(position, v, item); + } } } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java index c1cffffc..f374e6b4 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java @@ -163,12 +163,17 @@ class CommitCommentsPresenter extends BasePresenter impl } } - @Override public void onItemLongClick(int position, View v, TimelineModel item) { - ReactionTypes reactionTypes = ReactionTypes.get(v.getId()); - if (reactionTypes != null) { - if (getView() != null) getView().showReactionsPopup(reactionTypes, login, repoId, item.getComment().getId()); + @Override public void onItemLongClick(int position, View v, TimelineModel timelineModel) { + if (v.getId() == R.id.commentMenu) { + Comment item = timelineModel.getComment(); + if (getView() != null) getView().onReply(item.getUser(), item.getBody()); } else { - onItemClick(position, v, item); + ReactionTypes reactionTypes = ReactionTypes.get(v.getId()); + if (reactionTypes != null) { + if (getView() != null) getView().showReactionsPopup(reactionTypes, login, repoId, timelineModel.getComment().getId()); + } else { + onItemClick(position, v, timelineModel); + } } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesSingleton.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesSingleton.java index 69c79ada..53d2b166 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesSingleton.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/files/CommitFilesSingleton.java @@ -25,7 +25,7 @@ class CommitFilesSingleton { private CommitFilesSingleton() {} void putFiles(@NonNull String id, @NonNull CommitFileListModel commitFiles) { - files.clear(); + clear(); files.put(id, commitFiles); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/IssuePagerPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/IssuePagerPresenter.java index 7e6254e5..6a522058 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/IssuePagerPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/IssuePagerPresenter.java @@ -142,16 +142,15 @@ class IssuePagerPresenter extends BasePresenter implements I manageDisposable(RxHelper.getObservable(RestProvider.getIssueService(isEnterprise()).editIssue(login, repoId, issueNumber, requestModel)) .doOnSubscribe(disposable -> sendToView(view -> view.showProgress(0))) - .doOnNext(issue -> { + .subscribe(issue -> { if (issue != null) { sendToView(view -> view.showSuccessIssueActionMsg(currentIssue.getState() == IssueState.open)); issue.setRepoId(issueModel.getRepoId()); issue.setLogin(issueModel.getLogin()); issueModel = issue; - sendToView(view -> view.onSetupIssue(true)); + sendToView(view -> view.onSetupIssue(false)); } - }) - .subscribe(issue -> {/**/}, this::onError)); + }, this::onError)); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index d9e44c7d..87f34c0e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -128,20 +128,25 @@ import lombok.Getter; @Override public void onItemLongClick(int position, View v, TimelineModel item) { if (getView() == null) return; if (item.getType() == TimelineModel.COMMENT || item.getType() == TimelineModel.HEADER) { - if (getView().getIssue() == null) return; - Issue issue = getView().getIssue(); - String login = issue.getLogin(); - String repoId = issue.getRepoId(); - if (!InputHelper.isEmpty(login) && !InputHelper.isEmpty(repoId)) { - ReactionTypes type = ReactionTypes.get(v.getId()); - if (type != null) { - if (item.getType() == TimelineModel.HEADER) { - getView().showReactionsPopup(type, login, repoId, item.getIssue().getNumber(), true); + if (v.getId() == R.id.commentMenu && item.getType() == TimelineModel.COMMENT) { + Comment comment = item.getComment(); + if (getView() != null) getView().onReply(comment.getUser(), comment.getBody()); + } else { + if (getView().getIssue() == null) return; + Issue issue = getView().getIssue(); + String login = issue.getLogin(); + String repoId = issue.getRepoId(); + if (!InputHelper.isEmpty(login) && !InputHelper.isEmpty(repoId)) { + ReactionTypes type = ReactionTypes.get(v.getId()); + if (type != null) { + if (item.getType() == TimelineModel.HEADER) { + getView().showReactionsPopup(type, login, repoId, item.getIssue().getNumber(), true); + } else { + getView().showReactionsPopup(type, login, repoId, item.getComment().getId(), false); + } } else { - getView().showReactionsPopup(type, login, repoId, item.getComment().getId(), false); + onItemClick(position, v, item); } - } else { - onItemClick(position, v, item); } } } else { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index f723677c..e9946b5a 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -114,6 +114,12 @@ public class PullRequestTimelinePresenter extends BasePresenter(), WikiMvp.Presenter { val wikiWrapper = document.select("#wiki-wrapper") if (wikiWrapper.isNotEmpty()) { val cloneUrl = wikiWrapper.select(".clone-url") - val bottomRightBar = wikiWrapper.select(".wiki-custom-sidebar") +// val bottomRightBar = wikiWrapper.select(".wiki-custom-sidebar") if (cloneUrl.isNotEmpty()) { cloneUrl.remove() } - if (bottomRightBar.isNotEmpty()) { - bottomRightBar.remove() - } +// if (bottomRightBar.isNotEmpty()) { +// bottomRightBar.remove() +// } val headerHtml = wikiWrapper.select(".gh-header .gh-header-meta") val revision = headerHtml.select("a.history") if (revision.isNotEmpty()) { revision.remove() } - wikiWrapper.select(".js-wiki-more-pages-link").remove() val header = "
${headerHtml.html()}
" val wikiContent = wikiWrapper.select(".wiki-content") - val content = header + wikiContent.select(".markdown-body").html() + val content = header + wikiContent.select(".wiki-body").html() val rightBarList = wikiContent.select(".wiki-pages").select("li") val sidebarList = arrayListOf() if (rightBarList.isNotEmpty()) { @@ -72,7 +70,6 @@ class WikiPresenter : BasePresenter(), WikiMvp.Presenter { sidebarList.add(WikiSideBarModel(sidebarTitle, sidebarLink)) } } - Logger.d(header) s.onNext(WikiContentModel(content, "", sidebarList)) } else { s.onNext(WikiContentModel("

No Wiki

", "", arrayListOf())) diff --git a/app/src/main/java/com/fastaccess/ui/modules/search/SearchActivity.java b/app/src/main/java/com/fastaccess/ui/modules/search/SearchActivity.java index 3b5c9697..e6b12434 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/search/SearchActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/search/SearchActivity.java @@ -60,8 +60,12 @@ public class SearchActivity extends BaseActivity { - setTheme(getString(R.string.light_theme_mode)) - } - R.style.ThemeDark -> { - setTheme(getString(R.string.dark_theme_mode)) - } - R.style.ThemeAmlod -> { - if (!isGoogleSupported()) return - if (PrefGetter.isAmlodEnabled() || PrefGetter.isProEnabled()) { - setTheme(getString(R.string.amlod_theme_mode)) - } else { - DonateActivity.start(this, getString(R.string.amlod_theme_purchase)) - } - } - R.style.ThemeMidNighBlue -> { - if (!isGoogleSupported()) return - if (PrefGetter.isMidNightBlueThemeEnabled() || PrefGetter.isProEnabled()) { - setTheme(getString(R.string.mid_night_blue_theme_mode)) - } else { - DonateActivity.start(this, getString(R.string.midnight_blue_theme_purchase)) - } - } - R.style.ThemeBluish -> { - if (!isGoogleSupported()) return - if (PrefGetter.isBluishEnabled() || PrefGetter.isProEnabled()) { - setTheme(getString(R.string.bluish_theme)) - } else { - DonateActivity.start(this, getString(R.string.theme_bluish_purchase)) - } - } + R.style.ThemeLight -> setTheme(getString(R.string.light_theme_mode)) + R.style.ThemeDark -> setTheme(getString(R.string.dark_theme_mode)) + R.style.ThemeAmlod -> applyAmlodTheme() + R.style.ThemeBluish -> applyBluishTheme() + } + } + + private fun applyBluishTheme() { + if (!isGoogleSupported()) return + if (PrefGetter.isBluishEnabled() || PrefGetter.isProEnabled()) { + setTheme(getString(R.string.bluish_theme)) + } else { + DonateActivity.start(this, getString(R.string.theme_bluish_purchase)) + } + } + + private fun applyAmlodTheme() { + if (!isGoogleSupported()) return + if (PrefGetter.isAmlodEnabled() || PrefGetter.isProEnabled()) { + setTheme(getString(R.string.amlod_theme_mode)) + } else { + DonateActivity.start(this, getString(R.string.amlod_theme_purchase)) } } @@ -149,7 +140,7 @@ class ThemeFragment : BaseFragment + + - + android:background="?selectableItemBackgroundBorderless" + android:contentDescription="@string/search" + android:padding="@dimen/spacing_micro" + android:src="@drawable/ic_search"/> diff --git a/app/src/main/res/layouts/main_layouts/layout/filter_issues_prs_layout.xml b/app/src/main/res/layouts/main_layouts/layout/filter_issues_prs_layout.xml index 16a18c1d..ba83f9cf 100644 --- a/app/src/main/res/layouts/main_layouts/layout/filter_issues_prs_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/filter_issues_prs_layout.xml @@ -33,10 +33,10 @@ + android:orientation="horizontal"> + android:visibility="gone"/> + + diff --git a/app/src/main/res/layouts/main_layouts/layout/search_layout.xml b/app/src/main/res/layouts/main_layouts/layout/search_layout.xml index e5eb0d6e..1c406f4e 100644 --- a/app/src/main/res/layouts/main_layouts/layout/search_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/search_layout.xml @@ -28,7 +28,8 @@ @@ -56,11 +56,19 @@ android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/clear" android:padding="@dimen/spacing_micro" - android:layout_marginEnd="@dimen/spacing_xs_large" - android:scaleType="centerCrop" android:src="@drawable/ic_clear" android:visibility="invisible"/> + + diff --git a/app/src/main/res/layouts/row_layouts/layout/comments_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/comments_row_item.xml index 581e4722..e5d8e4b9 100644 --- a/app/src/main/res/layouts/row_layouts/layout/comments_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/comments_row_item.xml @@ -85,7 +85,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:background="?selectableItemBackgroundBorderless" - android:contentDescription="@string/options" + android:contentDescription="@string/reactions" android:padding="@dimen/spacing_micro" android:src="@drawable/ic_add_emoji"/> diff --git a/app/src/main/res/layouts/row_layouts/layout/no_emojies_comments_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/no_emojies_comments_row_item.xml index d148d771..fda14300 100644 --- a/app/src/main/res/layouts/row_layouts/layout/no_emojies_comments_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/no_emojies_comments_row_item.xml @@ -61,6 +61,7 @@ android:layout_gravity="center" android:layout_marginStart="@dimen/spacing_micro" android:background="?selectableItemBackgroundBorderless" + android:contentDescription="@string/options" android:padding="@dimen/spacing_normal" android:src="@drawable/ic_overflow"/> diff --git a/app/src/main/res/layouts/row_layouts/layout/review_comments_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/review_comments_row_item.xml index 7f4b3ef0..a24c2922 100644 --- a/app/src/main/res/layouts/row_layouts/layout/review_comments_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/review_comments_row_item.xml @@ -85,7 +85,7 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:background="?selectableItemBackgroundBorderless" - android:contentDescription="@string/options" + android:contentDescription="@string/reactions" android:padding="@dimen/spacing_micro" android:src="@drawable/ic_add_emoji"/> From a224472bb3c68e6f902b58487da52b0e4d0225d9 Mon Sep 17 00:00:00 2001 From: kosh Date: Mon, 31 Jul 2017 10:00:21 +0800 Subject: [PATCH 06/67] this commit fixes #827 --- .github/CONTRIBUTING.md | 2 +- .github/ISSUE_TEMPLATE.md | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 44f7b2c1..f04ac7ae 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,6 +1,6 @@ # How to contribute & build *FastHub* -If you have a question in mind, feel free to come our public [Slack](https://rebrand.ly/fasthub) channel. +If you have a question in mind, feel free to come our public [Slack](http://rebrand.ly/fasthub-slack) channel. ### Optional diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 42e9e92c..b65fbe6e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -4,7 +4,7 @@ - Make sure that you are always on the latest version. - Search issue before submitting a new one. - Public Slack channel: https://rebrand.ly/fasthub + Public Slack channel: https://rebrand.ly/fasthub-slack --> **FastHub Version:** <> diff --git a/README.md b/README.md index add1625b..f4304eef 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Build Status](https://travis-ci.org/k0shk0sh/FastHub.svg?branch=master)](https://travis-ci.org/k0shk0sh/FastHub) [![Build status](https://ci.appveyor.com/api/projects/status/2yhxx7hu6hju24bk?svg=true)](https://ci.appveyor.com/project/k0shk0sh/fasthub) -[![Releases](https://img.shields.io/github/release/k0shk0sh/FastHub.svg)](https://github.com/k0shk0sh/FastHub/releases/latest) [![Slack](https://img.shields.io/badge/slack-join-e01563.svg)](http://rebrand.ly/fasthub) +[![Releases](https://img.shields.io/github/release/k0shk0sh/FastHub.svg)](https://github.com/k0shk0sh/FastHub/releases/latest) [![Slack](https://img.shields.io/badge/slack-join-e01563.svg)](http://rebrand.ly/fasthub-slack) ![Logo](/.github/assets/feature_graphic.png?raw=true "Logo") From 19b01c4db740898f235d20b0526906dabec1252a Mon Sep 17 00:00:00 2001 From: kosh Date: Mon, 31 Jul 2017 10:15:11 +0800 Subject: [PATCH 07/67] added hr and made md editor to have same syntax as in github --- app/build.gradle | 7 ++- .../provider/markdown/MarkDownProvider.java | 48 ++++++++++++++++++- .../provider/timeline/HtmlHelper.java | 8 ++-- .../timeline/handler/EmojiHandler.java | 3 +- .../provider/timeline/handler/HrHandler.java | 28 +++++++++++ .../timeline/handler/UnderLineSpan.java | 38 +++++++++++++++ .../ui/widgets/SpannableBuilder.java | 5 ++ .../main_layouts/layout/editor_layout.xml | 5 +- build.gradle | 1 + 9 files changed, 131 insertions(+), 12 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java create mode 100644 app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java diff --git a/app/build.gradle b/app/build.gradle index 46991f4c..4e04ad97 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -145,7 +145,12 @@ dependencies { implementation 'com.github.nightwhistler:HtmlSpanner:0.4' implementation 'net.sourceforge.htmlcleaner:htmlcleaner:2.2' implementation 'com.github.matthiasrobbers:shortbread:1.0.1' - implementation 'com.atlassian.commonmark:commonmark:0.9.0' + implementation "com.atlassian.commonmark:commonmark:${commonmark}" + implementation "com.atlassian.commonmark:commonmark-ext-autolink:${commonmark}" + implementation "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:${commonmark}" + implementation "com.atlassian.commonmark:commonmark-ext-gfm-tables:${commonmark}" + implementation "com.atlassian.commonmark:commonmark-ext-ins:${commonmark}" + implementation "com.atlassian.commonmark:commonmark-ext-yaml-front-matter:${commonmark}" implementation "com.google.firebase:firebase-messaging:${gms}" implementation "com.google.android.gms:play-services-ads:${gms}" implementation "com.google.firebase:firebase-database:${gms}" diff --git a/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java b/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java index 42c0fe70..48ae3983 100644 --- a/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java +++ b/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java @@ -9,11 +9,25 @@ import android.widget.TextView; import com.annimon.stream.IntStream; import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.Logger; import com.fastaccess.provider.timeline.HtmlHelper; +import org.commonmark.ext.autolink.AutolinkExtension; +import org.commonmark.ext.front.matter.YamlFrontMatterExtension; +import org.commonmark.ext.gfm.strikethrough.StrikethroughExtension; +import org.commonmark.ext.gfm.tables.TablesExtension; +import org.commonmark.ext.ins.InsExtension; +import org.commonmark.node.IndentedCodeBlock; import org.commonmark.node.Node; import org.commonmark.parser.Parser; +import org.commonmark.renderer.NodeRenderer; +import org.commonmark.renderer.html.HtmlNodeRendererContext; import org.commonmark.renderer.html.HtmlRenderer; +import org.commonmark.renderer.html.HtmlWriter; + +import java.util.Arrays; +import java.util.Collections; +import java.util.Set; /** * Created by Kosh on 24 Nov 2016, 7:43 PM @@ -37,7 +51,15 @@ public class MarkDownProvider { if (!InputHelper.isEmpty(markdown)) { Parser parser = Parser.builder().build(); Node node = parser.parse(markdown); - HtmlHelper.htmlIntoTextView(textView, HtmlRenderer.builder().build().render(node)); + String rendered = HtmlRenderer.builder() + .extensions(Arrays.asList(AutolinkExtension.create(), + StrikethroughExtension.create(), + TablesExtension.create(), + InsExtension.create(), + YamlFrontMatterExtension.create())) + .build().render(node); + Logger.e(rendered); + HtmlHelper.htmlIntoTextView(textView, rendered); } } @@ -125,7 +147,7 @@ public class MarkDownProvider { int selectionStart = editText.getSelectionStart(); int selectionEnd = editText.getSelectionEnd(); String substring = source.substring(selectionStart, selectionEnd); - String result = "__" + substring + "__ "; + String result = "**" + substring + "** "; editText.getText().replace(selectionStart, selectionEnd, result); editText.setSelection(result.length() + selectionStart - 3); @@ -259,4 +281,26 @@ public class MarkDownProvider { return false; } + + private static class IndentedCodeBlockNodeRenderer implements NodeRenderer { + + private final HtmlWriter html; + + IndentedCodeBlockNodeRenderer(HtmlNodeRendererContext context) { + this.html = context.getWriter(); + } + + @Override public Set> getNodeTypes() { + return Collections.singleton(IndentedCodeBlock.class); + } + + @Override public void render(Node node) { + IndentedCodeBlock codeBlock = (IndentedCodeBlock) node; + html.line(); + html.tag("pre"); + html.text(codeBlock.getLiteral()); + html.tag("/pre"); + html.line(); + } + } } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java index 658a2724..f409b00a 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java @@ -23,6 +23,7 @@ import com.fastaccess.provider.scheme.SchemeParser; import com.fastaccess.provider.timeline.handler.BetterLinkMovementExtended; import com.fastaccess.provider.timeline.handler.DrawableHandler; import com.fastaccess.provider.timeline.handler.EmojiHandler; +import com.fastaccess.provider.timeline.handler.HrHandler; import com.fastaccess.provider.timeline.handler.ItalicHandler; import com.fastaccess.provider.timeline.handler.LinkHandler; import com.fastaccess.provider.timeline.handler.ListsHandler; @@ -108,6 +109,7 @@ public class HtmlHelper { mySpanner.registerHandler("sub", new SubScriptHandler()); mySpanner.registerHandler("sup", new SuperScriptHandler()); mySpanner.registerHandler("a", new LinkHandler()); + mySpanner.registerHandler("hr", new HrHandler(windowBackground, textView.getWidth())); TableHandler tableHandler = new TableHandler(); tableHandler.setTextColor(ViewHelper.generateTextColor(windowBackground)); WindowManager windowManager = (WindowManager) App.getInstance().getSystemService(Context.WINDOW_SERVICE); @@ -119,7 +121,7 @@ public class HtmlHelper { return mySpanner; } - @ColorInt public static int getWindowBackground(@PrefGetter.ThemeType int theme) { + @ColorInt static int getWindowBackground(@PrefGetter.ThemeType int theme) { switch (theme) { case PrefGetter.AMLOD: return Color.parseColor("#0B162A"); @@ -144,10 +146,6 @@ public class HtmlHelper { private static final String SIGNATURE_END = ""; - private static final String EMAIL_START = "
"; - - private static final String EMAIL_END = "
"; - private static final String HIDDEN_REPLY_START = "
"; private static final String HIDDEN_REPLY_END = "
"; diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/EmojiHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/EmojiHandler.java index 95285615..289dddc1 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/EmojiHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/EmojiHandler.java @@ -2,7 +2,6 @@ package com.fastaccess.provider.timeline.handler; import android.text.SpannableStringBuilder; -import com.fastaccess.helper.InputHelper; import com.fastaccess.provider.emoji.Emoji; import com.fastaccess.provider.emoji.EmojiManager; @@ -18,7 +17,7 @@ public class EmojiHandler extends TagNodeHandler { @Override public void handleTagNode(TagNode node, SpannableStringBuilder builder, int start, int end) { String emoji = node.getAttributeByName("alias"); - if (!InputHelper.isEmpty(emoji)) { + if (emoji != null) { Emoji unicode = EmojiManager.getForAlias(emoji); if (unicode != null && unicode.getUnicode() != null) { builder.replace(start, end, unicode.getUnicode()); diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java new file mode 100644 index 00000000..68e5536b --- /dev/null +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java @@ -0,0 +1,28 @@ +package com.fastaccess.provider.timeline.handler; + +import android.text.SpannableStringBuilder; +import android.text.Spanned; + +import net.nightwhistler.htmlspanner.TagNodeHandler; + +import org.htmlcleaner.TagNode; + +import lombok.AllArgsConstructor; + +/** + * Created by kosh on 30/07/2017. + */ + +@AllArgsConstructor public class HrHandler extends TagNodeHandler { + + private final int color; + private final int width; + + + @Override public void handleTagNode(TagNode tagNode, SpannableStringBuilder spannableStringBuilder, int i, int i1) { + spannableStringBuilder.append(" "); + spannableStringBuilder.setSpan(new UnderLineSpan(color, width), i, i1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + spannableStringBuilder.append("\n"); + } + +} diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java new file mode 100644 index 00000000..2cf4a003 --- /dev/null +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java @@ -0,0 +1,38 @@ +package com.fastaccess.provider.timeline.handler; + +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.drawable.ColorDrawable; +import android.graphics.drawable.Drawable; +import android.support.annotation.NonNull; +import android.text.style.LineHeightSpan; +import android.text.style.ReplacementSpan; + +public class UnderLineSpan extends ReplacementSpan implements LineHeightSpan { + + private final int height = 5; + private int width; + private final Drawable drawable; + + UnderLineSpan(int color, int width) { + this.width = width; + this.drawable = new ColorDrawable(color); + } + + @Override public int getSize(@NonNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { + return (int) paint.measureText(text, start, end); + } + + @Override public void draw(@NonNull Canvas canvas, CharSequence text, int start, int end, float x, int top, + int y, int bottom, @NonNull Paint paint) { + drawable.setBounds((int) x, bottom - height, (int) x + width, bottom); + drawable.draw(canvas); + } + + @Override public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) { + fm.top /= 3; + fm.ascent /= 3; + fm.bottom /= 3; + fm.descent /= 3; + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java b/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java index 026d1ad4..fa9ecb9d 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/SpannableBuilder.java @@ -49,6 +49,11 @@ public class SpannableBuilder extends SpannableStringBuilder { return this; } + public SpannableBuilder append(Object span) { + setSpan(span, length() - 1, length(), SPAN_EXCLUSIVE_EXCLUSIVE); + return this; + } + public SpannableBuilder append(Drawable drawable) { if (drawable != null) { drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); diff --git a/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml b/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml index 631b05a5..d32ce81d 100644 --- a/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml @@ -4,12 +4,13 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" - android:id="@+id/parentView"> + android:background="?card_background" + android:orientation="vertical"> Date: Tue, 1 Aug 2017 10:49:24 +0800 Subject: [PATCH 08/67] added graphql integration preparing for massive reimplementation --- .travis.yml | 9 +- app/build.gradle | 2 + .../graphql/pr/PullRequestTimeline.graphql | 164 + app/src/main/graphql/pr/schema.json | 34201 ++++++++++++++++ app/src/main/java/com/fastaccess/App.java | 13 + build.gradle | 1 + 6 files changed, 34388 insertions(+), 2 deletions(-) create mode 100644 app/src/main/graphql/pr/PullRequestTimeline.graphql create mode 100644 app/src/main/graphql/pr/schema.json diff --git a/.travis.yml b/.travis.yml index c16bd731..b6e6d77e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,5 +27,10 @@ after_success: - bash <(curl -s https://codecov.io/bash) notifications: - slack: fasthub:mjJWGD8UpgSgKawKa5OqMNlR - email: false + webhooks: + urls: + - https://discordapp.com/api/webhooks/341508199612153857/_86ddhBkrka3SaPzYJtL2LBH-sKeVI_tSAp0L2h4cPoy2m4CLa4lpqqJu4rjxHs86V0i + on_success: always + on_failure: always + on_start: never + email: false diff --git a/app/build.gradle b/app/build.gradle index 4e04ad97..4b16841e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: 'com.apollographql.android' apply plugin: 'kotlin-android' apply plugin: 'com.novoda.build-properties' apply plugin: 'jacoco-android' @@ -163,6 +164,7 @@ dependencies { implementation 'org.jsoup:jsoup:1.10.2' implementation "com.evernote:android-state:${state_version}" implementation "petrov.kristiyan:colorpicker-library:1.1.4" + implementation 'com.apollographql.apollo:apollo-rx2-support:0.4.0' compileOnly "org.projectlombok:lombok:${lombokVersion}" kapt "io.requery:requery-processor:${requery}" kapt "org.projectlombok:lombok:${lombokVersion}" diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql new file mode 100644 index 00000000..82c2fff1 --- /dev/null +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -0,0 +1,164 @@ +query PullRequestTimeline($owner: String!, $name: String!, $number: Int!){ + repository(owner: $owner, name: $name) { + pullRequest(number: $number) { + timeline(first: 30) { + pageInfo { + hasNextPage + startCursor + endCursor + } + edges { + cursor + } + totalCount + nodes { + __typename + ... on Commit { + committer { + user { + login + avatarUrl + url + } + } + oid + signature { + state + } + messageHeadlineHTML + status { + state + } + committedDate + url + } + ... on PullRequestReview { + bodyHTML + } + ... on IssueComment { + viewerCanUpdate + author { + login + avatarUrl + url + } + authorAssociation + createdAt + updatedAt + body + reactionGroups { + viewerHasReacted + content + users { + totalCount + } + } + } + ... on ReviewRequestedEvent { + actor { + login + avatarUrl + } + subject { + login + avatarUrl + } + } + ... on PullRequestReviewComment { + body + author { + login + } + } + ... on ClosedEvent { + commit { + oid + } + actor { + login + avatarUrl + } + } + ... on ReopenedEvent { + actor { + login + } + } + ... on ReferencedEvent { + actor { + login + } + isCrossRepository + isDirectReference + subject { + ... on Issue { + title + } + ... on PullRequest { + title + } + } + } + ... on LabeledEvent { + actor { + login + } + label { + color + name + } + } + ... on RenamedTitleEvent { + actor { + login + avatarUrl + } + previousTitle + currentTitle + } + ... on AssignedEvent { + createdAt + actor { + login + avatarUrl + } + user { + login + avatarUrl + } + } + ... on MergedEvent { + createdAt + actor { + login + } + commit { + oid + } + mergeRefName + } + ... on HeadRefDeletedEvent { + createdAt + actor { + login + avatarUrl + } + headRefName + } + ... on HeadRefRestoredEvent { + createdAt + actor { + login + avatarUrl + } + } + } + } + } + } + rateLimit { + cost + remaining + limit + } +} \ No newline at end of file diff --git a/app/src/main/graphql/pr/schema.json b/app/src/main/graphql/pr/schema.json new file mode 100644 index 00000000..0b9ea514 --- /dev/null +++ b/app/src/main/graphql/pr/schema.json @@ -0,0 +1,34201 @@ +{ + "data": { + "__schema": { + "queryType": { + "name": "Query" + }, + "mutationType": { + "name": "Mutation" + }, + "subscriptionType": null, + "types": [ + { + "kind": "OBJECT", + "name": "Query", + "description": "The query root of GitHub's GraphQL interface.", + "fields": [ + { + "name": "codeOfConduct", + "description": "Look up a code of conduct by its key", + "args": [ + { + "name": "key", + "description": "The code of conduct's key", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CodeOfConduct", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "codesOfConduct", + "description": "Look up a code of conduct by its key", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CodeOfConduct", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "Fetches an object given its ID.", + "args": [ + { + "name": "id", + "description": "ID of the object.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "Lookup nodes by a list of IDs.", + "args": [ + { + "name": "ids", + "description": "The list of node IDs.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": "Lookup a organization by login.", + "args": [ + { + "name": "login", + "description": "The organization's login.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rateLimit", + "description": "The client's rate limit information.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "RateLimit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "relay", + "description": "Hack to workaround https://github.com/facebook/relay/issues/112 re-exposing the root query object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Query", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Lookup a given repository by the owner and repository name.", + "args": [ + { + "name": "owner", + "description": "The login field of a user or organizationn", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of the repository", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositoryOwner", + "description": "Lookup a repository owner (ie. either a User or an Organization) by login.", + "args": [ + { + "name": "login", + "description": "The username to lookup the owner by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resource", + "description": "Lookup resource by a URL.", + "args": [ + { + "name": "url", + "description": "The URL.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "search", + "description": "Perform a search across resources.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "query", + "description": "The search string to look for.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "type", + "description": "The types of search items to search within.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SearchType", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SearchResultItemConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "topic", + "description": "Look up a topic by name.", + "args": [ + { + "name": "name", + "description": "The topic's name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Lookup a user by login.", + "args": [ + { + "name": "login", + "description": "The user's login.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewer", + "description": "The currently authenticated user.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Node", + "description": "An object with an ID.", + "fields": [ + { + "name": "id", + "description": "ID of the object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "AddedToProjectEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AssignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "BaseRefChangedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "BaseRefForcePushedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Blob", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Bot", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ClosedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommentDeletedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommitCommentThread", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ConvertedNoteToIssueEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DemilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DeployedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Deployment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DeploymentStatus", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Gist", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefDeletedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefForcePushedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefRestoredEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Label", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Language", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LockedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MentionedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MergedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MovedColumnsInProjectEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "OrganizationIdentityProvider", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProjectCard", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ProtectedBranch", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestCommit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewThread", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PushAllowance", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Reaction", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReferencedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Release", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReleaseAsset", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RemovedFromProjectEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RenamedTitleEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReopenedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RepositoryInvitation", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RepositoryTopic", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissalAllowance", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestRemovedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Status", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "StatusContext", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Tag", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Team", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Tree", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnassignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlockedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnsubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "ID", + "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "description": "Represents a type that can be retrieved by a URL.", + "fields": [ + { + "name": "resourcePath", + "description": "The HTML path to this resource.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The URL to this resource.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Bot", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MergedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestCommit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Release", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RepositoryTopic", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "URI", + "description": "An RFC 3986, RFC 3987, and RFC 6570 (level 4) compliant URI string.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "User", + "description": "A user is an individual's account on GitHub that owns repositories and can make new content.", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the user's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bio", + "description": "The user's public profile bio.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bioHTML", + "description": "The user's public profile bio as HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "company", + "description": "The user's public profile company.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "companyHTML", + "description": "The user's public profile company as HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contributedRepositories", + "description": "A list of repositories that the user recently contributed to.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "email", + "description": "The user's publicly visible profile email.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "followers", + "description": "A list of users the given user is followed by.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FollowerConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "following", + "description": "A list of users the given user is following.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FollowingConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gist", + "description": "Find gist by repo name.", + "args": [ + { + "name": "name", + "description": "The gist name to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Gist", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "gists", + "description": "A list of the Gists the user has created.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "Filters Gists according to privacy.", + "type": { + "kind": "ENUM", + "name": "GistPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for gists returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "GistOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GistConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isBountyHunter", + "description": "Whether or not this user is a participant in the GitHub Security Bug Bounty.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isCampusExpert", + "description": "Whether or not this user is a participant in the GitHub Campus Experts Program.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeveloperProgramMember", + "description": "Whether or not this user is a GitHub Developer Program member.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isEmployee", + "description": "Whether or not this user is a GitHub employee.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isHireable", + "description": "Whether or not the user has marked themselves as for hire.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isInvoiced", + "description": "Is the account billed through invoices?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isSiteAdmin", + "description": "Whether or not this user is a site administrator.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isViewer", + "description": "Whether or not this user is the viewing user.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issues", + "description": "A list of issues assocated with this user.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for issues returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the issues by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "IssueState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "location", + "description": "The user's public profile location.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "login", + "description": "The username used to login.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The user's public profile name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": "Find an organization by its login that the user belongs to.", + "args": [ + { + "name": "login", + "description": "The login of the organization to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizations", + "description": "A list of organizations the user belongs to.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrganizationConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pinnedRepositories", + "description": "A list of repositories this user has pinned to their profile", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequests", + "description": "A list of pull requests assocated with this user.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestState", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "headRefName", + "description": "The head ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "baseRefName", + "description": "The base ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for pull requests returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositories", + "description": "A list of repositories that the user owns.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "isFork", + "description": "If non-null, filters repositories according to whether they are forks of another repository", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Find Repository.", + "args": [ + { + "name": "name", + "description": "Name of Repository to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this user", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "starredRepositories", + "description": "Repositories the user has starred.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "ownedByViewer", + "description": "Filters starred repositories to only return repositories owned by the viewer.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "StarOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StarredRepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this user", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanFollow", + "description": "Whether or not the viewer is able to follow the user.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerIsFollowing", + "description": "Whether or not this user is followed by the viewer.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "watching", + "description": "A list of repositories the given user is watching.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "websiteUrl", + "description": "A URL pointing to the user's public website/blog.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Actor", + "description": "Represents an object which can take actions on GitHub. Typically a User or Bot.", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the actor's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "login", + "description": "The username of the actor.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this actor.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this actor.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Bot", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "String", + "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Int", + "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "description": "A repository contains the content for a project.", + "fields": [ + { + "name": "codeOfConduct", + "description": "Returns the code of conduct for this repository", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CodeOfConduct", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitComments", + "description": "A list of commit comments associated with the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "defaultBranchRef", + "description": "The Ref associated with the repository's default branch.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deployments", + "description": "Deployments associated with the repository", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "environments", + "description": "Environments to list deployments for", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DeploymentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The description of the repository.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionHTML", + "description": "The description of the repository rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "diskUsage", + "description": "The number of kilobytes this repository occupies on disk.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "forks", + "description": "A list of forked repositories.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasIssuesEnabled", + "description": "Indicates if the repository has issues feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasWikiEnabled", + "description": "Indicates if the repository has wiki feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageUrl", + "description": "The repository's URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isFork", + "description": "Identifies if the repository is a fork.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isLocked", + "description": "Indicates if the repository has been locked or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isMirror", + "description": "Identifies if the repository is a mirror.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": "Identifies if the repository is private.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issue", + "description": "Returns a single issue from the current repository by number.", + "args": [ + { + "name": "number", + "description": "The number for the issue to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issueOrPullRequest", + "description": "Returns a single issue-like object from the current repository by number.", + "args": [ + { + "name": "number", + "description": "The number for the issue to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "UNION", + "name": "IssueOrPullRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issues", + "description": "A list of issues that have been opened in the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for issues returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the issues by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "IssueState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Returns a single label by name", + "args": [ + { + "name": "name", + "description": "Label name", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Label", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labels", + "description": "A list of labels associated with the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "LabelConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "languages", + "description": "A list containing a breakdown of the language composition of the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "LanguageOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "LanguageConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "license", + "description": "The license associated with the repository", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lockReason", + "description": "The reason the repository has been locked.", + "args": [], + "type": { + "kind": "ENUM", + "name": "RepositoryLockReason", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mentionableUsers", + "description": "A list of Users that can be mentioned in the context of the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestone", + "description": "Returns a single milestone from the current repository by number.", + "args": [ + { + "name": "number", + "description": "The number for the milestone to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestones", + "description": "A list of milestones associated with the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MilestoneConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mirrorUrl", + "description": "The repository's original mirror URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nameWithOwner", + "description": "The repository's name with owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "object", + "description": "A Git object in the repository", + "args": [ + { + "name": "oid", + "description": "The Git object ID", + "type": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "expression", + "description": "A Git revision expression suitable for rev-parse", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The User owner of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parent", + "description": "The repository parent, if this is a fork.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "primaryLanguage", + "description": "The primary language of the repository's code.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Language", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "Find project by number.", + "args": [ + { + "name": "number", + "description": "The project number to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projects", + "description": "A list of projects under the owner.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for projects returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProjectOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "search", + "description": "Query to search projects by, currently only searching by name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the projects by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProjectState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsResourcePath", + "description": "The HTTP path listing repository's projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsUrl", + "description": "The HTTP URL listing repository's projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "protectedBranches", + "description": "A list of protected branches that are on this repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProtectedBranchConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "Returns a single pull request from the current repository by number.", + "args": [ + { + "name": "number", + "description": "The number for the pull request to be returned.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequests", + "description": "A list of pull requests that have been opened in the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestState", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "headRefName", + "description": "The head ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "baseRefName", + "description": "The base ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for pull requests returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pushedAt", + "description": "Identifies when the repository was last pushed to.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ref", + "description": "Fetch a given ref from the repository", + "args": [ + { + "name": "qualifiedName", + "description": "The ref to retrieve.Fully qualified matches are checked in order (`refs/heads/master`) before falling back onto checks for short name matches (`master`).", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "refs", + "description": "Fetch a list of refs from the repository", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "refPrefix", + "description": "A ref name prefix like `refs/heads/`, `refs/tags/`, etc.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The ordering direction.", + "type": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RefConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releases", + "description": "List of releases which are dependent on this repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReleaseConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositoryTopics", + "description": "A list of applied repository-topic associations for this repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryTopicConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stargazers", + "description": "A list of users who have starred this starrable.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "StarOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StargazerConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanAdminister", + "description": "Indicates whether the viewer has admin permissions on this repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanCreateProjects", + "description": "Can the current viewer create new projects on this owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanSubscribe", + "description": "Check if the viewer is able to change their subscription status for the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdateTopics", + "description": "Indicates whether the viewer can update the topics of this repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerHasStarred", + "description": "Returns a boolean indicating whether the viewing user has starred this starrable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerSubscription", + "description": "Identifies if the viewer is watching, not watching, or ignoring the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "watchers", + "description": "A list of users watching the repository.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ProjectOwner", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Starrable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryInfo", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "ProjectOwner", + "description": "Represents an owner of a Project.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "Find project by number.", + "args": [ + { + "name": "number", + "description": "The project number to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projects", + "description": "A list of projects under the owner.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for projects returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProjectOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "search", + "description": "Query to search projects by, currently only searching by name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the projects by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProjectState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsResourcePath", + "description": "The HTTP path listing owners projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsUrl", + "description": "The HTTP URL listing owners projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanCreateProjects", + "description": "Can the current viewer create new projects on this owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "Project", + "description": "Projects manage issues, pull requests and notes within a project owner.", + "fields": [ + { + "name": "body", + "description": "The project's description body.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The projects description body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "closedAt", + "description": "Identifities the date and time when the project was closed.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "columns", + "description": "List of columns in the project", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumnConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creator", + "description": "The actor who originally created the project.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The project's name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": "The project's number.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The project's owner. Currently limited to repositories and organizations.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "ProjectOwner", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this project", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Whether the project is open or closed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProjectState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this project", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "description": "Entities that can be updated.", + "fields": [ + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "Represents `true` or `false` values.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "DateTime", + "description": "An ISO-8601 encoded UTC date string.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProjectState", + "description": "State of the project; either 'open' or 'closed'", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "OPEN", + "description": "The project is open.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CLOSED", + "description": "The project is closed.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "HTML", + "description": "A string containing HTML code.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectColumnConnection", + "description": "The connection type for ProjectColumn.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumnEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectColumnEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectColumn", + "description": "A column inside a project.", + "fields": [ + { + "name": "cards", + "description": "List of cards in the column", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCardConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The project column's name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The project that contains this column.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectCardConnection", + "description": "The connection type for ProjectCard.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCardEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectCardEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProjectCard", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectCard", + "description": "A card in a project.", + "fields": [ + { + "name": "column", + "description": "The project column this card is associated under. A card may only belong to one\nproject column at a time. The column field will be null if the card is created\nin a pending state and has yet to be associated with a column. Once cards are\nassociated with a column, they will not become pending in the future.\n", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "content", + "description": "The card content item", + "args": [], + "type": { + "kind": "UNION", + "name": "ProjectCardItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creator", + "description": "The actor who created this card", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": "The card note", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The project that contains this card.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectColumn", + "description": "The column that contains this card.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use ProjectCard.column instead. The associated column will be null if the card is in a pending state." + }, + { + "name": "resourcePath", + "description": "The HTTP path for this card", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of ProjectCard", + "args": [], + "type": { + "kind": "ENUM", + "name": "ProjectCardState", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this card", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProjectCardState", + "description": "Various content states of a ProjectCard", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CONTENT_ONLY", + "description": "The card has content only.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOTE_ONLY", + "description": "The card has a note only.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REDACTED", + "description": "The card is redacted.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "ProjectCardItem", + "description": "Types that can be inside Project Cards.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "Issue", + "description": "An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project.", + "fields": [ + { + "name": "assignees", + "description": "A list of Users assigned to this object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the body of the issue.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "Identifies the body of the issue rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyText", + "description": "Identifies the body of the issue rendered to text.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "closed", + "description": "`true` if the object is closed (definition of closed may depend on type)", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": "A list of comments associated with the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labels", + "description": "A list of labels associated with the object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "LabelConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locked", + "description": "`true` if the object is locked", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestone", + "description": "Identifies the milestone associated with the issue.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": "Identifies the issue number.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "participants", + "description": "A list of Users that are participating in the Issue conversation.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Identifies the repository associated with the issue.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this issue", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Identifies the state of the issue.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "IssueState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timeline", + "description": "A list of events associated with an Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "since", + "description": "Allows filtering timeline events by a `since` timestamp.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueTimelineConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": "Identifies the issue title.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this issue", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanSubscribe", + "description": "Check if the viewer is able to change their subscription status for the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerSubscription", + "description": "Identifies if the viewer is watching, not watching, or ignoring the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Assignable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Closable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Labelable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Lockable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Assignable", + "description": "An object that can have users assigned to it.", + "fields": [ + { + "name": "assignees", + "description": "A list of Users assigned to this object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "UserConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UserEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "description": "Information about pagination in a connection.", + "fields": [ + { + "name": "endCursor", + "description": "When paginating forwards, the cursor to continue.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasNextPage", + "description": "When paginating forwards, are there more items?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasPreviousPage", + "description": "When paginating backwards, are there more items?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startCursor", + "description": "When paginating backwards, the cursor to continue.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Closable", + "description": "An object that can be closed", + "fields": [ + { + "name": "closed", + "description": "`true` if the object is closed (definition of closed may depend on type)", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "Comment", + "description": "Represents a comment.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "The comment body as Markdown.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The comment body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "description": "A comment author association with repository.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MEMBER", + "description": "Author is a member of the organization that owns the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OWNER", + "description": "Author is the owner of the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLABORATOR", + "description": "Author has been invited to collaborate on the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONTRIBUTOR", + "description": "Author has previously committed to the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIRST_TIME_CONTRIBUTOR", + "description": "Author has not previously committed to the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIRST_TIMER", + "description": "Author has not previously committed to GitHub.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NONE", + "description": "Author has no association with the repository.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "description": "Comments that can be updated.", + "fields": [ + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "description": "The possible errors that will prevent a user from updating a comment.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "INSUFFICIENT_ACCESS", + "description": "You must be the author or have write access to this repository to update this comment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LOCKED", + "description": "Unable to create comment because issue is locked.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LOGIN_REQUIRED", + "description": "You must be logged in to update this comment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MAINTENANCE", + "description": "Repository is under maintenance.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VERIFIED_EMAIL_REQUIRED", + "description": "At least one email address must be verified to update this comment.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Labelable", + "description": "An object that can have labels assigned to it.", + "fields": [ + { + "name": "labels", + "description": "A list of labels associated with the object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "LabelConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "LabelConnection", + "description": "The connection type for Label.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LabelEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Label", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LabelEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Label", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Label", + "description": "A label for categorizing Issues or Milestones with a given Repository.", + "fields": [ + { + "name": "color", + "description": "Identifies the label color.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issues", + "description": "A list of issues associated with this label.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for issues returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the issues by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "IssueState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Identifies the label name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequests", + "description": "A list of pull requests associated with this label.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestState", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "headRefName", + "description": "The head ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "baseRefName", + "description": "The base ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for pull requests returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this label.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueConnection", + "description": "The connection type for Issue.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "description": "Ways in which lists of issues can be ordered upon return.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field in which to order issues by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "IssueOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The direction in which to order issues by the specified field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "IssueOrderField", + "description": "Properties by which issue connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Order issues by creation time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Order issues by update time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COMMENTS", + "description": "Order issues by comment count", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrderDirection", + "description": "Possible directions in which to order a list of items when provided an `orderBy` argument.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ASC", + "description": "Specifies an ascending order for a given `orderBy` argument.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESC", + "description": "Specifies a descending order for a given `orderBy` argument.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "IssueState", + "description": "The possible states of an issue.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "OPEN", + "description": "An issue that is still open", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CLOSED", + "description": "An issue that has been closed", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestConnection", + "description": "The connection type for PullRequest.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "description": "A repository pull request.", + "fields": [ + { + "name": "assignees", + "description": "A list of Users assigned to this object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "baseRef", + "description": "Identifies the base Ref associated with the pull request.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "baseRefName", + "description": "Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the body of the pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "Identifies the body of the pull request rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyText", + "description": "Identifies the body of the pull request rendered to text.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "closed", + "description": "`true` if the pull request is closed", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": "A list of comments associated with the pull request.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commits", + "description": "A list of commits present in this pull request's head branch not present in the base branch.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestCommitConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "editor", + "description": "The actor who edited this pull request's body.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRef", + "description": "Identifies the head Ref associated with the pull request.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRefName", + "description": "Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRepository", + "description": "The repository associated with this pull request's head Ref.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRepositoryOwner", + "description": "The owner of the repository associated with this pull request's head Ref.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isCrossRepository", + "description": "The head and base repositories are different.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labels", + "description": "A list of labels associated with the object.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "LabelConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locked", + "description": "`true` if the pull request is locked", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mergeCommit", + "description": "The commit that was created when this pull request was merged.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mergeable", + "description": "Whether or not the pull request can be merged based on the existence of merge conflicts.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MergeableState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "merged", + "description": "Whether or not the pull request was merged.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mergedAt", + "description": "The date and time that the pull request was merged.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": "Identifies the pull request number.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "participants", + "description": "A list of Users that are participating in the Pull Request conversation.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "potentialMergeCommit", + "description": "The commit that GitHub automatically generated to test if this pull request could be merged. This field will not return a value if the pull request is merged, or if the test merge commit is still being generated. See the `mergeable` field for more details on the mergeability of the pull request.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revertResourcePath", + "description": "The HTTP path for reverting this pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revertUrl", + "description": "The HTTP URL for reverting this pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviewRequests", + "description": "A list of review requests associated with the pull request.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "ReviewRequestConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviews", + "description": "A list of reviews associated with the pull request.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the reviews.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestReviewState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "PullRequestReviewConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Identifies the state of the pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "suggestedReviewers", + "description": "A list of reviewer suggestions based on commit history and past review comments.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SuggestedReviewer", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timeline", + "description": "A list of events associated with a PullRequest.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "since", + "description": "Allows filtering timeline events by a `since` timestamp.", + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestTimelineConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": "Identifies the pull request title.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanSubscribe", + "description": "Check if the viewer is able to change their subscription status for the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerSubscription", + "description": "Identifies if the viewer is watching, not watching, or ignoring the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Assignable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Closable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Labelable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Lockable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Lockable", + "description": "An object that can be locked.", + "fields": [ + { + "name": "locked", + "description": "`true` if the object is locked", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "description": "Represents a subject that can be reacted on.", + "fields": [ + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "ReactionGroup", + "description": "A group of emoji reactions to a particular piece of content.", + "fields": [ + { + "name": "content", + "description": "Identifies the emoji reaction.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies when the reaction was created.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "The subject that was reacted to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "users", + "description": "Users who have reacted to the reaction subject with the emotion represented by this reaction group", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactingUserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerHasReacted", + "description": "Whether or not the authenticated user has left a reaction on the subject.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ReactionContent", + "description": "Emojis that can be attached to Issues, Pull Requests and Comments.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "THUMBS_UP", + "description": "Represents the 👍 emoji.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "THUMBS_DOWN", + "description": "Represents the 👎 emoji.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LAUGH", + "description": "Represents the 😄 emoji.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HOORAY", + "description": "Represents the 🎉 emoji.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFUSED", + "description": "Represents the 😕 emoji.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HEART", + "description": "Represents the ❤️ emoji.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReactingUserConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactingUserEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReactingUserEdge", + "description": "Represents a user that's made a reaction.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactedAt", + "description": "The moment when the user made the reaction.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReactionConnection", + "description": "A list of reactions that have been left on the subject.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Reaction", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerHasReacted", + "description": "Whether or not the authenticated user has left a reaction on the subject.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReactionEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Reaction", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Reaction", + "description": "An emoji reaction to a particular piece of content.", + "fields": [ + { + "name": "content", + "description": "Identifies the emoji reaction.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Identifies the user who created this reaction.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "description": "Ways in which lists of reactions can be ordered upon return.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field in which to order reactions by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReactionOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The direction in which to order reactions by the specified field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ReactionOrderField", + "description": "A list of fields that reactions can be ordered by.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Allows ordering a list of reactions by when they were created.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "description": "Represents a object that belongs to a repository.", + "fields": [ + { + "name": "repository", + "description": "The repository associated with this node.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommitCommentThread", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "Subscribable", + "description": "Entities that can be subscribed to for web and email notifications.", + "fields": [ + { + "name": "viewerCanSubscribe", + "description": "Check if the viewer is able to change their subscription status for the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerSubscription", + "description": "Identifies if the viewer is watching, not watching, or ignoring the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "SubscriptionState", + "description": "The possible states of a subscription.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "UNSUBSCRIBED", + "description": "The User is only notified when particpating or @mentioned.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIBED", + "description": "The User is notified of all conversations.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "IGNORED", + "description": "The User is never notified.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Ref", + "description": "Represents a Git reference.", + "fields": [ + { + "name": "associatedPullRequests", + "description": "A list of pull requests with this ref as the head ref.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestState", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "labels", + "description": "A list of label names to filter the pull requests by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "headRefName", + "description": "The head ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "baseRefName", + "description": "The base ref name to filter the pull requests by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for pull requests returned from the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "IssueOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The ref name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "prefix", + "description": "The ref's prefix, such as `refs/heads/` or `refs/tags/`.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository the ref belongs to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "target", + "description": "The object the ref points to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "GitObject", + "description": "Represents a Git object.", + "fields": [ + { + "name": "abbreviatedOid", + "description": "An abbreviated version of the Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitResourcePath", + "description": "The HTTP path for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitUrl", + "description": "The HTTP URL for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "The Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the Git object belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Blob", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Tag", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Tree", + "ofType": null + } + ] + }, + { + "kind": "SCALAR", + "name": "GitObjectID", + "description": "A Git object ID.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Commit", + "description": "Represents a Git commit.", + "fields": [ + { + "name": "abbreviatedOid", + "description": "An abbreviated version of the Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "author", + "description": "Authorship details of the commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GitActor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authoredByCommitter", + "description": "Check if the committer and the author match.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "blame", + "description": "Fetches `git blame` information.", + "args": [ + { + "name": "path", + "description": "The file whose Git blame information you want.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Blame", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": "Comments made on the commit.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitResourcePath", + "description": "The HTTP path for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitUrl", + "description": "The HTTP URL for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "committedDate", + "description": "The datetime when this commit was committed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "committedViaWeb", + "description": "Check if commited via GitHub web UI.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "committer", + "description": "Committership details of the commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GitActor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "history", + "description": "The linear commit history starting from (and including) this commit, in the same order as `git log`.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "path", + "description": "If non-null, filters history to only show commits touching files under this path.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "author", + "description": "If non-null, filters history to only show commits with matching authorship.", + "type": { + "kind": "INPUT_OBJECT", + "name": "CommitAuthor", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "since", + "description": "Allows specifying a beginning time or date for fetching commits.", + "type": { + "kind": "SCALAR", + "name": "GitTimestamp", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "until", + "description": "Allows specifying an ending time or date for fetching commits.", + "type": { + "kind": "SCALAR", + "name": "GitTimestamp", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitHistoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The Git commit message", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "messageBody", + "description": "The Git commit message body", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "messageBodyHTML", + "description": "The commit message body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "messageHeadline", + "description": "The Git commit message headline", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "messageHeadlineHTML", + "description": "The commit message headline rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "The Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository this commit belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signature", + "description": "Commit signing information, if present.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "GitSignature", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Status information for this commit", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Status", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tree", + "description": "Commit's root Tree", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Tree", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "treeResourcePath", + "description": "The HTTP path for the tree of this commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "treeUrl", + "description": "The HTTP URL for the tree of this commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanSubscribe", + "description": "Check if the viewer is able to change their subscription status for the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerSubscription", + "description": "Identifies if the viewer is watching, not watching, or ignoring the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Tree", + "description": "Represents a Git tree.", + "fields": [ + { + "name": "abbreviatedOid", + "description": "An abbreviated version of the Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitResourcePath", + "description": "The HTTP path for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitUrl", + "description": "The HTTP URL for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "entries", + "description": "A list of tree entries.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TreeEntry", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "The Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the Git object belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TreeEntry", + "description": "Represents a Git tree entry.", + "fields": [ + { + "name": "mode", + "description": "Entry file mode.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Entry file name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "object", + "description": "Entry file object.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "Entry file Git object ID.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the tree entry belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "Entry file type.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GitActor", + "description": "Represents an actor in a Git commit (ie. an author or committer).", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the author's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "date", + "description": "The timestamp of the Git action (authoring or committing).", + "args": [], + "type": { + "kind": "SCALAR", + "name": "GitTimestamp", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "email", + "description": "The email in the Git commit.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name in the Git commit.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "The GitHub user corresponding to the email field. Null if no such user exists.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "GitTimestamp", + "description": "An ISO-8601 encoded date string. Unlike the DateTime type, GitTimestamp is not converted in UTC.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommitHistoryConnection", + "description": "The connection type for Commit.", + "fields": [ + { + "name": "edges", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommitEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CommitAuthor", + "description": "Specifies an author for filtering Git commits.", + "fields": null, + "inputFields": [ + { + "name": "id", + "description": "ID of a User to filter by. If non-null, only commits authored by this user will be returned. This field takes precedence over emails.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "emails", + "description": "Email addresses to filter by. Commits authored by any of the specified email addresses will be returned.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommitCommentConnection", + "description": "The connection type for CommitComment.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommitCommentEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommitComment", + "description": "Represents a comment on a given Commit.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the comment body.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "Identifies the comment body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with the comment, if the commit exists.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": "Identifies the file path associated with the comment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "position", + "description": "Identifies the line position associated with the comment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Identifies the repository associated with the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "description": "Entities that can be deleted.", + "fields": [ + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommitComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "GitSignature", + "description": "Information about a signature (GPG or S/MIME) on a Commit or Tag.", + "fields": [ + { + "name": "email", + "description": "Email used to sign this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "True if the signature is valid and verified by GitHub.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "Payload for GPG signing object. Raw ODB object without the signature header.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signature", + "description": "ASCII-armored signature header from object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signer", + "description": "GitHub user corresponding to the email signing this commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GitSignatureState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "GpgSignature", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SmimeSignature", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnknownSignature", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "GitSignatureState", + "description": "The state of a Git signature.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "VALID", + "description": "Valid signature and verified by GitHub.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": "Invalid signature.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MALFORMED_SIG", + "description": "Malformed signature.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNKNOWN_KEY", + "description": "Key used for signing not known to GitHub.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BAD_EMAIL", + "description": "Invalid email used for signing.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNVERIFIED_EMAIL", + "description": "Email used for signing unverified on GitHub.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NO_USER", + "description": "Email used for signing not known to GitHub.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNKNOWN_SIG_TYPE", + "description": "Unknown signature type.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNSIGNED", + "description": "Unsigned.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GPGVERIFY_UNAVAILABLE", + "description": "Internal error - the GPG verification service is unavailable at the moment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "GPGVERIFY_ERROR", + "description": "Internal error - the GPG verification service misbehaved.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NOT_SIGNING_KEY", + "description": "The usage flags for the key that signed this don't allow signing.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EXPIRED_KEY", + "description": "Signing key expired.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Status", + "description": "Represents a commit status.", + "fields": [ + { + "name": "commit", + "description": "The commit this status is attached to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "context", + "description": "Looks up an individual status context by context name.", + "args": [ + { + "name": "name", + "description": "The context name.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "StatusContext", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "contexts", + "description": "The individual status contexts for this commit.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StatusContext", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The combined commit status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "StatusState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StatusState", + "description": "The possible commit status states.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "EXPECTED", + "description": "Status is expected.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ERROR", + "description": "Status is errored.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILURE", + "description": "Status is failing.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": "Status is pending.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUCCESS", + "description": "Status is successful.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StatusContext", + "description": "Represents an individual commit status context", + "fields": [ + { + "name": "commit", + "description": "This commit this status context is attached to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "context", + "description": "The name of this status context.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creator", + "description": "The actor who created this status context.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The description for this status context.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of this status context.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "StatusState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "targetUrl", + "description": "The URL for this status context.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Blame", + "description": "Represents a Git blame.", + "fields": [ + { + "name": "ranges", + "description": "The list of ranges from a Git blame.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BlameRange", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BlameRange", + "description": "Represents a range of information from a Git blame.", + "fields": [ + { + "name": "age", + "description": "Identifies the recency of the change, from 1 (new) to 10 (old). This is calculated as a 2-quantile and determines the length of distance between the median age of all the changes in the file and the recency of the current range's change.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the line author", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "endingLine", + "description": "The ending line for the range", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "startingLine", + "description": "The starting line for the range", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Blob", + "description": "Represents a Git blob.", + "fields": [ + { + "name": "abbreviatedOid", + "description": "An abbreviated version of the Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "byteSize", + "description": "Byte size of Blob object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitResourcePath", + "description": "The HTTP path for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitUrl", + "description": "The HTTP URL for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isBinary", + "description": "Indicates whether the Blob is binary or text", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isTruncated", + "description": "Indicates whether the contents is truncated", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "The Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the Git object belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "text", + "description": "UTF8 text data or null if the Blob is binary", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Language", + "description": "Represents a given language found in repositories.", + "fields": [ + { + "name": "color", + "description": "The color defined for the current language.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the current language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PullRequestState", + "description": "The possible states of a pull request.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "OPEN", + "description": "A pull request that is still open.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CLOSED", + "description": "A pull request that has been closed without being merged.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MERGED", + "description": "A pull request that has been closed by being merged.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "description": "Represents an owner of a Repository.", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the owner's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "login", + "description": "The username used to login.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pinnedRepositories", + "description": "A list of repositories this user has pinned to their profile", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositories", + "description": "A list of repositories that the user owns.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "isFork", + "description": "If non-null, filters repositories according to whether they are forks of another repository", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Find Repository.", + "args": [ + { + "name": "name", + "description": "Name of Repository to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP URL for the owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for the owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "RepositoryConnection", + "description": "A list of repositories owned by the subject.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalDiskUsage", + "description": "The total size in kilobytes of all repositories in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "description": "The privacy of a repository", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PUBLIC", + "description": "Public", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PRIVATE", + "description": "Private", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "description": "Ordering options for repository connections", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field to order repositories by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The ordering direction.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RepositoryOrderField", + "description": "Properties by which repository connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Order repositories by creation time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Order repositories by update time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUSHED_AT", + "description": "Order repositories by push time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAME", + "description": "Order repositories by name", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "STARGAZERS", + "description": "Order repositories by number of stargazers", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "description": "The affiliation of a user to a repository", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "OWNER", + "description": "Repositories that are owned by the authenticated user.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COLLABORATOR", + "description": "Repositories that the user has been added to as a collaborator.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ORGANIZATION_MEMBER", + "description": "Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MergeableState", + "description": "Whether or not a PullRequest can be merged.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MERGEABLE", + "description": "The pull request can be merged.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFLICTING", + "description": "The pull request cannot be merged due to merge conflicts.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNKNOWN", + "description": "The mergeability of the pull request is still being calculated.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueCommentConnection", + "description": "The connection type for IssueComment.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueCommentEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "description": "Represents a comment on an Issue.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the comment body.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The comment body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyText", + "description": "Identifies the body of the issue rendered to text.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issue", + "description": "Identifies the issue associated with the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "Returns the pull request associated with the comment, if this comment was made on a\npull request.\n", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this node.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "IssuePubSubTopic", + "description": "The possible PubSub channels for an issue.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "UPDATED", + "description": "The channel ID for observing issue updates.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MARKASREAD", + "description": "The channel ID for marking an issue as read.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewConnection", + "description": "The connection type for PullRequestReview.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "description": "A review object for a given pull request.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the pull request review body.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The body of this review rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyText", + "description": "The body of this review rendered as plain text.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": "A list of review comments for the current pull request review.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with this pull request review.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "Identifies the pull request associated with this pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this node.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path permalink for this PullRequestReview.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Identifies the current state of the pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestReviewState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "submittedAt", + "description": "Identifies when the Pull Request Review was submitted", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL permalink for this PullRequestReview.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PullRequestReviewState", + "description": "The possible states of a pull request review.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PENDING", + "description": "A review that has not yet been submitted.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COMMENTED", + "description": "An informational review.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "APPROVED", + "description": "A review allowing the pull request to merge.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHANGES_REQUESTED", + "description": "A review blocking the pull request from merging.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DISMISSED", + "description": "A review that has been dismissed.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewCommentConnection", + "description": "The connection type for PullRequestReviewComment.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewCommentEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "description": "A review comment associated with a given repository pull request.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the subject of the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "The comment body of this review comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The comment body of this review comment rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyText", + "description": "The comment body of this review comment rendered as plain text.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies when the comment was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "diffHunk", + "description": "The diff hunk to which the comment applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "draftedAt", + "description": "Identifies when the comment was created in a draft state.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originalCommit", + "description": "Identifies the original commit associated with the comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originalPosition", + "description": "The original line index in the diff to which the comment applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": "The path to which the comment applies.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "position", + "description": "The line index in the diff to which the comment applies.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "The pull request associated with this review comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The pull request review associated with this review comment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactionGroups", + "description": "A list of reactions grouped by content left on the subject.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionGroup", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reactions", + "description": "A list of Reactions left on the Issue.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "content", + "description": "Allows filtering Reactions by emoji.", + "type": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Allows specifying the order in which reactions are returned.", + "type": { + "kind": "INPUT_OBJECT", + "name": "ReactionOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReactionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this review comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path permalink for this review comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies when the comment was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL permalink for this review comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanReact", + "description": "Can user react to this subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PullRequestPubSubTopic", + "description": "The possible PubSub channels for a pull request.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "UPDATED", + "description": "The channel ID for observing pull request updates.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MARKASREAD", + "description": "The channel ID for marking an pull request as read.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "HEAD_REF", + "description": "The channel ID for observing head ref updates.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestCommitConnection", + "description": "The connection type for PullRequestCommit.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestCommitEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestCommit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestCommitEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestCommit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestCommit", + "description": "Represents a Git commit part of a pull request.", + "fields": [ + { + "name": "commit", + "description": "The Git commit object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "The pull request this commit belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this pull request commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this pull request commit", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestConnection", + "description": "The connection type for ReviewRequest.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReviewRequestEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReviewRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ReviewRequest", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequest", + "description": "A request for a user to review a pull request.", + "fields": [ + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "Identifies the pull request associated with this review request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviewer", + "description": "Identifies the author associated with this review request.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Team", + "description": "A team of users in an organization.", + "fields": [ + { + "name": "ancestors", + "description": "A list of teams that are ancestors of this team.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "childTeams", + "description": "List of child teams belonging to this team", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "TeamOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "userLogins", + "description": "User logins to filter by", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "immediateOnly", + "description": "Whether to list immediate child teams or all descendant child teams.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "combinedSlug", + "description": "The slug corresponding to the organization and team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The description of the team.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editTeamResourcePath", + "description": "The HTTP path for editing this team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editTeamUrl", + "description": "The HTTP URL for editing this team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invitations", + "description": "A list of pending invitations for users to this team", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "OrganizationInvitationConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "members", + "description": "A list of users who are members of this team.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "query", + "description": "The search string to look for.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "membership", + "description": "Filter by membership type", + "type": { + "kind": "ENUM", + "name": "TeamMembershipType", + "ofType": null + }, + "defaultValue": "ALL" + }, + { + "name": "role", + "description": "Filter by team member role", + "type": { + "kind": "ENUM", + "name": "TeamMemberRole", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamMemberConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "membersResourcePath", + "description": "The HTTP path for the team' members", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "membersUrl", + "description": "The HTTP URL for the team' members", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newTeamResourcePath", + "description": "The HTTP path creating a new team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newTeamUrl", + "description": "The HTTP URL creating a new team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": "The organization that owns this team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parentTeam", + "description": "The parent team of the team.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Team", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "privacy", + "description": "The level of privacy the team has.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TeamPrivacy", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositories", + "description": "A list of repositories this team has access to.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "query", + "description": "The search string to look for.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for the connection.", + "type": { + "kind": "INPUT_OBJECT", + "name": "TeamRepositoryOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamRepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositoriesResourcePath", + "description": "The HTTP path for this team's repositories", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositoriesUrl", + "description": "The HTTP URL for this team's repositories", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": "The slug corresponding to the team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamsResourcePath", + "description": "The HTTP path for this team's teams", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamsUrl", + "description": "The HTTP URL for this team's teams", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanAdminister", + "description": "Team is adminable by the viewer.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamPrivacy", + "description": "The possible team privacy values.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SECRET", + "description": "A secret team can only be seen by its members.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VISIBLE", + "description": "A visible team can be seen and @mentioned by every member of the organization.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamMemberConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamMemberEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamMemberEdge", + "description": "Represents a user who is a member of a team.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "memberAccessResourcePath", + "description": "The HTTP path to the organization's member access page.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "memberAccessUrl", + "description": "The HTTP URL to the organization's member access page.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "role", + "description": "The role the member has on the team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TeamMemberRole", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamMemberRole", + "description": "The possible team member roles; either 'maintainer' or 'member'.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MAINTAINER", + "description": "A team maintainer has permission to add and remove team members.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MEMBER", + "description": "A team member has no administrative permissions on the team.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamMembershipType", + "description": "Defines which types of team members are included in the returned list. Can be one of IMMEDIATE, CHILD_TEAM or ALL.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "IMMEDIATE", + "description": "Includes only immediate members of the team.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CHILD_TEAM", + "description": "Includes only child team members for the team.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ALL", + "description": "Includes immediate and child team members for the team.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamRepositoryConnection", + "description": "The connection type for Repository.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamRepositoryEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamRepositoryEdge", + "description": "Represents a team repository.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "permission", + "description": "The permission level the team has on the repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryPermission", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RepositoryPermission", + "description": "The access level to a repository", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ADMIN", + "description": "Can read, clone, push, and add collaborators", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WRITE", + "description": "Can read, clone and push", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "READ", + "description": "Can read and clone", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TeamRepositoryOrder", + "description": "Ordering options for team repository connections", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field to order repositories by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TeamRepositoryOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The ordering direction.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamRepositoryOrderField", + "description": "Properties by which team repository connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Order repositories by creation time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Order repositories by update time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUSHED_AT", + "description": "Order repositories by push time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAME", + "description": "Order repositories by name", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERMISSION", + "description": "Order repositories by permission", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "STARGAZERS", + "description": "Order repositories by number of stargazers", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationInvitationConnection", + "description": "The connection type for OrganizationInvitation.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrganizationInvitationEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrganizationInvitation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationInvitationEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrganizationInvitation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationInvitation", + "description": "An Invitation for a user to an organization.", + "fields": [ + { + "name": "email", + "description": "The email address of the user invited to the organization.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invitee", + "description": "The user who was invited to the organization.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inviter", + "description": "The user who created the invitation.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "role", + "description": "The user's pending role in the organization (e.g. member, owner).", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrganizationInvitationRole", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "OrganizationInvitationRole", + "description": "The possible organization invitation roles.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DIRECT_MEMBER", + "description": "The user is invited to be a direct member of the organization.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ADMIN", + "description": "The user is invited to be an admin of the organization.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BILLING_MANAGER", + "description": "The user is invited to be a billing manager of the organization.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REINSTATE", + "description": "The user's previous role will be reinstated.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamConnection", + "description": "The connection type for Team.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Team", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Team", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "TeamOrder", + "description": "Ways in which team connections can be ordered.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field in which to order nodes by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TeamOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The direction in which to order nodes.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamOrderField", + "description": "Properties by which team connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NAME", + "description": "Allows ordering a list of teams by name.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Organization", + "description": "An account on GitHub, with one or more owners, that has repositories, members and teams.", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the organization's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isInvoiced", + "description": "Is the account billed through invoices?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "login", + "description": "The organization's login name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "members", + "description": "A list of users who are members of this organization.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The organization's public profile name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newTeamResourcePath", + "description": "The HTTP path creating a new team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newTeamUrl", + "description": "The HTTP URL creating a new team", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationBillingEmail", + "description": "The billing email for the organization.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pinnedRepositories", + "description": "A list of repositories this user has pinned to their profile", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "Find project by number.", + "args": [ + { + "name": "number", + "description": "The project number to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projects", + "description": "A list of projects under the owner.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for projects returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "ProjectOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "search", + "description": "Query to search projects by, currently only searching by name.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "states", + "description": "A list of states to filter the projects by.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProjectState", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsResourcePath", + "description": "The HTTP path listing organization's projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectsUrl", + "description": "The HTTP URL listing organization's projects", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositories", + "description": "A list of repositories that the user owns.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters repositories according to privacy", + "type": { + "kind": "ENUM", + "name": "RepositoryPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for repositories returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "RepositoryOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "affiliations", + "description": "Affiliation options for repositories returned from the connection", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "RepositoryAffiliation", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isLocked", + "description": "If non-null, filters repositories according to whether they have been locked", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "isFork", + "description": "If non-null, filters repositories according to whether they are forks of another repository", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Find Repository.", + "args": [ + { + "name": "name", + "description": "Name of Repository to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this user", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "samlIdentityProvider", + "description": "The Organization's SAML Identity Providers", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrganizationIdentityProvider", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "team", + "description": "Find an organization's team by its slug.", + "args": [ + { + "name": "slug", + "description": "The name or slug of the team to find.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "Team", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teams", + "description": "A list of teams in this organization.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "privacy", + "description": "If non-null, filters teams according to privacy", + "type": { + "kind": "ENUM", + "name": "TeamPrivacy", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "role", + "description": "If non-null, filters teams according to whether the viewer is an admin or member on team", + "type": { + "kind": "ENUM", + "name": "TeamRole", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "query", + "description": "If non-null, filters teams with query on team name and team slug", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "userLogins", + "description": "User logins to filter by", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Ordering options for teams returned from the connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "TeamOrder", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "ldapMapped", + "description": "If true, filters teams that are mapped to an LDAP Group (Enterprise only)", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "rootTeamsOnly", + "description": "If true, restrict to only root teams", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamsResourcePath", + "description": "The HTTP path listing organization's teams", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamsUrl", + "description": "The HTTP URL listing organization's teams", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this user", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanAdminister", + "description": "Organization is adminable by the viewer.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanCreateProjects", + "description": "Can the current viewer create new projects on this owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanCreateRepositories", + "description": "Viewer can create repositories on this organization", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanCreateTeams", + "description": "Viewer can create teams on this organization.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerIsAMember", + "description": "Viewer is a member of this organization.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "ProjectOwner", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Float", + "description": "Represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LanguageConnection", + "description": "A list of languages associated with the parent.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LanguageEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Language", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalSize", + "description": "The total size in bytes of files written in that language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LanguageEdge", + "description": "Represents the language of a repository.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Language", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "size", + "description": "The number of bytes of code written in the language.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Bot", + "description": "A special type of user which takes actions on behalf of GitHub Apps.", + "fields": [ + { + "name": "avatarUrl", + "description": "A URL pointing to the GitHub App's public avatar.", + "args": [ + { + "name": "size", + "description": "The size of the resulting square image.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "login", + "description": "The username of the actor.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this bot", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this bot", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectConnection", + "description": "A list of projects associated with the owner.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProjectEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ProjectOrder", + "description": "Ways in which lists of projects can be ordered upon return.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field in which to order projects by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ProjectOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The direction in which to order projects by the specified field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ProjectOrderField", + "description": "Properties by which project connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Order projects by creation time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Order projects by update time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NAME", + "description": "Order projects by name", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "X509Certificate", + "description": "A valid x509 certificate string", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationIdentityProvider", + "description": "An Identity Provider configured to provision SAML and SCIM identities for Organizations", + "fields": [ + { + "name": "digestMethod", + "description": "The digest algorithm used to sign SAML requests for the Identity Provider.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalIdentities", + "description": "External Identities provisioned by this Identity Provider", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExternalIdentityConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "idpCertificate", + "description": "The x509 certificate used by the Identity Provder to sign assertions and responses.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "X509Certificate", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issuer", + "description": "The Issuer Entity ID for the SAML Identity Provider", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": "Organization this Identity Provider belongs to", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signatureMethod", + "description": "The signature algorithm used to sign SAML requests for the Identity Provider.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ssoUrl", + "description": "The URL endpoint for the Identity Provider's SAML SSO.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentityConnection", + "description": "The connection type for ExternalIdentity.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExternalIdentityEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExternalIdentity", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentityEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExternalIdentity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentity", + "description": "An external identity provisioned by SAML SSO or SCIM.", + "fields": [ + { + "name": "guid", + "description": "The GUID for this identity", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationInvitation", + "description": "Organization invitation for this SCIM-provisioned external identity", + "args": [], + "type": { + "kind": "OBJECT", + "name": "OrganizationInvitation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "samlIdentity", + "description": "SAML Identity attributes", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExternalIdentitySamlAttributes", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "scimIdentity", + "description": "SCIM Identity attributes", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExternalIdentityScimAttributes", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "User linked to this external identity", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentitySamlAttributes", + "description": "SAML attributes for the External Identity", + "fields": [ + { + "name": "nameId", + "description": "The NameID of the SAML identity", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExternalIdentityScimAttributes", + "description": "SCIM attributes for the External Identity", + "fields": [ + { + "name": "username", + "description": "The userName of the SCIM identity", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DefaultRepositoryPermissionField", + "description": "The possible default permissions for organization-owned repositories.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "READ", + "description": "Members have read access to org repos by default", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "WRITE", + "description": "Members have read and write access to org repos by default", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ADMIN", + "description": "Members have read, write, and admin access to org repos by default", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TeamRole", + "description": "The role of a user on a team.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ADMIN", + "description": "User has admin rights on the team.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MEMBER", + "description": "User is a member of the team.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GistConnection", + "description": "The connection type for Gist.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GistEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Gist", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GistEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Gist", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Gist", + "description": "A Gist.", + "fields": [ + { + "name": "comments", + "description": "A list of comments associated with the gist", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GistCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The gist description.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPublic", + "description": "Whether the gist is public or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The gist name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The gist owner.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pushedAt", + "description": "Identifies when the gist was last pushed to.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stargazers", + "description": "A list of users who have starred this starrable.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "StarOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StargazerConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "viewerHasStarred", + "description": "Returns a boolean indicating whether the viewing user has starred this starrable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Starrable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Starrable", + "description": "Things that can be starred.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stargazers", + "description": "A list of users who have starred this starrable.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "orderBy", + "description": "Order for connection", + "type": { + "kind": "INPUT_OBJECT", + "name": "StarOrder", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StargazerConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerHasStarred", + "description": "Returns a boolean indicating whether the viewing user has starred this starrable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Gist", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "StargazerConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StargazerEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StargazerEdge", + "description": "Represents a user that's starred a repository.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "starredAt", + "description": "Identifies when the item was starred.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "StarOrder", + "description": "Ways in which star connections can be ordered.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field in which to order nodes by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "StarOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The direction in which to order nodes.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "StarOrderField", + "description": "Properties by which star connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "STARRED_AT", + "description": "Allows ordering a list of stars by when they were created.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GistCommentConnection", + "description": "The connection type for GistComment.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GistCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GistCommentEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GistComment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GistComment", + "description": "Represents a comment on an Gist.", + "fields": [ + { + "name": "author", + "description": "The actor who authored the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "authorAssociation", + "description": "Author's association with the gist.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentAuthorAssociation", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "body", + "description": "Identifies the comment body.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "bodyHTML", + "description": "The comment body rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdViaEmail", + "description": "Check if this comment was created via an email reply.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "editor", + "description": "The actor who edited the comment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastEditedAt", + "description": "The moment the editor made the last edit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies when the comment was published at.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "viewerCanDelete", + "description": "Check if the current viewer can delete this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCanUpdate", + "description": "Check if the current viewer can update this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerCannotUpdateReasons", + "description": "Reasons why the current viewer can not update this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentCannotUpdateReason", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "viewerDidAuthor", + "description": "Did the viewer author this comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Comment", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Deletable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Updatable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UpdatableComment", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GistPrivacy", + "description": "The privacy of a Gist", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PUBLIC", + "description": "Public", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SECRET", + "description": "Secret", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ALL", + "description": "Gists that are public and secret", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "GistOrder", + "description": "Ordering options for gist connections", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field to order repositories by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GistOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The ordering direction.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "GistOrderField", + "description": "Properties by which gist connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATED_AT", + "description": "Order gists by creation time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UPDATED_AT", + "description": "Order gists by update time", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PUSHED_AT", + "description": "Order gists by push time", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestTimelineConnection", + "description": "The connection type for PullRequestTimelineItem.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestTimelineItemEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "UNION", + "name": "PullRequestTimelineItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestTimelineItemEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "UNION", + "name": "PullRequestTimelineItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "PullRequestTimelineItem", + "description": "An item in an pull request timeline", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommitCommentThread", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewThread", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ClosedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReopenedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnsubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MergedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReferencedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AssignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnassignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DemilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RenamedTitleEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LockedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlockedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DeployedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefDeletedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefRestoredEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "HeadRefForcePushedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "BaseRefForcePushedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestRemovedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissedEvent", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "CommitCommentThread", + "description": "A thread of comments on a commit.", + "fields": [ + { + "name": "comments", + "description": "The comments that exist in this thread.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommitCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "The commit the comments were made on.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "path", + "description": "The file the comments were made on.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "position", + "description": "The position in the diff for the commit that the comment was made on.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this node.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "RepositoryNode", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PullRequestReviewThread", + "description": "A threaded list of comments for a given pull request.", + "fields": [ + { + "name": "comments", + "description": "A list of pull request comments associated with the thread.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewCommentConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "Identifies the pull request associated with this thread.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ClosedEvent", + "description": "Represents a 'closed' event on any `Closable`.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "closable", + "description": "Object that was closed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Closable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with the 'closed' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReopenedEvent", + "description": "Represents a 'reopened' event on any `Closable`.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "closable", + "description": "Object that was reopened.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Closable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SubscribedEvent", + "description": "Represents a 'subscribed' event on a given `Subscribable`.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscribable", + "description": "Object referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UnsubscribedEvent", + "description": "Represents an 'unsubscribed' event on a given `Subscribable`.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscribable", + "description": "Object referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MergedEvent", + "description": "Represents a 'merged' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with the `merge` event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mergeRef", + "description": "Identifies the Ref associated with the `merge` event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mergeRefName", + "description": "Identifies the name of the Ref associated with the `merge` event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this merged event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this merged event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReferencedEvent", + "description": "Represents a 'referenced' event on a given `ReferencedSubject`.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commit", + "description": "Identifies the commit associated with the 'referenced' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitRepository", + "description": "Identifies the repository associated with the 'referenced' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isCrossReference", + "description": "Reference originated in a different repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use ReferencedEvent.isCrossRepository instead." + }, + { + "name": "isCrossRepository", + "description": "Reference originated in a different repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDirectReference", + "description": "Checks if the commit message itself references the subject. Can be false in the case of a commit comment reference.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Object referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "ReferencedSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "ReferencedSubject", + "description": "Any referencable object", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "AssignedEvent", + "description": "Represents an 'assigned' event on any assignable object.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assignable", + "description": "Identifies the assignable associated with the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Assignable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Identifies the user who was assigned.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UnassignedEvent", + "description": "Represents an 'unassigned' event on any assignable object.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assignable", + "description": "Identifies the assignable associated with the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Assignable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": "Identifies the subject (user) who was unassigned.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "LabeledEvent", + "description": "Represents a 'labeled' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Identifies the label associated with the 'labeled' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Label", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labelable", + "description": "Identifies the `Labelable` associated with the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Labelable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UnlabeledEvent", + "description": "Represents an 'unlabeled' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "label", + "description": "Identifies the label associated with the 'unlabeled' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Label", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "labelable", + "description": "Identifies the `Labelable` associated with the event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Labelable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MilestonedEvent", + "description": "Represents a 'milestoned' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestoneTitle", + "description": "Identifies the milestone title associated with the 'milestoned' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Object referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "MilestoneItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "MilestoneItem", + "description": "Types that can be inside a Milestone.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "DemilestonedEvent", + "description": "Represents a 'demilestoned' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestoneTitle", + "description": "Identifies the milestone title associated with the 'demilestoned' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Object referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "MilestoneItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RenamedTitleEvent", + "description": "Represents a 'renamed' event on a given issue or pull request", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentTitle", + "description": "Identifies the current title of the issue or pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "previousTitle", + "description": "Identifies the previous title of the issue or pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Subject that was renamed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "RenamedTitleSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "RenamedTitleSubject", + "description": "An object which has a renamable title", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "LockedEvent", + "description": "Represents a 'locked' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lockable", + "description": "Object that was locked.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Lockable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UnlockedEvent", + "description": "Represents an 'unlocked' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lockable", + "description": "Object that was unlocked.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Lockable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeployedEvent", + "description": "Represents a 'deployed' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "deployment", + "description": "The deployment associated with the 'deployed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Deployment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ref", + "description": "The ref associated with the 'deployed' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Deployment", + "description": "Represents triggered deployment instance.", + "fields": [ + { + "name": "commit", + "description": "Identifies the commit sha of the deployment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creator", + "description": "Identifies the actor who triggered the deployment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environment", + "description": "The environment to which this deployment was made.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "latestStatus", + "description": "The latest status of this deployment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "DeploymentStatus", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "Identifies the repository associated with the deployment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The current state of the deployment.", + "args": [], + "type": { + "kind": "ENUM", + "name": "DeploymentState", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "statuses", + "description": "A list of statuses associated with the deployment.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeploymentStatusConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeploymentStatusConnection", + "description": "The connection type for DeploymentStatus.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DeploymentStatusEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DeploymentStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeploymentStatusEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "DeploymentStatus", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeploymentStatus", + "description": "Describes the status of a given deployment attempt.", + "fields": [ + { + "name": "creator", + "description": "Identifies the actor who triggered the deployment.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deployment", + "description": "Identifies the deployment associated with status.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Deployment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Identifies the description of the deployment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "environmentUrl", + "description": "Identifies the environment URL of the deployment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "logUrl", + "description": "Identifies the log URL of the deployment.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Identifies the current state of the deployment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "DeploymentStatusState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DeploymentStatusState", + "description": "The possible states for a deployment status.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PENDING", + "description": "The deployment is pending.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUCCESS", + "description": "The deployment was successful.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILURE", + "description": "The deployment has failed.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INACTIVE", + "description": "The deployment is inactive.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ERROR", + "description": "The deployment experienced an error.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DeploymentState", + "description": "The possible states in which a deployment can be.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ABANDONED", + "description": "The pending deployment was not updated after 30 minutes.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ACTIVE", + "description": "The deployment is currently active.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DESTROYED", + "description": "An inactive transient deployment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ERROR", + "description": "The deployment experienced an error.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILURE", + "description": "The deployment has failed.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INACTIVE", + "description": "The deployment is inactive.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PENDING", + "description": "The deployment is pending.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "HeadRefDeletedEvent", + "description": "Represents a 'head_ref_deleted' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRef", + "description": "Identifies the Ref associated with the `head_ref_deleted` event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "headRefName", + "description": "Identifies the name of the Ref associated with the `head_ref_deleted` event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "HeadRefRestoredEvent", + "description": "Represents a 'head_ref_restored' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "HeadRefForcePushedEvent", + "description": "Represents a 'head_ref_force_pushed' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "afterCommit", + "description": "Identifies the after commit SHA for the 'head_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "beforeCommit", + "description": "Identifies the before commit SHA for the 'head_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ref", + "description": "Identifies the fully qualified ref name for the 'head_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BaseRefForcePushedEvent", + "description": "Represents a 'base_ref_force_pushed' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "afterCommit", + "description": "Identifies the after commit SHA for the 'base_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "beforeCommit", + "description": "Identifies the before commit SHA for the 'base_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ref", + "description": "Identifies the fully qualified ref name for the 'base_ref_force_pushed' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestedEvent", + "description": "Represents an 'review_requested' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Identifies the user whose review was requested.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewRequestRemovedEvent", + "description": "Represents an 'review_request_removed' event on a given pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "Identifies the user whose review request was removed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissedEvent", + "description": "Represents a 'review_dismissed' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "Identifies the message associated with the 'review_dismissed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "messageHtml", + "description": "The message associated with the event, rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "previousReviewState", + "description": "Identifies the previous state of the review with the 'review_dismissed' event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestReviewState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "PullRequest referenced by event.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestCommit", + "description": "Identifies the commit which caused the review to become stale.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestCommit", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this ReviewDismissedEvent.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "review", + "description": "Identifies the review associated with the 'review_dismissed' event.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this ReviewDismissedEvent.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SuggestedReviewer", + "description": "A suggestion to review a pull request based on a user's commit history and review comments.", + "fields": [ + { + "name": "isAuthor", + "description": "Is this suggestion based on past commits?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isCommenter", + "description": "Is this suggestion based on past review comments?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviewer", + "description": "Identifies the user suggested to review the pull request.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Milestone", + "description": "Represents a Milestone object on a given repository.", + "fields": [ + { + "name": "creator", + "description": "Identifies the actor who created the milestone.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "Identifies the description of the milestone.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dueOn", + "description": "Identifies the due date of the milestone.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "number", + "description": "Identifies the number of the milestone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this milestone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this milestone", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Identifies the state of the milestone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "MilestoneState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "title", + "description": "Identifies the title of the milestone.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this milestone", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MilestoneState", + "description": "The possible states of a milestone.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "OPEN", + "description": "A milestone that is still open.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CLOSED", + "description": "A milestone that has been closed.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueTimelineConnection", + "description": "The connection type for IssueTimelineItem.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueTimelineItemEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "UNION", + "name": "IssueTimelineItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "IssueTimelineItemEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "UNION", + "name": "IssueTimelineItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "IssueTimelineItem", + "description": "An item in an issue timeline", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Commit", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "IssueComment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ClosedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReopenedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnsubscribedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ReferencedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "AssignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnassignedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlabeledEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DemilestonedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RenamedTitleEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "LockedEvent", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UnlockedEvent", + "ofType": null + } + ] + }, + { + "kind": "UNION", + "name": "IssueOrPullRequest", + "description": "Used for return value of Repository.issueOrPullRequest.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "RepositoryInfo", + "description": "A subset of repository info.", + "fields": [ + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The description of the repository.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionHTML", + "description": "The description of the repository rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasIssuesEnabled", + "description": "Indicates if the repository has issues feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasWikiEnabled", + "description": "Indicates if the repository has wiki feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageUrl", + "description": "The repository's URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isFork", + "description": "Identifies if the repository is a fork.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isLocked", + "description": "Indicates if the repository has been locked or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isMirror", + "description": "Identifies if the repository is a mirror.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": "Identifies if the repository is private.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "license", + "description": "The license associated with the repository", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lockReason", + "description": "The reason the repository has been locked.", + "args": [], + "type": { + "kind": "ENUM", + "name": "RepositoryLockReason", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mirrorUrl", + "description": "The repository's original mirror URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nameWithOwner", + "description": "The repository's name with owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The User owner of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pushedAt", + "description": "Identifies when the repository was last pushed to.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RepositoryInvitationRepository", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "RepositoryLockReason", + "description": "The possible reasons a given repository could be in a locked state.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MOVING", + "description": "The repository is locked due to a move.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BILLING", + "description": "The repository is locked due to a billing related reason.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RENAME", + "description": "The repository is locked due to a rename.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MIGRATING", + "description": "The repository is locked due to a migration.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "RepositoryCollaboratorAffiliation", + "description": "The affiliation type between collaborator and repository.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ALL", + "description": "All collaborators of the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OUTSIDE", + "description": "All outside collaborators of an organization-owned repository.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryTopicConnection", + "description": "The connection type for RepositoryTopic.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryTopicEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RepositoryTopic", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryTopicEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "RepositoryTopic", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryTopic", + "description": "A repository-topic connects a repository to a topic.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this repository-topic.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "topic", + "description": "The topic.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this repository-topic.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Topic", + "description": "A topic aggregates entities that are related to a subject.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The topic's name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "relatedTopics", + "description": "A list of related topics sorted with the most relevant first.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProtectedBranchConnection", + "description": "The connection type for ProtectedBranch.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProtectedBranchEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProtectedBranch", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProtectedBranchEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ProtectedBranch", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ProtectedBranch", + "description": "A repository protected branch.", + "fields": [ + { + "name": "creator", + "description": "The actor who created this protected branch.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasDismissableStaleReviews", + "description": "Will new commits pushed to this branch dismiss pull request review approvals.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasRequiredReviews", + "description": "Are reviews required to update this branch.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasRequiredStatusChecks", + "description": "Are status checks required to update this branch.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasRestrictedPushes", + "description": "Is pushing to this branch restricted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasRestrictedReviewDismissals", + "description": "Is dismissal of pull request reviews restricted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasStrictRequiredStatusChecks", + "description": "Are branches required to be up to date before merging.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isAdminEnforced", + "description": "Can admins overwrite branch protection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Identifies the name of the protected branch.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pushAllowances", + "description": "A list push allowances for this protected branch.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PushAllowanceConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The repository associated with this protected branch.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requiredStatusCheckContexts", + "description": "List of required status check contexts that must pass for commits to be accepted to this branch.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviewDismissalAllowances", + "description": "A list review dismissal allowances for this protected branch.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReviewDismissalAllowanceConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissalAllowanceConnection", + "description": "The connection type for ReviewDismissalAllowance.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReviewDismissalAllowanceEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReviewDismissalAllowance", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissalAllowanceEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ReviewDismissalAllowance", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReviewDismissalAllowance", + "description": "A team or user who has the ability to dismiss a review on a protected branch.", + "fields": [ + { + "name": "actor", + "description": "The actor that can dismiss.", + "args": [], + "type": { + "kind": "UNION", + "name": "ReviewDismissalAllowanceActor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "protectedBranch", + "description": "Identifies the protected branch associated with the allowed user or team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProtectedBranch", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "ReviewDismissalAllowanceActor", + "description": "Types that can be an actor.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Team", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "PushAllowanceConnection", + "description": "The connection type for PushAllowance.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PushAllowanceEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PushAllowance", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PushAllowanceEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "PushAllowance", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PushAllowance", + "description": "A team or user who has the ability to push to a protected branch.", + "fields": [ + { + "name": "actor", + "description": "The actor that can push.", + "args": [], + "type": { + "kind": "UNION", + "name": "PushAllowanceActor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "protectedBranch", + "description": "Identifies the protected branch associated with the allowed user or team.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProtectedBranch", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "PushAllowanceActor", + "description": "Types that can be an actor.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Team", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "MilestoneConnection", + "description": "The connection type for Milestone.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MilestoneEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Milestone", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CodeOfConduct", + "description": "The Code of Conduct for a repository", + "fields": [ + { + "name": "body", + "description": "The body of the CoC", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "key", + "description": "The key for the CoC", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The formal name of the CoC", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The path to the CoC", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "LanguageOrder", + "description": "Ordering options for language connections.", + "fields": null, + "inputFields": [ + { + "name": "field", + "description": "The field to order languages by.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LanguageOrderField", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "direction", + "description": "The ordering direction.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "OrderDirection", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "LanguageOrderField", + "description": "Properties by which language connections can be ordered.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SIZE", + "description": "Order languages by the size of all files containing the language", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RefConnection", + "description": "The connection type for Ref.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RefEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RefEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReleaseConnection", + "description": "The connection type for Release.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReleaseEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Release", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReleaseEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Release", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Release", + "description": "A release contains the content for a release.", + "fields": [ + { + "name": "description", + "description": "Identifies the description of the release.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Identifies the title of the release.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publishedAt", + "description": "Identifies the date and time when the release was created.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "releaseAssets", + "description": "List of releases assets which are dependent on this release.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified global ID.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "name", + "description": "A list of names to filter the assets by.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReleaseAssetConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this issue", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tag", + "description": "The Git tag the release points to", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Ref", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "The HTTP URL for this issue", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "UniformResourceLocatable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReleaseAssetConnection", + "description": "The connection type for ReleaseAsset.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReleaseAssetEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ReleaseAsset", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReleaseAssetEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ReleaseAsset", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReleaseAsset", + "description": "A release asset contains the content for a release asset.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "Identifies the title of the release asset.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "release", + "description": "release that the asset is associated with", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Release", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "url", + "description": "Identifies the URL of the release asset.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeploymentConnection", + "description": "The connection type for Deployment.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DeploymentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Deployment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeploymentEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Deployment", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FollowingConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FollowerConnection", + "description": "The connection type for User.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationConnection", + "description": "The connection type for Organization.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OrganizationEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OrganizationEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StarredRepositoryConnection", + "description": "The connection type for Repository.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "StarredRepositoryEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "Identifies the total count of items in the connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "StarredRepositoryEdge", + "description": "Represents a starred repository.", + "fields": [ + { + "name": "cursor", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "starredAt", + "description": "Identifies when the item was starred.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RateLimit", + "description": "Represents the client's rate limit.", + "fields": [ + { + "name": "cost", + "description": "The point cost for the current query counting against the rate limit.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "limit", + "description": "The maximum number of points the client is permitted to consume in a 60 minute window.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "remaining", + "description": "The number of points remaining in the current rate limit window.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resetAt", + "description": "The time at which the current rate limit window resets in UTC epoch seconds.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SearchResultItemConnection", + "description": "A list of results that matched against a search query.", + "fields": [ + { + "name": "codeCount", + "description": "The number of pieces of code that matched the search query.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SearchResultItemEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "issueCount", + "description": "The number of issues that matched the search query.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "UNION", + "name": "SearchResultItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repositoryCount", + "description": "The number of repositories that matched the search query.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userCount", + "description": "The number of users that matched the search query.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "wikiCount", + "description": "The number of wiki pages that matched the search query.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SearchResultItemEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "UNION", + "name": "SearchResultItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "SearchResultItem", + "description": "The results of a search.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Issue", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "SearchType", + "description": "Represents the individual results of a search.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ISSUE", + "description": "Returns results matching issues in repositories.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REPOSITORY", + "description": "Returns results matching repositories.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "USER", + "description": "Returns results matching users on GitHub.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Mutation", + "description": "The root query for implementing GraphQL mutations.", + "fields": [ + { + "name": "acceptTopicSuggestion", + "description": "Applies a suggested topic to the repository.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AcceptTopicSuggestionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AcceptTopicSuggestionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addComment", + "description": "Adds a comment to an Issue or Pull Request.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddCommentInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddCommentPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addProjectCard", + "description": "Adds a card to a ProjectColumn. Either `contentId` or `note` must be provided but **not** both.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddProjectCardInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddProjectCardPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addProjectColumn", + "description": "Adds a column to a Project.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddProjectColumnInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddProjectColumnPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addPullRequestReview", + "description": "Adds a review to a Pull Request.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddPullRequestReviewInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddPullRequestReviewPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addPullRequestReviewComment", + "description": "Adds a comment to a review.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddPullRequestReviewCommentInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddPullRequestReviewCommentPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addReaction", + "description": "Adds a reaction to a subject.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddReactionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddReactionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "addStar", + "description": "Adds a star to a Starrable.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AddStarInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "AddStarPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createProject", + "description": "Creates a new project.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateProjectInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateProjectPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "declineTopicSuggestion", + "description": "Rejects a suggested topic for the repository.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeclineTopicSuggestionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeclineTopicSuggestionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteProject", + "description": "Deletes a project.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteProjectPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteProjectCard", + "description": "Deletes a project card.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectCardInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteProjectCardPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteProjectColumn", + "description": "Deletes a project column.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectColumnInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteProjectColumnPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deletePullRequestReview", + "description": "Deletes a pull request review.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeletePullRequestReviewInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeletePullRequestReviewPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "dismissPullRequestReview", + "description": "Dismisses an approved or rejected pull request review.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DismissPullRequestReviewInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DismissPullRequestReviewPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moveProjectCard", + "description": "Moves a project card to another place.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoveProjectCardInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MoveProjectCardPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "moveProjectColumn", + "description": "Moves a project column to another place.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoveProjectColumnInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MoveProjectColumnPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeOutsideCollaborator", + "description": "Removes outside collaborator from all repositories in an organization.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RemoveOutsideCollaboratorInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RemoveOutsideCollaboratorPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeReaction", + "description": "Removes a reaction from a subject.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RemoveReactionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RemoveReactionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeStar", + "description": "Removes a star from a Starrable.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RemoveStarInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RemoveStarPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestReviews", + "description": "Set review requests on a pull request.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RequestReviewsInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RequestReviewsPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "submitPullRequestReview", + "description": "Submits a pending pull request review.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SubmitPullRequestReviewInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SubmitPullRequestReviewPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateProject", + "description": "Updates an existing project.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateProjectPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateProjectCard", + "description": "Updates an existing project card.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectCardInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateProjectCardPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateProjectColumn", + "description": "Updates an existing project column.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectColumnInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateProjectColumnPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatePullRequestReview", + "description": "Updates the body of a pull request review.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdatePullRequestReviewInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdatePullRequestReviewPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatePullRequestReviewComment", + "description": "Updates a pull request review comment.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdatePullRequestReviewCommentInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdatePullRequestReviewCommentPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateSubscription", + "description": "Updates viewers repository subscription state.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateSubscriptionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateSubscriptionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updateTopics", + "description": "Replaces the repository's topics with the given topics.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateTopicsInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateTopicsPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddReactionPayload", + "description": "Autogenerated return type of AddReaction", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reaction", + "description": "The reaction object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Reaction", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "The reactable subject.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddReactionInput", + "description": "Autogenerated input type of AddReaction", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "subjectId", + "description": "The Node ID of the subject to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "content", + "description": "The name of the emoji to react with.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemoveReactionPayload", + "description": "Autogenerated return type of RemoveReaction", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reaction", + "description": "The reaction object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Reaction", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "The reactable subject.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Reactable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "RemoveReactionInput", + "description": "Autogenerated input type of RemoveReaction", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "subjectId", + "description": "The Node ID of the subject to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "content", + "description": "The name of the emoji to react with.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReactionContent", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddCommentPayload", + "description": "Autogenerated return type of AddComment", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commentEdge", + "description": "The edge from the subject's comment connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": "The subject", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timelineEdge", + "description": "The edge from the subject's timeline connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IssueTimelineItemEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddCommentInput", + "description": "Autogenerated input type of AddComment", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "subjectId", + "description": "The Node ID of the subject to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The contents of the comment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateSubscriptionPayload", + "description": "Autogenerated return type of UpdateSubscription", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscribable", + "description": "The input subscribable entity.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Subscribable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateSubscriptionInput", + "description": "Autogenerated input type of UpdateSubscription", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "subscribableId", + "description": "The Node ID of the subscribable object to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "state", + "description": "The new state of the subscription.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SubscriptionState", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateProjectPayload", + "description": "Autogenerated return type of CreateProject", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The new project.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CreateProjectInput", + "description": "Autogenerated input type of CreateProject", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "ownerId", + "description": "The owner ID to create the project under.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of project.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The description of project.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateProjectPayload", + "description": "Autogenerated return type of UpdateProject", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The updated project.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectInput", + "description": "Autogenerated input type of UpdateProject", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectId", + "description": "The Project ID to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of project.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The description of project.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "state", + "description": "Whether the project is open or closed.", + "type": { + "kind": "ENUM", + "name": "ProjectState", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteProjectPayload", + "description": "Autogenerated return type of DeleteProject", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The repository or organization the project was removed from.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "ProjectOwner", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectInput", + "description": "Autogenerated input type of DeleteProject", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectId", + "description": "The Project ID to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddProjectColumnPayload", + "description": "Autogenerated return type of AddProjectColumn", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "columnEdge", + "description": "The edge from the project's column connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumnEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The project", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddProjectColumnInput", + "description": "Autogenerated input type of AddProjectColumn", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectId", + "description": "The Node ID of the project.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of the column.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MoveProjectColumnPayload", + "description": "Autogenerated return type of MoveProjectColumn", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "columnEdge", + "description": "The new edge of the moved column.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumnEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MoveProjectColumnInput", + "description": "Autogenerated input type of MoveProjectColumn", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "columnId", + "description": "The id of the column to move.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "afterColumnId", + "description": "Place the new column after the column with this id. Pass null to place it at the front.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateProjectColumnPayload", + "description": "Autogenerated return type of UpdateProjectColumn", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectColumn", + "description": "The updated project column.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectColumnInput", + "description": "Autogenerated input type of UpdateProjectColumn", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectColumnId", + "description": "The ProjectColumn ID to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of project column.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteProjectColumnPayload", + "description": "Autogenerated return type of DeleteProjectColumn", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deletedColumnId", + "description": "The deleted column ID.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "project", + "description": "The project the deleted column was in.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectColumnInput", + "description": "Autogenerated input type of DeleteProjectColumn", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "columnId", + "description": "The id of the column to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddProjectCardPayload", + "description": "Autogenerated return type of AddProjectCard", + "fields": [ + { + "name": "cardEdge", + "description": "The edge from the ProjectColumn's card connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCardEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectColumn", + "description": "The ProjectColumn", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Project", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddProjectCardInput", + "description": "Autogenerated input type of AddProjectCard", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectColumnId", + "description": "The Node ID of the ProjectColumn.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "contentId", + "description": "The content of the card. Must be a member of the ProjectCardItem union", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "note", + "description": "The note on the card.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateProjectCardPayload", + "description": "Autogenerated return type of UpdateProjectCard", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "projectCard", + "description": "The updated ProjectCard.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCard", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateProjectCardInput", + "description": "Autogenerated input type of UpdateProjectCard", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "projectCardId", + "description": "The ProjectCard ID to update.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "note", + "description": "The note of ProjectCard.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MoveProjectCardPayload", + "description": "Autogenerated return type of MoveProjectCard", + "fields": [ + { + "name": "cardEdge", + "description": "The new edge of the moved card.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectCardEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "MoveProjectCardInput", + "description": "Autogenerated input type of MoveProjectCard", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "cardId", + "description": "The id of the card to move.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "columnId", + "description": "The id of the column to move it into.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "afterCardId", + "description": "Place the new card after the card with this id. Pass null to place it at the top.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteProjectCardPayload", + "description": "Autogenerated return type of DeleteProjectCard", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "column", + "description": "The column the deleted card was in.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ProjectColumn", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deletedCardId", + "description": "The deleted card ID.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteProjectCardInput", + "description": "Autogenerated input type of DeleteProjectCard", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "cardId", + "description": "The id of the card to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddPullRequestReviewPayload", + "description": "Autogenerated return type of AddPullRequestReview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The newly created pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reviewEdge", + "description": "The edge from the pull request's review connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddPullRequestReviewInput", + "description": "Autogenerated input type of AddPullRequestReview", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestId", + "description": "The Node ID of the pull request to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "commitOID", + "description": "The commit OID the review pertains to.", + "type": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The contents of the review body comment.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "event", + "description": "The event to perform on the pull request review.", + "type": { + "kind": "ENUM", + "name": "PullRequestReviewEvent", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "comments", + "description": "The review line comments.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DraftPullRequestReviewComment", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "PullRequestReviewEvent", + "description": "The possible events to perform on a pull request review.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "COMMENT", + "description": "Submit general feedback without explicit approval.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "APPROVE", + "description": "Submit feedback and approve merging these changes.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REQUEST_CHANGES", + "description": "Submit feedback that must be addressed before merging.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DISMISS", + "description": "Dismiss review so it now longer effects merging.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DraftPullRequestReviewComment", + "description": "Specifies a review comment to be left with a Pull Request Review.", + "fields": null, + "inputFields": [ + { + "name": "path", + "description": "Path to the file being commented on.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "position", + "description": "Position in the file to leave a comment on.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "Body of the comment to leave.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SubmitPullRequestReviewPayload", + "description": "Autogenerated return type of SubmitPullRequestReview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The submitted pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "SubmitPullRequestReviewInput", + "description": "Autogenerated input type of SubmitPullRequestReview", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewId", + "description": "The Pull Request Review ID to submit.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "event", + "description": "The event to send to the Pull Request Review.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PullRequestReviewEvent", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The text field to set on the Pull Request Review.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdatePullRequestReviewPayload", + "description": "Autogenerated return type of UpdatePullRequestReview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The updated pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdatePullRequestReviewInput", + "description": "Autogenerated input type of UpdatePullRequestReview", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewId", + "description": "The Node ID of the pull request review to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The contents of the pull request review body.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DismissPullRequestReviewPayload", + "description": "Autogenerated return type of DismissPullRequestReview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The dismissed pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DismissPullRequestReviewInput", + "description": "Autogenerated input type of DismissPullRequestReview", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewId", + "description": "The Node ID of the pull request review to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "message", + "description": "The contents of the pull request review dismissal message.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeletePullRequestReviewPayload", + "description": "Autogenerated return type of DeletePullRequestReview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReview", + "description": "The deleted pull request review.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeletePullRequestReviewInput", + "description": "Autogenerated input type of DeletePullRequestReview", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewId", + "description": "The Node ID of the pull request review to delete.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddPullRequestReviewCommentPayload", + "description": "Autogenerated return type of AddPullRequestReviewComment", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comment", + "description": "The newly created comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commentEdge", + "description": "The edge from the review's comment connection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewCommentEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddPullRequestReviewCommentInput", + "description": "Autogenerated input type of AddPullRequestReviewComment", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewId", + "description": "The Node ID of the review to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "commitOID", + "description": "The SHA of the commit to comment on.", + "type": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The text of the comment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "path", + "description": "The relative path of the file to comment on.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "position", + "description": "The line index in the diff to comment on.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "inReplyTo", + "description": "The comment id to reply to.", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdatePullRequestReviewCommentPayload", + "description": "Autogenerated return type of UpdatePullRequestReviewComment", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequestReviewComment", + "description": "The updated comment.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequestReviewComment", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdatePullRequestReviewCommentInput", + "description": "Autogenerated input type of UpdatePullRequestReviewComment", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestReviewCommentId", + "description": "The Node ID of the comment to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The text of the comment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemoveOutsideCollaboratorPayload", + "description": "Autogenerated return type of RemoveOutsideCollaborator", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removedUser", + "description": "The user that was removed as an outside collaborator.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "RemoveOutsideCollaboratorInput", + "description": "Autogenerated input type of RemoveOutsideCollaborator", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "userId", + "description": "The ID of the outside collaborator to remove.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "organizationId", + "description": "The ID of the organization to remove the outside collaborator from.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RequestReviewsPayload", + "description": "Autogenerated return type of RequestReviews", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pullRequest", + "description": "The pull request that is getting requests.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PullRequest", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "requestedReviewersEdge", + "description": "The edge from the pull request to the requested reviewers.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "UserEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "RequestReviewsInput", + "description": "Autogenerated input type of RequestReviews", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "pullRequestId", + "description": "The Node ID of the pull request to modify.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "userIds", + "description": "The Node IDs of the user to request.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "teamIds", + "description": "The Node IDs of the team to request.", + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "union", + "description": "Add users to the set rather than replace.", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddStarPayload", + "description": "Autogenerated return type of AddStar", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "starrable", + "description": "The starrable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Starrable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddStarInput", + "description": "Autogenerated input type of AddStar", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "starrableId", + "description": "The Starrable ID to star.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemoveStarPayload", + "description": "Autogenerated return type of RemoveStar", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "starrable", + "description": "The starrable.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "Starrable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "RemoveStarInput", + "description": "Autogenerated input type of RemoveStar", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "starrableId", + "description": "The Starrable ID to unstar.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AcceptTopicSuggestionPayload", + "description": "Autogenerated return type of AcceptTopicSuggestion", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "topic", + "description": "The accepted topic.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AcceptTopicSuggestionInput", + "description": "Autogenerated input type of AcceptTopicSuggestion", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "repositoryId", + "description": "The Node ID of the repository.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of the suggested topic.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeclineTopicSuggestionPayload", + "description": "Autogenerated return type of DeclineTopicSuggestion", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "topic", + "description": "The declined topic.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Topic", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeclineTopicSuggestionInput", + "description": "Autogenerated input type of DeclineTopicSuggestion", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "repositoryId", + "description": "The Node ID of the repository.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": "The name of the suggested topic.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "reason", + "description": "The reason why the suggested topic is declined.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "TopicSuggestionDeclineReason", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "TopicSuggestionDeclineReason", + "description": "Reason that the suggested topic is declined.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "NOT_RELEVANT", + "description": "The suggested topic is not relevant to the repository.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TOO_SPECIFIC", + "description": "The suggested topic is too specific for the repository (e.g. #ruby-on-rails-version-4-2-1).", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PERSONAL_PREFERENCE", + "description": "The viewer does not like the suggested topic.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TOO_GENERAL", + "description": "The suggested topic is too general for the repository.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateTopicsPayload", + "description": "Autogenerated return type of UpdateTopics", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invalidTopicNames", + "description": "Names of the provided topics that are not valid.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The updated repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateTopicsInput", + "description": "Autogenerated input type of UpdateTopics", + "fields": null, + "inputFields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "repositoryId", + "description": "The Node ID of the repository.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "topicNames", + "description": "An array of topic names.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Schema", + "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", + "fields": [ + { + "name": "directives", + "description": "A list of all directives supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Directive", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mutationType", + "description": "If this server supports mutation, the type that mutation operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "queryType", + "description": "The type that query operations will be rooted at.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subscriptionType", + "description": "If this server support subscription, the type that subscription operations will be rooted at.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "types", + "description": "A list of all types supported by this server.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Type", + "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", + "fields": [ + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enumValues", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__EnumValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "description": null, + "args": [ + { + "name": "includeDeprecated", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "false" + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Field", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inputFields", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "interfaces", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "kind", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__TypeKind", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ofType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "possibleTypes", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__TypeKind", + "description": "An enum describing what kind of type a given `__Type` is.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SCALAR", + "description": "Indicates this type is a scalar.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Indicates this type is a union. `possibleTypes` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Indicates this type is an enum. `enumValues` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Indicates this type is an input object. `inputFields` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIST", + "description": "Indicates this type is a list. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NON_NULL", + "description": "Indicates this type is a non-null. `ofType` is a valid field.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Field", + "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", + "fields": [ + { + "name": "args", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__InputValue", + "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", + "fields": [ + { + "name": "defaultValue", + "description": "A GraphQL-formatted string representing the default value for this input value.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__Type", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__EnumValue", + "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", + "fields": [ + { + "name": "deprecationReason", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isDeprecated", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "__Directive", + "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", + "fields": [ + { + "name": "args", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "__InputValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locations", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "__DirectiveLocation", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "onField", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + }, + { + "name": "onFragment", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + }, + { + "name": "onOperation", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "Use `locations`." + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "__DirectiveLocation", + "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "QUERY", + "description": "Location adjacent to a query operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MUTATION", + "description": "Location adjacent to a mutation operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUBSCRIPTION", + "description": "Location adjacent to a subscription operation.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD", + "description": "Location adjacent to a field.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_DEFINITION", + "description": "Location adjacent to a fragment definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FRAGMENT_SPREAD", + "description": "Location adjacent to a fragment spread.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INLINE_FRAGMENT", + "description": "Location adjacent to an inline fragment.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCHEMA", + "description": "Location adjacent to a schema definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SCALAR", + "description": "Location adjacent to a scalar definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OBJECT", + "description": "Location adjacent to an object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FIELD_DEFINITION", + "description": "Location adjacent to a field definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ARGUMENT_DEFINITION", + "description": "Location adjacent to an argument definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INTERFACE", + "description": "Location adjacent to an interface definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNION", + "description": "Location adjacent to a union definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM", + "description": "Location adjacent to an enum definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ENUM_VALUE", + "description": "Location adjacent to an enum value definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_OBJECT", + "description": "Location adjacent to an input object type definition.", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPUT_FIELD_DEFINITION", + "description": "Location adjacent to an input object field definition.", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "GpgSignature", + "description": "Represents a GPG signature on a Commit or Tag.", + "fields": [ + { + "name": "email", + "description": "Email used to sign this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "True if the signature is valid and verified by GitHub.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "keyId", + "description": "Hex-encoded ID of the key that signed this object.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "Payload for GPG signing object. Raw ODB object without the signature header.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signature", + "description": "ASCII-armored signature header from object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signer", + "description": "GitHub user corresponding to the email signing this commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GitSignatureState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "GitSignature", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryInvitation", + "description": "An invitation for a user to be added to a repository.", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "invitee", + "description": "The user who received the invitation.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "inviter", + "description": "The user who created the invitation.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the user is invited to.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "RepositoryInvitationRepository", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RepositoryInvitationRepository", + "description": "A subset of repository info shared with potential collaborators.", + "fields": [ + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The description of the repository.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "descriptionHTML", + "description": "The description of the repository rendered to HTML.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "HTML", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasIssuesEnabled", + "description": "Indicates if the repository has issues feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "hasWikiEnabled", + "description": "Indicates if the repository has wiki feature enabled.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "homepageUrl", + "description": "The repository's URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isFork", + "description": "Identifies if the repository is a fork.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isLocked", + "description": "Indicates if the repository has been locked or not.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isMirror", + "description": "Identifies if the repository is a mirror.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPrivate", + "description": "Identifies if the repository is private.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "license", + "description": "The license associated with the repository", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lockReason", + "description": "The reason the repository has been locked.", + "args": [], + "type": { + "kind": "ENUM", + "name": "RepositoryLockReason", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mirrorUrl", + "description": "The repository's original mirror URL.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nameWithOwner", + "description": "The repository's name with owner.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "owner", + "description": "The User owner of the repository.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "RepositoryOwner", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pushedAt", + "description": "Identifies when the repository was last pushed to.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resourcePath", + "description": "The HTTP path for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": "Identifies the date and time when the object was last updated.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": true, + "deprecationReason": "General type updated timestamps will eventually be replaced by other field specific timestamps." + }, + { + "name": "url", + "description": "The HTTP URL for this repository", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "RepositoryInfo", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SmimeSignature", + "description": "Represents an S/MIME signature on a Commit or Tag.", + "fields": [ + { + "name": "email", + "description": "Email used to sign this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "True if the signature is valid and verified by GitHub.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "Payload for GPG signing object. Raw ODB object without the signature header.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signature", + "description": "ASCII-armored signature header from object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signer", + "description": "GitHub user corresponding to the email signing this commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GitSignatureState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "GitSignature", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Tag", + "description": "Represents a Git tag.", + "fields": [ + { + "name": "abbreviatedOid", + "description": "An abbreviated version of the Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitResourcePath", + "description": "The HTTP path for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "commitUrl", + "description": "The HTTP URL for this Git object", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "URI", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "message", + "description": "The Git tag message.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The Git tag name.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oid", + "description": "The Git object ID", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "GitObjectID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "repository", + "description": "The Repository the Git object belongs to", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Repository", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tagger", + "description": "Details about the tag author.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "GitActor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "target", + "description": "The Git object the tag points to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "GitObject", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UnknownSignature", + "description": "Represents an unknown signature on a Commit or Tag.", + "fields": [ + { + "name": "email", + "description": "Email used to sign this object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isValid", + "description": "True if the signature is valid and verified by GitHub.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "payload", + "description": "Payload for GPG signing object. Raw ODB object without the signature header.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signature", + "description": "ASCII-armored signature header from object.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "signer", + "description": "GitHub user corresponding to the email signing this commit.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "The state of this signature. `VALID` if signature is valid and verified by GitHub, otherwise represents reason why signature is considered invalid.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "GitSignatureState", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "GitSignature", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddedToProjectEvent", + "description": "Represents a 'added_to_project' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BaseRefChangedEvent", + "description": "Represents a 'base_ref_changed' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommentDeletedEvent", + "description": "Represents a 'comment_deleted' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ConvertedNoteToIssueEvent", + "description": "Represents a 'converted_note_to_issue' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MentionedEvent", + "description": "Represents a 'mentioned' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MovedColumnsInProjectEvent", + "description": "Represents a 'moved_columns_in_project' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemovedFromProjectEvent", + "description": "Represents a 'removed_from_project' event on a given issue or pull request.", + "fields": [ + { + "name": "actor", + "description": "Identifies the actor who performed the event.", + "args": [], + "type": { + "kind": "INTERFACE", + "name": "Actor", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createdAt", + "description": "Identifies the date and time when the object was created.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "databaseId", + "description": "Identifies the primary key from the database.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": true, + "deprecationReason": "Exposed database IDs will eventually be removed in favor of global Relay IDs." + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + } + ], + "directives": [ + { + "name": "include", + "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "description": "Included when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "skip", + "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", + "locations": [ + "FIELD", + "FRAGMENT_SPREAD", + "INLINE_FRAGMENT" + ], + "args": [ + { + "name": "if", + "description": "Skipped when true.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + } + ] + }, + { + "name": "deprecated", + "description": "Marks an element of a GraphQL schema as no longer supported.", + "locations": [ + "FIELD_DEFINITION", + "ENUM_VALUE" + ], + "args": [ + { + "name": "reason", + "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"No longer supported\"" + } + ] + } + ] + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/App.java b/app/src/main/java/com/fastaccess/App.java index ceec5311..9c4ec55d 100644 --- a/app/src/main/java/com/fastaccess/App.java +++ b/app/src/main/java/com/fastaccess/App.java @@ -4,12 +4,14 @@ import android.app.Application; import android.support.annotation.NonNull; import android.support.v7.preference.PreferenceManager; +import com.apollographql.apollo.ApolloClient; import com.crashlytics.android.Crashlytics; import com.crashlytics.android.core.CrashlyticsCore; import com.fastaccess.data.dao.model.Models; import com.fastaccess.helper.TypeFaceHelper; import com.fastaccess.provider.colors.ColorsProvider; import com.fastaccess.provider.emoji.EmojiManager; +import com.fastaccess.provider.rest.RestProvider; import com.fastaccess.provider.tasks.notification.NotificationSchedulerJobTask; import com.miguelbcr.io.rx_billing_service.RxBillingService; @@ -32,6 +34,7 @@ import shortbread.Shortbread; public class App extends Application { private static App instance; private ReactiveEntityStore dataStore; + private ApolloClient apolloClient; @Override public void onCreate() { super.onCreate(); @@ -87,4 +90,14 @@ public class App extends Application { } return dataStore; } + + public ApolloClient getApolloClient() { + if (apolloClient == null) { + apolloClient = ApolloClient.builder() + .serverUrl("https://api.github.com/graphql") + .okHttpClient(RestProvider.provideOkHttpClient()) + .build(); + } + return apolloClient; + } } \ No newline at end of file diff --git a/build.gradle b/build.gradle index f7d8a0cb..4998d73a 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ buildscript { classpath 'com.novoda:gradle-build-properties-plugin:0.3' classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2' classpath 'io.fabric.tools:gradle:1.22.2' + classpath 'com.apollographql.apollo:gradle-plugin:0.4.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } From c6468b5696d657fdb1bd226ea8d45dac22f2291a Mon Sep 17 00:00:00 2001 From: kosh Date: Wed, 2 Aug 2017 11:11:38 +0800 Subject: [PATCH 09/67] editor & reviews to have table support, em, hr and others. (WIP) --- .../data/dao/model/AbstractRepo.java | 13 ++--- .../data/service/OrganizationService.java | 9 ++- .../provider/markdown/MarkDownProvider.java | 56 +++++++++++++++---- .../provider/rest/RestProvider.java | 2 +- .../provider/timeline/HtmlHelper.java | 37 ++++++++---- .../provider/timeline/handler/HrHandler.java | 11 +++- .../{UnderLineSpan.java => HrSpan.java} | 16 ++++-- .../timeline/handler/ListsHandler.java | 2 +- .../timeline/handler/TableHandler.java | 17 ++---- .../viewholder/CommentsViewHolder.java | 8 ++- .../viewholder/IssueDetailsViewHolder.java | 5 +- .../viewholder/ReviewCommentsViewHolder.java | 2 +- .../adapter/viewholder/ReviewsViewHolder.java | 9 ++- .../TimelineCommentsViewHolder.java | 2 +- .../modules/about/FastHubAboutActivity.java | 2 +- .../ui/modules/code/CodeViewerActivity.java | 2 + .../ui/modules/editor/EditorActivity.java | 10 ++-- .../ui/modules/editor/EditorPresenter.java | 3 + .../ui/modules/feeds/FeedsPresenter.java | 4 +- .../ui/modules/main/MainPresenter.java | 4 +- .../all/AllNotificationsFragment.java | 16 +++++- .../unread/UnreadNotificationsFragment.java | 18 +++++- .../unread/UnreadNotificationsPresenter.java | 4 +- .../ui/modules/repos/RepoPagerPresenter.java | 2 +- .../commit/details/CommitPagerActivity.java | 7 ++- .../timeline/IssueTimelineFragment.java | 2 + .../timeline/IssueTimelinePresenter.java | 6 +- .../PullRequestTimelinePresenter.java | 15 +++++ .../settings/SlackBottomSheetDialog.java | 3 +- .../ui/widgets/dialog/MessageDialogView.java | 10 +++- app/src/main/res/drawable/ic_inline_code.xml | 9 +++ .../main_layouts/layout/editor_layout.xml | 41 ++++++++------ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 34 files changed, 243 insertions(+), 108 deletions(-) rename app/src/main/java/com/fastaccess/provider/timeline/handler/{UnderLineSpan.java => HrSpan.java} (69%) create mode 100644 app/src/main/res/drawable/ic_inline_code.xml diff --git a/app/src/main/java/com/fastaccess/data/dao/model/AbstractRepo.java b/app/src/main/java/com/fastaccess/data/dao/model/AbstractRepo.java index 33c7833c..4413be49 100644 --- a/app/src/main/java/com/fastaccess/data/dao/model/AbstractRepo.java +++ b/app/src/main/java/com/fastaccess/data/dao/model/AbstractRepo.java @@ -121,13 +121,12 @@ import static com.fastaccess.data.dao.model.Repo.UPDATED_AT; String starredUser; String reposOwner; - public Single save(Repo entity) { - return RxHelper.getSingle(App.getInstance().getDataStore() - .delete(Repo.class) - .where(Repo.ID.eq(entity.getId())) - .get() - .single() - .flatMap(observer -> App.getInstance().getDataStore().insert(entity))); + public Disposable save(Repo entity) { + return Single.create(e -> { + BlockingEntityStore dataSource = App.getInstance().getDataStore().toBlocking(); + dataSource.delete(Repo.class).where(Repo.ID.eq(entity.getId())).get().value(); + dataSource.insert(entity); + }).subscribe(o -> {/**/}, Throwable::printStackTrace); } public static Maybe getRepo(@NonNull String name, @NonNull String login) { diff --git a/app/src/main/java/com/fastaccess/data/service/OrganizationService.java b/app/src/main/java/com/fastaccess/data/service/OrganizationService.java index 07d6b29b..f4b64f10 100644 --- a/app/src/main/java/com/fastaccess/data/service/OrganizationService.java +++ b/app/src/main/java/com/fastaccess/data/service/OrganizationService.java @@ -39,10 +39,13 @@ public interface OrganizationService { @GET("teams/{id}/repos") Observable> getTeamRepos(@Path("id") long id, @Query("page") int page); - @GET("orgs/{username}/events") - Observable> getReceivedEvents(@NonNull @Path("username") String userName, @Query("page") int page); + @GET("users/{username}/events/orgs/{org}") + Observable> getReceivedEvents(@NonNull @Path("username") String userName, + @NonNull @Path("org") String org, @Query("page") int page); @GET("orgs/{org}/repos") - Observable> getOrgRepos(@NonNull @Path("org") String org, @QueryMap(encoded = true) Map filterParams, @Query("page") int page); + Observable> getOrgRepos(@NonNull @Path("org") String org, + @QueryMap(encoded = true) Map filterParams, + @Query("page") int page); } diff --git a/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java b/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java index 48ae3983..6c382d27 100644 --- a/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java +++ b/app/src/main/java/com/fastaccess/provider/markdown/MarkDownProvider.java @@ -3,6 +3,7 @@ package com.fastaccess.provider.markdown; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Html; +import android.view.ViewTreeObserver; import android.webkit.MimeTypeMap; import android.widget.EditText; import android.widget.TextView; @@ -12,6 +13,7 @@ import com.fastaccess.helper.InputHelper; import com.fastaccess.helper.Logger; import com.fastaccess.provider.timeline.HtmlHelper; +import org.commonmark.Extension; import org.commonmark.ext.autolink.AutolinkExtension; import org.commonmark.ext.front.matter.YamlFrontMatterExtension; import org.commonmark.ext.gfm.strikethrough.StrikethroughExtension; @@ -27,6 +29,7 @@ import org.commonmark.renderer.html.HtmlWriter; import java.util.Arrays; import java.util.Collections; +import java.util.List; import java.util.Set; /** @@ -49,20 +52,40 @@ public class MarkDownProvider { public static void setMdText(@NonNull TextView textView, String markdown) { if (!InputHelper.isEmpty(markdown)) { - Parser parser = Parser.builder().build(); - Node node = parser.parse(markdown); - String rendered = HtmlRenderer.builder() - .extensions(Arrays.asList(AutolinkExtension.create(), - StrikethroughExtension.create(), - TablesExtension.create(), - InsExtension.create(), - YamlFrontMatterExtension.create())) - .build().render(node); - Logger.e(rendered); - HtmlHelper.htmlIntoTextView(textView, rendered); + int width = textView.getMeasuredWidth(); + if (width > 0) { + render(textView, markdown, width); + } else { + textView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override public void onGlobalLayout() { + textView.getViewTreeObserver().removeOnGlobalLayoutListener(this); + render(textView, markdown, textView.getMeasuredWidth()); + } + }); + } } } + protected static void render(@NonNull TextView textView, String markdown, int width) { + List extensions = Arrays.asList( + StrikethroughExtension.create(), + AutolinkExtension.create(), + TablesExtension.create(), + InsExtension.create(), + YamlFrontMatterExtension.create()); + Parser parser = Parser.builder() + .extensions(extensions) + .build(); + Node node = parser.parse(markdown); + String rendered = HtmlRenderer + .builder() + .extensions(extensions) + .build() + .render(node); + Logger.e(rendered); + HtmlHelper.htmlIntoTextView(textView, rendered, (width - (textView.getPaddingStart() + textView.getPaddingEnd()))); + } + public static void stripMdText(@NonNull TextView textView, String markdown) { if (!InputHelper.isEmpty(markdown)) { Parser parser = Parser.builder().build(); @@ -173,6 +196,17 @@ public class MarkDownProvider { } } + public static void addInlinleCode(@NonNull EditText editText) { + String source = editText.getText().toString(); + int selectionStart = editText.getSelectionStart(); + int selectionEnd = editText.getSelectionEnd(); + String substring = source.substring(selectionStart, selectionEnd); + String result = "`" + substring + "` "; + editText.getText().replace(selectionStart, selectionEnd, result); + editText.setSelection(result.length() + selectionStart - 2); + + } + public static void addStrikeThrough(@NonNull EditText editText) { String source = editText.getText().toString(); int selectionStart = editText.getSelectionStart(); diff --git a/app/src/main/java/com/fastaccess/provider/rest/RestProvider.java b/app/src/main/java/com/fastaccess/provider/rest/RestProvider.java index ce9288a8..c91413ea 100644 --- a/app/src/main/java/com/fastaccess/provider/rest/RestProvider.java +++ b/app/src/main/java/com/fastaccess/provider/rest/RestProvider.java @@ -61,7 +61,7 @@ public class RestProvider { .setPrettyPrinting() .create(); - private static OkHttpClient provideOkHttpClient() { + public static OkHttpClient provideOkHttpClient() { if (okHttpClient == null) { OkHttpClient.Builder client = new OkHttpClient.Builder(); if (BuildConfig.DEBUG) { diff --git a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java index f409b00a..6ade3ecd 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java @@ -1,21 +1,20 @@ package com.fastaccess.provider.timeline; + import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.graphics.Color; -import android.graphics.Point; import android.graphics.drawable.Drawable; import android.net.Uri; import android.support.annotation.ColorInt; import android.support.annotation.NonNull; import android.support.v4.content.ContextCompat; import android.view.HapticFeedbackConstants; -import android.view.WindowManager; +import android.view.ViewTreeObserver; import android.widget.PopupMenu; import android.widget.TextView; -import com.fastaccess.App; import com.fastaccess.R; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.ViewHelper; @@ -46,9 +45,18 @@ import net.nightwhistler.htmlspanner.handlers.BoldHandler; public class HtmlHelper { - public static void htmlIntoTextView(@NonNull TextView textView, @NonNull String html) { + public static void htmlIntoTextView(@NonNull TextView textView, @NonNull String html, int width) { registerClickEvent(textView); - textView.setText(initHtml(textView).fromHtml(format(html).toString())); + if (textView.getMeasuredWidth() > 0) { + textView.setText(initHtml(textView, getActualWidth(textView)).fromHtml(format(html).toString())); + } else { + textView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override public void onGlobalLayout() { + textView.getViewTreeObserver().removeOnGlobalLayoutListener(this); + textView.setText(initHtml(textView, getActualWidth(textView)).fromHtml(format(html).toString())); + } + }); + } } private static void registerClickEvent(@NonNull TextView textView) { @@ -83,7 +91,11 @@ public class HtmlHelper { }); } - private static HtmlSpanner initHtml(@NonNull TextView textView) { + private static int getActualWidth(TextView textView) { + return textView.getMeasuredWidth() - (convertDpToPx(textView.getContext(), 16)); + } + + private static HtmlSpanner initHtml(@NonNull TextView textView, int width) { @PrefGetter.ThemeType int theme = PrefGetter.getThemeType(); @ColorInt int windowBackground = getWindowBackground(theme); Drawable checked = ContextCompat.getDrawable(textView.getContext(), R.drawable.ic_checkbox_small); @@ -109,14 +121,10 @@ public class HtmlHelper { mySpanner.registerHandler("sub", new SubScriptHandler()); mySpanner.registerHandler("sup", new SuperScriptHandler()); mySpanner.registerHandler("a", new LinkHandler()); - mySpanner.registerHandler("hr", new HrHandler(windowBackground, textView.getWidth())); + mySpanner.registerHandler("hr", new HrHandler(windowBackground, width, false)); TableHandler tableHandler = new TableHandler(); tableHandler.setTextColor(ViewHelper.generateTextColor(windowBackground)); - WindowManager windowManager = (WindowManager) App.getInstance().getSystemService(Context.WINDOW_SERVICE); - Point point = new Point(); - windowManager.getDefaultDisplay().getRealSize(point); - tableHandler.setTableWidth((int) (point.x / 1.2)); - tableHandler.setTextSize(18.0F); + tableHandler.setTableWidth(width); mySpanner.registerHandler("table", tableHandler); return mySpanner; } @@ -204,4 +212,9 @@ public class HtmlHelper { length = input.length(); } } + + private static int convertDpToPx(Context context, float dp) { + return (int) (dp * context.getResources().getDisplayMetrics().density + 0.5f); + } + } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java index 68e5536b..21a75d3b 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrHandler.java @@ -4,6 +4,7 @@ import android.text.SpannableStringBuilder; import android.text.Spanned; import net.nightwhistler.htmlspanner.TagNodeHandler; +import net.nightwhistler.htmlspanner.spans.CenterSpan; import org.htmlcleaner.TagNode; @@ -17,12 +18,16 @@ import lombok.AllArgsConstructor; private final int color; private final int width; - + private final boolean isHeader; @Override public void handleTagNode(TagNode tagNode, SpannableStringBuilder spannableStringBuilder, int i, int i1) { - spannableStringBuilder.append(" "); - spannableStringBuilder.setSpan(new UnderLineSpan(color, width), i, i1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spannableStringBuilder.append("\n"); + SpannableStringBuilder builder = new SpannableStringBuilder("$"); + HrSpan hrSpan = new HrSpan(color, width); + builder.setSpan(hrSpan, 0, builder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + builder.setSpan(new CenterSpan(), 0, builder.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + builder.append("\n"); + spannableStringBuilder.append(builder); } } diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java similarity index 69% rename from app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java rename to app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java index 2cf4a003..6bfa74fe 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/UnderLineSpan.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java @@ -2,19 +2,22 @@ package com.fastaccess.provider.timeline.handler; import android.graphics.Canvas; import android.graphics.Paint; +import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import android.text.style.LineHeightSpan; import android.text.style.ReplacementSpan; -public class UnderLineSpan extends ReplacementSpan implements LineHeightSpan { +public class HrSpan extends ReplacementSpan implements LineHeightSpan { - private final int height = 5; + private final int height = 10; private int width; private final Drawable drawable; + private final int color; - UnderLineSpan(int color, int width) { + HrSpan(int color, int width) { + this.color = color; this.width = width; this.drawable = new ColorDrawable(color); } @@ -25,8 +28,11 @@ public class UnderLineSpan extends ReplacementSpan implements LineHeightSpan { @Override public void draw(@NonNull Canvas canvas, CharSequence text, int start, int end, float x, int top, int y, int bottom, @NonNull Paint paint) { - drawable.setBounds((int) x, bottom - height, (int) x + width, bottom); - drawable.draw(canvas); + final int currentColor = paint.getColor(); + paint.setColor(color); + paint.setStyle(Paint.Style.FILL); + canvas.drawRect(new Rect(0, bottom - height, (int) x + width, bottom), paint); + paint.setColor(currentColor); } @Override public void chooseHeight(CharSequence text, int start, int end, int spanstartv, int v, Paint.FontMetricsInt fm) { diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/ListsHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/ListsHandler.java index c0ac2c34..28f5641a 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/ListsHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/ListsHandler.java @@ -42,7 +42,7 @@ import lombok.NoArgsConstructor; return node.getParent() == null ? null : node.getParent().getName(); } - @Override public void beforeChildren(TagNode node, SpannableStringBuilder builder) { + @Override public void beforeChildren(TagNode node, SpannableStringBuilder builder) { TodoItems todoItem = null; if (node.getChildTags() != null && node.getChildTags().length > 0) { for (TagNode tagNode : node.getChildTags()) { diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/TableHandler.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/TableHandler.java index 3c4a7ada..ff1bab2d 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/TableHandler.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/TableHandler.java @@ -19,6 +19,7 @@ import android.text.style.AlignmentSpan; import android.text.style.ImageSpan; import net.nightwhistler.htmlspanner.TagNodeHandler; +import net.nightwhistler.htmlspanner.spans.CenterSpan; import org.htmlcleaner.TagNode; @@ -35,12 +36,12 @@ import java.util.List; */ public class TableHandler extends TagNodeHandler { - private int tableWidth = 400; + private int tableWidth = 500; private Typeface typeFace = Typeface.DEFAULT; - private float textSize = 16f; + private float textSize = 30f; private int textColor = Color.BLACK; - private static final int PADDING = 5; + private static final int PADDING = 20; /** * Sets how wide the table should be. @@ -144,7 +145,6 @@ public class TableHandler extends TagNodeHandler { int rowHeight = 0; for (Spanned cell : row) { - StaticLayout layout = new StaticLayout(cell, textPaint, columnWidth - 2 * PADDING, Alignment.ALIGN_NORMAL, 1f, 0f, true); @@ -165,19 +165,14 @@ public class TableHandler extends TagNodeHandler { drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); builder.setSpan(new ImageSpan(drawable), start + i, builder.length(), 33); - } - - /* - We add an empty last row to work around a rendering issue where - the last row would appear detached. - */ builder.append("\uFFFC"); - Drawable drawable = new TableRowDrawable(new ArrayList(), table.isDrawBorder()); + Drawable drawable = new TableRowDrawable(new ArrayList<>(), table.isDrawBorder()); drawable.setBounds(0, 0, tableWidth, 1); builder.setSpan(new ImageSpan(drawable), builder.length() - 1, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); builder.setSpan((AlignmentSpan) () -> Alignment.ALIGN_CENTER, start, builder.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + builder.setSpan(new CenterSpan(), start, builder.length(), 33); builder.append("\n"); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java index f6460677..fcc84c86 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/CommentsViewHolder.java @@ -31,6 +31,7 @@ public class CommentsViewHolder extends BaseViewHolder { @BindView(R.id.comment) FontTextView comment; @BindView(R.id.toggleHolder) View toggleHolder; @BindView(R.id.toggle) AppCompatImageView toggle; + private final ViewGroup viewGroup; @Override public void onClick(View v) { if (v.getId() == R.id.toggleHolder) { @@ -40,17 +41,18 @@ public class CommentsViewHolder extends BaseViewHolder { } } - private CommentsViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter) { + private CommentsViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter, @NonNull ViewGroup viewGroup) { super(itemView, adapter); itemView.setOnClickListener(null); itemView.setOnLongClickListener(null); toggleHolder.setOnClickListener(this); toggle.setOnClickListener(this); toggle.setOnLongClickListener(this); + this.viewGroup = viewGroup; } public static CommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter) { - return new CommentsViewHolder(getView(viewGroup, R.layout.no_emojies_comments_row_item), adapter); + return new CommentsViewHolder(getView(viewGroup, R.layout.no_emojies_comments_row_item), adapter, viewGroup); } @Override public void bind(@NonNull Comment commentsModel) { @@ -61,7 +63,7 @@ public class CommentsViewHolder extends BaseViewHolder { avatar.setUrl(null, null, false, false); } if (!InputHelper.isEmpty(commentsModel.getBodyHtml())) { - HtmlHelper.htmlIntoTextView(comment, commentsModel.getBodyHtml()); + HtmlHelper.htmlIntoTextView(comment, commentsModel.getBodyHtml(), viewGroup.getWidth()); } else { comment.setText(""); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueDetailsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueDetailsViewHolder.java index 3d14dc32..628e854e 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueDetailsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/IssueDetailsViewHolder.java @@ -16,7 +16,6 @@ import com.fastaccess.data.dao.model.Issue; import com.fastaccess.data.dao.model.PullRequest; import com.fastaccess.data.dao.model.User; import com.fastaccess.helper.InputHelper; -import com.fastaccess.helper.Logger; import com.fastaccess.helper.ParseDateFormat; import com.fastaccess.provider.scheme.LinkParserHelper; import com.fastaccess.provider.timeline.CommentsHelper; @@ -194,8 +193,8 @@ public class IssueDetailsViewHolder extends BaseViewHolder { if (reactionsModel != null) { appendEmojies(reactionsModel); } - if (!InputHelper.isEmpty(description)) { - HtmlHelper.htmlIntoTextView(comment, description); + if (description != null && !description.trim().isEmpty()) { + HtmlHelper.htmlIntoTextView(comment, description, viewGroup.getWidth()); } else { comment.setText(R.string.no_description_provided); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewCommentsViewHolder.java index 1085675a..5aa5c067 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewCommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewCommentsViewHolder.java @@ -129,7 +129,7 @@ public class ReviewCommentsViewHolder extends BaseViewHolder } date.setText(ParseDateFormat.getTimeAgo(commentModel.getCreatedAt())); if (!InputHelper.isEmpty(commentModel.getBodyHtml())) { - HtmlHelper.htmlIntoTextView(comment, commentModel.getBodyHtml()); + HtmlHelper.htmlIntoTextView(comment, commentModel.getBodyHtml(), viewGroup.getWidth()); } else { comment.setText(""); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java index 81024420..1d111389 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/ReviewsViewHolder.java @@ -33,15 +33,18 @@ public class ReviewsViewHolder extends BaseViewHolder { @BindView(R.id.avatarLayout) AvatarLayout avatarLayout; @BindView(R.id.stateText) FontTextView stateText; @BindView(R.id.body) FontTextView body; + private final ViewGroup viewGroup; - private ReviewsViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter) { + private ReviewsViewHolder(@NonNull View itemView, @Nullable BaseRecyclerAdapter adapter, @NonNull ViewGroup viewGroup) { super(itemView, adapter); itemView.setOnLongClickListener(null); itemView.setOnClickListener(null); + this.viewGroup = viewGroup; + } public static ReviewsViewHolder newInstance(ViewGroup viewGroup, BaseRecyclerAdapter adapter) { - return new ReviewsViewHolder(getView(viewGroup, R.layout.review_timeline_row_item), adapter); + return new ReviewsViewHolder(getView(viewGroup, R.layout.review_timeline_row_item), adapter, viewGroup); } @Override public void bind(@NonNull TimelineModel model) { @@ -66,7 +69,7 @@ public class ReviewsViewHolder extends BaseViewHolder { } if (!InputHelper.isEmpty(review.getBodyHtml())) { body.setVisibility(View.VISIBLE); - HtmlHelper.htmlIntoTextView(body, review.getBodyHtml()); + HtmlHelper.htmlIntoTextView(body, review.getBodyHtml(), viewGroup.getWidth()); } else { body.setVisibility(View.GONE); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java index 1d4efa42..0998dac0 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java @@ -144,7 +144,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder { (commentsModel.getLine() > 0 ? commentsModel.getLine() : commentsModel.getPosition()) + ") in " + commentsModel.getPath() + "
" + body; } - HtmlHelper.htmlIntoTextView(comment, body); + HtmlHelper.htmlIntoTextView(comment, body, viewGroup.getWidth()); } else { comment.setText(""); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/about/FastHubAboutActivity.java b/app/src/main/java/com/fastaccess/ui/modules/about/FastHubAboutActivity.java index 9b4f7fdf..1de10fde 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/about/FastHubAboutActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/about/FastHubAboutActivity.java @@ -146,7 +146,7 @@ public class FastHubAboutActivity extends MaterialAboutActivity { .addItem(new MaterialAboutActionItem.Builder() .text(R.string.join_slack) .icon(ContextCompat.getDrawable(context, R.drawable.ic_slack)) - .setOnClickAction(() -> ActivityHelper.startCustomTab(this, "http://rebrand.ly/fasthub")) + .setOnClickAction(() -> ActivityHelper.startCustomTab(this, "http://rebrand.ly/fasthub-slack")) .build()) .addItem(new MaterialAboutActionItem.Builder() .text(R.string.open_source_libs) diff --git a/app/src/main/java/com/fastaccess/ui/modules/code/CodeViewerActivity.java b/app/src/main/java/com/fastaccess/ui/modules/code/CodeViewerActivity.java index 54bb6477..c7b96073 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/code/CodeViewerActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/code/CodeViewerActivity.java @@ -8,6 +8,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.Menu; import android.view.MenuItem; +import android.webkit.MimeTypeMap; import com.annimon.stream.Objects; import com.evernote.android.state.State; @@ -90,6 +91,7 @@ public class CodeViewerActivity extends BaseActivity { } String title = Uri.parse(url).getLastPathSegment(); setTitle(title); + if (toolbar != null) toolbar.setSubtitle(MimeTypeMap.getFileExtensionFromUrl(url)); setTaskName(title); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java b/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java index 12f44435..2e1b097d 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java @@ -10,7 +10,6 @@ import android.support.transition.TransitionManager; import android.util.Log; import android.view.Menu; import android.view.MenuItem; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; @@ -22,7 +21,6 @@ import com.evernote.android.state.State; import com.fastaccess.R; import com.fastaccess.data.dao.EditReviewCommentModel; import com.fastaccess.data.dao.model.Comment; -import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.AnimHelper; import com.fastaccess.helper.AppHelper; import com.fastaccess.helper.BundleConstant; @@ -145,7 +143,8 @@ public class EditorActivity extends BaseActivity implements EditorMvp case R.id.unCheckbox: MarkDownProvider.addList(editText, "- [ ]"); break; + case R.id.inlineCode: + MarkDownProvider.addInlinleCode(editText); + break; } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java index 8496c13f..c27670ff 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java @@ -19,6 +19,7 @@ import com.fastaccess.data.dao.model.Repo; import com.fastaccess.data.dao.types.EventsType; import com.fastaccess.helper.BundleConstant; import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.Logger; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.RxHelper; import com.fastaccess.provider.rest.RestProvider; @@ -66,9 +67,10 @@ public class FeedsPresenter extends BasePresenter implements Feed Login login = Login.getUser(); if (login == null) return;// I can't understand how this could possibly be reached lol. Observable> observable; + Logger.e(isOrg); if (user != null) { if (isOrg) { - observable = RestProvider.getOrgService(isEnterprise()).getReceivedEvents(user, page); + observable = RestProvider.getOrgService(isEnterprise()).getReceivedEvents(login.getLogin(), user, page); } else { observable = RestProvider.getUserService(login.getLogin().equalsIgnoreCase(user) ? PrefGetter.isEnterprise() : isEnterprise()).getUserEvents(user, page); diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java index 51dfae1f..8e8336e5 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java @@ -54,10 +54,10 @@ public class MainPresenter extends BasePresenter implements MainMv } return Observable.empty(); }) - .subscribe(unread -> sendToView(view -> { + .subscribe(unread -> {/**/}, Throwable::printStackTrace/*fail silently*/, () -> sendToView(view -> { view.onInvalidateNotification(); view.onUpdateDrawerMenuHeader(); - }), Throwable::printStackTrace/*fail silently*/)); + }))); } @Override public boolean canBackPress(@NonNull DrawerLayout drawerLayout) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsFragment.java b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsFragment.java index a9f021d7..557f7ad8 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsFragment.java @@ -16,6 +16,7 @@ import com.fastaccess.R; import com.fastaccess.data.dao.GroupedNotificationModel; import com.fastaccess.data.dao.model.Notification; import com.fastaccess.data.dao.model.Repo; +import com.fastaccess.helper.Bundler; import com.fastaccess.helper.ObjectsCompat; import com.fastaccess.provider.scheme.SchemeParser; import com.fastaccess.provider.tasks.notification.ReadNotificationService; @@ -25,6 +26,7 @@ import com.fastaccess.ui.base.BaseFragment; import com.fastaccess.ui.modules.notification.callback.OnNotificationChangedListener; import com.fastaccess.ui.widgets.AppbarRefreshLayout; import com.fastaccess.ui.widgets.StateLayout; +import com.fastaccess.ui.widgets.dialog.MessageDialogView; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; import java.util.List; @@ -156,7 +158,12 @@ public class AllNotificationsFragment extends BaseFragment implements Rep if (InputHelper.isEmpty(login) || InputHelper.isEmpty(repoId)) return; makeRestCall(RestProvider.getRepoService(isEnterprise()).getRepo(login(), repoId()), repoModel -> { this.repo = repoModel; - manageObservable(this.repo.save(repo).toObservable()); + manageDisposable(this.repo.save(repo)); updatePinned(repoModel); sendToView(view -> { view.onInitRepo(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/CommitPagerActivity.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/CommitPagerActivity.java index 1c7c0845..ff342683 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/CommitPagerActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/CommitPagerActivity.java @@ -139,8 +139,9 @@ public class CommitPagerActivity extends BaseActivity getLoadMore() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index 87f34c0e..f5e83595 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -242,8 +242,10 @@ import lombok.Getter; lastPage = response.getLast(); } return TimelineConverter.INSTANCE.convert(response != null ? response.getItems() : null); - }).toList() - .toObservable(); + }) + .toList() + .toObservable() + .doOnError(Throwable::printStackTrace); makeRestCall(observable, timeline -> sendToView(view -> view.onNotifyAdapter(timeline, page))); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index e9946b5a..64a2533b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -300,6 +300,21 @@ public class PullRequestTimelinePresenter extends BasePresenter apolloCall = App.getInstance().getApolloClient() + .query(query); + manageDisposable(Rx2Apollo.from(apolloCall) + .filter(dataResponse -> !dataResponse.hasErrors() && dataResponse.data() != null) + .map(Response::data) + .filter(data -> data != null && data.repository() != null) + .map(PullRequestTimelineQuery.Data::repository) + .filter(repository -> repository.pullRequest() != null) + .map(PullRequestTimelineQuery.Repository::pullRequest) + .map(PullRequestTimelineQuery.PullRequest::timeline) + .subscribe(timeline -> { + Logger.e(timeline.__typename(), timeline.pageInfo(), timeline.edges()); + }, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress)));*/ + Observable> timeline = RestProvider.getIssueService(isEnterprise()) .getTimeline(login, repoId, number, page) diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/SlackBottomSheetDialog.java b/app/src/main/java/com/fastaccess/ui/modules/settings/SlackBottomSheetDialog.java index 6e9213f2..91cf9aed 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/SlackBottomSheetDialog.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/SlackBottomSheetDialog.java @@ -51,8 +51,7 @@ public class SlackBottomSheetDialog extends BaseBottomSheetDialog { @OnClick({R.id.cancel, R.id.ok}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.ok: -// view.getContext().startService(new Intent(getContext().getApplicationContext(), SlackInvitationService.class)); - ActivityHelper.startCustomTab(getActivity(), "http://rebrand.ly/fasthub"); + ActivityHelper.startCustomTab(getActivity(), "http://rebrand.ly/fasthub-slack"); break; } if (listener != null) listener.onDismissed(); diff --git a/app/src/main/java/com/fastaccess/ui/widgets/dialog/MessageDialogView.java b/app/src/main/java/com/fastaccess/ui/widgets/dialog/MessageDialogView.java index 24ae5443..e621c942 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/dialog/MessageDialogView.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/dialog/MessageDialogView.java @@ -83,7 +83,11 @@ public class MessageDialogView extends BaseBottomSheetDialog { } else { message.setText(msg); } - if (bundle != null) initButton(bundle); + if (bundle != null) { + boolean hideCancel = bundle.getBoolean("hideCancel"); + if (hideCancel) cancel.setVisibility(View.GONE); + initButton(bundle); + } } private void initButton(@NonNull Bundle bundle) { @@ -103,11 +107,11 @@ public class MessageDialogView extends BaseBottomSheetDialog { } else if (!InputHelper.isEmpty(primaryExtra)) { ok.setText(primaryExtra); if (!InputHelper.isEmpty(secondaryExtra)) cancel.setText(secondaryExtra); + ok.setVisibility(View.VISIBLE); + cancel.setVisibility(View.VISIBLE); } } } - boolean hideCancel = bundle.getBoolean("hideCancel"); - if (hideCancel) cancel.setVisibility(View.GONE); } @Override protected void onDismissedByScrolling() { diff --git a/app/src/main/res/drawable/ic_inline_code.xml b/app/src/main/res/drawable/ic_inline_code.xml new file mode 100644 index 00000000..6ba7e75c --- /dev/null +++ b/app/src/main/res/drawable/ic_inline_code.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml b/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml index d32ce81d..515ea5fb 100644 --- a/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/editor_layout.xml @@ -110,7 +110,7 @@ android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/header_one" android:padding="@dimen/spacing_normal" - android:scaleType="centerCrop" + android:src="@drawable/ic_header_one"/> + + @@ -264,7 +273,7 @@ android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/preview" android:padding="@dimen/spacing_normal" - android:scaleType="centerCrop" + android:src="@drawable/ic_eye"/> diff --git a/build.gradle b/build.gradle index 4998d73a..b0c1b816 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0-alpha8' + classpath 'com.android.tools.build:gradle:3.0.0-alpha9' classpath 'com.google.gms:google-services:3.0.0' classpath 'com.novoda:gradle-build-properties-plugin:0.3' classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c7cc2d0f..de90b3ce 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip \ No newline at end of file From 404c3d50a56a6da66557f165910b6bc8018277d8 Mon Sep 17 00:00:00 2001 From: kosh Date: Wed, 2 Aug 2017 17:33:40 +0800 Subject: [PATCH 10/67] enhanced FastScroller & added to every list. --- .../graphql/pr/PullRequestTimeline.graphql | 408 +++++++++++++++--- .../ui/modules/feeds/FeedsFragment.java | 3 + .../issues/fragment/FilterIssueFragment.java | 3 + .../ui/modules/gists/GistsFragment.java | 4 +- .../gist/comments/GistCommentsFragment.java | 3 + .../gist/files/GistFilesListFragment.java | 3 + .../modules/main/issues/MyIssuesFragment.java | 3 + .../main/orgs/OrgListDialogFragment.java | 3 + .../pullrequests/MyPullRequestFragment.java | 3 + .../all/AllNotificationsFragment.java | 3 + .../unread/UnreadNotificationsFragment.java | 3 + .../modules/pinned/PinnedReposFragment.java | 3 + .../followers/ProfileFollowersFragment.java | 5 +- .../following/ProfileFollowingFragment.java | 5 +- .../profile/gists/ProfileGistsFragment.java | 3 + .../org/members/OrgMembersFragment.java | 5 +- .../profile/org/repos/OrgReposFragment.java | 3 + .../profile/org/teams/OrgTeamFragment.java | 3 + .../details/members/TeamMembersFragment.java | 3 + .../details/repos/TeamReposFragment.java | 3 + .../profile/repos/ProfileReposFragment.java | 3 + .../starred/ProfileStarredFragment.java | 3 + .../code/commit/RepoCommitsFragment.java | 3 + .../comments/CommitCommentsFragment.java | 3 + .../details/files/CommitFilesFragment.java | 3 + .../RepoContributorsFragment.java | 5 +- .../repos/code/files/RepoFilesFragment.java | 3 + .../code/releases/RepoReleasesFragment.java | 3 + .../assignees/AssigneesDialogFragment.java | 3 + .../repos/extras/branches/BranchesFragment.kt | 3 + .../extras/labels/LabelsDialogFragment.java | 3 + .../create/CreateLabelDialogFragment.java | 3 + .../milestone/MilestoneDialogFragment.java | 3 + .../extras/misc/RepoMiscDialogFragment.java | 5 +- .../issue/RepoClosedIssuesFragment.java | 3 + .../issue/RepoOpenedIssuesFragment.java | 3 + .../timeline/IssueTimelineFragment.java | 5 +- .../pull_request/RepoPullRequestFragment.java | 3 + .../commits/PullRequestCommitsFragment.java | 5 +- .../files/PullRequestFilesFragment.java | 3 + .../timeline/PullRequestTimelineFragment.java | 5 +- .../PullRequestTimelinePresenter.java | 48 ++- .../reactions/ReactionsDialogFragment.java | 5 +- .../search/code/SearchCodeFragment.java | 3 + .../search/issues/SearchIssuesFragment.java | 3 + .../search/repos/SearchReposFragment.java | 3 + .../search/users/SearchUsersFragment.java | 3 + .../trending/fragment/TrendingFragment.kt | 3 + .../ui/widgets/dialog/ListDialogView.java | 3 + .../scroll/RecyclerFastScroller.java | 276 ------------ .../scroll/RecyclerViewFastScroller.java | 143 ++++++ .../main/res/drawable/fastscroller_bubble.xml | 30 +- .../main/res/drawable/ic_fasthub_mascot.xml | 43 ++ .../layout/create_label_layout.xml | 29 +- .../layout/fab_micro_grid_refresh_list.xml | 49 ++- .../layout/micro_grid_refresh_list.xml | 34 +- .../layout/small_grid_refresh_list.xml | 36 +- .../layout/tending_buttons_layout.xml | 26 +- .../layout/vertical_refresh_list.xml | 32 +- .../layout/fastscroller_layout.xml | 26 ++ .../layout/simple_footer_list_dialog.xml | 33 +- .../layout/simple_list_dialog.xml | 25 +- 62 files changed, 942 insertions(+), 456 deletions(-) delete mode 100644 app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerFastScroller.java create mode 100755 app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java create mode 100644 app/src/main/res/drawable/ic_fasthub_mascot.xml create mode 100755 app/src/main/res/layouts/other_layouts/layout/fastscroller_layout.xml diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 82c2fff1..8d98b04d 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -1,51 +1,87 @@ -query PullRequestTimeline($owner: String!, $name: String!, $number: Int!){ +query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: String) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { - timeline(first: 30) { + timeline(first: 100 after: $page) { + edges { + cursor + } pageInfo { hasNextPage startCursor endCursor } - edges { - cursor - } totalCount nodes { __typename ... on Commit { - committer { + id + oid + url + messageHeadlineHTML + author { + name user { login - avatarUrl url + avatarUrl } } - oid - signature { - state - } - messageHeadlineHTML - status { - state - } - committedDate - url } ... on PullRequestReview { + databaseId + url bodyHTML - } - ... on IssueComment { - viewerCanUpdate + submittedAt + createdAt + state author { login - avatarUrl url + avatarUrl } - authorAssociation + comments(first: 30) { + edges { + node { + databaseId + authorAssociation + bodyHTML + diffHunk + createdAt + url + originalPosition + path + position + author { + login + avatarUrl + url + } + reactionGroups { + viewerHasReacted + content + users { + totalCount + } + } + } + } + } + } + ... on IssueComment { + databaseId + bodyHTML createdAt updatedAt - body + viewerCanReact + viewerCanDelete + viewerCanUpdate + viewerDidAuthor + authorAssociation + author { + login + url + avatarUrl + } reactionGroups { viewerHasReacted content @@ -54,102 +90,356 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!){ } } } - ... on ReviewRequestedEvent { + ... on ClosedEvent { + createdAt actor { login avatarUrl + url } - subject { + commit { + oid + url + messageHeadlineHTML + } + } + ... on ReopenedEvent { + createdAt + actor { login avatarUrl + url } } - ... on PullRequestReviewComment { - body - author { - login - } - } - ... on ClosedEvent { + ... on MergedEvent { + id + url + createdAt + mergeRefName commit { oid } actor { - login avatarUrl - } - } - ... on ReopenedEvent { - actor { login + url } } ... on ReferencedEvent { - actor { - login - } + id + createdAt isCrossRepository isDirectReference + commitRepository { + nameWithOwner + url + } + commit { + oid + } subject { + __typename ... on Issue { title + number } ... on PullRequest { title + number } } } + ... on AssignedEvent { + id + createdAt + actor { + login + avatarUrl + url + } + user { + avatarUrl + login + url + } + } + ... on UnassignedEvent { + id + createdAt + actor { + login + avatarUrl + url + } + user { + avatarUrl + login + url + } + } ... on LabeledEvent { actor { login + avatarUrl + url } label { color name } } + ... on UnlabeledEvent { + actor { + login + avatarUrl + url + } + label { + color + name + } + } + ... on MilestonedEvent { + createdAt + id + milestoneTitle + actor { + login + avatarUrl + url + } + } + ... on DemilestonedEvent { + createdAt + id + milestoneTitle + actor { + login + avatarUrl + url + } + } ... on RenamedTitleEvent { - actor { - login - avatarUrl - } - previousTitle + id + createdAt currentTitle + previousTitle } - ... on AssignedEvent { + ... on LockedEvent { createdAt actor { login avatarUrl - } - user { - login - avatarUrl + url } } - ... on MergedEvent { + ... on UnlockedEvent { createdAt actor { login + avatarUrl + url } - commit { - oid + } + ... on DeployedEvent { + createdAt + ref { + name + prefix + } + deployment { + createdAt + state + creator { + avatarUrl + login + url + } + latestStatus { + description + environmentUrl + state + } + statuses(first: 30) { + edges { + node { + creator { + avatarUrl + login + url + } + logUrl + state + description + environmentUrl + } + } + } } - mergeRefName } ... on HeadRefDeletedEvent { createdAt - actor { - login - avatarUrl - } headRefName + actor { + avatarUrl + login + url + } } ... on HeadRefRestoredEvent { + actor { + avatarUrl + login + url + } createdAt + pullRequest { + number + headRefName + } + } + ... on HeadRefForcePushedEvent { + createdAt + ref { + name + prefix + } actor { login avatarUrl + url + } + afterCommit { + oid + url + } + beforeCommit { + oid + url + status { + state + contexts { + context + createdAt + description + state + targetUrl + creator { + avatarUrl + login + url + } + } + } + } + } + ... on BaseRefForcePushedEvent { + createdAt + ref { + name + prefix + } + actor { + login + avatarUrl + url + } + afterCommit { + oid + url + } + beforeCommit { + oid + url + status { + state + contexts { + context + createdAt + description + state + targetUrl + creator { + avatarUrl + login + url + } + } + } + } + } + ... on ReviewRequestedEvent { + id + createdAt + actor { + avatarUrl + login + url + } + subject { + avatarUrl + login + url + } + } + ... on ReviewRequestRemovedEvent { + id + createdAt + actor { + avatarUrl + login + url + } + subject { + avatarUrl + login + url + } + } + ... on ReviewDismissedEvent { + databaseId + createdAt + messageHtml + previousReviewState + review { + databaseId + submittedAt + authorAssociation + bodyHTML + state + viewerDidAuthor + author { + login + avatarUrl + url + } + comments(first: 30) { + edges { + node { + databaseId + authorAssociation + bodyHTML + diffHunk + createdAt + url + originalPosition + path + position + author { + login + avatarUrl + url + } + reactionGroups { + viewerHasReacted + content + users { + totalCount + } + } + } + } + } } } } @@ -161,4 +451,4 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!){ remaining limit } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsFragment.java b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsFragment.java index eecd79d0..ea253bc6 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsFragment.java @@ -27,6 +27,7 @@ import com.fastaccess.ui.modules.repos.code.commit.details.CommitPagerActivity; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.dialog.ListDialogView; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.ArrayList; import java.util.List; @@ -45,6 +46,7 @@ public class FeedsFragment extends BaseFragment i @BindView(R.id.recycler) DynamicRecyclerView recycler; @BindView(R.id.refresh) SwipeRefreshLayout refresh; @BindView(R.id.stateLayout) StateLayout stateLayout; + @BindView(R.id.fastScroller) RecyclerViewFastScroller fastScroller; private FeedsAdapter adapter; private OnLoadMore onLoadMore; @@ -79,6 +81,7 @@ public class FeedsFragment extends BaseFragment i recycler.addDivider(); } recycler.addOnScrollListener(getLoadMore()); + fastScroller.attachRecyclerView(recycler); if (getPresenter().getEvents().isEmpty() && !getPresenter().isApiCalled()) { getPresenter().onFragmentCreated(getArguments()); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssueFragment.java b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssueFragment.java index c8873d2d..3881656e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssueFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssueFragment.java @@ -23,6 +23,7 @@ import com.fastaccess.ui.modules.repos.issues.issue.details.IssuePagerActivity; import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.PullRequestPagerActivity; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.List; @@ -37,6 +38,7 @@ public class FilterIssueFragment extends BaseFragment onLoadMore; private IssuesAdapter adapter; @@ -165,6 +167,7 @@ public class FilterIssueFragment extends BaseFragment i @BindView(R.id.recycler) DynamicRecyclerView recycler; @BindView(R.id.refresh) SwipeRefreshLayout refresh; @BindView(R.id.stateLayout) StateLayout stateLayout; - + @BindView(R.id.fastScroller) RecyclerViewFastScroller fastScroller; private GistsAdapter adapter; private OnLoadMore onLoadMore; @@ -56,6 +57,7 @@ public class GistsFragment extends BaseFragment i if (getPresenter().getGists().isEmpty() && !getPresenter().isApiCalled()) { onRefresh(); } + fastScroller.attachRecyclerView(recycler); } @Override public void onRefresh() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsFragment.java b/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsFragment.java index f7b11b34..95e6f410 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsFragment.java @@ -25,6 +25,7 @@ import com.fastaccess.ui.modules.editor.EditorActivity; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.dialog.MessageDialogView; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.List; @@ -42,6 +43,7 @@ public class GistCommentsFragment extends BaseFragment onLoadMore; private IssuesAdapter adapter; @@ -137,6 +139,7 @@ public class MyIssuesFragment extends BaseFragment onLoadMore; private PullRequestAdapter adapter; @@ -155,6 +157,7 @@ public class MyPullRequestFragment extends BaseFragment onLoadMore; private UsersAdapter adapter; @@ -73,6 +75,7 @@ public class ProfileFollowersFragment extends BaseFragment onLoadMore; private UsersAdapter adapter; @@ -73,6 +75,7 @@ public class ProfileFollowingFragment extends BaseFragment onLoadMore; @@ -68,6 +70,7 @@ public class ProfileGistsFragment extends BaseFragment onLoadMore; private UsersAdapter adapter; @@ -73,6 +75,7 @@ public class OrgMembersFragment extends BaseFragment onLoadMore; private ReposAdapter adapter; @@ -75,6 +77,7 @@ public class OrgReposFragment extends BaseFragment onLoadMore; private TeamsAdapter adapter; @@ -73,6 +75,7 @@ public class OrgTeamFragment extends BaseFragment onLoadMore; private UsersAdapter adapter; @@ -73,6 +75,7 @@ public class TeamMembersFragment extends BaseFragment onLoadMore; private ReposAdapter adapter; @@ -73,6 +75,7 @@ public class TeamReposFragment extends BaseFragment onLoadMore; private ReposAdapter adapter; @@ -74,6 +76,7 @@ public class ProfileReposFragment extends BaseFragment onLoadMore; private ReposAdapter adapter; private RepoPagerMvp.TabsBadgeListener tabsBadgeListener; @@ -91,6 +93,7 @@ public class ProfileStarredFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); private IssuePullsTimelineAdapter adapter; @@ -80,6 +82,7 @@ public class CommitCommentsFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); private CommitPagerMvp.View viewCallback; @@ -106,6 +108,7 @@ public class CommitFilesFragment extends BaseFragment selectionMap; private AssigneesAdapter adapter; @@ -88,6 +90,7 @@ public class AssigneesDialogFragment extends BaseDialogFragment(), Br val recycler: DynamicRecyclerView by lazy { view!!.findViewById(R.id.recycler) } val refresh: SwipeRefreshLayout by lazy { view!!.findViewById(R.id.refresh) } val stateLayout: StateLayout by lazy { view!!.findViewById(R.id.stateLayout) } + val fastScroller: RecyclerViewFastScroller by lazy { view!!.findViewById(R.id.fastScroller) } private var onLoadMore: OnLoadMore? = null private var branchCallback: BranchesPagerListener? = null @@ -72,6 +74,7 @@ class BranchesFragment : BaseFragment(), Br if (savedInstanceState == null) { presenter.onFragmentCreated(arguments) } + fastScroller.attachRecyclerView(recycler) } override fun showProgress(resId: Int) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/LabelsDialogFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/LabelsDialogFragment.java index 2db81cce..44878d81 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/LabelsDialogFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/LabelsDialogFragment.java @@ -23,6 +23,7 @@ import com.fastaccess.ui.modules.repos.extras.labels.create.CreateLabelDialogFra import com.fastaccess.ui.widgets.FontTextView; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.ArrayList; import java.util.HashMap; @@ -44,6 +45,7 @@ public class LabelsDialogFragment extends BaseDialogFragment selectionMap; private LabelsAdapter adapter; private LabelsMvp.SelectedLabelsListener callback; @@ -109,6 +111,7 @@ public class LabelsDialogFragment extends BaseDialogFragment getPresenter().onLoadMilestones(login, repo)); refresh.setOnRefreshListener(() -> getPresenter().onLoadMilestones(login, repo)); + fastScroller.attachRecyclerView(recycler); } @Override public void showProgress(@StringRes int resId) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscDialogFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscDialogFragment.java index 9639459c..477cf3e8 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscDialogFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscDialogFragment.java @@ -18,6 +18,7 @@ import com.fastaccess.ui.adapter.UsersAdapter; import com.fastaccess.ui.base.BaseDialogFragment; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.List; @@ -32,6 +33,7 @@ public class RepoMiscDialogFragment extends BaseDialogFragment onLoadMore; private UsersAdapter adapter; @@ -100,11 +102,12 @@ public class RepoMiscDialogFragment extends BaseDialogFragment onLoadMore; private IssuesAdapter adapter; private RepoPagerMvp.TabsBadgeListener tabsBadgeListener; @@ -108,6 +110,7 @@ public class RepoClosedIssuesFragment extends BaseFragment onLoadMore; private IssuesAdapter adapter; private RepoIssuesPagerMvp.View pagerCallback; @@ -110,6 +112,7 @@ public class RepoOpenedIssuesFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); private IssuePullsTimelineAdapter adapter; @@ -124,7 +124,6 @@ public class IssueTimelineFragment extends BaseFragment onLoadMore; private PullRequestAdapter adapter; private RepoPagerMvp.TabsBadgeListener tabsBadgeListener; @@ -102,6 +104,7 @@ public class RepoPullRequestFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); private PullRequestFilesMvp.PatchCallback viewCallback; @@ -107,6 +109,7 @@ public class PullRequestFilesFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); private IssuePullsTimelineAdapter adapter; @@ -107,7 +107,6 @@ public class PullRequestTimelineFragment extends BaseFragment implements PullRequestTimelineMvp.Presenter { private ArrayList timeline = new ArrayList<>(); + private SparseArray pages = new SparseArray<>(); private ReactionsProvider reactionsProvider; private int page; private int previousTotal; @@ -300,7 +307,7 @@ public class PullRequestTimelinePresenter extends BasePresenter apolloCall = App.getInstance().getApolloClient() .query(query); manageDisposable(Rx2Apollo.from(apolloCall) @@ -311,25 +318,32 @@ public class PullRequestTimelinePresenter extends BasePresenter repository.pullRequest() != null) .map(PullRequestTimelineQuery.Repository::pullRequest) .map(PullRequestTimelineQuery.PullRequest::timeline) + .map(timeline -> { + pages.clear(); + List edges = timeline.edges(); + if (edges != null) { + for (int i = 0; i < edges.size(); i++) { + pages.append(i, edges.get(i).cursor()); + } + } + return timeline; + }) .subscribe(timeline -> { Logger.e(timeline.__typename(), timeline.pageInfo(), timeline.edges()); - }, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress)));*/ + }, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress))); + } + @NonNull private PullRequestTimelineQuery getTimelineBuilder(@NonNull String login, @NonNull String repoId, int number, int page) { + return PullRequestTimelineQuery.builder() + .owner(login) + .name(repoId) + .number(number) + .page(getPage(page)) + .build(); + } - Observable> timeline = RestProvider.getIssueService(isEnterprise()) - .getTimeline(login, repoId, number, page) - .flatMap(response -> { - lastPage = response != null ? response.getLast() : 0; - return TimelineConverter.INSTANCE.convert(response != null ? response.getItems() : null); - }) - .toList() - .toObservable() - .doOnComplete(() -> { - if (page == 1) { - loadStatus(login, repoId, sha, isMergeable); - } - }); - makeRestCall(timeline, timelineModels -> sendToView(view -> view.onNotifyAdapter(timelineModels, page))); + @Nullable private String getPage(int number) { + return number < pages.size() ? pages.get(number - 1) : null; } private void loadStatus(@NonNull String login, @NonNull String repoId, @NonNull String sha, boolean isMergeable) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogFragment.java index e64deea5..691c7f82 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogFragment.java @@ -22,6 +22,7 @@ import com.fastaccess.ui.widgets.AppbarRefreshLayout; import com.fastaccess.ui.widgets.SpannableBuilder; import com.fastaccess.ui.widgets.StateLayout; import com.fastaccess.ui.widgets.recyclerview.DynamicRecyclerView; +import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller; import java.util.List; @@ -39,6 +40,7 @@ public class ReactionsDialogFragment extends BaseDialogFragment items, int page) { @@ -94,7 +97,7 @@ public class ReactionsDialogFragment extends BaseDialogFragment onLoadMore; private SearchCodeAdapter adapter; private SearchMvp.View countCallback; @@ -94,6 +96,7 @@ public class SearchCodeFragment extends BaseFragment onLoadMore; private IssuesAdapter adapter; private SearchMvp.View countCallback; @@ -91,6 +93,7 @@ public class SearchIssuesFragment extends BaseFragment onLoadMore; private ReposAdapter adapter; private SearchMvp.View countCallback; @@ -93,6 +95,7 @@ public class SearchReposFragment extends BaseFragment onLoadMore; private UsersAdapter adapter; private SearchMvp.View countCallback; @@ -91,6 +93,7 @@ public class SearchUsersFragment extends BaseFragment(R.id.recycler) } val refresh: SwipeRefreshLayout by lazy { view!!.findViewById(R.id.refresh) } val stateLayout: StateLayout by lazy { view!!.findViewById(R.id.stateLayout) } + val fastScroller: RecyclerViewFastScroller by lazy { view!!.findViewById(R.id.fastScroller) } val adapter by lazy { TrendingAdapter(presenter.getTendingList()) } @State var lang: String = "" @@ -40,6 +42,7 @@ class TrendingFragment : BaseFragment extends BaseDialogFragment imp @BindView(R.id.title) FontTextView title; @BindView(R.id.recycler) DynamicRecyclerView recycler; + @BindView(R.id.fastScroller) RecyclerViewFastScroller fastScroller; public interface onSimpleItemSelection { void onItemSelected(O item); @@ -56,6 +58,7 @@ public class ListDialogView extends BaseDialogFragment imp } else { dismiss(); } + fastScroller.attachRecyclerView(recycler); } @Override public void onAttach(Context context) { diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerFastScroller.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerFastScroller.java deleted file mode 100644 index 2b9a2df2..00000000 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerFastScroller.java +++ /dev/null @@ -1,276 +0,0 @@ -package com.fastaccess.ui.widgets.recyclerview.scroll; - -import android.animation.Animator; -import android.animation.AnimatorListenerAdapter; -import android.animation.AnimatorSet; -import android.animation.ObjectAnimator; -import android.annotation.SuppressLint; -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.InsetDrawable; -import android.graphics.drawable.StateListDrawable; -import android.support.annotation.AttrRes; -import android.support.annotation.ColorInt; -import android.support.v4.view.GravityCompat; -import android.support.v4.view.animation.FastOutLinearInInterpolator; -import android.support.v4.view.animation.LinearOutSlowInInterpolator; -import android.support.v7.widget.RecyclerView; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewGroup; -import android.widget.FrameLayout; - -import com.fastaccess.R; -import com.fastaccess.provider.rest.loadmore.OnLoadMore; - -/** - * Created by thermatk on 17/04/2017. - * Original source: https://github.com/plusCubed/recycler-fast-scroll - */ -public class RecyclerFastScroller extends FrameLayout { - - private static final int DEFAULT_AUTO_HIDE_DELAY = 1500; - - private final View bar; - private final View handle; - final int hiddenTranslationX; - private final Runnable hideRunnable; - private final int minScrollHandleHeight; - private RecyclerView recyclerView; - private AnimatorSet animator; - boolean animatingIn; - - private int hideDelay; - private boolean hidingEnabled; - private int handleNormalColor; - private int handlePressedColor; - private int touchTargetWidth; - private int barInset; - private OnLoadMore onLoadMore; - private boolean hideOverride; - private RecyclerView.Adapter adapter; - private RecyclerView.AdapterDataObserver adapterObserver = new RecyclerView.AdapterDataObserver() { - @Override public void onChanged() { - super.onChanged(); - requestLayout(); - } - }; - - public RecyclerFastScroller(Context context) { - this(context, null); - } - - public RecyclerFastScroller(Context context, AttributeSet attrs) { - super(context, attrs, 0); - handleNormalColor = resolveColor(context, R.attr.colorControlNormal); - handlePressedColor = resolveColor(context, R.attr.colorAccent); - touchTargetWidth = convertDpToPx(context, 24); - hideDelay = DEFAULT_AUTO_HIDE_DELAY; - hidingEnabled = true; - int fortyEightDp = convertDpToPx(context, 48); - setLayoutParams(new ViewGroup.LayoutParams(fortyEightDp, ViewGroup.LayoutParams.MATCH_PARENT)); - bar = new View(context); - handle = new View(context); - addView(bar); - addView(handle); - int eightDp = convertDpToPx(getContext(), 8); - barInset = touchTargetWidth - eightDp; - if (touchTargetWidth > fortyEightDp) { - throw new RuntimeException("Touch target width cannot be larger than 48dp!"); - } - bar.setLayoutParams(new LayoutParams(touchTargetWidth, ViewGroup.LayoutParams.MATCH_PARENT, GravityCompat.END)); - handle.setLayoutParams(new LayoutParams(touchTargetWidth, convertDpToPx(context, 80), GravityCompat.END)); - updateHandleColorsAndInset(); - updateBarColorAndInset(); - minScrollHandleHeight = fortyEightDp; - hiddenTranslationX = ((isRTL(getContext()) ? -1 : 1) * eightDp) + convertDpToPx(getContext(), 4); - hideRunnable = () -> { - if (!handle.isPressed()) { - if (animator != null && animator.isStarted()) { - animator.cancel(); - } - animator = new AnimatorSet(); - ObjectAnimator animator2 = ObjectAnimator.ofFloat(RecyclerFastScroller.this, View.TRANSLATION_X, - hiddenTranslationX); - animator2.setInterpolator(new FastOutLinearInInterpolator()); - animator2.setDuration(150); - handle.setEnabled(false); - animator.play(animator2); - animator.start(); - } - }; - - handle.setOnTouchListener(new OnTouchListener() { - private float mInitialBarHeight; - private float mLastPressedYAdjustedToInitial; - - @SuppressLint("ClickableViewAccessibility") - @Override public boolean onTouch(View v, MotionEvent event) { - if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { - handle.setPressed(true); - recyclerView.stopScroll(); - mInitialBarHeight = bar.getHeight(); - mLastPressedYAdjustedToInitial = event.getY() + handle.getY() + bar.getY(); - } else if (event.getActionMasked() == MotionEvent.ACTION_MOVE) { - float newHandlePressedY = event.getY() + handle.getY() + bar.getY(); - int barHeight = bar.getHeight(); - float newHandlePressedYAdjustedToInitial = newHandlePressedY + (mInitialBarHeight - barHeight); - float deltaPressedYFromLastAdjustedToInitial = newHandlePressedYAdjustedToInitial - mLastPressedYAdjustedToInitial; - int dY = (int) ((deltaPressedYFromLastAdjustedToInitial / mInitialBarHeight) * (recyclerView.computeVerticalScrollRange())); - if (recyclerView != null) { - try { - recyclerView.scrollBy(0, dY); - if (onLoadMore != null) { - onLoadMore.onScrollStateChanged(recyclerView, RecyclerView.SCROLL_STATE_DRAGGING); - } - } catch (Exception t) { - t.printStackTrace(); - } - } - mLastPressedYAdjustedToInitial = newHandlePressedYAdjustedToInitial; - } else if (event.getActionMasked() == MotionEvent.ACTION_UP) { - mLastPressedYAdjustedToInitial = -1; - recyclerView.stopNestedScroll(); - handle.setPressed(false); - postAutoHide(); - } - return true; - } - }); - setTranslationX(hiddenTranslationX); - } - - @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { - super.onLayout(changed, left, top, right, bottom); - updateScroller(); - } - - private void updateScroller() { - if (recyclerView == null) return; - int scrollOffset = recyclerView.computeVerticalScrollOffset(); - int verticalScrollRange = recyclerView.computeVerticalScrollRange() + recyclerView.getPaddingBottom(); - int barHeight = bar.getHeight(); - float ratio = (float) scrollOffset / (verticalScrollRange - barHeight); - int calculatedHandleHeight = (int) ((float) barHeight / verticalScrollRange * barHeight); - if (calculatedHandleHeight < minScrollHandleHeight) { - calculatedHandleHeight = minScrollHandleHeight; - } - if (calculatedHandleHeight >= barHeight) { - setTranslationX(hiddenTranslationX); - hideOverride = true; - return; - } - hideOverride = false; - float y = ratio * (barHeight - calculatedHandleHeight); - handle.setY(y); - } - - private void updateHandleColorsAndInset() { - StateListDrawable drawable = new StateListDrawable(); - - if (!isRTL(getContext())) { - drawable.addState(View.PRESSED_ENABLED_STATE_SET, - new InsetDrawable(new ColorDrawable(handlePressedColor), barInset, 0, 0, 0)); - drawable.addState(View.EMPTY_STATE_SET, - new InsetDrawable(new ColorDrawable(handleNormalColor), barInset, 0, 0, 0)); - } else { - drawable.addState(View.PRESSED_ENABLED_STATE_SET, - new InsetDrawable(new ColorDrawable(handlePressedColor), 0, 0, barInset, 0)); - drawable.addState(View.EMPTY_STATE_SET, - new InsetDrawable(new ColorDrawable(handleNormalColor), 0, 0, barInset, 0)); - } - handle.setBackground(drawable); - } - - private void updateBarColorAndInset() { -// Drawable drawable; -// -// if (!isRTL(getContext())) { -// drawable = new InsetDrawable(new ColorDrawable(mBarColor), barInset, 0, 0, 0); -// } else { -// drawable = new InsetDrawable(new ColorDrawable(mBarColor), 0, 0, barInset, 0); -// } -// drawable.setAlpha(57); -// bar.setBackground(drawable); - } - - public void attachRecyclerView(RecyclerView recyclerView) { - this.recyclerView = recyclerView; - this.recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { - @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { - super.onScrolled(recyclerView, dx, dy); - RecyclerFastScroller.this.show(); - } - }); - if (recyclerView.getAdapter() != null && recyclerView.getAdapter() != adapter) { - if (adapter != null) { - adapter.unregisterAdapterDataObserver(adapterObserver); - } - recyclerView.getAdapter().registerAdapterDataObserver(adapterObserver); - adapter = recyclerView.getAdapter(); - } - } - - public void show() { - requestLayout(); - - post(new Runnable() { - @Override - public void run() { - if (hideOverride) { - return; - } - - handle.setEnabled(true); - if (!animatingIn && getTranslationX() != 0) { - if (animator != null && animator.isStarted()) { - animator.cancel(); - } - animator = new AnimatorSet(); - ObjectAnimator animator = ObjectAnimator.ofFloat(RecyclerFastScroller.this, View.TRANSLATION_X, 0); - animator.setInterpolator(new LinearOutSlowInInterpolator()); - animator.setDuration(100); - animator.addListener(new AnimatorListenerAdapter() { - @Override - public void onAnimationEnd(Animator animation) { - super.onAnimationEnd(animation); - animatingIn = false; - } - }); - animatingIn = true; - RecyclerFastScroller.this.animator.play(animator); - RecyclerFastScroller.this.animator.start(); - } - postAutoHide(); - } - }); - } - - void postAutoHide() { - if (recyclerView != null && hidingEnabled) { - recyclerView.removeCallbacks(hideRunnable); - recyclerView.postDelayed(hideRunnable, hideDelay); - } - } - - @ColorInt private int resolveColor(Context context, @AttrRes int color) { - TypedArray a = context.obtainStyledAttributes(new int[]{color}); - int resId = a.getColor(0, 0); - a.recycle(); - return resId; - } - - private boolean isRTL(Context context) { - return context.getResources().getConfiguration().getLayoutDirection() == View.LAYOUT_DIRECTION_RTL; - } - - private int convertDpToPx(Context context, float dp) { - return (int) (dp * context.getResources().getDisplayMetrics().density + 0.5f); - } - - public void setOnLoadMore(OnLoadMore onLoadMore) { - this.onLoadMore = onLoadMore; - } -} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java new file mode 100755 index 00000000..4dcf5439 --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java @@ -0,0 +1,143 @@ +package com.fastaccess.ui.widgets.recyclerview.scroll; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.support.annotation.NonNull; +import android.support.v4.view.ViewCompat; +import android.support.v7.widget.GridLayoutManager; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.StaggeredGridLayoutManager; +import android.util.AttributeSet; +import android.view.LayoutInflater; +import android.view.MotionEvent; +import android.view.ViewTreeObserver; +import android.widget.FrameLayout; +import android.widget.ImageView; + +import com.fastaccess.R; + +public class RecyclerViewFastScroller extends FrameLayout { + + private static final int TRACK_SNAP_RANGE = 5; + private ImageView scrollerView; + private int height; + private RecyclerView recyclerView; + private RecyclerView.LayoutManager layoutManager; + + private final RecyclerView.OnScrollListener onScrollListener = new RecyclerView.OnScrollListener() { + @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { + if (scrollerView.isSelected()) return; + int verticalScrollOffset = recyclerView.computeVerticalScrollOffset(); + int verticalScrollRange = recyclerView.computeVerticalScrollRange(); + float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); + setScrollerHeight(height * proportion); + } + }; + + public RecyclerViewFastScroller(Context context) { + super(context); + init(); + } + + public RecyclerViewFastScroller(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + public RecyclerViewFastScroller(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(); + } + + @Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + height = h; + } + + @SuppressLint("ClickableViewAccessibility") @Override public boolean onTouchEvent(@NonNull MotionEvent event) { + int action = event.getAction(); + switch (action) { + case MotionEvent.ACTION_DOWN: + if (event.getX() < scrollerView.getX() - ViewCompat.getPaddingStart(scrollerView)) return false; + scrollerView.setSelected(true); + case MotionEvent.ACTION_MOVE: + float y = event.getY(); + setScrollerHeight(y); + setRecyclerViewPosition(y); + return true; + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + scrollerView.setSelected(false); + return true; + } + return super.onTouchEvent(event); + } + + @Override protected void onDetachedFromWindow() { + if (recyclerView != null) recyclerView.removeOnScrollListener(onScrollListener); + super.onDetachedFromWindow(); + } + + protected void init() { + setClipChildren(false); + LayoutInflater inflater = LayoutInflater.from(getContext()); + inflater.inflate(R.layout.fastscroller_layout, this); + scrollerView = findViewById(R.id.fast_scroller_handle); + setVisibility(VISIBLE); + } + + public void attachRecyclerView(final RecyclerView recyclerView) { + if (this.recyclerView == null) { + this.recyclerView = recyclerView; + this.layoutManager = recyclerView.getLayoutManager(); + this.recyclerView.addOnScrollListener(onScrollListener); + initScrollHeight(); + } + } + + private void initScrollHeight() { + this.recyclerView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { + @Override public boolean onPreDraw() { + RecyclerViewFastScroller.this.recyclerView.getViewTreeObserver().removeOnPreDrawListener(this); + if (scrollerView.isSelected()) return true; + int verticalScrollOffset = RecyclerViewFastScroller.this.recyclerView.computeVerticalScrollOffset(); + int verticalScrollRange = RecyclerViewFastScroller.this.computeVerticalScrollRange(); + float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); + setScrollerHeight(height * proportion); + return true; + } + }); + } + + + private void setRecyclerViewPosition(float y) { + if (recyclerView != null) { + int itemCount = recyclerView.getAdapter().getItemCount(); + float proportion; + if (scrollerView.getY() == 0) { + proportion = 0f; + } else if (scrollerView.getY() + scrollerView.getHeight() >= height - TRACK_SNAP_RANGE) { + proportion = 1f; + } else { + proportion = y / (float) height; + } + int targetPos = getValueInRange(itemCount - 1, (int) (proportion * (float) itemCount)); + if (layoutManager instanceof StaggeredGridLayoutManager) { + ((StaggeredGridLayoutManager) layoutManager).scrollToPositionWithOffset(targetPos, 0); + } else if (layoutManager instanceof GridLayoutManager) { + ((GridLayoutManager) layoutManager).scrollToPositionWithOffset(targetPos, 0); + } else { + ((LinearLayoutManager) layoutManager).scrollToPositionWithOffset(targetPos, 0); + } + } + } + + private static int getValueInRange(int max, int value) { + return Math.min(Math.max(0, value), max); + } + + private void setScrollerHeight(float y) { + int handleHeight = scrollerView.getHeight(); + scrollerView.setY(getValueInRange(height - handleHeight, (int) (y - handleHeight / 2))); + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable/fastscroller_bubble.xml b/app/src/main/res/drawable/fastscroller_bubble.xml index 07c50820..dedcbb27 100755 --- a/app/src/main/res/drawable/fastscroller_bubble.xml +++ b/app/src/main/res/drawable/fastscroller_bubble.xml @@ -1,12 +1,20 @@ - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_fasthub_mascot.xml b/app/src/main/res/drawable/ic_fasthub_mascot.xml new file mode 100644 index 00000000..d6e3adca --- /dev/null +++ b/app/src/main/res/drawable/ic_fasthub_mascot.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layouts/main_layouts/layout/create_label_layout.xml b/app/src/main/res/layouts/main_layouts/layout/create_label_layout.xml index 6dc5e8f9..9bfe7c39 100644 --- a/app/src/main/res/layouts/main_layouts/layout/create_label_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/create_label_layout.xml @@ -66,14 +66,29 @@ - + android:layout_height="match_parent"> + + + + + + diff --git a/app/src/main/res/layouts/main_layouts/layout/fab_micro_grid_refresh_list.xml b/app/src/main/res/layouts/main_layouts/layout/fab_micro_grid_refresh_list.xml index efb42ec5..f65a66b4 100644 --- a/app/src/main/res/layouts/main_layouts/layout/fab_micro_grid_refresh_list.xml +++ b/app/src/main/res/layouts/main_layouts/layout/fab_micro_grid_refresh_list.xml @@ -6,33 +6,38 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - + android:layout_height="match_parent"> + + + + + + + - - - - \ No newline at end of file diff --git a/app/src/main/res/layouts/main_layouts/layout/micro_grid_refresh_list.xml b/app/src/main/res/layouts/main_layouts/layout/micro_grid_refresh_list.xml index 2e7ccd29..1f9efe2d 100644 --- a/app/src/main/res/layouts/main_layouts/layout/micro_grid_refresh_list.xml +++ b/app/src/main/res/layouts/main_layouts/layout/micro_grid_refresh_list.xml @@ -7,20 +7,34 @@ android:layout_height="match_parent" tools:ignore="MergeRootFrame"> - - - + + + + + + + + diff --git a/app/src/main/res/layouts/main_layouts/layout/small_grid_refresh_list.xml b/app/src/main/res/layouts/main_layouts/layout/small_grid_refresh_list.xml index fe5e1ed0..043b423c 100644 --- a/app/src/main/res/layouts/main_layouts/layout/small_grid_refresh_list.xml +++ b/app/src/main/res/layouts/main_layouts/layout/small_grid_refresh_list.xml @@ -7,20 +7,36 @@ android:layout_height="match_parent" tools:ignore="MergeRootFrame"> - - - + + + + + + + + diff --git a/app/src/main/res/layouts/main_layouts/layout/tending_buttons_layout.xml b/app/src/main/res/layouts/main_layouts/layout/tending_buttons_layout.xml index c62ce645..584c7eb8 100644 --- a/app/src/main/res/layouts/main_layouts/layout/tending_buttons_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/tending_buttons_layout.xml @@ -66,11 +66,25 @@ android:layout_height="@dimen/divider_height" android:background="?dividerColor"/> - + android:layout_height="match_parent"> + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/main_layouts/layout/vertical_refresh_list.xml b/app/src/main/res/layouts/main_layouts/layout/vertical_refresh_list.xml index 4f350c57..da12bb03 100644 --- a/app/src/main/res/layouts/main_layouts/layout/vertical_refresh_list.xml +++ b/app/src/main/res/layouts/main_layouts/layout/vertical_refresh_list.xml @@ -7,19 +7,35 @@ android:layout_height="match_parent" tools:ignore="MergeRootFrame"> - - + android:layout_height="match_parent"> - + + + + + + diff --git a/app/src/main/res/layouts/other_layouts/layout/fastscroller_layout.xml b/app/src/main/res/layouts/other_layouts/layout/fastscroller_layout.xml new file mode 100755 index 00000000..1263e4bb --- /dev/null +++ b/app/src/main/res/layouts/other_layouts/layout/fastscroller_layout.xml @@ -0,0 +1,26 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/other_layouts/layout/simple_footer_list_dialog.xml b/app/src/main/res/layouts/other_layouts/layout/simple_footer_list_dialog.xml index a1bbc637..fea58974 100644 --- a/app/src/main/res/layouts/other_layouts/layout/simple_footer_list_dialog.xml +++ b/app/src/main/res/layouts/other_layouts/layout/simple_footer_list_dialog.xml @@ -54,10 +54,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" + android:layout_marginEnd="@dimen/spacing_micro" android:background="?selectableItemBackgroundBorderless" android:contentDescription="@string/add" android:padding="@dimen/spacing_micro" - android:layout_marginEnd="@dimen/spacing_micro" android:scaleType="centerCrop" android:src="@drawable/ic_add" android:visibility="gone"/> @@ -81,19 +81,32 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:layout_height="match_parent"> - + android:layout_height="wrap_content"> - + + + + + + diff --git a/app/src/main/res/layouts/other_layouts/layout/simple_list_dialog.xml b/app/src/main/res/layouts/other_layouts/layout/simple_list_dialog.xml index a636e6fd..fd1f2aba 100644 --- a/app/src/main/res/layouts/other_layouts/layout/simple_list_dialog.xml +++ b/app/src/main/res/layouts/other_layouts/layout/simple_list_dialog.xml @@ -18,11 +18,24 @@ android:textStyle="bold" tools:text="How jolly. You loot like a mast."/> - + android:layout_height="match_parent"> + + + + + + \ No newline at end of file From 201a1d9b234debb7ff84279869ef92f8047a075d Mon Sep 17 00:00:00 2001 From: kosh Date: Wed, 2 Aug 2017 18:12:55 +0800 Subject: [PATCH 11/67] prepring for pullrequest timeline --- .../timeline/PullRequestTimelineModel.java | 52 +++++++++++++ .../data/dao/timeline/Timeline.java | 73 ------------------- .../PullRequestTimelinePresenter.java | 15 ++-- 3 files changed, 62 insertions(+), 78 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java delete mode 100644 app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java new file mode 100644 index 00000000..658e85b8 --- /dev/null +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -0,0 +1,52 @@ +package com.fastaccess.data.dao.timeline; + +import com.fastaccess.data.dao.model.PullRequest; + +import pr.PullRequestTimelineQuery; + +/** + * Created by kosh on 02/08/2017. + */ + +public class PullRequestTimelineModel { + + public static final int HEADER = 0; + public static final int LINE_COMMENT = 1; + public static final int EVENT = 2; + public static final int COMMENT = 3; + public static final int STATUS = 4; + public static final int REVIEW = 5; + + private PullRequestTimelineQuery.Node node; + private PullRequest pullRequest; + + public PullRequestTimelineModel(PullRequest pullRequest) { + this.pullRequest = pullRequest; + } + + public PullRequestTimelineModel(PullRequestTimelineQuery.Node node) { + this.node = node; + } + + public int getType() { + if (pullRequest != null) return HEADER; + if (node.asAssignedEvent() != null || node.asClosedEvent() != null + || node.asDemilestonedEvent() != null || node.asHeadRefDeletedEvent() != null + || node.asLabeledEvent() != null || node.asLockedEvent() != null + || node.asMergedEvent() != null || node.asMilestonedEvent() != null + || node.asReferencedEvent() != null || node.asRenamedTitleEvent() != null + || node.asReopenedEvent() != null || node.asUnassignedEvent() != null + || node.asUnlabeledEvent() != null || node.asUnlockedEvent() != null + || node.asCommit() != null) { + return EVENT; + } else if (node.asIssueComment() != null) { + return COMMENT; + } else if (node.asDeployedEvent() != null) { + return STATUS; + } else if (node.asPullRequestReview() != null || node.asReviewDismissedEvent() != null + || node.asReviewRequestedEvent() != null || node.asReviewRequestRemovedEvent() != null) { + return REVIEW; + } + return EVENT; + } +} diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java b/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java deleted file mode 100644 index e5a49527..00000000 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/Timeline.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.fastaccess.data.dao.timeline; - -import android.os.Parcel; -import android.os.Parcelable; - -import com.fastaccess.data.dao.PullRequestStatusModel; -import com.fastaccess.data.dao.ReviewCommentModel; -import com.fastaccess.data.dao.model.Comment; -import com.fastaccess.data.dao.types.IssueEventType; - -import lombok.Getter; -import lombok.Setter; - -/** - * Created by kosh on 25/07/2017. - */ - -@Getter @Setter public class Timeline implements Parcelable { - public static final int HEADER = 0; - public static final int LINE_COMMENT = 1; - public static final int EVENT = 2; - public static final int COMMENT = 3; - public static final int STATUS = 4; - - private IssueEventType event; - private Comment comment; - private GenericEvent genericEvent; - private ReviewCommentModel reviewComment; - private PullRequestStatusModel statusModel; - - public int getType() { - if (getEvent() != null) { - switch (getEvent()) { - case commented: - return COMMENT; - case line_commented: - return LINE_COMMENT; - default: - return EVENT; - } - } else { - if (statusModel != null) return STATUS; - return EVENT; - } - } - - public Timeline() {} - - @Override public int describeContents() { return 0; } - - @Override public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(this.event == null ? -1 : this.event.ordinal()); - dest.writeParcelable(this.comment, flags); - dest.writeParcelable(this.genericEvent, flags); - dest.writeParcelable(this.reviewComment, flags); - dest.writeParcelable(this.statusModel, flags); - } - - protected Timeline(Parcel in) { - int tmpEvent = in.readInt(); - this.event = tmpEvent == -1 ? null : IssueEventType.values()[tmpEvent]; - this.comment = in.readParcelable(Comment.class.getClassLoader()); - this.genericEvent = in.readParcelable(GenericEvent.class.getClassLoader()); - this.reviewComment = in.readParcelable(ReviewCommentModel.class.getClassLoader()); - this.statusModel = in.readParcelable(PullRequestStatusModel.class.getClassLoader()); - } - - public static final Creator CREATOR = new Creator() { - @Override public Timeline createFromParcel(Parcel source) {return new Timeline(source);} - - @Override public Timeline[] newArray(int size) {return new Timeline[size];} - }; -} diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 235dab51..f5531a1c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -18,11 +18,12 @@ import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.PullRequest; +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel; import com.fastaccess.data.dao.types.ReactionTypes; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; import com.fastaccess.helper.InputHelper; -import com.fastaccess.helper.Logger; +import com.fastaccess.helper.RxHelper; import com.fastaccess.provider.rest.RestProvider; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.ReactionsProvider; @@ -310,7 +311,7 @@ public class PullRequestTimelinePresenter extends BasePresenter apolloCall = App.getInstance().getApolloClient() .query(query); - manageDisposable(Rx2Apollo.from(apolloCall) + manageDisposable(RxHelper.getObservable(Rx2Apollo.from(apolloCall)) .filter(dataResponse -> !dataResponse.hasErrors() && dataResponse.data() != null) .map(Response::data) .filter(data -> data != null && data.repository() != null) @@ -318,7 +319,8 @@ public class PullRequestTimelinePresenter extends BasePresenter repository.pullRequest() != null) .map(PullRequestTimelineQuery.Repository::pullRequest) .map(PullRequestTimelineQuery.PullRequest::timeline) - .map(timeline -> { + .filter(timeline -> timeline.nodes() != null) + .flatMap(timeline -> { pages.clear(); List edges = timeline.edges(); if (edges != null) { @@ -326,10 +328,13 @@ public class PullRequestTimelinePresenter extends BasePresenter nodes = timeline.nodes(); + return nodes != null ? Observable.fromIterable(nodes) + : Observable.fromIterable(new ArrayList<>()); }) + .map(PullRequestTimelineModel::new) .subscribe(timeline -> { - Logger.e(timeline.__typename(), timeline.pageInfo(), timeline.edges()); +// sendToView(view -> view.onNotifyAdapter(timeline, page)); }, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress))); } From c51ea305fb5fa8837278e4532488dc1cb7a8a6a1 Mon Sep 17 00:00:00 2001 From: kosh Date: Wed, 2 Aug 2017 18:20:34 +0800 Subject: [PATCH 12/67] fixed travis. --- .../java/com/fastaccess/data/dao/PullRequestStatusModel.java | 3 +-- .../java/com/fastaccess/data/dao/ReviewCommentModel.java | 3 +-- .../data/dao/timeline/PullRequestTimelineModel.java | 4 ++++ .../timeline/timeline/PullRequestTimelinePresenter.java | 5 ++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java index 7a419273..1f64f2dd 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java @@ -3,7 +3,6 @@ package com.fastaccess.data.dao; import android.os.Parcel; import android.os.Parcelable; -import com.fastaccess.data.dao.timeline.Timeline; import com.fastaccess.data.dao.types.StatusStateType; import java.util.Date; @@ -16,7 +15,7 @@ import lombok.Setter; * Created by Kosh on 10 Apr 2017, 3:15 AM */ -@Getter @Setter public class PullRequestStatusModel extends Timeline implements Parcelable { +@Getter @Setter public class PullRequestStatusModel implements Parcelable { StatusStateType state; String sha; diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java index c3916f1e..818589d3 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java @@ -4,7 +4,6 @@ import android.os.Parcel; import android.os.Parcelable; import com.fastaccess.data.dao.model.User; -import com.fastaccess.data.dao.timeline.Timeline; import java.util.Date; @@ -15,7 +14,7 @@ import lombok.Setter; * Created by Kosh on 04 May 2017, 7:10 PM */ -@Getter @Setter public class ReviewCommentModel extends Timeline implements Parcelable { +@Getter @Setter public class ReviewCommentModel implements Parcelable { long id; String url; diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 658e85b8..92bbd731 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -49,4 +49,8 @@ public class PullRequestTimelineModel { } return EVENT; } + + @Override public String toString() { + return String.valueOf(getType()); + } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index f5531a1c..ca2edd3b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -23,6 +23,7 @@ import com.fastaccess.data.dao.types.ReactionTypes; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.Logger; import com.fastaccess.helper.RxHelper; import com.fastaccess.provider.rest.RestProvider; import com.fastaccess.provider.timeline.CommentsHelper; @@ -333,9 +334,7 @@ public class PullRequestTimelinePresenter extends BasePresenter()); }) .map(PullRequestTimelineModel::new) - .subscribe(timeline -> { -// sendToView(view -> view.onNotifyAdapter(timeline, page)); - }, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress))); + .subscribe(Logger::e, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress))); } @NonNull private PullRequestTimelineQuery getTimelineBuilder(@NonNull String login, @NonNull String repoId, int number, int page) { From d90f19c3f8103ddd17b1094901c09ce531fa95e3 Mon Sep 17 00:00:00 2001 From: Yakov Date: Wed, 2 Aug 2017 10:24:37 -0400 Subject: [PATCH 13/67] Quick fix --- app/src/main/java/com/fastaccess/helper/AppHelper.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/fastaccess/helper/AppHelper.java b/app/src/main/java/com/fastaccess/helper/AppHelper.java index 1681ff3f..5bdf3448 100644 --- a/app/src/main/java/com/fastaccess/helper/AppHelper.java +++ b/app/src/main/java/com/fastaccess/helper/AppHelper.java @@ -73,14 +73,16 @@ public class AppHelper { .append("**Android Version: ").append(String.valueOf(Build.VERSION.RELEASE)).append(" (SDK: ") .append(String.valueOf(Build.VERSION.SDK_INT)).append(")**").append(" \n") .append("**Device Information:**").append(" \n") - .append("- **" + (!model.equalsIgnoreCase(brand) ? "Manufacturer" : "Manufacturer&Brand") + ":** ").append(Build.MANUFACTURER) + .append("- **") + .append(!model.equalsIgnoreCase(brand) ? "Manufacturer" : "Manufacturer&Brand") + .append(":** ") + .append(Build.MANUFACTURER) .append(" \n"); if (!(model.equalsIgnoreCase(brand) || "google".equals(Build.BRAND))) { builder.append("- **Brand:** ").append(brand).append(" \n"); } - builder.append("- **Model:** ") - .append(model) - .append(" \n").append("---").append("\n"); + builder.append("- **Model:** ").append(model).append(" \n") + .append("---").append("\n\n"); if (!Locale.getDefault().getLanguage().equals(new Locale("en").getLanguage())) { builder.append("<--") .append(App.getInstance().getString(R.string.english_please)) From e6343c1816b559e020e512a6e8a5de40afe709b5 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 09:59:42 +0800 Subject: [PATCH 14/67] fixed commitComments empty state & enhanced fastScroller --- .../graphql/pr/PullRequestTimeline.graphql | 2 +- .../timeline/PullRequestTimelineModel.java | 23 ++++-- .../comments/CommitCommentsFragment.java | 2 +- .../details/comments/CommitCommentsMvp.java | 2 + .../comments/CommitCommentsPresenter.java | 7 +- .../timeline/IssueTimelinePresenter.java | 3 +- .../PullRequestTimelinePresenter.java | 19 +++-- .../scroll/RecyclerViewFastScroller.java | 77 +++++++++++++++---- .../main/res/drawable/fastscroller_bubble.xml | 10 +-- 9 files changed, 104 insertions(+), 41 deletions(-) diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 8d98b04d..7823ec85 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -1,7 +1,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: String) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { - timeline(first: 100 after: $page) { + timeline(first: 30 after: $page) { edges { cursor } diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 92bbd731..179231fb 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -1,24 +1,27 @@ package com.fastaccess.data.dao.timeline; +import com.fastaccess.data.dao.PullRequestStatusModel; import com.fastaccess.data.dao.model.PullRequest; +import lombok.Getter; +import lombok.Setter; import pr.PullRequestTimelineQuery; /** * Created by kosh on 02/08/2017. */ -public class PullRequestTimelineModel { +@Getter @Setter public class PullRequestTimelineModel { public static final int HEADER = 0; - public static final int LINE_COMMENT = 1; - public static final int EVENT = 2; - public static final int COMMENT = 3; - public static final int STATUS = 4; - public static final int REVIEW = 5; + public static final int EVENT = 1; + public static final int COMMENT = 2; + public static final int STATUS = 3; + public static final int REVIEW = 4; private PullRequestTimelineQuery.Node node; private PullRequest pullRequest; + private PullRequestStatusModel status; public PullRequestTimelineModel(PullRequest pullRequest) { this.pullRequest = pullRequest; @@ -28,6 +31,10 @@ public class PullRequestTimelineModel { this.node = node; } + public PullRequestTimelineModel(PullRequestStatusModel status) { + this.status = status; + } + public int getType() { if (pullRequest != null) return HEADER; if (node.asAssignedEvent() != null || node.asClosedEvent() != null @@ -37,11 +44,11 @@ public class PullRequestTimelineModel { || node.asReferencedEvent() != null || node.asRenamedTitleEvent() != null || node.asReopenedEvent() != null || node.asUnassignedEvent() != null || node.asUnlabeledEvent() != null || node.asUnlockedEvent() != null - || node.asCommit() != null) { + || node.asCommit() != null || node.asHeadRefRestoredEvent() != null) { return EVENT; } else if (node.asIssueComment() != null) { return COMMENT; - } else if (node.asDeployedEvent() != null) { + } else if (status != null) { return STATUS; } else if (node.asPullRequestReview() != null || node.asReviewDismissedEvent() != null || node.asReviewRequestedEvent() != null || node.asReviewRequestRemovedEvent() != null) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java index 6d571b10..8d5a2ff1 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java @@ -290,7 +290,7 @@ public class CommitCommentsFragment extends BaseFragment impl lastPage = listResponse.getLast(); return TimelineModel.construct(listResponse.getItems()); }) - .doOnComplete(() -> sendToView(BaseMvp.FAView::hideProgress)), + .doOnComplete(() -> { + if (lastPage <= 1) { + sendToView(CommitCommentsMvp.View::showReload); + } + }), listResponse -> sendToView(view -> view.onNotifyAdapter(listResponse, page))); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index f5e83595..fc9def5b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -244,8 +244,7 @@ import lombok.Getter; return TimelineConverter.INSTANCE.convert(response != null ? response.getItems() : null); }) .toList() - .toObservable() - .doOnError(Throwable::printStackTrace); + .toObservable(); makeRestCall(observable, timeline -> sendToView(view -> view.onNotifyAdapter(timeline, page))); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index ca2edd3b..592efd9e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -42,6 +42,8 @@ import pr.PullRequestTimelineQuery; */ public class PullRequestTimelinePresenter extends BasePresenter implements PullRequestTimelineMvp.Presenter { + @com.evernote.android.state.State boolean hasNextPage; + private ArrayList timeline = new ArrayList<>(); private SparseArray pages = new SparseArray<>(); private ReactionsProvider reactionsProvider; @@ -322,6 +324,7 @@ public class PullRequestTimelinePresenter extends BasePresenter timeline.nodes() != null) .flatMap(timeline -> { + hasNextPage = timeline.pageInfo().hasNextPage(); pages.clear(); List edges = timeline.edges(); if (edges != null) { @@ -351,13 +354,13 @@ public class PullRequestTimelinePresenter extends BasePresenter { - if (statuses != null) { - statuses.setMergable(isMergeable); - } - return statuses; - }).map(TimelineModel::new) - .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); +// manageObservable(RestProvider.getPullRequestService(isEnterprise()).getPullStatus(login, repoId, sha) +// .map(statuses -> { +// if (statuses != null) { +// statuses.setMergable(isMergeable); +// } +// return statuses; +// }).map(PullRequestTimelineModel::new) +// .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java index 4dcf5439..282428e1 100755 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java @@ -1,9 +1,12 @@ package com.fastaccess.ui.widgets.recyclerview.scroll; import android.annotation.SuppressLint; +import android.app.Activity; import android.content.Context; import android.support.annotation.NonNull; -import android.support.v4.view.ViewCompat; +import android.support.design.widget.AppBarLayout; +import android.support.v4.app.Fragment; +import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; @@ -16,6 +19,9 @@ import android.widget.FrameLayout; import android.widget.ImageView; import com.fastaccess.R; +import com.fastaccess.helper.ActivityHelper; + +import it.sephiroth.android.library.bottomnavigation.BottomNavigation; public class RecyclerViewFastScroller extends FrameLayout { @@ -24,16 +30,9 @@ public class RecyclerViewFastScroller extends FrameLayout { private int height; private RecyclerView recyclerView; private RecyclerView.LayoutManager layoutManager; - - private final RecyclerView.OnScrollListener onScrollListener = new RecyclerView.OnScrollListener() { - @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { - if (scrollerView.isSelected()) return; - int verticalScrollOffset = recyclerView.computeVerticalScrollOffset(); - int verticalScrollRange = recyclerView.computeVerticalScrollRange(); - float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); - setScrollerHeight(height * proportion); - } - }; + private AppBarLayout appBarLayout; + private BottomNavigation bottomNavigation; + private boolean toggled; public RecyclerViewFastScroller(Context context) { super(context); @@ -58,8 +57,9 @@ public class RecyclerViewFastScroller extends FrameLayout { int action = event.getAction(); switch (action) { case MotionEvent.ACTION_DOWN: - if (event.getX() < scrollerView.getX() - ViewCompat.getPaddingStart(scrollerView)) return false; + if (event.getX() < (scrollerView.getX() - scrollerView.getPaddingStart())) return false; scrollerView.setSelected(true); + hideAppbar(); case MotionEvent.ACTION_MOVE: float y = event.getY(); setScrollerHeight(y); @@ -68,6 +68,7 @@ public class RecyclerViewFastScroller extends FrameLayout { case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: scrollerView.setSelected(false); + showAppbar(); return true; } return super.onTouchEvent(event); @@ -75,6 +76,8 @@ public class RecyclerViewFastScroller extends FrameLayout { @Override protected void onDetachedFromWindow() { if (recyclerView != null) recyclerView.removeOnScrollListener(onScrollListener); + appBarLayout = null; + bottomNavigation = null; super.onDetachedFromWindow(); } @@ -84,6 +87,45 @@ public class RecyclerViewFastScroller extends FrameLayout { inflater.inflate(R.layout.fastscroller_layout, this); scrollerView = findViewById(R.id.fast_scroller_handle); setVisibility(VISIBLE); + Activity activity = ActivityHelper.getActivity(getContext()); + if (activity != null) { + if (activity instanceof AppCompatActivity) { + Fragment fragment = ActivityHelper.getVisibleFragment(((AppCompatActivity) activity).getSupportFragmentManager()); + if (fragment != null && fragment.getView() != null) { + appBarLayout = fragment.getView().findViewById(R.id.appbar); + } + } + if (appBarLayout == null) { + appBarLayout = activity.findViewById(R.id.appbar); + bottomNavigation = activity.findViewById(R.id.bottomNavigation); + } + } + } + + protected void hideAppbar() { + if (!toggled) { + if (appBarLayout != null) { + appBarLayout.setExpanded(false, true); + } + if (bottomNavigation != null) { + bottomNavigation.setExpanded(false, true); + } + toggled = true; + } + } + + protected void showAppbar() { + if (toggled) { + if (scrollerView.getY() == 0) { + if (appBarLayout != null) { + appBarLayout.setExpanded(true, true); + } + if (bottomNavigation != null) { + bottomNavigation.setExpanded(true, true); + } + toggled = false; + } + } } public void attachRecyclerView(final RecyclerView recyclerView) { @@ -109,7 +151,6 @@ public class RecyclerViewFastScroller extends FrameLayout { }); } - private void setRecyclerViewPosition(float y) { if (recyclerView != null) { int itemCount = recyclerView.getAdapter().getItemCount(); @@ -140,4 +181,14 @@ public class RecyclerViewFastScroller extends FrameLayout { int handleHeight = scrollerView.getHeight(); scrollerView.setY(getValueInRange(height - handleHeight, (int) (y - handleHeight / 2))); } + + private final RecyclerView.OnScrollListener onScrollListener = new RecyclerView.OnScrollListener() { + @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { + if (scrollerView.isSelected()) return; + int verticalScrollOffset = recyclerView.computeVerticalScrollOffset(); + int verticalScrollRange = recyclerView.computeVerticalScrollRange(); + float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); + setScrollerHeight(height * proportion); + } + }; } \ No newline at end of file diff --git a/app/src/main/res/drawable/fastscroller_bubble.xml b/app/src/main/res/drawable/fastscroller_bubble.xml index dedcbb27..611c1571 100755 --- a/app/src/main/res/drawable/fastscroller_bubble.xml +++ b/app/src/main/res/drawable/fastscroller_bubble.xml @@ -4,17 +4,15 @@ - - + + - - + \ No newline at end of file From 5e5a9aa6af27e5d3ae8b4a527975d45e957d6d95 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 10:27:31 +0800 Subject: [PATCH 15/67] enhanced FastScroller & fixed dividers. --- .../ui/widgets/dialog/ListDialogView.java | 2 +- .../recyclerview/DynamicRecyclerView.java | 33 +++++++++++-------- .../scroll/RecyclerViewFastScroller.java | 14 ++------ 3 files changed, 23 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/widgets/dialog/ListDialogView.java b/app/src/main/java/com/fastaccess/ui/widgets/dialog/ListDialogView.java index b906427f..45cd3c5b 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/dialog/ListDialogView.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/dialog/ListDialogView.java @@ -53,7 +53,7 @@ public class ListDialogView extends BaseDialogFragment imp title.setText(titleText); if (objects != null) { SimpleListAdapter adapter = new SimpleListAdapter<>(objects, this); - recycler.addDivider(true); + recycler.addDivider(); recycler.setAdapter(adapter); } else { dismiss(); diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/DynamicRecyclerView.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/DynamicRecyclerView.java index e7556b61..2d7d8344 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/DynamicRecyclerView.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/DynamicRecyclerView.java @@ -4,7 +4,10 @@ import android.content.Context; import android.content.res.Resources; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v7.widget.GridLayoutManager; +import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.StaggeredGridLayoutManager; import android.util.AttributeSet; import android.view.View; @@ -116,7 +119,7 @@ public class DynamicRecyclerView extends RecyclerView { } public void addKeyLineDivider() { - if (!ViewHelper.isTablet(getContext())) { + if (canAddDivider()) { Resources resources = getResources(); addItemDecoration(new InsetDividerDecoration(resources.getDimensionPixelSize(R.dimen.divider_height), resources.getDimensionPixelSize(R.dimen.keyline_2), ViewHelper.getListDivider(getContext()))); @@ -124,17 +127,8 @@ public class DynamicRecyclerView extends RecyclerView { } public void addDivider() { - addDivider(false); - } - - public void addDivider(boolean allScreens) { - Resources resources = getResources(); - if (!allScreens) { - if (!ViewHelper.isTablet(getContext())) { - addItemDecoration(new InsetDividerDecoration(resources.getDimensionPixelSize(R.dimen.divider_height), 0, - ViewHelper.getListDivider(getContext()))); - } - } else { + if (canAddDivider()) { + Resources resources = getResources(); addItemDecoration(new InsetDividerDecoration(resources.getDimensionPixelSize(R.dimen.divider_height), 0, ViewHelper.getListDivider(getContext()))); } @@ -145,10 +139,23 @@ public class DynamicRecyclerView extends RecyclerView { } public void addDivider(@NonNull Class toDivide) { - if (!ViewHelper.isTablet(getContext())) { + if (canAddDivider()) { Resources resources = getResources(); addItemDecoration(new InsetDividerDecoration(resources.getDimensionPixelSize(R.dimen.divider_height), 0, ViewHelper.getListDivider(getContext()), toDivide)); } } + + private boolean canAddDivider() { + if (getLayoutManager() != null) { + if (getLayoutManager() instanceof LinearLayoutManager) { + return true; + } else if (getLayoutManager() instanceof GridLayoutManager) { + return ((GridLayoutManager) getLayoutManager()).getSpanCount() == 1; + } else if (getLayoutManager() instanceof StaggeredGridLayoutManager) { + return ((StaggeredGridLayoutManager) getLayoutManager()).getSpanCount() == 1; + } + } + return false; + } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java index 282428e1..1e658a10 100755 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java @@ -5,8 +5,6 @@ import android.app.Activity; import android.content.Context; import android.support.annotation.NonNull; import android.support.design.widget.AppBarLayout; -import android.support.v4.app.Fragment; -import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; @@ -89,16 +87,8 @@ public class RecyclerViewFastScroller extends FrameLayout { setVisibility(VISIBLE); Activity activity = ActivityHelper.getActivity(getContext()); if (activity != null) { - if (activity instanceof AppCompatActivity) { - Fragment fragment = ActivityHelper.getVisibleFragment(((AppCompatActivity) activity).getSupportFragmentManager()); - if (fragment != null && fragment.getView() != null) { - appBarLayout = fragment.getView().findViewById(R.id.appbar); - } - } - if (appBarLayout == null) { - appBarLayout = activity.findViewById(R.id.appbar); - bottomNavigation = activity.findViewById(R.id.bottomNavigation); - } + appBarLayout = activity.findViewById(R.id.appbar); + bottomNavigation = activity.findViewById(R.id.bottomNavigation); } } From 325b1a4d8d37d81fdb19ff9cc7c6ab00aa05b684 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 11:23:28 +0800 Subject: [PATCH 16/67] this commit adds progress footer for loading more. --- .../provider/rest/loadmore/OnLoadMore.java | 5 +- .../com/fastaccess/ui/base/mvp/BaseMvp.java | 2 +- .../fastaccess/ui/modules/feeds/FeedsMvp.java | 2 +- .../ui/modules/feeds/FeedsPresenter.java | 11 +++-- .../issues/fragment/FilterIssuePresenter.java | 5 +- .../ui/modules/gists/GistsPresenter.java | 5 +- .../gist/comments/GistCommentsPresenter.java | 5 +- .../main/issues/MyIssuesPresenter.java | 5 +- .../pullrequests/MyPullRequestsPresenter.java | 5 +- .../followers/ProfileFollowersPresenter.java | 5 +- .../following/ProfileFollowingPresenter.java | 5 +- .../profile/gists/ProfileGistsPresenter.java | 5 +- .../org/members/OrgMembersPresenter.java | 5 +- .../profile/org/repos/OrgReposPresenter.java | 5 +- .../profile/org/teams/OrgTeamPresenter.java | 5 +- .../details/members/TeamMembersPresenter.java | 5 +- .../details/repos/TeamReposPresenter.java | 5 +- .../profile/repos/ProfileReposPresenter.java | 5 +- .../starred/ProfileStarredPresenter.java | 5 +- .../code/commit/RepoCommitsPresenter.java | 7 +-- .../comments/CommitCommentsPresenter.java | 5 +- .../RepoContributorsPresenter.java | 5 +- .../code/releases/RepoReleasesPresenter.java | 7 +-- .../extras/branches/BranchesPresenter.kt | 7 +-- .../repos/extras/misc/RepoMiscPresenter.java | 11 +++-- .../issues/issue/RepoIssuesPresenter.java | 7 +-- .../timeline/IssueTimelinePresenter.java | 7 +-- .../RepoPullRequestPresenter.java | 11 +++-- .../commits/PullRequestCommitsPresenter.java | 7 +-- .../files/PullRequestFilesPresenter.java | 7 +-- .../PullRequestTimelinePresenter.java | 8 ++-- .../reactions/ReactionsDialogPresenter.java | 5 +- .../search/code/SearchCodePresenter.java | 10 ++-- .../search/issues/SearchIssuesPresenter.java | 10 ++-- .../search/repos/SearchReposPresenter.java | 10 ++-- .../search/users/SearchUsersPresenter.java | 10 ++-- .../recyclerview/BaseRecyclerAdapter.java | 48 ++++++++++++++++--- .../recyclerview/InsetDividerDecoration.java | 28 ++++++----- .../recyclerview/ProgressBarViewHolder.java | 26 ++++++++++ .../recyclerview/scroll/InfiniteScroll.java | 11 ++++- .../row_layouts/layout/progress_layout.xml | 16 +++++++ 41 files changed, 233 insertions(+), 125 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/ui/widgets/recyclerview/ProgressBarViewHolder.java create mode 100644 app/src/main/res/layouts/row_layouts/layout/progress_layout.xml diff --git a/app/src/main/java/com/fastaccess/provider/rest/loadmore/OnLoadMore.java b/app/src/main/java/com/fastaccess/provider/rest/loadmore/OnLoadMore.java index 8e9de3bb..f0d77da7 100644 --- a/app/src/main/java/com/fastaccess/provider/rest/loadmore/OnLoadMore.java +++ b/app/src/main/java/com/fastaccess/provider/rest/loadmore/OnLoadMore.java @@ -29,10 +29,11 @@ public class OnLoadMore

extends InfiniteScroll { return parameter; } - @Override public void onLoadMore(int page, int totalItemsCount) { + @Override public boolean onLoadMore(int page, int totalItemsCount) { if (presenter != null) { presenter.setPreviousTotal(totalItemsCount); - presenter.onCallApi(page + 1, parameter); + return presenter.onCallApi(page + 1, parameter); } + return false; } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/base/mvp/BaseMvp.java b/app/src/main/java/com/fastaccess/ui/base/mvp/BaseMvp.java index 87c30680..124feb18 100644 --- a/app/src/main/java/com/fastaccess/ui/base/mvp/BaseMvp.java +++ b/app/src/main/java/com/fastaccess/ui/base/mvp/BaseMvp.java @@ -79,7 +79,7 @@ public interface BaseMvp { void setPreviousTotal(int previousTotal); - void onCallApi(int page, @Nullable P parameter); + boolean onCallApi(int page, @Nullable P parameter); } interface OnScrollTopListener { diff --git a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsMvp.java b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsMvp.java index 107d493a..051c8775 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsMvp.java +++ b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsMvp.java @@ -40,7 +40,7 @@ public interface FeedsMvp { void onFragmentCreated(@NonNull Bundle argument); - void onCallApi(int page); + boolean onCallApi(int page); @NonNull ArrayList getEvents(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java index c27670ff..6578a7f3 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/feeds/FeedsPresenter.java @@ -54,18 +54,18 @@ public class FeedsPresenter extends BasePresenter implements Feed } } - @Override public void onCallApi(int page) { + @Override public boolean onCallApi(int page) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } if (page > lastPage || lastPage == 0) { sendToView(FeedsMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); Login login = Login.getUser(); - if (login == null) return;// I can't understand how this could possibly be reached lol. + if (login == null) return false;// I can't understand how this could possibly be reached lol. Observable> observable; Logger.e(isOrg); if (user != null) { @@ -85,6 +85,7 @@ public class FeedsPresenter extends BasePresenter implements Feed } sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @Override public int getCurrentPage() { @@ -103,8 +104,8 @@ public class FeedsPresenter extends BasePresenter implements Feed this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable Object parameter) { - onCallApi(page); + @Override public boolean onCallApi(int page, @Nullable Object parameter) { + return onCallApi(page); } @Override public void onSubscribed(boolean cancelable) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssuePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssuePresenter.java index 01d16926..bef87919 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssuePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/fragment/FilterIssuePresenter.java @@ -52,14 +52,14 @@ public class FilterIssuePresenter extends BasePresenter im this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1 || parameter == null) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } if (page > lastPage || lastPage == 0 || parameter == null) { sendToView(FilterIssuesMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getSearchService(isEnterprise()).searchIssues(parameter, page), @@ -70,5 +70,6 @@ public class FilterIssuePresenter extends BasePresenter im } sendToView(view -> view.onNotifyAdapter(issues.getItems(), page)); }); + return true; } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/gists/GistsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/gists/GistsPresenter.java index f07a0ee7..8e4e7f76 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/gists/GistsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/gists/GistsPresenter.java @@ -43,14 +43,14 @@ class GistsPresenter extends BasePresenter implements GistsMvp.Pr super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Object parameter) { + @Override public boolean onCallApi(int page, @Nullable Object parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } if (page > lastPage || lastPage == 0) { sendToView(GistsMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getGistService(isEnterprise()).getPublicGists(RestProvider.PAGE_SIZE, page), @@ -58,6 +58,7 @@ class GistsPresenter extends BasePresenter implements GistsMvp.Pr lastPage = listResponse.getLast(); sendToView(view -> view.onNotifyAdapter(listResponse.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getGists() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsPresenter.java index 12d09d4a..df512f6a 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/gists/gist/comments/GistCommentsPresenter.java @@ -50,14 +50,14 @@ class GistCommentsPresenter extends BasePresenter implemen super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } if (page > lastPage || parameter == null || lastPage == 0) { sendToView(GistCommentsMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getGistService(isEnterprise()).getGistComments(parameter, page), @@ -68,6 +68,7 @@ class GistCommentsPresenter extends BasePresenter implemen } sendToView(view -> view.onNotifyAdapter(listResponse.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getComments() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/issues/MyIssuesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/main/issues/MyIssuesPresenter.java index c9321f60..50c4d55e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/issues/MyIssuesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/issues/MyIssuesPresenter.java @@ -65,7 +65,7 @@ public class MyIssuesPresenter extends BasePresenter implement this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable IssueState parameter) { + @Override public boolean onCallApi(int page, @Nullable IssueState parameter) { if (parameter == null) { throw new NullPointerException("parameter is null"); } @@ -75,7 +75,7 @@ public class MyIssuesPresenter extends BasePresenter implement } if (page > lastPage || lastPage == 0) { sendToView(MyIssuesMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getIssueService(isEnterprise()).getIssuesWithCount(getUrl(parameter), page), issues -> { @@ -85,6 +85,7 @@ public class MyIssuesPresenter extends BasePresenter implement } sendToView(view -> view.onNotifyAdapter(issues.getItems(), page)); }); + return true; } @NonNull private String getUrl(@NonNull IssueState parameter) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestsPresenter.java index 60342bcb..62ee0e90 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/pullrequests/MyPullRequestsPresenter.java @@ -65,7 +65,7 @@ public class MyPullRequestsPresenter extends BasePresenter lastPage || lastPage == 0) { sendToView(MyPullRequestsMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getPullRequestService(isEnterprise()).getPullsWithCount(getUrl(parameter), page), response -> { @@ -85,6 +85,7 @@ public class MyPullRequestsPresenter extends BasePresenter view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull private String getUrl(@NonNull IssueState parameter) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/followers/ProfileFollowersPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/followers/ProfileFollowersPresenter.java index 9d26b5e3..a9dfbd4c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/followers/ProfileFollowersPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/followers/ProfileFollowersPresenter.java @@ -47,7 +47,7 @@ class ProfileFollowersPresenter extends BasePresenter super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -58,7 +58,7 @@ class ProfileFollowersPresenter extends BasePresenter setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(ProfileFollowersMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getUserService(isEnterprise()).getFollowers(parameter, page), response -> { @@ -68,6 +68,7 @@ class ProfileFollowersPresenter extends BasePresenter } sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getFollowers() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/following/ProfileFollowingPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/following/ProfileFollowingPresenter.java index 0288f55f..8f75fd1d 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/following/ProfileFollowingPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/following/ProfileFollowingPresenter.java @@ -47,7 +47,7 @@ class ProfileFollowingPresenter extends BasePresenter super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -58,7 +58,7 @@ class ProfileFollowingPresenter extends BasePresenter setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(ProfileFollowingMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getUserService(isEnterprise()).getFollowing(parameter, page), response -> { @@ -68,6 +68,7 @@ class ProfileFollowingPresenter extends BasePresenter } sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getFollowing() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/gists/ProfileGistsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/gists/ProfileGistsPresenter.java index fe9012ad..44fda497 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/gists/ProfileGistsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/gists/ProfileGistsPresenter.java @@ -48,7 +48,7 @@ class ProfileGistsPresenter extends BasePresenter implemen super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -59,7 +59,7 @@ class ProfileGistsPresenter extends BasePresenter implemen setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(ProfileGistsMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getGistService(isEnterprise()).getUserGists(parameter, page), listResponse -> { @@ -67,6 +67,7 @@ class ProfileGistsPresenter extends BasePresenter implemen sendToView(view -> view.onNotifyAdapter(listResponse.getItems(), page)); manageDisposable(Gist.save(Stream.of(listResponse.getItems()).toList(), parameter)); }); + return true; } @NonNull @Override public ArrayList getGists() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/org/members/OrgMembersPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/org/members/OrgMembersPresenter.java index 694bbeab..c771193c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/org/members/OrgMembersPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/org/members/OrgMembersPresenter.java @@ -41,7 +41,7 @@ class OrgMembersPresenter extends BasePresenter implements O super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -52,13 +52,14 @@ class OrgMembersPresenter extends BasePresenter implements O setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(OrgMembersMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getOrgService(isEnterprise()).getOrgMembers(parameter, page), response -> { lastPage = response.getLast(); sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getFollowers() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/org/repos/OrgReposPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/org/repos/OrgReposPresenter.java index 323c2863..ce79f4c2 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/org/repos/OrgReposPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/org/repos/OrgReposPresenter.java @@ -50,7 +50,7 @@ class OrgReposPresenter extends BasePresenter implements OrgRe super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -61,7 +61,7 @@ class OrgReposPresenter extends BasePresenter implements OrgRe setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(OrgReposMvp.View::hideProgress); - return; + return false; } filterOptions.setOrg(true); makeRestCall(RestProvider.getOrgService(isEnterprise()).getOrgRepos(parameter, filterOptions.getQueryMap(), page), @@ -72,6 +72,7 @@ class OrgReposPresenter extends BasePresenter implements OrgRe } sendToView(view -> view.onNotifyAdapter(repoModelPageable.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getRepos() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/OrgTeamPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/OrgTeamPresenter.java index 8474af95..decd37e4 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/OrgTeamPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/OrgTeamPresenter.java @@ -43,7 +43,7 @@ class OrgTeamPresenter extends BasePresenter implements OrgTeam super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -54,13 +54,14 @@ class OrgTeamPresenter extends BasePresenter implements OrgTeam setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(OrgTeamMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getOrgService(isEnterprise()).getOrgTeams(parameter, page), response -> { lastPage = response.getLast(); sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getTeams() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/members/TeamMembersPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/members/TeamMembersPresenter.java index 5ada4941..d4f653c2 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/members/TeamMembersPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/members/TeamMembersPresenter.java @@ -41,7 +41,7 @@ class TeamMembersPresenter extends BasePresenter implements super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Long parameter) { + @Override public boolean onCallApi(int page, @Nullable Long parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -52,13 +52,14 @@ class TeamMembersPresenter extends BasePresenter implements setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(TeamMembersMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getOrgService(isEnterprise()).getTeamMembers(parameter, page), response -> { lastPage = response.getLast(); sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getFollowers() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/repos/TeamReposPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/repos/TeamReposPresenter.java index add7325f..a6639217 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/repos/TeamReposPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/org/teams/details/repos/TeamReposPresenter.java @@ -41,7 +41,7 @@ class TeamReposPresenter extends BasePresenter implements Tea super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Long parameter) { + @Override public boolean onCallApi(int page, @Nullable Long parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -52,13 +52,14 @@ class TeamReposPresenter extends BasePresenter implements Tea setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(TeamReposMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getOrgService(isEnterprise()).getTeamRepos(parameter, page), repoModelPageable -> { lastPage = repoModelPageable.getLast(); sendToView(view -> view.onNotifyAdapter(repoModelPageable.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getRepos() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/repos/ProfileReposPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/repos/ProfileReposPresenter.java index 1ffcc18e..3581cde1 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/repos/ProfileReposPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/repos/ProfileReposPresenter.java @@ -54,7 +54,7 @@ class ProfileReposPresenter extends BasePresenter implemen super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (currentLoggedIn == null) { currentLoggedIn = Login.getUser().getLogin(); } @@ -69,7 +69,7 @@ class ProfileReposPresenter extends BasePresenter implemen setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(ProfileReposMvp.View::hideProgress); - return; + return false; } boolean isProfile = TextUtils.equals(currentLoggedIn, username); filterOptions.setIsPersonalProfile(isProfile); @@ -83,6 +83,7 @@ class ProfileReposPresenter extends BasePresenter implemen } sendToView(view -> view.onNotifyAdapter(repoModelPageable.getItems(), page)); }); + return true; } @NonNull @Override public ArrayList getRepos() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/profile/starred/ProfileStarredPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/profile/starred/ProfileStarredPresenter.java index a1388300..182e710f 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/profile/starred/ProfileStarredPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/profile/starred/ProfileStarredPresenter.java @@ -52,7 +52,7 @@ class ProfileStarredPresenter extends BasePresenter impl super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (parameter == null) { throw new NullPointerException("Username is null"); } @@ -63,7 +63,7 @@ class ProfileStarredPresenter extends BasePresenter impl setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(ProfileStarredMvp.View::hideProgress); - return; + return false; } Observable> observable; if (starredCount == -1) { @@ -87,6 +87,7 @@ class ProfileStarredPresenter extends BasePresenter impl view.onNotifyAdapter(repoModelPageable.getItems(), page); }); }); + return true; } @NonNull @Override public ArrayList getRepos() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/RepoCommitsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/RepoCommitsPresenter.java index 47bcc8d6..ab0fc161 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/RepoCommitsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/RepoCommitsPresenter.java @@ -52,7 +52,7 @@ class RepoCommitsPresenter extends BasePresenter implements super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Object parameter) { + @Override public boolean onCallApi(int page, @Nullable Object parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); @@ -60,9 +60,9 @@ class RepoCommitsPresenter extends BasePresenter implements setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(RepoCommitsMvp.View::hideProgress); - return; + return false; } - if (repoId == null || login == null) return; + if (repoId == null || login == null) return false; makeRestCall(RestProvider.getRepoService(isEnterprise()).getCommits(login, repoId, branch, page), response -> { if (response != null && response.getItems() != null) { @@ -73,6 +73,7 @@ class RepoCommitsPresenter extends BasePresenter implements } sendToView(view -> view.onNotifyAdapter(response != null ? response.getItems() : null, page)); }); + return true; } @Override public void onFragmentCreated(@NonNull Bundle bundle) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java index 05f0fff9..460b7687 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsPresenter.java @@ -54,14 +54,14 @@ class CommitCommentsPresenter extends BasePresenter impl this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } if (page > lastPage || lastPage == 0) { sendToView(CommitCommentsMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); makeRestCall(RestProvider.getRepoService(isEnterprise()).getCommitComments(login, repoId, sha, page) @@ -75,6 +75,7 @@ class CommitCommentsPresenter extends BasePresenter impl } }), listResponse -> sendToView(view -> view.onNotifyAdapter(listResponse, page))); + return true; } @Override public void onFragmentCreated(@Nullable Bundle bundle) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/contributors/RepoContributorsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/contributors/RepoContributorsPresenter.java index 660c4cdc..784d8d3b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/contributors/RepoContributorsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/contributors/RepoContributorsPresenter.java @@ -43,7 +43,7 @@ class RepoContributorsPresenter extends BasePresenter this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable Object parameter) { + @Override public boolean onCallApi(int page, @Nullable Object parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); @@ -51,7 +51,7 @@ class RepoContributorsPresenter extends BasePresenter setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(RepoContributorsMvp.View::hideProgress); - return; + return false; } makeRestCall(RestProvider.getRepoService(isEnterprise()).getContributors(login, repoId, page), response -> { @@ -60,6 +60,7 @@ class RepoContributorsPresenter extends BasePresenter } sendToView(view -> view.onNotifyAdapter(response != null ? response.getItems() : null, page)); }); + return true; } @Override public void onFragmentCreated(@NonNull Bundle bundle) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/releases/RepoReleasesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/releases/RepoReleasesPresenter.java index 7400e672..31206dd1 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/releases/RepoReleasesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/releases/RepoReleasesPresenter.java @@ -49,7 +49,7 @@ class RepoReleasesPresenter extends BasePresenter implemen super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Object parameter) { + @Override public boolean onCallApi(int page, @Nullable Object parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); @@ -57,9 +57,9 @@ class RepoReleasesPresenter extends BasePresenter implemen setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(RepoReleasesMvp.View::hideProgress); - return; + return false; } - if (repoId == null || login == null) return; + if (repoId == null || login == null) return false; makeRestCall(RestProvider.getRepoService(isEnterprise()).getReleases(login, repoId, page), response -> { if (response.getItems() == null || response.getItems().isEmpty()) { @@ -68,6 +68,7 @@ class RepoReleasesPresenter extends BasePresenter implemen } onResponse(response); }); + return true; } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesPresenter.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesPresenter.kt index 85d19469..91e38192 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesPresenter.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesPresenter.kt @@ -68,10 +68,10 @@ class BranchesPresenter : BasePresenter(), BranchesMvp.Present this.previousTotal = previousTotal } - override fun onCallApi(page: Int, parameter: Boolean?) { + override fun onCallApi(page: Int, parameter: Boolean?): Boolean { if (login.isNullOrEmpty() || repoId.isNullOrEmpty()) { sendToView({ it.hideProgress() }) - return + return false } if (page == 1) { lastPage = Integer.MAX_VALUE @@ -79,10 +79,11 @@ class BranchesPresenter : BasePresenter(), BranchesMvp.Present } if (page > lastPage || lastPage == 0) { sendToView({ it.hideProgress() }) - return + return false } currentPage = page callApi(login!!, repoId!!, page) + return true } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscPresenter.java index 90a5ff0b..69787266 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/misc/RepoMiscPresenter.java @@ -66,7 +66,7 @@ public class RepoMiscPresenter extends BasePresenter implement this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @RepoMiscMVp.MiscType @Nullable Integer parameter) { + @Override public boolean onCallApi(int page, @RepoMiscMVp.MiscType @Nullable Integer parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); @@ -74,15 +74,15 @@ public class RepoMiscPresenter extends BasePresenter implement setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(RepoMiscMVp.View::hideProgress); - return; + return false; } switch (type) { case RepoMiscMVp.WATCHERS: makeRestCall(RestProvider.getRepoService(isEnterprise()).getWatchers(owner, repo, page), response -> onResponse(page, response)); - break; + return true; case RepoMiscMVp.STARS: makeRestCall(RestProvider.getRepoService(isEnterprise()).getStargazers(owner, repo, page), response -> onResponse(page, response)); - break; + return true; case RepoMiscMVp.FORKS: makeRestCall(RestProvider.getRepoService(isEnterprise()).getForks(owner, repo, page) .flatMap(repoPageable -> { @@ -92,8 +92,9 @@ public class RepoMiscPresenter extends BasePresenter implement .toList() .toObservable(); }), owners -> sendToView(view -> view.onNotifyAdapter(owners, page))); - break; + return true; } + return false; } private void onResponse(int page, @Nullable Pageable response) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/RepoIssuesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/RepoIssuesPresenter.java index 65852ef1..b45dac4e 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/RepoIssuesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/RepoIssuesPresenter.java @@ -56,10 +56,10 @@ class RepoIssuesPresenter extends BasePresenter implements R super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable IssueState parameter) { + @Override public boolean onCallApi(int page, @Nullable IssueState parameter) { if (parameter == null) { sendToView(RepoIssuesMvp.View::hideProgress); - return; + return false; } this.issueState = parameter; if (page == 1) { @@ -69,7 +69,7 @@ class RepoIssuesPresenter extends BasePresenter implements R } if (page > lastPage || lastPage == 0) { sendToView(RepoIssuesMvp.View::hideProgress); - return; + return false; } String sortBy = "created"; if (isLastUpdated) { @@ -87,6 +87,7 @@ class RepoIssuesPresenter extends BasePresenter implements R } sendToView(view -> view.onNotifyAdapter(filtered, page)); }); + return true; } private void onCallCountApi(@NonNull IssueState issueState) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java index fc9def5b..0c709112 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/issues/issue/details/timeline/IssueTimelinePresenter.java @@ -218,10 +218,10 @@ import lombok.Getter; this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable Issue parameter) { + @Override public boolean onCallApi(int page, @Nullable Issue parameter) { if (parameter == null) { sendToView(BaseMvp.FAView::hideProgress); - return; + return false; } if (page == 1) { lastPage = Integer.MAX_VALUE; @@ -229,7 +229,7 @@ import lombok.Getter; } if (page > lastPage || lastPage == 0) { sendToView(IssueTimelineMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); String login = parameter.getLogin(); @@ -246,5 +246,6 @@ import lombok.Getter; .toList() .toObservable(); makeRestCall(observable, timeline -> sendToView(view -> view.onNotifyAdapter(timeline, page))); + return true; } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/RepoPullRequestPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/RepoPullRequestPresenter.java index 4d55124d..42fb9c68 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/RepoPullRequestPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/RepoPullRequestPresenter.java @@ -53,10 +53,10 @@ class RepoPullRequestPresenter extends BasePresenter im super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable IssueState parameter) { + @Override public boolean onCallApi(int page, @Nullable IssueState parameter) { if (parameter == null) { sendToView(RepoPullRequestMvp.View::hideProgress); - return; + return false; } this.issueState = parameter; if (page == 1) { @@ -67,9 +67,9 @@ class RepoPullRequestPresenter extends BasePresenter im setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(RepoPullRequestMvp.View::hideProgress); - return; + return false; } - if (repoId == null || login == null) return; + if (repoId == null || login == null) return false; makeRestCall(RestProvider.getPullRequestService(isEnterprise()).getPullRequests(login, repoId, parameter.name(), page), response -> { lastPage = response.getLast(); if (getCurrentPage() == 1) { @@ -77,6 +77,7 @@ class RepoPullRequestPresenter extends BasePresenter im } sendToView(view -> view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @Override public void onFragmentCreated(@NonNull Bundle bundle) { @@ -123,6 +124,6 @@ class RepoPullRequestPresenter extends BasePresenter im } @Override public void onItemLongClick(int position, View v, PullRequest item) { - if(getView()!=null)getView().onShowPullRequestPopup(item); + if (getView() != null) getView().onShowPullRequestPopup(item); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/commits/PullRequestCommitsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/commits/PullRequestCommitsPresenter.java index 9f6bcb43..28e96c4b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/commits/PullRequestCommitsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/commits/PullRequestCommitsPresenter.java @@ -50,7 +50,7 @@ class PullRequestCommitsPresenter extends BasePresenter view.getLoadMore().reset()); @@ -58,9 +58,9 @@ class PullRequestCommitsPresenter extends BasePresenter lastPage || lastPage == 0) { sendToView(PullRequestCommitsMvp.View::hideProgress); - return; + return false; } - if (repoId == null || login == null) return; + if (repoId == null || login == null) return false; makeRestCall(RestProvider.getPullRequestService(isEnterprise()).getPullRequestCommits(login, repoId, number, page), response -> { lastPage = response.getLast(); @@ -69,6 +69,7 @@ class PullRequestCommitsPresenter extends BasePresenter view.onNotifyAdapter(response.getItems(), page)); }); + return true; } @Override public void onFragmentCreated(@NonNull Bundle bundle) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/files/PullRequestFilesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/files/PullRequestFilesPresenter.java index 66902704..ab1f40bf 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/files/PullRequestFilesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/files/PullRequestFilesPresenter.java @@ -61,7 +61,7 @@ class PullRequestFilesPresenter extends BasePresenter super.onError(throwable); } - @Override public void onCallApi(int page, @Nullable Object parameter) { + @Override public boolean onCallApi(int page, @Nullable Object parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); @@ -69,9 +69,9 @@ class PullRequestFilesPresenter extends BasePresenter setCurrentPage(page); if (page > lastPage || lastPage == 0) { sendToView(PullRequestFilesMvp.View::hideProgress); - return; + return false; } - if (repoId == null || login == null) return; + if (repoId == null || login == null) return false; makeRestCall(RestProvider.getPullRequestService(isEnterprise()).getPullRequestFiles(login, repoId, number, page) .flatMap(commitFileModelPageable -> { if (commitFileModelPageable != null) { @@ -83,6 +83,7 @@ class PullRequestFilesPresenter extends BasePresenter return Observable.empty(); }), response -> sendToView(view -> view.onNotifyAdapter(response, page))); + return true; } @Override public void onFragmentCreated(@NonNull Bundle bundle) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 592efd9e..06ce69cf 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -287,10 +287,10 @@ public class PullRequestTimelinePresenter extends BasePresenter lastPage || lastPage == 0) { sendToView(PullRequestTimelineMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); if (parameter.getHead() != null) { loadEverything(login, repoId, number, parameter.getHead().getSha(), parameter.isMergeable(), page); + return true; } + return false; } private void loadEverything(@NonNull String login, @NonNull String repoId, int number, diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogPresenter.java index 7e1febe5..8032c665 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/reactions/ReactionsDialogPresenter.java @@ -65,14 +65,14 @@ public class ReactionsDialogPresenter extends BasePresenter view.getLoadMore().reset()); } if (page > lastPage || lastPage == 0 || (login == null || repoId == null || reactionType == null)) { sendToView(ReactionsDialogMvp.View::hideProgress); - return; + return false; } setCurrentPage(page); Observable> observable = null; @@ -104,6 +104,7 @@ public class ReactionsDialogPresenter extends BasePresenter implements S this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } setCurrentPage(page); - if (page > lastPage || lastPage == 0) { + if (page > lastPage || lastPage == 0 || parameter == null) { sendToView(SearchCodeMvp.View::hideProgress); - return; - } - if (parameter == null) { - return; + return false; } makeRestCall(RestProvider.getSearchService(isEnterprise()).searchCode(parameter, page), response -> { @@ -58,6 +55,7 @@ class SearchCodePresenter extends BasePresenter implements S view.onSetTabCount(response.getTotalCount()); }); }); + return true; } @NonNull @Override public ArrayList getCodes() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/search/issues/SearchIssuesPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/search/issues/SearchIssuesPresenter.java index 4cbc50a5..7c00ae35 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/search/issues/SearchIssuesPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/search/issues/SearchIssuesPresenter.java @@ -38,18 +38,15 @@ class SearchIssuesPresenter extends BasePresenter implemen this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } setCurrentPage(page); - if (page > lastPage || lastPage == 0) { + if (page > lastPage || lastPage == 0 || parameter == null) { sendToView(SearchIssuesMvp.View::hideProgress); - return; - } - if (parameter == null) { - return; + return false; } makeRestCall(RestProvider.getSearchService(isEnterprise()).searchIssues(parameter, page), response -> { @@ -59,6 +56,7 @@ class SearchIssuesPresenter extends BasePresenter implemen view.onSetTabCount(response.getTotalCount()); }); }); + return true; } @NonNull @Override public ArrayList getIssues() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/search/repos/SearchReposPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/search/repos/SearchReposPresenter.java index 0deefdcb..66f5b19f 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/search/repos/SearchReposPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/search/repos/SearchReposPresenter.java @@ -38,18 +38,15 @@ class SearchReposPresenter extends BasePresenter implements this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } setCurrentPage(page); - if (page > lastPage || lastPage == 0) { + if (page > lastPage || lastPage == 0 || parameter == null) { sendToView(SearchReposMvp.View::hideProgress); - return; - } - if (parameter == null) { - return; + return false; } makeRestCall(RestProvider.getSearchService(isEnterprise()).searchRepositories(parameter, page), response -> { @@ -59,6 +56,7 @@ class SearchReposPresenter extends BasePresenter implements view.onSetTabCount(response.getTotalCount()); }); }); + return true; } @NonNull @Override public ArrayList getRepos() { diff --git a/app/src/main/java/com/fastaccess/ui/modules/search/users/SearchUsersPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/search/users/SearchUsersPresenter.java index 109fddc6..c9f7099c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/search/users/SearchUsersPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/search/users/SearchUsersPresenter.java @@ -37,18 +37,15 @@ class SearchUsersPresenter extends BasePresenter implements this.previousTotal = previousTotal; } - @Override public void onCallApi(int page, @Nullable String parameter) { + @Override public boolean onCallApi(int page, @Nullable String parameter) { if (page == 1) { lastPage = Integer.MAX_VALUE; sendToView(view -> view.getLoadMore().reset()); } setCurrentPage(page); - if (page > lastPage || lastPage == 0) { + if (page > lastPage || lastPage == 0 || parameter == null) { sendToView(SearchUsersMvp.View::hideProgress); - return; - } - if (parameter == null) { - return; + return false; } makeRestCall(RestProvider.getSearchService(isEnterprise()).searchUsers(parameter, page), response -> { @@ -58,6 +55,7 @@ class SearchUsersPresenter extends BasePresenter implements view.onSetTabCount(response.getTotalCount()); }); }); + return true; } @NonNull @Override public ArrayList getUsers() { diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java index c58c0c35..32fbafcd 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java @@ -18,9 +18,7 @@ import java.util.List; public abstract class BaseRecyclerAdapter> extends RecyclerView.Adapter { - public interface GuideListener { - void onShowGuide(@NonNull View itemView, @NonNull M model); - } + private final static int PROGRESS_TYPE = 2017; @NonNull private List data; @Nullable private P listener; @@ -28,6 +26,7 @@ public abstract class BaseRecyclerAdapter()); @@ -59,13 +58,26 @@ public abstract class BaseRecyclerAdapter items) { + removeProgress(); data.addAll(items); notifyItemRangeInserted(getItemCount(), (getItemCount() + items.size()) - 1); } @@ -143,6 +157,7 @@ public abstract class BaseRecyclerAdapter { + void onShowGuide(@NonNull View itemView, @NonNull M model); + } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/InsetDividerDecoration.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/InsetDividerDecoration.java index 57ea11bc..991ecfc6 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/InsetDividerDecoration.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/InsetDividerDecoration.java @@ -44,19 +44,21 @@ class InsetDividerDecoration extends RecyclerView.ItemDecoration { for (int i = 0; i < childCount; i++) { View child = parent.getChildAt(i); RecyclerView.ViewHolder viewHolder = parent.getChildViewHolder(child); - boolean canDivide = toDivide == null || viewHolder.getClass() == toDivide; - if (canDivide) { - int position = parent.getChildAdapterPosition(child); - if (child.isActivated() || (i + 1 < childCount && parent.getChildAt(i + 1).isActivated())) { - continue; - } - if (position != (state.getItemCount() - 1)) { - lines[i * 4] = inset == 0 ? inset : inset + lm.getDecoratedLeft(child); - lines[(i * 4) + 2] = lm.getDecoratedRight(child); - int y = lm.getDecoratedBottom(child) + (int) child.getTranslationY() - height; - lines[(i * 4) + 1] = y; - lines[(i * 4) + 3] = y; - hasDividers = true; + if (!(viewHolder instanceof ProgressBarViewHolder)) { + boolean canDivide = toDivide == null || viewHolder.getClass() == toDivide; + if (canDivide) { + int position = parent.getChildAdapterPosition(child); + if (child.isActivated() || (i + 1 < childCount && parent.getChildAt(i + 1).isActivated())) { + continue; + } + if (position != (state.getItemCount() - 1)) { + lines[i * 4] = inset == 0 ? inset : inset + lm.getDecoratedLeft(child); + lines[(i * 4) + 2] = lm.getDecoratedRight(child); + int y = lm.getDecoratedBottom(child) + (int) child.getTranslationY() - height; + lines[(i * 4) + 1] = y; + lines[(i * 4) + 3] = y; + hasDividers = true; + } } } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/ProgressBarViewHolder.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/ProgressBarViewHolder.java new file mode 100644 index 00000000..a34127c0 --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/ProgressBarViewHolder.java @@ -0,0 +1,26 @@ +package com.fastaccess.ui.widgets.recyclerview; + +import android.support.annotation.NonNull; +import android.view.View; +import android.view.ViewGroup; + +import com.fastaccess.R; + +/** + * Created by kosh on 03/08/2017. + */ + +public class ProgressBarViewHolder extends BaseViewHolder { + + private ProgressBarViewHolder(@NonNull View itemView) { + super(itemView); + } + + public static ProgressBarViewHolder newInstance(ViewGroup viewGroup) { + return new ProgressBarViewHolder(getView(viewGroup, R.layout.progress_layout)); + } + + @Override public void bind(@NonNull Object o) { + + } +} diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java index 66cce29c..03f09449 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java @@ -5,6 +5,8 @@ import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; +import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; + /** * Created by Kosh on 8/2/2015. copyrights are reserved @ */ @@ -70,8 +72,13 @@ public abstract class InfiniteScroll extends RecyclerView.OnScrollListener { } if (!loading && (lastVisibleItemPosition + visibleThreshold) > totalItemCount) { currentPage++; - onLoadMore(currentPage, totalItemCount); + boolean isCallingApi = onLoadMore(currentPage, totalItemCount); loading = true; + if (recyclerView.getAdapter() != null && isCallingApi) { + if (recyclerView.getAdapter() instanceof BaseRecyclerAdapter) { + ((BaseRecyclerAdapter) recyclerView.getAdapter()).addProgress(); + } + } } } @@ -87,7 +94,7 @@ public abstract class InfiniteScroll extends RecyclerView.OnScrollListener { this.loading = true; } - public abstract void onLoadMore(int page, int totalItemsCount); + public abstract boolean onLoadMore(int page, int totalItemsCount); } diff --git a/app/src/main/res/layouts/row_layouts/layout/progress_layout.xml b/app/src/main/res/layouts/row_layouts/layout/progress_layout.xml new file mode 100644 index 00000000..26d24666 --- /dev/null +++ b/app/src/main/res/layouts/row_layouts/layout/progress_layout.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file From 9f577c9e9734cdaad963e88ed58953d66bdef463 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 11:33:41 +0800 Subject: [PATCH 17/67] enhanced footer. --- .../recyclerview/BaseRecyclerAdapter.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java index 32fbafcd..f95c06eb 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java @@ -2,7 +2,9 @@ package com.fastaccess.ui.widgets.recyclerview; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; +import android.support.v7.widget.StaggeredGridLayoutManager; import android.view.View; import android.view.ViewGroup; @@ -59,6 +61,7 @@ public abstract class BaseRecyclerAdapter { void onShowGuide(@NonNull View itemView, @NonNull M model); } From 92812438137cc04082092ee6fd0320c2fc947013 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 11:38:34 +0800 Subject: [PATCH 18/67] fixed footer span lookup. --- .../ui/widgets/recyclerview/BaseRecyclerAdapter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java index f95c06eb..325a8988 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java @@ -223,9 +223,10 @@ public abstract class BaseRecyclerAdapter Date: Thu, 3 Aug 2017 11:59:07 +0800 Subject: [PATCH 19/67] fixed settings notification to remove sound as well & catching recyclerview bug to avoid crash --- .../com/fastaccess/ui/modules/main/MainActivity.java | 4 ++++ .../com/fastaccess/ui/modules/main/MainPresenter.java | 5 +++-- .../settings/category/SettingsCategoryFragment.java | 2 ++ .../recyclerview/layout_manager/GridManager.java | 10 +++++++--- .../recyclerview/layout_manager/LinearManager.java | 9 ++++++++- .../recyclerview/layout_manager/StaggeredManager.java | 7 +++++++ .../widgets/recyclerview/scroll/InfiniteScroll.java | 11 +++++++++++ 7 files changed, 42 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java b/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java index c48cea44..800aee88 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java @@ -15,6 +15,7 @@ import com.fastaccess.R; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.Notification; import com.fastaccess.helper.BundleConstant; +import com.fastaccess.helper.Logger; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.TypeFaceHelper; import com.fastaccess.helper.ViewHelper; @@ -106,8 +107,11 @@ public class MainActivity extends BaseActivity impl } @Override public boolean onPrepareOptionsMenu(Menu menu) { + Logger.e(); if (isLoggedIn() && Notification.hasUnreadNotifications()) { ViewHelper.tintDrawable(menu.findItem(R.id.notifications).setIcon(R.drawable.ic_ring).getIcon(), ViewHelper.getAccentColor(this)); + } else { + ViewHelper.tintDrawable(menu.findItem(R.id.notifications).setIcon(R.drawable.ic_ring).getIcon(), ViewHelper.getIconColor(this)); } return super.onPrepareOptionsMenu(menu); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java index 8e8336e5..87cdd0d2 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java @@ -48,11 +48,12 @@ public class MainPresenter extends BasePresenter implements MainMv .flatMap(login -> RxHelper.getObservable(RestProvider.getNotificationService(isEnterprise()) .getNotifications(ParseDateFormat.getLastWeekDate()))) .flatMap(notificationPageable -> { + boolean hasUnread = false; if (notificationPageable != null && notificationPageable.getItems() == null && !notificationPageable.getItems().isEmpty()) { + hasUnread = Stream.of(notificationPageable.getItems()).anyMatch(Notification::isUnread); manageDisposable(Notification.save(notificationPageable.getItems())); - return Observable.just(Stream.of(notificationPageable.getItems()).anyMatch(Notification::isUnread)); } - return Observable.empty(); + return Observable.just(hasUnread); }) .subscribe(unread -> {/**/}, Throwable::printStackTrace/*fail silently*/, () -> sendToView(view -> { view.onInvalidateNotification(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java index 0db19933..7441e4c4 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java @@ -111,12 +111,14 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement getPreferenceScreen().addPreference(notificationTime); getPreferenceScreen().addPreference(notificationRead); getPreferenceScreen().addPreference(notificationSound); + getPreferenceScreen().addPreference(findPreference("notification_sound_path")); NotificationSchedulerJobTask.scheduleJob(App.getInstance(), PrefGetter.getNotificationTaskDuration(), true); } else { getPreferenceScreen().removePreference(notificationTime); getPreferenceScreen().removePreference(notificationRead); getPreferenceScreen().removePreference(notificationSound); + getPreferenceScreen().removePreference(findPreference("notification_sound_path")); NotificationSchedulerJobTask.scheduleJob(App.getInstance(), -1, true); } return true; diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/GridManager.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/GridManager.java index 329f286f..9f3cc68f 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/GridManager.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/GridManager.java @@ -25,12 +25,16 @@ public class GridManager extends GridLayoutManager { } @Override public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { - super.onLayoutChildren(recycler, state); - updateCount(); + try { + super.onLayoutChildren(recycler, state); + updateCount(); + } catch (Exception ignored) {} } @Override public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state, int widthSpec, int heightSpec) { - super.onMeasure(recycler, state, widthSpec, heightSpec); + try { + super.onMeasure(recycler, state, widthSpec, heightSpec); + } catch (Exception ignored) {} } private void updateCount() { diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/LinearManager.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/LinearManager.java index 9a787804..2d830d36 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/LinearManager.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/LinearManager.java @@ -25,6 +25,13 @@ public class LinearManager extends LinearLayoutManager { @Override public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { try { super.onLayoutChildren(recycler, state); - } catch (IndexOutOfBoundsException ignored) {} + } catch (Exception ignored) {} } + + @Override public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state, int widthSpec, int heightSpec) { + try { + super.onMeasure(recycler, state, widthSpec, heightSpec); + } catch (Exception ignored) {} + } + } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/StaggeredManager.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/StaggeredManager.java index b132a6d6..46a75430 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/StaggeredManager.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/layout_manager/StaggeredManager.java @@ -23,4 +23,11 @@ public class StaggeredManager extends StaggeredGridLayoutManager { super.onLayoutChildren(recycler, state); } catch (Exception ignored) {} } + + @Override public void onMeasure(RecyclerView.Recycler recycler, RecyclerView.State state, int widthSpec, int heightSpec) { + try { + super.onMeasure(recycler, state, widthSpec, heightSpec); + } catch (Exception ignored) {} + } + } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java index 03f09449..9b0809d8 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/InfiniteScroll.java @@ -4,8 +4,11 @@ import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; +import android.view.View; +import com.fastaccess.helper.Logger; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; +import com.fastaccess.ui.widgets.recyclerview.ProgressBarViewHolder; /** * Created by Kosh on 8/2/2015. copyrights are reserved @ @@ -66,6 +69,14 @@ public abstract class InfiniteScroll extends RecyclerView.OnScrollListener { this.loading = true; } } + View child = recyclerView.getChildAt(lastVisibleItemPosition); + if (child != null) { + RecyclerView.ViewHolder viewHolder = recyclerView.getChildViewHolder(child); + if (viewHolder != null && viewHolder instanceof ProgressBarViewHolder) { + Logger.e(); + return; + } + } if (loading && (totalItemCount > previousTotalItemCount)) { loading = false; previousTotalItemCount = totalItemCount; From 11198328ef2de47c61d991a6dd61a4d4aa946c59 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 12:26:09 +0800 Subject: [PATCH 20/67] this commit fixes notification icon in main activity & fixes notification toggle in settings. --- .../data/dao/model/AbstractNotification.java | 22 ++++++++++++++++++- .../ui/modules/main/MainActivity.java | 5 ++--- .../ui/modules/main/MainPresenter.java | 13 +++++------ .../category/SettingsCategoryFragment.java | 22 ++++++++++++------- 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/app/src/main/java/com/fastaccess/data/dao/model/AbstractNotification.java b/app/src/main/java/com/fastaccess/data/dao/model/AbstractNotification.java index d7ce2f6a..61657946 100644 --- a/app/src/main/java/com/fastaccess/data/dao/model/AbstractNotification.java +++ b/app/src/main/java/com/fastaccess/data/dao/model/AbstractNotification.java @@ -92,6 +92,26 @@ import lombok.NoArgsConstructor; })).subscribe(o -> {/*do nothing*/}, Throwable::printStackTrace); } + public static Single saveAsSingle(@android.support.annotation.Nullable List models) { + if (models == null || models.isEmpty()) { + return Single.just(true); + } + return RxHelper.getSingle(Single.fromPublisher(s -> { + try { + BlockingEntityStore dataStore = App.getInstance().getDataStore().toBlocking(); + for (Notification entity : models) { + dataStore.delete(Notification.class).where(Notification.ID.eq(entity.getId())).get().value(); + } + dataStore.insert(models); + s.onNext(true); + } catch (Exception e) { + e.printStackTrace(); + s.onError(e); + } + s.onComplete(); + })); + } + public static Single> getUnreadNotifications() { return App.getInstance() .getDataStore() @@ -116,9 +136,9 @@ import lombok.NoArgsConstructor; public static boolean hasUnreadNotifications() { return App.getInstance() .getDataStore() + .toBlocking() .count(Notification.class) .where(Notification.UNREAD.equal(true)) - .limit(1) .get() .value() > 0; } diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java b/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java index 800aee88..db12f7c2 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/MainActivity.java @@ -15,7 +15,6 @@ import com.fastaccess.R; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.Notification; import com.fastaccess.helper.BundleConstant; -import com.fastaccess.helper.Logger; import com.fastaccess.helper.PrefGetter; import com.fastaccess.helper.TypeFaceHelper; import com.fastaccess.helper.ViewHelper; @@ -107,11 +106,11 @@ public class MainActivity extends BaseActivity impl } @Override public boolean onPrepareOptionsMenu(Menu menu) { - Logger.e(); if (isLoggedIn() && Notification.hasUnreadNotifications()) { ViewHelper.tintDrawable(menu.findItem(R.id.notifications).setIcon(R.drawable.ic_ring).getIcon(), ViewHelper.getAccentColor(this)); } else { - ViewHelper.tintDrawable(menu.findItem(R.id.notifications).setIcon(R.drawable.ic_ring).getIcon(), ViewHelper.getIconColor(this)); + ViewHelper.tintDrawable(menu.findItem(R.id.notifications).setIcon(R.drawable.ic_notifications_none).getIcon(), ViewHelper.getIconColor + (this)); } return super.onPrepareOptionsMenu(menu); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java index 87cdd0d2..31a86374 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/MainPresenter.java @@ -7,7 +7,6 @@ import android.support.v4.app.FragmentManager; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; -import com.annimon.stream.Stream; import com.fastaccess.R; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.Notification; @@ -20,7 +19,7 @@ import com.fastaccess.ui.modules.feeds.FeedsFragment; import com.fastaccess.ui.modules.main.issues.pager.MyIssuesPagerFragment; import com.fastaccess.ui.modules.main.pullrequests.pager.MyPullsPagerFragment; -import io.reactivex.Observable; +import io.reactivex.Single; import static com.fastaccess.helper.ActivityHelper.getVisibleFragment; import static com.fastaccess.helper.AppHelper.getFragmentByTag; @@ -47,13 +46,11 @@ public class MainPresenter extends BasePresenter implements MainMv }) .flatMap(login -> RxHelper.getObservable(RestProvider.getNotificationService(isEnterprise()) .getNotifications(ParseDateFormat.getLastWeekDate()))) - .flatMap(notificationPageable -> { - boolean hasUnread = false; - if (notificationPageable != null && notificationPageable.getItems() == null && !notificationPageable.getItems().isEmpty()) { - hasUnread = Stream.of(notificationPageable.getItems()).anyMatch(Notification::isUnread); - manageDisposable(Notification.save(notificationPageable.getItems())); + .flatMapSingle(notificationPageable -> { + if (notificationPageable != null) { + return Notification.saveAsSingle(notificationPageable.getItems()); } - return Observable.just(hasUnread); + return Single.just(true); }) .subscribe(unread -> {/**/}, Throwable::printStackTrace/*fail silently*/, () -> sendToView(view -> { view.onInvalidateNotification(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java index 7441e4c4..e0ab0ef3 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/settings/category/SettingsCategoryFragment.java @@ -66,6 +66,7 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement private Preference notificationTime; private Preference notificationRead; private Preference notificationSound; + private Preference notificationSoundPath; private SettingsCallback settingsCallback; @Override public void onAttach(Context context) { @@ -111,14 +112,14 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement getPreferenceScreen().addPreference(notificationTime); getPreferenceScreen().addPreference(notificationRead); getPreferenceScreen().addPreference(notificationSound); - getPreferenceScreen().addPreference(findPreference("notification_sound_path")); + getPreferenceScreen().addPreference(notificationSoundPath); NotificationSchedulerJobTask.scheduleJob(App.getInstance(), PrefGetter.getNotificationTaskDuration(), true); } else { getPreferenceScreen().removePreference(notificationTime); getPreferenceScreen().removePreference(notificationRead); getPreferenceScreen().removePreference(notificationSound); - getPreferenceScreen().removePreference(findPreference("notification_sound_path")); + getPreferenceScreen().removePreference(notificationSoundPath); NotificationSchedulerJobTask.scheduleJob(App.getInstance(), -1, true); } return true; @@ -201,14 +202,17 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement restoreData(data); } else if (requestCode == SOUND_REQUEST_CODE) { Uri ringtone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); - findPreference("notification_sound_path").setDefaultValue(ringtone.toString()); + if (notificationSoundPath != null && notificationSoundPath.isVisible()) { + notificationSoundPath.setDefaultValue(ringtone.toString()); + } } } } @Override public void onSoundSelected(Uri uri) { PrefGetter.setNotificationSound(uri); - findPreference("notification_sound_path").setSummary(FileHelper.getRingtoneName(getContext(), uri)); + if (notificationSoundPath != null && notificationSoundPath.isVisible()) + notificationSoundPath.setSummary(FileHelper.getRingtoneName(getContext(), uri)); } private void showFileChooser() { @@ -285,18 +289,20 @@ public class SettingsCategoryFragment extends PreferenceFragmentCompat implement notificationTime = findPreference("notificationTime"); notificationRead = findPreference("markNotificationAsRead"); notificationSound = findPreference("notificationSound"); - findPreference("notification_sound_path").setSummary(FileHelper.getRingtoneName(getContext(), PrefGetter.getNotificationSound())); - findPreference("notification_sound_path").setOnPreferenceClickListener(preference -> { + notificationTime.setOnPreferenceChangeListener(this); + findPreference("notificationEnabled").setOnPreferenceChangeListener(this); + notificationSoundPath = findPreference("notification_sound_path"); + notificationSoundPath.setSummary(FileHelper.getRingtoneName(getContext(), PrefGetter.getNotificationSound())); + notificationSoundPath.setOnPreferenceClickListener(preference -> { NotificationSoundBottomSheet.Companion.newInstance(FileHelper.getRingtoneName(getContext(), PrefGetter.getNotificationSound())) .show(getChildFragmentManager(), "NotificationSoundBottomSheet"); return true; }); - findPreference("notificationTime").setOnPreferenceChangeListener(this); - findPreference("notificationEnabled").setOnPreferenceChangeListener(this); if (!PrefHelper.getBoolean("notificationEnabled")) { getPreferenceScreen().removePreference(notificationTime); getPreferenceScreen().removePreference(notificationRead); getPreferenceScreen().removePreference(notificationSound); + getPreferenceScreen().removePreference(notificationSoundPath); } } From 48d0cf6bea8f37988055cffac1988eddccfb3a58 Mon Sep 17 00:00:00 2001 From: Yakov Date: Thu, 3 Aug 2017 01:12:38 -0400 Subject: [PATCH 21/67] Corrected Milestone lang --- .../provider/timeline/TimelineProvider.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java index 9a17fe14..d5f91efc 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineProvider.java @@ -108,15 +108,17 @@ public class TimelineProvider { } else if (event == IssueEventType.head_ref_deleted || event == IssueEventType.head_ref_restored) { spannableBuilder.append(" ").append(event.name().replaceAll("_", " "), new BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))); + } else if (event == IssueEventType.milestoned || event == IssueEventType.demilestoned) { + spannableBuilder.append(" ") + .append(event == IssueEventType.milestoned ? "added this to the" : "removed this from the") + .append(" ") + .bold(issueEventModel.getMilestone().getTitle()) + .append(" ") + .append("milestone"); } else { spannableBuilder.append(" ").append(event.name().replaceAll("_", " ")); } - if (event == IssueEventType.milestoned || event == IssueEventType.demilestoned) { - spannableBuilder.append(" ") - .append(event == IssueEventType.milestoned ? to : from) - .append(" ") - .bold(issueEventModel.getMilestone().getTitle()); - } else if (event == IssueEventType.renamed) { + if (event == IssueEventType.renamed) { spannableBuilder .append(" ") .append(from) From 83de7da2d076e8da55be70a971fec358b647df11 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 15:56:41 +0800 Subject: [PATCH 22/67] this commit fixed crash on multiple types introduced by progress footer. --- .../timeline/PullRequestTimelineModel.java | 6 ++-- ...dapter.java => IssuesTimelineAdapter.java} | 15 +++++---- .../ui/adapter/PullReqeustTimelineAdapter.kt | 33 +++++++++++++++++++ .../TimelineCommentsViewHolder.java | 6 ++-- .../comments/CommitCommentsFragment.java | 6 ++-- .../timeline/IssueTimelineFragment.java | 8 ++--- .../timeline/PullRequestTimelineFragment.java | 8 ++--- .../recyclerview/BaseRecyclerAdapter.java | 4 +++ .../recyclerview/scroll/InfiniteScroll.java | 23 +++++-------- .../scroll/RecyclerViewFastScroller.java | 30 ++++++++++------- 10 files changed, 89 insertions(+), 50 deletions(-) rename app/src/main/java/com/fastaccess/ui/adapter/{IssuePullsTimelineAdapter.java => IssuesTimelineAdapter.java} (85%) create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 179231fb..77e4b84e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -19,9 +19,9 @@ import pr.PullRequestTimelineQuery; public static final int STATUS = 3; public static final int REVIEW = 4; - private PullRequestTimelineQuery.Node node; - private PullRequest pullRequest; - private PullRequestStatusModel status; + public PullRequestTimelineQuery.Node node; + public PullRequest pullRequest; + public PullRequestStatusModel status; public PullRequestTimelineModel(PullRequest pullRequest) { this.pullRequest = pullRequest; diff --git a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java similarity index 85% rename from app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java rename to app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java index b48a1211..fe42f6c2 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuePullsTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java @@ -23,7 +23,7 @@ import java.util.List; * Created by Kosh on 13 Dec 2016, 1:44 AM */ -public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter> { private final OnToggleView onToggleView; @@ -34,9 +34,9 @@ public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter data, OnToggleView onToggleView, boolean showEmojies, - ReactionsCallback reactionsCallback, boolean isMerged, - ReviewCommentCallback reviewCommentCallback, String repoOwner, String poster) { + public IssuesTimelineAdapter(@NonNull List data, OnToggleView onToggleView, boolean showEmojies, + ReactionsCallback reactionsCallback, boolean isMerged, + ReviewCommentCallback reviewCommentCallback, String repoOwner, String poster) { super(data); this.onToggleView = onToggleView; this.showEmojies = showEmojies; @@ -47,8 +47,8 @@ public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter data, OnToggleView onToggleView, boolean showEmojies, - ReactionsCallback reactionsCallback, String repoOwner, String poster) { + public IssuesTimelineAdapter(@NonNull List data, OnToggleView onToggleView, boolean showEmojies, + ReactionsCallback reactionsCallback, String repoOwner, String poster) { this(data, onToggleView, showEmojies, reactionsCallback, false, null, repoOwner, poster); } @@ -99,7 +99,8 @@ public class IssuePullsTimelineAdapter extends BaseRecyclerAdapter) : BaseRecyclerAdapter, BaseViewHolder.OnItemClickListener>(data) { + + override fun viewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder? { + when (viewType) { + PullRequestTimelineModel.STATUS -> PullStatusViewHolder.newInstance(parent) + } + return null + } + + override fun onBindView(holder: BaseViewHolder?, position: Int) { + val item = data[position] + if (item.type == PullRequestTimelineModel.STATUS) { + (holder as PullStatusViewHolder).bind(item.status) + } + } + + override fun getItemViewType(position: Int): Int { + val timeline: PullRequestTimelineModel? = data[position] + return timeline?.type ?: super.getItemViewType(position) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java index 0998dac0..721f5708 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TimelineCommentsViewHolder.java @@ -21,7 +21,7 @@ import com.fastaccess.provider.scheme.LinkParserHelper; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.HtmlHelper; import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; -import com.fastaccess.ui.adapter.IssuePullsTimelineAdapter; +import com.fastaccess.ui.adapter.IssuesTimelineAdapter; import com.fastaccess.ui.adapter.callback.OnToggleView; import com.fastaccess.ui.adapter.callback.ReactionsCallback; import com.fastaccess.ui.widgets.AvatarLayout; @@ -76,7 +76,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder { } } - private TimelineCommentsViewHolder(@NonNull View itemView, @NonNull ViewGroup viewGroup, @Nullable IssuePullsTimelineAdapter adapter, + private TimelineCommentsViewHolder(@NonNull View itemView, @NonNull ViewGroup viewGroup, @Nullable IssuesTimelineAdapter adapter, @NonNull OnToggleView onToggleView, boolean showEmojies, @NonNull ReactionsCallback reactionsCallback, String repoOwner, String poster) { super(itemView, adapter); @@ -106,7 +106,7 @@ public class TimelineCommentsViewHolder extends BaseViewHolder { heart.setOnClickListener(this); } - public static TimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable IssuePullsTimelineAdapter adapter, + public static TimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable IssuesTimelineAdapter adapter, @NonNull OnToggleView onToggleView, boolean showEmojies, @NonNull ReactionsCallback reactionsCallback, String repoOwner, String poster) { return new TimelineCommentsViewHolder(getView(viewGroup, R.layout.comments_row_item), viewGroup, adapter, diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java index 8d5a2ff1..170c4135 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/code/commit/details/comments/CommitCommentsFragment.java @@ -21,7 +21,7 @@ import com.fastaccess.helper.Bundler; import com.fastaccess.provider.rest.loadmore.OnLoadMore; import com.fastaccess.provider.timeline.CommentsHelper; import com.fastaccess.provider.timeline.ReactionsProvider; -import com.fastaccess.ui.adapter.IssuePullsTimelineAdapter; +import com.fastaccess.ui.adapter.IssuesTimelineAdapter; import com.fastaccess.ui.base.BaseFragment; import com.fastaccess.ui.modules.editor.EditorActivity; import com.fastaccess.ui.modules.repos.reactions.ReactionsDialogFragment; @@ -48,7 +48,7 @@ public class CommitCommentsFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); - private IssuePullsTimelineAdapter adapter; + private IssuesTimelineAdapter adapter; private OnLoadMore onLoadMore; public static CommitCommentsFragment newInstance(@NonNull String login, @NonNull String repoId, @NonNull String sha) { @@ -72,7 +72,7 @@ public class CommitCommentsFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); - private IssuePullsTimelineAdapter adapter; + private IssuesTimelineAdapter adapter; private OnLoadMore onLoadMore; private IssuePagerMvp.IssuePrCallback issueCallback; @@ -111,10 +111,10 @@ public class IssueTimelineFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); - private IssuePullsTimelineAdapter adapter; + private IssuesTimelineAdapter adapter; private OnLoadMore onLoadMore; private IssuePagerMvp.IssuePrCallback issueCallback; @@ -93,11 +93,11 @@ public class PullRequestTimelineFragment extends BaseFragment previousTotalItemCount)) { loading = false; previousTotalItemCount = totalItemCount; @@ -85,10 +80,8 @@ public abstract class InfiniteScroll extends RecyclerView.OnScrollListener { currentPage++; boolean isCallingApi = onLoadMore(currentPage, totalItemCount); loading = true; - if (recyclerView.getAdapter() != null && isCallingApi) { - if (recyclerView.getAdapter() instanceof BaseRecyclerAdapter) { - ((BaseRecyclerAdapter) recyclerView.getAdapter()).addProgress(); - } + if (adapter != null && isCallingApi) { + adapter.addProgress(); } } } diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java index 1e658a10..41205efe 100755 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/scroll/RecyclerViewFastScroller.java @@ -128,17 +128,25 @@ public class RecyclerViewFastScroller extends FrameLayout { } private void initScrollHeight() { - this.recyclerView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { - @Override public boolean onPreDraw() { - RecyclerViewFastScroller.this.recyclerView.getViewTreeObserver().removeOnPreDrawListener(this); - if (scrollerView.isSelected()) return true; - int verticalScrollOffset = RecyclerViewFastScroller.this.recyclerView.computeVerticalScrollOffset(); - int verticalScrollRange = RecyclerViewFastScroller.this.computeVerticalScrollRange(); - float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); - setScrollerHeight(height * proportion); - return true; - } - }); + if (recyclerView.computeVerticalScrollOffset() == 0) { + this.recyclerView.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { + @Override public boolean onPreDraw() { + RecyclerViewFastScroller.this.recyclerView.getViewTreeObserver().removeOnPreDrawListener(this); + iniHeight(); + return true; + } + }); + } else { + iniHeight(); + } + } + + protected void iniHeight() { + if (scrollerView.isSelected()) return; + int verticalScrollOffset = RecyclerViewFastScroller.this.recyclerView.computeVerticalScrollOffset(); + int verticalScrollRange = RecyclerViewFastScroller.this.computeVerticalScrollRange(); + float proportion = (float) verticalScrollOffset / ((float) verticalScrollRange - height); + setScrollerHeight(height * proportion); } private void setRecyclerViewPosition(float y) { From 7d58720ba92acfb12e1ebfe17a2ec437fcc581d3 Mon Sep 17 00:00:00 2001 From: kosh Date: Thu, 3 Aug 2017 23:50:23 +0800 Subject: [PATCH 23/67] prepared PR timeline events view holder. @yakov116 please review --- .../graphql/pr/PullRequestTimeline.graphql | 19 +- .../provider/timeline/HtmlHelper.java | 2 +- .../ui/adapter/PullReqeustTimelineAdapter.kt | 5 +- .../viewholder/PullRequestEventViewHolder.kt | 368 ++++++++++++++++++ .../recyclerview/BaseRecyclerAdapter.java | 1 + 5 files changed, 392 insertions(+), 3 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 7823ec85..59af0aa1 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -12,11 +12,11 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } totalCount nodes { - __typename ... on Commit { id oid url + committedDate messageHeadlineHTML author { name @@ -130,6 +130,11 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: createdAt isCrossRepository isDirectReference + actor { + avatarUrl + login + url + } commitRepository { nameWithOwner url @@ -178,6 +183,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } } ... on LabeledEvent { + createdAt actor { login avatarUrl @@ -189,6 +195,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } } ... on UnlabeledEvent { + createdAt actor { login avatarUrl @@ -224,6 +231,11 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: createdAt currentTitle previousTitle + actor { + login + avatarUrl + url + } } ... on LockedEvent { createdAt @@ -243,6 +255,11 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } ... on DeployedEvent { createdAt + actor { + login + avatarUrl + url + } ref { name prefix diff --git a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java index 6ade3ecd..b50d5469 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/HtmlHelper.java @@ -129,7 +129,7 @@ public class HtmlHelper { return mySpanner; } - @ColorInt static int getWindowBackground(@PrefGetter.ThemeType int theme) { + @ColorInt public static int getWindowBackground(@PrefGetter.ThemeType int theme) { switch (theme) { case PrefGetter.AMLOD: return Color.parseColor("#0B162A"); diff --git a/app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt index c7e61e28..79b2fd3e 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt @@ -2,6 +2,7 @@ package com.fastaccess.ui.adapter import android.view.ViewGroup import com.fastaccess.data.dao.timeline.PullRequestTimelineModel +import com.fastaccess.ui.adapter.viewholder.PullRequestEventViewHolder import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder @@ -16,13 +17,15 @@ class PullReqeustTimelineAdapter constructor(val data: ArrayList PullStatusViewHolder.newInstance(parent) } - return null + return PullRequestEventViewHolder.newInstance(parent, this) } override fun onBindView(holder: BaseViewHolder?, position: Int) { val item = data[position] if (item.type == PullRequestTimelineModel.STATUS) { (holder as PullStatusViewHolder).bind(item.status) + }else { + holder?.bind(item) } } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt new file mode 100644 index 00000000..b824409f --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -0,0 +1,368 @@ +package com.fastaccess.ui.adapter.viewholder + +import android.annotation.SuppressLint +import android.graphics.Color +import android.text.style.BackgroundColorSpan +import android.view.View +import android.view.ViewGroup +import butterknife.BindView +import com.fastaccess.R +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel +import com.fastaccess.helper.ParseDateFormat +import com.fastaccess.helper.PrefGetter +import com.fastaccess.helper.ViewHelper +import com.fastaccess.provider.scheme.LinkParserHelper +import com.fastaccess.provider.timeline.HtmlHelper +import com.fastaccess.ui.widgets.AvatarLayout +import com.fastaccess.ui.widgets.FontTextView +import com.fastaccess.ui.widgets.ForegroundImageView +import com.fastaccess.ui.widgets.SpannableBuilder +import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder +import com.zzhoujay.markdown.style.CodeSpan +import pr.PullRequestTimelineQuery +import java.util.* + +/** + * Created by kosh on 03/08/2017. + */ + +class PullRequestEventViewHolder private constructor(val view: View, adapter: BaseRecyclerAdapter<*, *, *>) : + BaseViewHolder(view, adapter) { + + @BindView(R.id.stateImage) lateinit var stateImage: ForegroundImageView + @BindView(R.id.avatarLayout) lateinit var avatarLayout: AvatarLayout + @BindView(R.id.stateText) lateinit var stateText: FontTextView + + override fun bind(t: PullRequestTimelineModel) { + val node = t.node + avatarLayout.setUrl(null, null, false, false) + stateText.text = null + node?.let { + it.asAssignedEvent()?.let { assignedEvent(it) } + it.asBaseRefForcePushedEvent()?.let { forcePushEvent(it) } + it.asClosedEvent()?.let { closedEvent(it) } + it.asCommit()?.let { commitEvent(it) } + it.asDemilestonedEvent()?.let { demilestonedEvent(it) } + it.asDeployedEvent()?.let { deployedEvent(it) } + it.asHeadRefDeletedEvent()?.let { refDeletedEvent(it) } + it.asHeadRefForcePushedEvent()?.let { refForPushedEvent(it) } + it.asHeadRefRestoredEvent()?.let { headRefRestoredEvent(it) } + it.asLabeledEvent()?.let { labeledEvent(it) } + it.asLockedEvent()?.let { lockEvent(it) } + it.asMergedEvent()?.let { mergedEvent(it) } + it.asMilestonedEvent()?.let { milestoneEvent(it) } + it.asReferencedEvent()?.let { referenceEvent(it) } + it.asRenamedTitleEvent()?.let { renamedEvent(it) } + it.asReopenedEvent()?.let { reopenedEvent(it) } + it.asUnassignedEvent()?.let { unassignedEvent(it) } + it.asUnlabeledEvent()?.let { unlabeledEvent(it) } + it.asUnlockedEvent()?.let { unlockedEvent(it) } + } + } + + @SuppressLint("SetTextI18n") + private fun unlockedEvent(event: PullRequestTimelineQuery.AsUnlockedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("unlocked this conversation") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_lock) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun unlabeledEvent(event: PullRequestTimelineQuery.AsUnlabeledEvent) { + event.actor()?.let { + val color = Color.parseColor("#" + event.label().color()) + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("unlabeled") + .append(" ") + .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_label) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun unassignedEvent(event: PullRequestTimelineQuery.AsUnassignedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("unassigned") + .append(" ") + .append(event.user()?.login()) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_profile) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun reopenedEvent(event: PullRequestTimelineQuery.AsReopenedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("reopened this") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_issue_opened) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun renamedEvent(event: PullRequestTimelineQuery.AsRenamedTitleEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("renamed this from").append(" ").append(event.previousTitle()) + .append(" ").append("to").append(" ").bold(event.currentTitle()) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_edit) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun referenceEvent(event: PullRequestTimelineQuery.AsReferencedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append(if (event.isCrossRepository) "cross referenced this" else "referenced this") + .append(" ") + .append("from").append(" ") + .url(if (event.commit() != null) { + substring(event.commit()?.oid()?.toString()) + } else if (event.subject().asIssue() != null) { + "${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" + } else if (event.subject().asPullRequest() != null) { + "${event.subject().asPullRequest()?.title()}#${event.subject().asPullRequest()?.number()}" + } else { + "" + }) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun milestoneEvent(event: PullRequestTimelineQuery.AsMilestonedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("added this to the") + .append(" ") + .append(event.milestoneTitle()).append(" ").append("milestone") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_milestone) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun mergedEvent(event: PullRequestTimelineQuery.AsMergedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("merged this in") + .append(" ") + .url(substring(event.commit()?.oid()?.toString())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_merge) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun lockEvent(event: PullRequestTimelineQuery.AsLockedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("locked and limited conversation to collaborators") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_lock) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun labeledEvent(event: PullRequestTimelineQuery.AsLabeledEvent) { + event.actor()?.let { + val color = Color.parseColor("#" + event.label().color()) + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("labeled") + .append(" ") + .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_label) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun headRefRestoredEvent(event: PullRequestTimelineQuery.AsHeadRefRestoredEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("head ref restored", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append(" ") + .url(substring(event.pullRequest().headRefName())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun refForPushedEvent(event: PullRequestTimelineQuery.AsHeadRefForcePushedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("reference force pushed to", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append(" ") + .url(substring(event.afterCommit().oid().toString())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun refDeletedEvent(event: PullRequestTimelineQuery.AsHeadRefDeletedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("head ref delete", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append(" ") + .url(substring(event.headRefName())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_trash) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun deployedEvent(event: PullRequestTimelineQuery.AsDeployedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("make a deployment", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append(" ") + .append(event.deployment().latestStatus()?.state()?.name) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun demilestonedEvent(event: PullRequestTimelineQuery.AsDemilestonedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("removed this from the") + .append(" ") + .append(event.milestoneTitle()).append(" ").append("milestone") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_milestone) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun commitEvent(event: PullRequestTimelineQuery.AsCommit) { + event.author()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.name()) + .append(" ") + .append("committed") + .append(" ") + .append("${event.messageHeadlineHTML()}#${substring(event.oid().toString())}") + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.committedDate() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.user()?.avatarUrl().toString(), it.user()?.login(), false, + LinkParserHelper.isEnterprise(it.user()?.url().toString())) + } + } + + private fun closedEvent(event: PullRequestTimelineQuery.AsClosedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("closed this in") + .append(" ") + .url(substring(event.commit()?.oid()?.toString())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_merge) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun forcePushEvent(event: PullRequestTimelineQuery.AsBaseRefForcePushedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("force pushed to", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append(" ") + .url(substring(event.afterCommit().oid().toString())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_push) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun assignedEvent(event: PullRequestTimelineQuery.AsAssignedEvent) { + event.actor()?.let { + stateText.text = SpannableBuilder.builder() + .bold(it.login()) + .append(" ") + .append("assigned") + .append(" ") + .append(event.user()?.login()) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + stateImage.setImageResource(R.drawable.ic_profile) + avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) + } + } + + private fun substring(value: String?): String { + if (value == null) { + return "" + } + if (value.length <= 7) return value + else return value.substring(0, 7) + } + + companion object { + fun newInstance(parent: ViewGroup, adapter: BaseRecyclerAdapter<*, *, *>): PullRequestEventViewHolder { + return PullRequestEventViewHolder(getView(parent, R.layout.label_row_item), adapter) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java index 9730e46b..30642645 100644 --- a/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/widgets/recyclerview/BaseRecyclerAdapter.java @@ -120,6 +120,7 @@ public abstract class BaseRecyclerAdapter Date: Thu, 3 Aug 2017 12:36:49 -0400 Subject: [PATCH 24/67] Fixed a few --- .../viewholder/PullRequestEventViewHolder.kt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt index b824409f..0de229f9 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -124,7 +124,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("renamed this from").append(" ").append(event.previousTitle()) + .append("changed the title from").append(" ").append(event.previousTitle()) .append(" ").append("to").append(" ").bold(event.currentTitle()) .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) @@ -177,10 +177,12 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("merged this in") + .append("merged commit") .append(" ") .url(substring(event.commit()?.oid()?.toString())) .append(" ") + .append("into") + .append(event.mergeRefName()) .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) @@ -221,8 +223,10 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("head ref restored", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append("restored the") .append(" ") + .append(it.login()) + .append(":") .url(substring(event.pullRequest().headRefName())) .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) @@ -251,8 +255,10 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("head ref delete", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append("deleted the") .append(" ") + .append(it.login()) + .append(":") .url(substring(event.headRefName())) .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) @@ -266,7 +272,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("make a deployment", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) + .append("made a deployment", BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) .append(" ") .append(event.deployment().latestStatus()?.state()?.name) .append(" ") From 08d19d94c9fe84d3ac4413d73f96a5fbc30dda59 Mon Sep 17 00:00:00 2001 From: Yakov Date: Sun, 6 Aug 2017 11:10:51 -0400 Subject: [PATCH 25/67] Added TODO's --- .../viewholder/PullRequestEventViewHolder.kt | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt index 0de229f9..9c04eb78 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -81,7 +81,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("unlabeled") + .append("unlabeled")//Review[k0shk0sh] should we change this to be like github? They have it as removed [label] .append(" ") .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) .append(" ") @@ -96,7 +96,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("unassigned") + .append("unassigned") //TODO add "removed their assignment" for self .append(" ") .append(event.user()?.login()) .append(" ") @@ -142,13 +142,14 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("from").append(" ") .url(if (event.commit() != null) { - substring(event.commit()?.oid()?.toString()) + substring(event.commit()?.oid()?.toString()) //TODO Referenced this in commit } else if (event.subject().asIssue() != null) { - "${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" + "${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" //TODO Referenced this in issue #[issue #] + //TODO If its an external issue Referenced this in [owner/repo#] } else if (event.subject().asPullRequest() != null) { - "${event.subject().asPullRequest()?.title()}#${event.subject().asPullRequest()?.number()}" + "${event.subject().asPullRequest()?.title()}#${event.subject().asPullRequest()?.number()}" //TODO Same as issue just use PR } else { - "" + "" //What? }) .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) @@ -182,7 +183,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .url(substring(event.commit()?.oid()?.toString())) .append(" ") .append("into") - .append(event.mergeRefName()) + .append(" ") + .append(event.actor())//TODO This should be the repo owner not actor + .append(":") + .append(event.mergeRefName())//TODO the above 2 lines should be `BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()` + .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) @@ -225,9 +230,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("restored the") .append(" ") - .append(it.login()) + .append(it.login())//TODO This should be the repo owner not actor .append(":") - .url(substring(event.pullRequest().headRefName())) + .url(substring(event.pullRequest().headRefName()))//TODO the above 2 lines should be `BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()` + .append(" ") + .append("branch") .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) stateImage.setImageResource(R.drawable.ic_push) @@ -257,9 +264,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("deleted the") .append(" ") - .append(it.login()) + .append(it.login())//TODO This should be the repo owner not actor .append(":") - .url(substring(event.headRefName())) + .url(substring(event.headRefName())) //TODO needs coloring + .append(" ") + .append("branch") .append(" ") .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) stateImage.setImageResource(R.drawable.ic_trash) @@ -299,7 +308,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba private fun commitEvent(event: PullRequestTimelineQuery.AsCommit) { event.author()?.let { - stateText.text = SpannableBuilder.builder() + stateText.text = SpannableBuilder.builder()//Review[k0shk0sh] We may want to suppress more then 3 or 4 commits. since it will clog the it .bold(it.name()) .append(" ") .append("committed") @@ -348,7 +357,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("assigned") + .append("assigned") //TODO add "self-assigned" for self .append(" ") .append(event.user()?.login()) .append(" ") From a36e3a85d1fdf665e883d02653c1a8419020668b Mon Sep 17 00:00:00 2001 From: kosh Date: Mon, 7 Aug 2017 17:02:47 +0800 Subject: [PATCH 26/67] displaying PR details & PR events/commits in timeline. WIP --- app/build.gradle | 1 - .../graphql/pr/PullRequestTimeline.graphql | 4 +- .../fastaccess/data/dao/TimelineModel.java | 16 +- .../timeline/PullRequestTimelineModel.java | 42 +-- .../data/dao/types/IssueEventType.java | 3 +- .../java/com/fastaccess/helper/AppHelper.java | 13 +- .../fastaccess/helper/ParseDateFormat.java | 12 + .../provider/timeline/TimelineConverter.kt | 17 +- .../ui/adapter/IssuesTimelineAdapter.java | 31 +- .../ui/adapter/PullReqeustTimelineAdapter.kt | 36 --- .../ui/adapter/PullRequestTimelineAdapter.kt | 43 +++ .../PullRequestDetailsViewHolder.java | 294 ++++++++++++++++++ .../viewholder/PullRequestEventViewHolder.kt | 77 +++-- .../viewholder/PullStatusViewHolder.java | 7 +- .../viewholder/UnknownTypeViewHolder.kt | 11 + .../com/fastaccess/ui/base/BaseActivity.java | 3 - .../main/donation/DonationActivity.java | 2 +- .../modules/main/premium/PremiumActivity.kt | 2 +- .../timeline/PullRequestTimelineFragment.java | 73 ++--- .../timeline/PullRequestTimelineMvp.java | 18 +- .../PullRequestTimelinePresenter.java | 85 ++--- .../modules/theme/fragment/ThemeFragment.kt | 2 +- .../fastaccess/ui/widgets/AvatarLayout.java | 2 +- .../recyclerview/BaseRecyclerAdapter.java | 12 +- .../main/res/drawable/ic_fasthub_mascot.xml | 4 +- .../main_layouts/layout/add_banner_layout.xml | 4 +- .../row_layouts/layout/unknown_row_item.xml | 4 + app/src/main/res/values/strings.xml | 1 + build.gradle | 2 +- 29 files changed, 558 insertions(+), 263 deletions(-) delete mode 100644 app/src/main/java/com/fastaccess/ui/adapter/PullReqeustTimelineAdapter.kt create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt create mode 100644 app/src/main/res/layouts/row_layouts/layout/unknown_row_item.xml diff --git a/app/build.gradle b/app/build.gradle index 4b16841e..cb20a6e3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -153,7 +153,6 @@ dependencies { implementation "com.atlassian.commonmark:commonmark-ext-ins:${commonmark}" implementation "com.atlassian.commonmark:commonmark-ext-yaml-front-matter:${commonmark}" implementation "com.google.firebase:firebase-messaging:${gms}" - implementation "com.google.android.gms:play-services-ads:${gms}" implementation "com.google.firebase:firebase-database:${gms}" implementation('com.github.b3er.rxfirebase:firebase-database-kotlin:11.2.0') { transitive = false } implementation('com.github.b3er.rxfirebase:firebase-database:11.2.0') { transitive = false } diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 59af0aa1..247f5c43 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -17,7 +17,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: oid url committedDate - messageHeadlineHTML + messageHeadline author { name user { @@ -100,7 +100,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: commit { oid url - messageHeadlineHTML + messageHeadline } } ... on ReopenedEvent { diff --git a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java index 176c4b27..9dcd48ca 100644 --- a/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/TimelineModel.java @@ -22,12 +22,9 @@ import lombok.Setter; */ @Getter @Setter public class TimelineModel implements Parcelable { - public static final int HEADER = 0; - public static final int LINE_COMMENT = 1; + public static final int HEADER = 1; public static final int EVENT = 2; public static final int COMMENT = 3; - public static final int STATUS = 4; - public static final int REVIEW = 5; public IssueEventType event; public Comment comment; @@ -55,10 +52,6 @@ import lombok.Setter; this.status = statusModel; } - public TimelineModel(ReviewCommentModel reviewCommentModel) { - this.reviewComment = reviewCommentModel; - this.event = IssueEventType.line_commented; - } public TimelineModel() {} @@ -67,17 +60,12 @@ import lombok.Setter; switch (getEvent()) { case commented: return COMMENT; - case line_commented: - return LINE_COMMENT; - case reviewed: - return REVIEW; default: return EVENT; } } else { if (issue != null || pullRequest != null) return HEADER; - if (status != null) return STATUS; - return EVENT; + return 0; } } diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 77e4b84e..00acb3b3 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -13,11 +13,11 @@ import pr.PullRequestTimelineQuery; @Getter @Setter public class PullRequestTimelineModel { - public static final int HEADER = 0; - public static final int EVENT = 1; - public static final int COMMENT = 2; - public static final int STATUS = 3; - public static final int REVIEW = 4; + public static final int HEADER = 1; + public static final int EVENT = 2; + public static final int COMMENT = 3; + public static final int STATUS = 4; + public static final int REVIEW = 5; public PullRequestTimelineQuery.Node node; public PullRequest pullRequest; @@ -37,24 +37,26 @@ import pr.PullRequestTimelineQuery; public int getType() { if (pullRequest != null) return HEADER; - if (node.asAssignedEvent() != null || node.asClosedEvent() != null - || node.asDemilestonedEvent() != null || node.asHeadRefDeletedEvent() != null - || node.asLabeledEvent() != null || node.asLockedEvent() != null - || node.asMergedEvent() != null || node.asMilestonedEvent() != null - || node.asReferencedEvent() != null || node.asRenamedTitleEvent() != null - || node.asReopenedEvent() != null || node.asUnassignedEvent() != null - || node.asUnlabeledEvent() != null || node.asUnlockedEvent() != null - || node.asCommit() != null || node.asHeadRefRestoredEvent() != null) { - return EVENT; - } else if (node.asIssueComment() != null) { - return COMMENT; + if (node != null) { + if (node.asAssignedEvent() != null || node.asClosedEvent() != null + || node.asDemilestonedEvent() != null || node.asHeadRefDeletedEvent() != null + || node.asLabeledEvent() != null || node.asLockedEvent() != null + || node.asMergedEvent() != null || node.asMilestonedEvent() != null + || node.asReferencedEvent() != null || node.asRenamedTitleEvent() != null + || node.asReopenedEvent() != null || node.asUnassignedEvent() != null + || node.asUnlabeledEvent() != null || node.asUnlockedEvent() != null + || node.asCommit() != null || node.asHeadRefRestoredEvent() != null) { + return EVENT; + } else if (node.asIssueComment() != null) { + return COMMENT; + } else if (node.asPullRequestReview() != null || node.asReviewDismissedEvent() != null + || node.asReviewRequestedEvent() != null || node.asReviewRequestRemovedEvent() != null) { + return REVIEW; + } } else if (status != null) { return STATUS; - } else if (node.asPullRequestReview() != null || node.asReviewDismissedEvent() != null - || node.asReviewRequestedEvent() != null || node.asReviewRequestRemovedEvent() != null) { - return REVIEW; } - return EVENT; + return 0; } @Override public String toString() { diff --git a/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java b/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java index 667c2114..a0bbfa11 100644 --- a/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java +++ b/app/src/main/java/com/fastaccess/data/dao/types/IssueEventType.java @@ -33,7 +33,8 @@ public enum IssueEventType { review_request_removed(R.drawable.ic_eye_off), @SerializedName("cross-referenced")cross_referenced(R.drawable.ic_format_quote), @SerializedName("line-commented")line_commented(R.drawable.ic_comment), - reviewed(R.drawable.ic_eye); + reviewed(R.drawable.ic_eye), + added_to_project(R.drawable.ic_add); int iconResId; diff --git a/app/src/main/java/com/fastaccess/helper/AppHelper.java b/app/src/main/java/com/fastaccess/helper/AppHelper.java index 5bdf3448..3029b83c 100644 --- a/app/src/main/java/com/fastaccess/helper/AppHelper.java +++ b/app/src/main/java/com/fastaccess/helper/AppHelper.java @@ -4,6 +4,8 @@ import android.app.NotificationManager; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; @@ -17,8 +19,6 @@ import android.view.inputmethod.InputMethodManager; import com.fastaccess.App; import com.fastaccess.BuildConfig; import com.fastaccess.R; -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GoogleApiAvailability; import java.util.Locale; @@ -163,7 +163,12 @@ public class AppHelper { } public static boolean isGoogleAvailable(@NonNull Context context) { - int status = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context); - return status != ConnectionResult.SERVICE_DISABLED && status == ConnectionResult.SUCCESS; + ApplicationInfo applicationInfo = null; + try { + applicationInfo = context.getPackageManager().getApplicationInfo("com.google.android.gms", 0); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + return applicationInfo != null && applicationInfo.enabled; } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/helper/ParseDateFormat.java b/app/src/main/java/com/fastaccess/helper/ParseDateFormat.java index d828b4ba..eba702cc 100644 --- a/app/src/main/java/com/fastaccess/helper/ParseDateFormat.java +++ b/app/src/main/java/com/fastaccess/helper/ParseDateFormat.java @@ -31,6 +31,18 @@ public class ParseDateFormat { } } + + @NonNull public static CharSequence getTimeAgo(@Nullable String toParse) { + try { + Date parsedDate = getInstance().dateFormat.parse(toParse); + long now = System.currentTimeMillis(); + return DateUtils.getRelativeTimeSpanString(parsedDate.getTime(), now, DateUtils.SECOND_IN_MILLIS); + } catch (Exception e) { + e.printStackTrace(); + } + return "N/A"; + } + @NonNull public static CharSequence getTimeAgo(@Nullable Date parsedDate) { if (parsedDate != null) { long now = System.currentTimeMillis(); diff --git a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt index 67a3ae2a..1ca4f1d5 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt +++ b/app/src/main/java/com/fastaccess/provider/timeline/TimelineConverter.kt @@ -1,7 +1,5 @@ package com.fastaccess.provider.timeline -import com.fastaccess.data.dao.ReviewCommentModel -import com.fastaccess.data.dao.ReviewModel import com.fastaccess.data.dao.TimelineModel import com.fastaccess.data.dao.model.Comment import com.fastaccess.data.dao.timeline.GenericEvent @@ -10,7 +8,6 @@ import com.fastaccess.helper.InputHelper import com.fastaccess.provider.rest.RestProvider import com.google.gson.Gson import com.google.gson.JsonObject - import io.reactivex.Observable /** @@ -32,10 +29,6 @@ object TimelineConverter { if (type != null) { if (type == IssueEventType.commented) { timeline.comment = getComment(jsonObject, gson) - } else if (type == IssueEventType.line_commented) { - timeline.reviewComment = getReviewComment(jsonObject, gson) - } else if (type == IssueEventType.reviewed) { - timeline.review = getReview(jsonObject, gson) } else { timeline.genericEvent = getGenericEvent(jsonObject, gson) } @@ -48,23 +41,15 @@ object TimelineConverter { .filter { filterEvents(it.event) } } - private fun getReview(jsonObject: JsonObject, gson: Gson): ReviewModel { - return gson.fromJson(jsonObject, ReviewModel::class.java) - } - private fun getGenericEvent(jsonObject: JsonObject, gson: Gson): GenericEvent { return gson.fromJson(jsonObject, GenericEvent::class.java) } - private fun getReviewComment(jsonObject: JsonObject, gson: Gson): ReviewCommentModel { - return gson.fromJson(jsonObject, ReviewCommentModel::class.java) - } - private fun getComment(jsonObject: JsonObject, gson: Gson): Comment { return gson.fromJson(jsonObject, Comment::class.java) } private fun filterEvents(type: IssueEventType?): Boolean { - return type != IssueEventType.subscribed && type != IssueEventType.unsubscribed && type != IssueEventType.mentioned + return type != null && type != IssueEventType.subscribed && type != IssueEventType.unsubscribed && type != IssueEventType.mentioned } } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java index fe42f6c2..a8dc20e0 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java @@ -4,15 +4,14 @@ import android.support.annotation.NonNull; import android.support.v7.widget.StaggeredGridLayoutManager; import android.view.ViewGroup; +import com.fastaccess.R; import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.ui.adapter.callback.OnToggleView; import com.fastaccess.ui.adapter.callback.ReactionsCallback; import com.fastaccess.ui.adapter.viewholder.IssueDetailsViewHolder; import com.fastaccess.ui.adapter.viewholder.IssueTimelineViewHolder; -import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder; -import com.fastaccess.ui.adapter.viewholder.ReviewCommentsViewHolder; -import com.fastaccess.ui.adapter.viewholder.ReviewsViewHolder; import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder; +import com.fastaccess.ui.adapter.viewholder.UnknownTypeViewHolder; import com.fastaccess.ui.modules.repos.pull_requests.pull_request.details.timeline.timeline.PullRequestTimelineMvp.ReviewCommentCallback; import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; @@ -53,22 +52,13 @@ public class IssuesTimelineAdapter extends BaseRecyclerAdapter) : BaseRecyclerAdapter, BaseViewHolder.OnItemClickListener>(data) { - - override fun viewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder? { - when (viewType) { - PullRequestTimelineModel.STATUS -> PullStatusViewHolder.newInstance(parent) - } - return PullRequestEventViewHolder.newInstance(parent, this) - } - - override fun onBindView(holder: BaseViewHolder?, position: Int) { - val item = data[position] - if (item.type == PullRequestTimelineModel.STATUS) { - (holder as PullStatusViewHolder).bind(item.status) - }else { - holder?.bind(item) - } - } - - override fun getItemViewType(position: Int): Int { - val timeline: PullRequestTimelineModel? = data[position] - return timeline?.type ?: super.getItemViewType(position) - } -} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt new file mode 100644 index 00000000..0c4a7dae --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt @@ -0,0 +1,43 @@ +package com.fastaccess.ui.adapter + +import android.view.ViewGroup +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel +import com.fastaccess.ui.adapter.callback.OnToggleView +import com.fastaccess.ui.adapter.callback.ReactionsCallback +import com.fastaccess.ui.adapter.viewholder.PullRequestDetailsViewHolder +import com.fastaccess.ui.adapter.viewholder.PullRequestEventViewHolder +import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder +import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder + +/** + * Created by kosh on 03/08/2017. + */ +class PullRequestTimelineAdapter constructor(val data: ArrayList, + internal var onToggleView: OnToggleView, + internal var reactionsCallback: ReactionsCallback, + internal var isMerged: Boolean = false, + internal var repoOwner: String, + internal var poster: String) + : BaseRecyclerAdapter, BaseViewHolder.OnItemClickListener>(data) { + + override fun viewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder { + when (viewType) { + PullRequestTimelineModel.HEADER -> return PullRequestDetailsViewHolder.newInstance(parent, this, + onToggleView, reactionsCallback, repoOwner, poster) + PullRequestTimelineModel.STATUS -> return PullStatusViewHolder.newInstance(parent) + else -> return PullRequestEventViewHolder.newInstance(parent, this) + } + } + + override fun onBindView(holder: BaseViewHolder, position: Int) { + val item = data[position] + holder.bind(item) + } + + override fun getItemViewType(position: Int): Int { + val timeline: PullRequestTimelineModel? = data[position] + return timeline?.type ?: super.getItemViewType(position) + } +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java new file mode 100644 index 00000000..684afeb8 --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java @@ -0,0 +1,294 @@ +package com.fastaccess.ui.adapter.viewholder; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.transition.ChangeBounds; +import android.support.transition.TransitionManager; +import android.text.TextUtils; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import com.fastaccess.R; +import com.fastaccess.data.dao.ReactionsModel; +import com.fastaccess.data.dao.TimelineModel; +import com.fastaccess.data.dao.model.Issue; +import com.fastaccess.data.dao.model.PullRequest; +import com.fastaccess.data.dao.model.User; +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel; +import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.ParseDateFormat; +import com.fastaccess.provider.scheme.LinkParserHelper; +import com.fastaccess.provider.timeline.CommentsHelper; +import com.fastaccess.provider.timeline.HtmlHelper; +import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; +import com.fastaccess.ui.adapter.callback.OnToggleView; +import com.fastaccess.ui.adapter.callback.ReactionsCallback; +import com.fastaccess.ui.widgets.AvatarLayout; +import com.fastaccess.ui.widgets.FontTextView; +import com.fastaccess.ui.widgets.SpannableBuilder; +import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; + +import java.util.Date; + +import butterknife.BindView; + +/** + * Created by Kosh on 13 Dec 2016, 1:03 AM + */ + +public class PullRequestDetailsViewHolder extends BaseViewHolder { + + @BindView(R.id.avatarView) AvatarLayout avatar; + @BindView(R.id.date) FontTextView date; + @BindView(R.id.name) FontTextView name; + @BindView(R.id.comment) FontTextView comment; + @BindView(R.id.thumbsUp) FontTextView thumbsUp; + @BindView(R.id.thumbsDown) FontTextView thumbsDown; + @BindView(R.id.laugh) FontTextView laugh; + @BindView(R.id.sad) FontTextView sad; + @BindView(R.id.hurray) FontTextView hooray; + @BindView(R.id.heart) FontTextView heart; + @BindView(R.id.toggle) View toggle; + @BindView(R.id.commentMenu) View commentMenu; + @BindView(R.id.commentOptions) View commentOptions; + @BindView(R.id.toggleHolder) View toggleHolder; + @BindView(R.id.emojiesList) View emojiesList; + @BindView(R.id.reactionsText) TextView reactionsText; + @BindView(R.id.owner) TextView owner; + private OnToggleView onToggleView; + private ReactionsCallback reactionsCallback; + private ViewGroup viewGroup; + private String repoOwner; + private String poster; + + private PullRequestDetailsViewHolder(@NonNull View itemView, @NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter, + @NonNull OnToggleView onToggleView, @NonNull ReactionsCallback reactionsCallback, + String repoOwner, String poster) { + super(itemView, adapter); + this.onToggleView = onToggleView; + this.viewGroup = viewGroup; + this.reactionsCallback = reactionsCallback; + this.repoOwner = repoOwner; + this.poster = poster; + itemView.setOnClickListener(null); + itemView.setOnLongClickListener(null); + commentMenu.setOnClickListener(this); + toggle.setOnClickListener(this); + toggleHolder.setOnClickListener(this); + laugh.setOnClickListener(this); + sad.setOnClickListener(this); + thumbsDown.setOnClickListener(this); + thumbsUp.setOnClickListener(this); + hooray.setOnClickListener(this); + laugh.setOnLongClickListener(this); + sad.setOnLongClickListener(this); + thumbsDown.setOnLongClickListener(this); + thumbsUp.setOnLongClickListener(this); + hooray.setOnLongClickListener(this); + heart.setOnLongClickListener(this); + heart.setOnClickListener(this); + } + + public static PullRequestDetailsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter, + @NonNull OnToggleView onToggleView, @NonNull ReactionsCallback reactionsCallback, + @NonNull String repoOwner, @NonNull String poster) { + return new PullRequestDetailsViewHolder(getView(viewGroup, R.layout.issue_detail_header_row_item), viewGroup, + adapter, onToggleView, reactionsCallback, repoOwner, poster); + } + + @Override public void bind(@NonNull PullRequestTimelineModel timelineModel) { + if (timelineModel.getPullRequest() != null) { + bind(timelineModel.getPullRequest()); + } + if (onToggleView != null) onToggle(onToggleView.isCollapsed(getAdapterPosition()), false); + } + + @Override public void onClick(View v) { + if (v.getId() == R.id.toggle || v.getId() == R.id.toggleHolder) { + if (onToggleView != null) { + int position = getAdapterPosition(); + onToggleView.onToggle(position, !onToggleView.isCollapsed(position)); + onToggle(onToggleView.isCollapsed(position), true); + } + } else { + addReactionCount(v); + super.onClick(v); + } + } + + private void addReactionCount(View v) { + if (adapter != null) { + TimelineModel timelineModel = (TimelineModel) adapter.getItem(getAdapterPosition()); + if (timelineModel == null) return; + ReactionsModel reactionsModel = null; + PullRequest pullRequest = timelineModel.getPullRequest(); + Issue issue = timelineModel.getIssue(); + int number = 0; + if (pullRequest != null) { + reactionsModel = pullRequest.getReactions(); + number = pullRequest.getNumber(); + } else if (issue != null) { + reactionsModel = issue.getReactions(); + number = issue.getNumber(); + } + if (reactionsModel == null) reactionsModel = new ReactionsModel(); + boolean isReacted = reactionsCallback == null || reactionsCallback.isPreviouslyReacted(number, v.getId()); + boolean isCallingApi = reactionsCallback != null && reactionsCallback.isCallingApi(number, v.getId()); + switch (v.getId()) { + case R.id.heart: + reactionsModel.setHeart(!isReacted ? reactionsModel.getHeart() + 1 : reactionsModel.getHeart() - 1); + break; + case R.id.sad: + reactionsModel.setConfused(!isReacted ? reactionsModel.getConfused() + 1 : reactionsModel.getConfused() - 1); + break; + case R.id.thumbsDown: + reactionsModel.setMinusOne(!isReacted ? reactionsModel.getMinusOne() + 1 : reactionsModel.getMinusOne() - 1); + break; + case R.id.thumbsUp: + reactionsModel.setPlusOne(!isReacted ? reactionsModel.getPlusOne() + 1 : reactionsModel.getPlusOne() - 1); + break; + case R.id.laugh: + reactionsModel.setLaugh(!isReacted ? reactionsModel.getLaugh() + 1 : reactionsModel.getLaugh() - 1); + break; + case R.id.hurray: + reactionsModel.setHooray(!isReacted ? reactionsModel.getHooray() + 1 : reactionsModel.getHooray() - 1); + break; + } + if (pullRequest != null) { + pullRequest.setReactions(reactionsModel); + appendEmojies(reactionsModel); + timelineModel.setPullRequest(pullRequest); + } else if (issue != null) { + issue.setReactions(reactionsModel); + appendEmojies(reactionsModel); + timelineModel.setIssue(issue); + } + } + } + + private void bind(@NonNull Issue issueModel) { + setup(issueModel.getUser(), issueModel.getBodyHtml(), issueModel.getReactions()); + setupDate(issueModel.getCreatedAt(), issueModel.getUpdatedAt()); + } + + private void bind(@NonNull PullRequest pullRequest) { + setup(pullRequest.getUser(), pullRequest.getBodyHtml(), pullRequest.getReactions()); + setupDate(pullRequest.getCreatedAt(), pullRequest.getUpdatedAt()); + } + + private void setup(User user, String description, ReactionsModel reactionsModel) { + avatar.setUrl(user.getAvatarUrl(), user.getLogin(), user.isOrganizationType(), LinkParserHelper.isEnterprise(user.getHtmlUrl())); + name.setText(user.getLogin()); + boolean isOwner = TextUtils.equals(repoOwner, user.getLogin()); + if (isOwner) { + owner.setVisibility(View.VISIBLE); + owner.setText(R.string.owner); + } else { + owner.setText(null); + owner.setVisibility(View.GONE); + } + if (reactionsModel != null) { + appendEmojies(reactionsModel); + } + if (description != null && !description.trim().isEmpty()) { + HtmlHelper.htmlIntoTextView(comment, description, viewGroup.getWidth()); + } else { + comment.setText(R.string.no_description_provided); + } + } + + private void setupDate(@NonNull Date createdDate, @NonNull Date updated) { + date.setText(ParseDateFormat.getTimeAgo(createdDate)); + } + + private void appendEmojies(@NonNull ReactionsModel reaction) { + SpannableBuilder spannableBuilder = SpannableBuilder.builder(); + reactionsText.setText(""); + thumbsUp.setText(SpannableBuilder.builder() + .append(CommentsHelper.getThumbsUp()).append(" ") + .append(String.valueOf(reaction.getPlusOne())) + .append(" ")); + thumbsDown.setText(SpannableBuilder.builder() + .append(CommentsHelper.getThumbsDown()).append(" ") + .append(String.valueOf(reaction.getMinusOne())) + .append(" ")); + hooray.setText(SpannableBuilder.builder() + .append(CommentsHelper.getHooray()).append(" ") + .append(String.valueOf(reaction.getHooray())) + .append(" ")); + sad.setText(SpannableBuilder.builder() + .append(CommentsHelper.getSad()).append(" ") + .append(String.valueOf(reaction.getConfused())) + .append(" ")); + laugh.setText(SpannableBuilder.builder() + .append(CommentsHelper.getLaugh()).append(" ") + .append(String.valueOf(reaction.getLaugh())) + .append(" ")); + heart.setText(SpannableBuilder.builder() + .append(CommentsHelper.getHeart()).append(" ") + .append(String.valueOf(reaction.getHeart()))); + if (reaction.getPlusOne() > 0) { + spannableBuilder.append(CommentsHelper.getThumbsUp()) + .append(" ") + .append(String.valueOf(reaction.getPlusOne())) + .append(" "); + } + if (reaction.getMinusOne() > 0) { + spannableBuilder.append(CommentsHelper.getThumbsDown()) + .append(" ") + .append(String.valueOf(reaction.getMinusOne())) + .append(" "); + } + if (reaction.getLaugh() > 0) { + spannableBuilder.append(CommentsHelper.getLaugh()) + .append(" ") + .append(String.valueOf(reaction.getLaugh())) + .append(" "); + } + if (reaction.getHooray() > 0) { + spannableBuilder.append(CommentsHelper.getHooray()) + .append(" ") + .append(String.valueOf(reaction.getHooray())) + .append(" "); + } + if (reaction.getConfused() > 0) { + spannableBuilder.append(CommentsHelper.getSad()) + .append(" ") + .append(String.valueOf(reaction.getConfused())) + .append(" "); + } + if (reaction.getHeart() > 0) { + spannableBuilder.append(CommentsHelper.getHeart()) + .append(" ") + .append(String.valueOf(reaction.getHeart())); + } + if (spannableBuilder.length() > 0) { + reactionsText.setText(spannableBuilder); + if (!onToggleView.isCollapsed(getAdapterPosition())) { + reactionsText.setVisibility(View.VISIBLE); + } + } else { + reactionsText.setVisibility(View.GONE); + } + } + + private void onToggle(boolean expanded, boolean animate) { + if (animate) { + TransitionManager.beginDelayedTransition(viewGroup, new ChangeBounds()); + } + toggle.setRotation(!expanded ? 0.0F : 180F); + commentOptions.setVisibility(!expanded ? View.GONE : View.VISIBLE); + if (!InputHelper.isEmpty(reactionsText)) { + reactionsText.setVisibility(!expanded ? View.VISIBLE : View.GONE); + } + } + + @Override protected void onViewIsDetaching() { + DrawableGetter drawableGetter = (DrawableGetter) comment.getTag(R.id.drawable_callback); + if (drawableGetter != null) { + drawableGetter.clear(drawableGetter); + } + } +} diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt index 9c04eb78..c46f0f57 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -21,7 +21,6 @@ import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder import com.zzhoujay.markdown.style.CodeSpan import pr.PullRequestTimelineQuery -import java.util.* /** * Created by kosh on 03/08/2017. @@ -69,7 +68,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("unlocked this conversation") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_lock) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -81,11 +80,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba stateText.text = SpannableBuilder.builder() .bold(it.login()) .append(" ") - .append("unlabeled")//Review[k0shk0sh] should we change this to be like github? They have it as removed [label] + .append("removed") .append(" ") .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_label) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -100,7 +99,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.user()?.login()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_profile) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -113,7 +112,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("reopened this") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_issue_opened) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -127,7 +126,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append("changed the title from").append(" ").append(event.previousTitle()) .append(" ").append("to").append(" ").bold(event.currentTitle()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_edit) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -142,17 +141,25 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("from").append(" ") .url(if (event.commit() != null) { - substring(event.commit()?.oid()?.toString()) //TODO Referenced this in commit + substring(event.commit()?.oid()?.toString()) } else if (event.subject().asIssue() != null) { - "${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" //TODO Referenced this in issue #[issue #] - //TODO If its an external issue Referenced this in [owner/repo#] + if (event.isCrossRepository) { + "${event.commitRepository().nameWithOwner()} ${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" + } else { + "${event.subject().asIssue()?.title()}#${event.subject().asIssue()?.number()}" + } } else if (event.subject().asPullRequest() != null) { - "${event.subject().asPullRequest()?.title()}#${event.subject().asPullRequest()?.number()}" //TODO Same as issue just use PR + if (event.isCrossRepository) { + "${event.commitRepository().nameWithOwner()} ${event.subject().asPullRequest()?.title()}" + + "#${event.subject().asPullRequest()?.number()}" + } else { + "${event.subject().asPullRequest()?.title()}#${event.subject().asPullRequest()?.number()}" + } } else { - "" //What? + event.commitRepository().nameWithOwner() }) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -167,7 +174,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.milestoneTitle()).append(" ").append("milestone") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_milestone) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -184,11 +191,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("into") .append(" ") - .append(event.actor())//TODO This should be the repo owner not actor + .append(event.actor()) .append(":") - .append(event.mergeRefName())//TODO the above 2 lines should be `BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()` + .append(event.mergeRefName(), BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -201,7 +208,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("locked and limited conversation to collaborators") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_lock) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -217,7 +224,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_label) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -230,13 +237,13 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("restored the") .append(" ") - .append(it.login())//TODO This should be the repo owner not actor + .append(it.login()) .append(":") - .url(substring(event.pullRequest().headRefName()))//TODO the above 2 lines should be `BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()` + .append(event.pullRequest().headRefName(), BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) .append(" ") .append("branch") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -251,7 +258,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.afterCommit().oid().toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -264,13 +271,13 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("deleted the") .append(" ") - .append(it.login())//TODO This should be the repo owner not actor + .append(it.login()) .append(":") - .url(substring(event.headRefName())) //TODO needs coloring + .append(substring(event.headRefName()), BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) .append(" ") .append("branch") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_trash) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -285,7 +292,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.deployment().latestStatus()?.state()?.name) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -300,7 +307,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.milestoneTitle()).append(" ").append("milestone") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_milestone) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -313,9 +320,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("committed") .append(" ") - .append("${event.messageHeadlineHTML()}#${substring(event.oid().toString())}") + .append("${event.messageHeadline()}") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.committedDate() as Date))) + .url(substring(event.oid().toString())) + .append(" ") + .append(ParseDateFormat.getTimeAgo((event.committedDate()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.user()?.avatarUrl().toString(), it.user()?.login(), false, LinkParserHelper.isEnterprise(it.user()?.url().toString())) @@ -331,7 +340,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.commit()?.oid()?.toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -346,7 +355,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.afterCommit().oid().toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -361,7 +370,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.user()?.login()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt() as Date))) + .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) stateImage.setImageResource(R.drawable.ic_profile) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -377,7 +386,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba companion object { fun newInstance(parent: ViewGroup, adapter: BaseRecyclerAdapter<*, *, *>): PullRequestEventViewHolder { - return PullRequestEventViewHolder(getView(parent, R.layout.label_row_item), adapter) + return PullRequestEventViewHolder(getView(parent, R.layout.issue_timeline_row_item), adapter) } } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullStatusViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullStatusViewHolder.java index 1837a9fb..9826cd80 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullStatusViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullStatusViewHolder.java @@ -1,6 +1,5 @@ package com.fastaccess.ui.adapter.viewholder; -import android.net.Uri; import android.support.annotation.NonNull; import android.support.v4.content.ContextCompat; import android.text.method.LinkMovementMethod; @@ -10,6 +9,7 @@ import android.view.ViewGroup; import com.annimon.stream.Stream; import com.fastaccess.R; import com.fastaccess.data.dao.PullRequestStatusModel; +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel; import com.fastaccess.data.dao.types.StatusStateType; import com.fastaccess.helper.InputHelper; import com.fastaccess.provider.scheme.SchemeParser; @@ -25,7 +25,7 @@ import butterknife.BindView; * Created by Kosh on 10 Apr 2017, 3:40 AM */ -public class PullStatusViewHolder extends BaseViewHolder { +public class PullStatusViewHolder extends BaseViewHolder { @BindView(R.id.stateImage) ForegroundImageView stateImage; @BindView(R.id.status) FontTextView status; @@ -44,7 +44,8 @@ public class PullStatusViewHolder extends BaseViewHolder return new PullStatusViewHolder(getView(parent, R.layout.pull_status_row_item)); } - @Override public void bind(@NonNull PullRequestStatusModel pullRequestStatusModel) { + @Override public void bind(@NonNull PullRequestTimelineModel model) { + PullRequestStatusModel pullRequestStatusModel = model.getStatus(); if (pullRequestStatusModel.getState() != null) { StatusStateType stateType = pullRequestStatusModel.getState(); stateImage.setImageResource(stateType.getDrawableRes()); diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt new file mode 100644 index 00000000..e2d0d440 --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt @@ -0,0 +1,11 @@ +package com.fastaccess.ui.adapter.viewholder + +import android.view.View +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder + +/** + * Created by kosh on 07/08/2017. + */ +class UnknownTypeViewHolder(val view: View) : BaseViewHolder(view) { + override fun bind(t: Any) {} //DO NOTHING +} \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java index cd8c00c8..0fb10620 100644 --- a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java +++ b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java @@ -43,9 +43,6 @@ import com.fastaccess.ui.modules.main.orgs.OrgListDialogFragment; import com.fastaccess.ui.modules.settings.SettingsActivity; import com.fastaccess.ui.widgets.dialog.MessageDialogView; import com.fastaccess.ui.widgets.dialog.ProgressDialogFragment; -import com.google.android.gms.ads.AdRequest; -import com.google.android.gms.ads.AdView; -import com.google.android.gms.ads.MobileAds; import net.grandcentrix.thirtyinch.TiActivity; diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java b/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java index 5170701f..149aef43 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java @@ -81,7 +81,7 @@ public class DonationActivity extends BaseActivity { if (AppHelper.isGoogleAvailable(this)) { DonateActivity.Companion.start(this, productKey); } else { - showErrorMessage(getString(R.string.common_google_play_services_unsupported_text)); + showErrorMessage(getString(R.string.google_play_service_error)); } } diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt index 8f497b3d..d331264b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt @@ -114,7 +114,7 @@ class PremiumActivity : BaseActivity(), Premi if (AppHelper.isGoogleAvailable(this)) { return true } - showErrorMessage(getString(R.string.common_google_play_services_unsupported_text)) + showErrorMessage(getString(R.string.google_play_service_error)) return false } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java index 17f7a8dd..84473565 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelineFragment.java @@ -13,17 +13,16 @@ import com.evernote.android.state.State; import com.fastaccess.R; import com.fastaccess.data.dao.EditReviewCommentModel; import com.fastaccess.data.dao.ReviewCommentModel; -import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.PullRequest; import com.fastaccess.data.dao.model.User; +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel; import com.fastaccess.data.dao.types.ReactionTypes; import com.fastaccess.helper.ActivityHelper; import com.fastaccess.helper.BundleConstant; import com.fastaccess.helper.Bundler; import com.fastaccess.provider.rest.loadmore.OnLoadMore; -import com.fastaccess.provider.timeline.CommentsHelper; -import com.fastaccess.ui.adapter.IssuesTimelineAdapter; +import com.fastaccess.ui.adapter.PullRequestTimelineAdapter; import com.fastaccess.ui.adapter.viewholder.TimelineCommentsViewHolder; import com.fastaccess.ui.base.BaseFragment; import com.fastaccess.ui.modules.editor.EditorActivity; @@ -53,7 +52,7 @@ public class PullRequestTimelineFragment extends BaseFragment toggleMap = new LinkedHashMap<>(); - private IssuesTimelineAdapter adapter; + private PullRequestTimelineAdapter adapter; private OnLoadMore onLoadMore; private IssuePagerMvp.IssuePrCallback issueCallback; @@ -92,15 +91,7 @@ public class PullRequestTimelineFragment extends BaseFragment items, int page) { + @Override public void onNotifyAdapter(@Nullable List items, int page) { hideProgress(); if (items == null) { adapter.subList(1, adapter.getItemCount()); @@ -187,7 +178,7 @@ public class PullRequestTimelineFragment extends BaseFragment items, int page); + @CallOnMainThread void onNotifyAdapter(@Nullable List items, int page); @NonNull OnLoadMore getLoadMore(); @@ -46,7 +48,7 @@ public interface PullRequestTimelineMvp { void onEditReviewComment(@NonNull ReviewCommentModel item, int groupPosition, int childPosition); - void onRemove(@NonNull TimelineModel timelineModel); + void onRemove(@NonNull PullRequestTimelineModel timelineModel); void onStartNewComment(); @@ -64,19 +66,21 @@ public interface PullRequestTimelineMvp { void onRemoveReviewComment(int groupPosition, int commentPosition); - void onSetHeader(@NonNull TimelineModel timelineModel); + void onSetHeader(@NonNull PullRequestTimelineModel timelineModel); @Nullable PullRequest getPullRequest(); void onUpdateHeader(); - void onAddStatus(@NonNull TimelineModel timelineModel); + void onAddStatus(@NonNull PullRequestTimelineModel timelineModel); + + @CallOnMainThread void showReload(); } - interface Presenter extends BaseMvp.FAPresenter, BaseViewHolder.OnItemClickListener, + interface Presenter extends BaseMvp.FAPresenter, BaseViewHolder.OnItemClickListener, ReviewCommentCallback, BaseMvp.PaginationListener { - @NonNull ArrayList getEvents(); + @NonNull ArrayList getEvents(); void onWorkOffline(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 06ce69cf..9bcb1b22 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -7,14 +7,13 @@ import android.util.SparseArray; import android.view.View; import android.widget.PopupMenu; +import com.annimon.stream.Stream; import com.apollographql.apollo.ApolloCall; -import com.apollographql.apollo.api.Response; import com.apollographql.apollo.rx2.Rx2Apollo; import com.fastaccess.App; import com.fastaccess.R; import com.fastaccess.data.dao.EditReviewCommentModel; import com.fastaccess.data.dao.ReviewCommentModel; -import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Comment; import com.fastaccess.data.dao.model.Login; import com.fastaccess.data.dao.model.PullRequest; @@ -44,16 +43,16 @@ import pr.PullRequestTimelineQuery; public class PullRequestTimelinePresenter extends BasePresenter implements PullRequestTimelineMvp.Presenter { @com.evernote.android.state.State boolean hasNextPage; - private ArrayList timeline = new ArrayList<>(); + private ArrayList timeline = new ArrayList<>(); private SparseArray pages = new SparseArray<>(); private ReactionsProvider reactionsProvider; private int page; private int previousTotal; private int lastPage = Integer.MAX_VALUE; - @Override public void onItemClick(int position, View v, TimelineModel item) { + @Override public void onItemClick(int position, View v, PullRequestTimelineModel item) { // if (getView() != null && getView().getPullRequest() != null) { -// if (item.getType() == TimelineModel.COMMENT) { +// if (item.getType() == PullRequestTimelineModel.COMMENT) { // PullRequest pullRequest = getView().getPullRequest(); // if (v.getId() == R.id.commentMenu) { // PopupMenu popupMenu = new PopupMenu(v.getContext(), v); @@ -79,12 +78,12 @@ public class PullRequestTimelinePresenter extends BasePresenter getEvents() { + @NonNull @Override public ArrayList getEvents() { return timeline; } @@ -175,7 +174,7 @@ public class PullRequestTimelinePresenter extends BasePresenter view.getLoadMore().reset()); } - if (page > lastPage || lastPage == 0) { + if (page > lastPage || lastPage == 0 || !hasNextPage) { sendToView(PullRequestTimelineMvp.View::hideProgress); return false; } @@ -314,32 +313,36 @@ public class PullRequestTimelinePresenter extends BasePresenter apolloCall = App.getInstance().getApolloClient() - .query(query); - manageDisposable(RxHelper.getObservable(Rx2Apollo.from(apolloCall)) - .filter(dataResponse -> !dataResponse.hasErrors() && dataResponse.data() != null) - .map(Response::data) - .filter(data -> data != null && data.repository() != null) - .map(PullRequestTimelineQuery.Data::repository) - .filter(repository -> repository.pullRequest() != null) - .map(PullRequestTimelineQuery.Repository::pullRequest) - .map(PullRequestTimelineQuery.PullRequest::timeline) - .filter(timeline -> timeline.nodes() != null) - .flatMap(timeline -> { - hasNextPage = timeline.pageInfo().hasNextPage(); - pages.clear(); - List edges = timeline.edges(); - if (edges != null) { - for (int i = 0; i < edges.size(); i++) { - pages.append(i, edges.get(i).cursor()); + ApolloCall apolloCall = App.getInstance().getApolloClient().query(query); + Observable observable = Rx2Apollo.from(apolloCall) + .flatMap(response -> { + if (!response.hasErrors()) { + PullRequestTimelineQuery.Data data = response.data(); + if (data != null) { + PullRequestTimelineQuery.Repository repo = data.repository(); + PullRequestTimelineQuery.PullRequest pullRequest = repo != null ? repo.pullRequest() : null; + if (pullRequest != null) { + PullRequestTimelineQuery.Timeline timeline = pullRequest.timeline(); + hasNextPage = timeline.pageInfo().hasNextPage(); + pages.clear(); + List edges = timeline.edges(); + if (edges != null) { + Stream.of(edges).forEachIndexed((i, edge) -> pages.append(i, edge.cursor())); + } + List nodes = timeline.nodes(); + if (nodes != null) { + Logger.e(nodes.size()); + return RxHelper.getObservable(Observable.fromIterable(nodes)); + } + } } } - List nodes = timeline.nodes(); - return nodes != null ? Observable.fromIterable(nodes) - : Observable.fromIterable(new ArrayList<>()); + Logger.e(response.hasErrors(), response.errors()); + return RxHelper.getObservable(Observable.fromIterable(new ArrayList<>())); }) - .map(PullRequestTimelineModel::new) - .subscribe(Logger::e, Throwable::printStackTrace, () -> sendToView(BaseMvp.FAView::hideProgress))); + .map(PullRequestTimelineModel::new); + makeRestCall(observable.toList().toObservable(), + pullRequestTimelineModels -> sendToView(view -> view.onNotifyAdapter(pullRequestTimelineModels, page))); } @NonNull private PullRequestTimelineQuery getTimelineBuilder(@NonNull String login, @NonNull String repoId, int number, int page) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/theme/fragment/ThemeFragment.kt b/app/src/main/java/com/fastaccess/ui/modules/theme/fragment/ThemeFragment.kt index 79135ac2..89f6e214 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/theme/fragment/ThemeFragment.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/theme/fragment/ThemeFragment.kt @@ -140,7 +140,7 @@ class ThemeFragment : BaseFragment diff --git a/app/src/main/res/layouts/main_layouts/layout/add_banner_layout.xml b/app/src/main/res/layouts/main_layouts/layout/add_banner_layout.xml index 0d11d392..724adde9 100644 --- a/app/src/main/res/layouts/main_layouts/layout/add_banner_layout.xml +++ b/app/src/main/res/layouts/main_layouts/layout/add_banner_layout.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/app/src/main/res/layouts/row_layouts/layout/unknown_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/unknown_row_item.xml new file mode 100644 index 00000000..96a6a1ef --- /dev/null +++ b/app/src/main/res/layouts/row_layouts/layout/unknown_row_item.xml @@ -0,0 +1,4 @@ + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d591f39f..685652bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -551,4 +551,5 @@ Disable auto playing GIFs Disable Playing GIF requested changes + Google Play Service unavailable diff --git a/build.gradle b/build.gradle index b0c1b816..a1c7d465 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { state_version = '1.1.0' lombokVersion = '1.12.6' supportVersion = "26.0.0" - gms = "11.0.2" + gms = "11.0.4" thirtyinchVersion = '0.8.0' retrofit = '2.3.0' junitVersion = '4.12' From 7d2e50d9e3f7104ade87b35f6b352dc76bec8072 Mon Sep 17 00:00:00 2001 From: kosh Date: Mon, 7 Aug 2017 17:07:43 +0800 Subject: [PATCH 27/67] fixed loading new page. --- .../details/timeline/timeline/PullRequestTimelinePresenter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java index 9bcb1b22..c30cee7c 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/pull_requests/pull_request/details/timeline/timeline/PullRequestTimelinePresenter.java @@ -41,7 +41,7 @@ import pr.PullRequestTimelineQuery; */ public class PullRequestTimelinePresenter extends BasePresenter implements PullRequestTimelineMvp.Presenter { - @com.evernote.android.state.State boolean hasNextPage; + @com.evernote.android.state.State boolean hasNextPage = true; private ArrayList timeline = new ArrayList<>(); private SparseArray pages = new SparseArray<>(); From 0e7a9d50443172088122061e36c6d9c6bb62d4c7 Mon Sep 17 00:00:00 2001 From: Kosh Sergani Date: Tue, 8 Aug 2017 21:54:20 +0800 Subject: [PATCH 28/67] added PR status --- app/build.gradle | 1 + .../graphql/pr/PullRequestTimeline.graphql | 15 ++++ .../timeline/PullRequestTimelineModel.java | 7 +- .../data/dao/types/StatusStateType.java | 10 +++ .../java/com/fastaccess/helper/AppHelper.java | 5 +- .../ui/adapter/PullRequestTimelineAdapter.kt | 6 +- .../PullRequestDetailsViewHolder.java | 11 +-- .../viewholder/PullStatusViewHolder.java | 81 ++++++++++------- .../timeline/PullRequestTimelineFragment.java | 4 - .../timeline/PullRequestTimelineMvp.java | 2 - .../PullRequestTimelinePresenter.java | 87 ++++++++++--------- .../layout/pull_status_row_item.xml | 44 +++++----- app/src/main/res/values/strings.xml | 2 +- 13 files changed, 159 insertions(+), 116 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cb20a6e3..53c8d8ea 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -154,6 +154,7 @@ dependencies { implementation "com.atlassian.commonmark:commonmark-ext-yaml-front-matter:${commonmark}" implementation "com.google.firebase:firebase-messaging:${gms}" implementation "com.google.firebase:firebase-database:${gms}" + implementation "com.google.android.gms:play-services-base:${gms}" implementation('com.github.b3er.rxfirebase:firebase-database-kotlin:11.2.0') { transitive = false } implementation('com.github.b3er.rxfirebase:firebase-database:11.2.0') { transitive = false } implementation 'com.firebase:firebase-jobdispatcher:0.7.0' diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 247f5c43..28836548 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -1,6 +1,21 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: String) { repository(owner: $owner, name: $name) { pullRequest(number: $number) { + pullRequestCommits: commits(last: 1) { + pullRequestCommit: nodes { + commit { + status { + state + contexts { + state + context + description + targetUrl + } + } + } + } + } timeline(first: 30 after: $page) { edges { cursor diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 00acb3b3..45c7960b 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -1,6 +1,5 @@ package com.fastaccess.data.dao.timeline; -import com.fastaccess.data.dao.PullRequestStatusModel; import com.fastaccess.data.dao.model.PullRequest; import lombok.Getter; @@ -21,7 +20,8 @@ import pr.PullRequestTimelineQuery; public PullRequestTimelineQuery.Node node; public PullRequest pullRequest; - public PullRequestStatusModel status; + public PullRequestTimelineQuery.Status status; + public boolean isMergeable; public PullRequestTimelineModel(PullRequest pullRequest) { this.pullRequest = pullRequest; @@ -31,8 +31,9 @@ import pr.PullRequestTimelineQuery; this.node = node; } - public PullRequestTimelineModel(PullRequestStatusModel status) { + public PullRequestTimelineModel(PullRequestTimelineQuery.Status status, boolean isMergeable) { this.status = status; + this.isMergeable = isMergeable; } public int getType() { diff --git a/app/src/main/java/com/fastaccess/data/dao/types/StatusStateType.java b/app/src/main/java/com/fastaccess/data/dao/types/StatusStateType.java index c7ec2beb..ae02006b 100644 --- a/app/src/main/java/com/fastaccess/data/dao/types/StatusStateType.java +++ b/app/src/main/java/com/fastaccess/data/dao/types/StatusStateType.java @@ -1,7 +1,10 @@ package com.fastaccess.data.dao.types; import android.support.annotation.DrawableRes; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import com.annimon.stream.Stream; import com.fastaccess.R; /** @@ -23,4 +26,11 @@ public enum StatusStateType { @DrawableRes public int getDrawableRes() { return drawableRes; } + + @NonNull public static StatusStateType getState(@Nullable String status) { + return Stream.of(values()) + .filter(value -> value.name().toLowerCase().equalsIgnoreCase(status)) + .findFirst() + .orElse(pending); + } } diff --git a/app/src/main/java/com/fastaccess/helper/AppHelper.java b/app/src/main/java/com/fastaccess/helper/AppHelper.java index 3029b83c..dc056407 100644 --- a/app/src/main/java/com/fastaccess/helper/AppHelper.java +++ b/app/src/main/java/com/fastaccess/helper/AppHelper.java @@ -19,6 +19,8 @@ import android.view.inputmethod.InputMethodManager; import com.fastaccess.App; import com.fastaccess.BuildConfig; import com.fastaccess.R; +import com.google.android.gms.common.ConnectionResult; +import com.google.android.gms.common.GoogleApiAvailability; import java.util.Locale; @@ -169,6 +171,7 @@ public class AppHelper { } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } - return applicationInfo != null && applicationInfo.enabled; + return applicationInfo != null && applicationInfo.enabled && + GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS; } } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt index 0c4a7dae..2c35675d 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt @@ -9,6 +9,7 @@ import com.fastaccess.ui.adapter.viewholder.PullRequestEventViewHolder import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder.OnItemClickListener /** * Created by kosh on 03/08/2017. @@ -18,9 +19,8 @@ class PullRequestTimelineAdapter constructor(val data: ArrayList, BaseViewHolder.OnItemClickListener>(data) { + internal var poster: String) : BaseRecyclerAdapter, OnItemClickListener>(data) { override fun viewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder { when (viewType) { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java index 684afeb8..548c5362 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestDetailsViewHolder.java @@ -11,7 +11,6 @@ import android.widget.TextView; import com.fastaccess.R; import com.fastaccess.data.dao.ReactionsModel; -import com.fastaccess.data.dao.TimelineModel; import com.fastaccess.data.dao.model.Issue; import com.fastaccess.data.dao.model.PullRequest; import com.fastaccess.data.dao.model.User; @@ -120,18 +119,14 @@ public class PullRequestDetailsViewHolder extends BaseViewHolder statusesModel.getState() != null) - .forEach(statusesModel -> { - builder.append(ContextCompat.getDrawable(statuses.getContext(), statusesModel.getState().getDrawableRes())); - if (!InputHelper.isEmpty(statusesModel.getTargetUrl())) { + Stream.of(pullRequestStatusModel.contexts()) + .forEachIndexed((index, statusesModel) -> { + builder.append(" ").append(ContextCompat.getDrawable(statuses.getContext(), getDrawable(statusesModel.state()))); + Object targetUrl = statusesModel.targetUrl(); + if (targetUrl != null) { + boolean canAdd = index < pullRequestStatusModel.contexts().size(); builder.append(" ") - .url(statusesModel.getDescription(), v -> SchemeParser.launchUri(v.getContext(), statusesModel.getTargetUrl())) - .append("\n"); + .append(statusesModel.context()) + .append(" ") + .url(statusesModel.description(), v -> SchemeParser.launchUri(v.getContext(), targetUrl.toString())) + .append(canAdd ? "\n" : ""); } else { builder.append("\n"); } @@ -96,4 +97,18 @@ public class PullStatusViewHolder extends BaseViewHolder implements PullRequestTimelineMvp.Presenter { @com.evernote.android.state.State boolean hasNextPage = true; + @com.evernote.android.state.State String previousPage; private ArrayList timeline = new ArrayList<>(); private SparseArray pages = new SparseArray<>(); @@ -313,39 +314,58 @@ public class PullRequestTimelinePresenter extends BasePresenter apolloCall = App.getInstance().getApolloClient().query(query); Observable observable = Rx2Apollo.from(apolloCall) .flatMap(response -> { - if (!response.hasErrors()) { - PullRequestTimelineQuery.Data data = response.data(); - if (data != null) { - PullRequestTimelineQuery.Repository repo = data.repository(); - PullRequestTimelineQuery.PullRequest pullRequest = repo != null ? repo.pullRequest() : null; - if (pullRequest != null) { - PullRequestTimelineQuery.Timeline timeline = pullRequest.timeline(); - hasNextPage = timeline.pageInfo().hasNextPage(); - pages.clear(); - List edges = timeline.edges(); - if (edges != null) { - Stream.of(edges).forEachIndexed((i, edge) -> pages.append(i, edge.cursor())); - } - List nodes = timeline.nodes(); - if (nodes != null) { - Logger.e(nodes.size()); - return RxHelper.getObservable(Observable.fromIterable(nodes)); - } - } - } - } - Logger.e(response.hasErrors(), response.errors()); - return RxHelper.getObservable(Observable.fromIterable(new ArrayList<>())); - }) - .map(PullRequestTimelineModel::new); + Observable models = getTimelineObservable(response, isMergeable); + return models != null ? models : RxHelper.getObservable(Observable.fromIterable(new ArrayList<>())); + }); makeRestCall(observable.toList().toObservable(), pullRequestTimelineModels -> sendToView(view -> view.onNotifyAdapter(pullRequestTimelineModels, page))); } - @NonNull private PullRequestTimelineQuery getTimelineBuilder(@NonNull String login, @NonNull String repoId, int number, int page) { + @Nullable private Observable getTimelineObservable(Response response, + boolean isMergeable) { + if (!response.hasErrors()) { + PullRequestTimelineQuery.Data data = response.data(); + if (data != null) { + PullRequestTimelineQuery.Repository repo = data.repository(); + PullRequestTimelineQuery.PullRequest pullRequest = repo != null ? repo.pullRequest() : null; + if (pullRequest != null) { + PullRequestTimelineQuery.Timeline timeline = pullRequest.timeline(); + hasNextPage = timeline.pageInfo().hasNextPage(); + pages.clear(); + ArrayList models = new ArrayList<>(); + PullRequestTimelineQuery.PullRequestCommits pullRequestCommits = pullRequest.pullRequestCommits(); + List commits = pullRequestCommits.pullRequestCommit(); + if (commits != null && !commits.isEmpty()) { + PullRequestTimelineQuery.Status status = commits.get(0).commit().status(); + if (status != null) { + models.add(new PullRequestTimelineModel(status, isMergeable)); + } + } + List edges = timeline.edges(); + if (edges != null) { + Stream.of(edges).forEachIndexed((i, edge) -> pages.append(i, edge.cursor())); + } + List nodes = timeline.nodes(); + if (nodes != null) { + for (PullRequestTimelineQuery.Node node : nodes) { + models.add(new PullRequestTimelineModel(node)); + } + } + return RxHelper.getObservable(Observable.fromIterable(models)); + } + } + } + return null; + } + + private PullRequestTimelineQuery getTimelineBuilder(@NonNull String login, @NonNull String repoId, int number, int page) { return PullRequestTimelineQuery.builder() .owner(login) .name(repoId) @@ -355,17 +375,6 @@ public class PullRequestTimelinePresenter extends BasePresenter { -// if (statuses != null) { -// statuses.setMergable(isMergeable); -// } -// return statuses; -// }).map(PullRequestTimelineModel::new) -// .doOnNext(timelineModel -> sendToView(view -> view.onAddStatus(timelineModel)))); + return number < pages.size() ? pages.get(number) : null; } } diff --git a/app/src/main/res/layouts/row_layouts/layout/pull_status_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/pull_status_row_item.xml index 424872fa..2614e40d 100644 --- a/app/src/main/res/layouts/row_layouts/layout/pull_status_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/pull_status_row_item.xml @@ -9,26 +9,26 @@ android:layout_marginStart="@dimen/spacing_xs_large" android:layout_marginTop="@dimen/spacing_normal" android:background="?card_background" - android:orientation="horizontal" + android:orientation="vertical" android:paddingBottom="@dimen/spacing_micro" android:paddingTop="@dimen/spacing_normal"> - + android:orientation="horizontal"> + + - - + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 685652bb..41a5751d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -432,7 +432,7 @@ Milestones Assignee Some checks have failed - All checks are pending + Some checks are pending All checks have passed Sort Newest From b5d47cbf91b12a9ac3563c581c18d9b10123d8e8 Mon Sep 17 00:00:00 2001 From: Kosh Sergani Date: Tue, 8 Aug 2017 21:57:31 +0800 Subject: [PATCH 29/67] updated dependency location. --- app/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 929e6079..5bc0c224 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -117,7 +117,6 @@ repositories { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "com.android.support:appcompat-v7:${supportVersion}" - implementation 'com.jaredrummler:android-device-names:1.1.4' implementation "com.android.support:design:${supportVersion}" implementation "com.android.support:cardview-v7:${supportVersion}" implementation "com.android.support:recyclerview-v7:${supportVersion}" @@ -130,7 +129,6 @@ dependencies { implementation "com.squareup.retrofit2:converter-gson:${retrofit}" implementation "com.squareup.retrofit2:adapter-rxjava2:${retrofit}" implementation "com.github.bumptech.glide:glide:3.7.0" -// implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'cn.gavinliu.android.lib:ShapedImageView:0.8.3' implementation "com.jakewharton:butterknife:${butterKnifeVersion}" implementation 'it.sephiroth.android.library.bottomnavigation:bottom-navigation:2.0.1-rc1' @@ -166,6 +164,7 @@ dependencies { implementation "com.evernote:android-state:${state_version}" implementation "petrov.kristiyan:colorpicker-library:1.1.4" implementation 'com.apollographql.apollo:apollo-rx2-support:0.4.0' + implementation 'com.jaredrummler:android-device-names:1.1.4' compileOnly "org.projectlombok:lombok:${lombokVersion}" kapt "io.requery:requery-processor:${requery}" kapt "org.projectlombok:lombok:${lombokVersion}" From c49a48c3197d98fc3d66a8228332db57995f7d6c Mon Sep 17 00:00:00 2001 From: Kosh Sergani Date: Tue, 8 Aug 2017 23:35:31 +0800 Subject: [PATCH 30/67] displaying PR comments. --- .../graphql/pr/PullRequestTimeline.graphql | 13 +- .../fastaccess/data/dao/ReactionsModel.java | 21 ++ .../timeline/PullRequestTimelineModel.java | 8 + .../ui/adapter/PullRequestTimelineAdapter.kt | 2 + .../viewholder/PullRequestEventViewHolder.kt | 4 +- ...PullRequestTimelineCommentsViewHolder.java | 255 ++++++++++++++++++ 6 files changed, 295 insertions(+), 8 deletions(-) create mode 100644 app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestTimelineCommentsViewHolder.java diff --git a/app/src/main/graphql/pr/PullRequestTimeline.graphql b/app/src/main/graphql/pr/PullRequestTimeline.graphql index 28836548..97a6f125 100644 --- a/app/src/main/graphql/pr/PullRequestTimeline.graphql +++ b/app/src/main/graphql/pr/PullRequestTimeline.graphql @@ -43,7 +43,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } } ... on PullRequestReview { - databaseId + id url bodyHTML submittedAt @@ -57,7 +57,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: comments(first: 30) { edges { node { - databaseId + id authorAssociation bodyHTML diffHunk @@ -83,7 +83,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } } ... on IssueComment { - databaseId + id bodyHTML createdAt updatedAt @@ -92,6 +92,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: viewerCanUpdate viewerDidAuthor authorAssociation + lastEditedAt author { login url @@ -429,12 +430,12 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: } } ... on ReviewDismissedEvent { - databaseId + id createdAt messageHtml previousReviewState review { - databaseId + id submittedAt authorAssociation bodyHTML @@ -448,7 +449,7 @@ query PullRequestTimeline($owner: String!, $name: String!, $number: Int!, $page: comments(first: 30) { edges { node { - databaseId + id authorAssociation bodyHTML diffHunk diff --git a/app/src/main/java/com/fastaccess/data/dao/ReactionsModel.java b/app/src/main/java/com/fastaccess/data/dao/ReactionsModel.java index 00e9f1f7..f20bfb04 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReactionsModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReactionsModel.java @@ -2,12 +2,18 @@ package com.fastaccess.data.dao; import android.os.Parcel; import android.os.Parcelable; +import android.support.annotation.Nullable; import com.fastaccess.data.dao.model.User; import com.google.gson.annotations.SerializedName; +import java.util.ArrayList; +import java.util.List; + import lombok.Getter; +import lombok.NonNull; import lombok.Setter; +import pr.PullRequestTimelineQuery; /** * Created by Kosh on 28 Mar 2017, 9:15 PM @@ -26,6 +32,7 @@ import lombok.Setter; private int heart; private String content; private User user; + private boolean viewerHasReacted; private boolean isCallingApi; public ReactionsModel() {} @@ -81,4 +88,18 @@ import lombok.Setter; @Override public ReactionsModel[] newArray(int size) {return new ReactionsModel[size];} }; + + @NonNull public static List getReaction(@Nullable List reactions) { + List models = new ArrayList<>(); + if (reactions != null && !reactions.isEmpty()) { + for (PullRequestTimelineQuery.ReactionGroup1 reaction : reactions) { + ReactionsModel model = new ReactionsModel(); + model.setContent(reaction.content().name()); + model.setViewerHasReacted(reaction.viewerHasReacted()); + model.setTotal_count(reaction.users().totalCount()); + models.add(model); + } + } + return models; + } } diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java index 45c7960b..0f95fcf0 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/PullRequestTimelineModel.java @@ -1,7 +1,10 @@ package com.fastaccess.data.dao.timeline; +import com.fastaccess.data.dao.ReactionsModel; import com.fastaccess.data.dao.model.PullRequest; +import java.util.List; + import lombok.Getter; import lombok.Setter; import pr.PullRequestTimelineQuery; @@ -21,6 +24,7 @@ import pr.PullRequestTimelineQuery; public PullRequestTimelineQuery.Node node; public PullRequest pullRequest; public PullRequestTimelineQuery.Status status; + public List reactions; public boolean isMergeable; public PullRequestTimelineModel(PullRequest pullRequest) { @@ -49,6 +53,10 @@ import pr.PullRequestTimelineQuery; || node.asCommit() != null || node.asHeadRefRestoredEvent() != null) { return EVENT; } else if (node.asIssueComment() != null) { + if (reactions == null) { + //noinspection ConstantConditions + setReactions(ReactionsModel.getReaction(node.asIssueComment().reactionGroups())); + } return COMMENT; } else if (node.asPullRequestReview() != null || node.asReviewDismissedEvent() != null || node.asReviewRequestedEvent() != null || node.asReviewRequestRemovedEvent() != null) { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt index 2c35675d..fbf48388 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt @@ -6,6 +6,7 @@ import com.fastaccess.ui.adapter.callback.OnToggleView import com.fastaccess.ui.adapter.callback.ReactionsCallback import com.fastaccess.ui.adapter.viewholder.PullRequestDetailsViewHolder import com.fastaccess.ui.adapter.viewholder.PullRequestEventViewHolder +import com.fastaccess.ui.adapter.viewholder.PullRequestTimelineCommentsViewHolder import com.fastaccess.ui.adapter.viewholder.PullStatusViewHolder import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder @@ -27,6 +28,7 @@ class PullRequestTimelineAdapter constructor(val data: ArrayList return PullRequestDetailsViewHolder.newInstance(parent, this, onToggleView, reactionsCallback, repoOwner, poster) PullRequestTimelineModel.STATUS -> return PullStatusViewHolder.newInstance(parent) + PullRequestTimelineModel.COMMENT -> return PullRequestTimelineCommentsViewHolder.newInstance(parent, this, onToggleView) else -> return PullRequestEventViewHolder.newInstance(parent, this) } } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt index c46f0f57..c4ecb5cb 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -316,11 +316,11 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba private fun commitEvent(event: PullRequestTimelineQuery.AsCommit) { event.author()?.let { stateText.text = SpannableBuilder.builder()//Review[k0shk0sh] We may want to suppress more then 3 or 4 commits. since it will clog the it - .bold(it.name()) + .bold(if(it.user() == null) it.name() else it.user()?.login()) .append(" ") .append("committed") .append(" ") - .append("${event.messageHeadline()}") + .append(event.messageHeadline()) .append(" ") .url(substring(event.oid().toString())) .append(" ") diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestTimelineCommentsViewHolder.java b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestTimelineCommentsViewHolder.java new file mode 100644 index 00000000..81e5e62d --- /dev/null +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestTimelineCommentsViewHolder.java @@ -0,0 +1,255 @@ +package com.fastaccess.ui.adapter.viewholder; + +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; +import android.support.transition.ChangeBounds; +import android.support.transition.TransitionManager; +import android.view.View; +import android.view.ViewGroup; +import android.widget.HorizontalScrollView; +import android.widget.LinearLayout; +import android.widget.RelativeLayout; + +import com.fastaccess.R; +import com.fastaccess.data.dao.ReactionsModel; +import com.fastaccess.data.dao.timeline.PullRequestTimelineModel; +import com.fastaccess.helper.InputHelper; +import com.fastaccess.helper.ParseDateFormat; +import com.fastaccess.provider.scheme.LinkParserHelper; +import com.fastaccess.provider.timeline.CommentsHelper; +import com.fastaccess.provider.timeline.HtmlHelper; +import com.fastaccess.provider.timeline.handler.drawable.DrawableGetter; +import com.fastaccess.ui.adapter.callback.OnToggleView; +import com.fastaccess.ui.widgets.AvatarLayout; +import com.fastaccess.ui.widgets.FontTextView; +import com.fastaccess.ui.widgets.ForegroundImageView; +import com.fastaccess.ui.widgets.SpannableBuilder; +import com.fastaccess.ui.widgets.recyclerview.BaseRecyclerAdapter; +import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder; + +import java.util.List; + +import butterknife.BindView; +import pr.PullRequestTimelineQuery; +import pr.type.ReactionContent; + +/** + * Created by Kosh on 11 Nov 2016, 2:08 PM + */ + +public class PullRequestTimelineCommentsViewHolder extends BaseViewHolder { + + + @BindView(R.id.avatarView) AvatarLayout avatar; + @BindView(R.id.name) FontTextView name; + @BindView(R.id.date) FontTextView date; + @BindView(R.id.toggle) ForegroundImageView toggle; + @BindView(R.id.commentMenu) ForegroundImageView commentMenu; + @BindView(R.id.toggleHolder) LinearLayout toggleHolder; + @BindView(R.id.thumbsUp) FontTextView thumbsUp; + @BindView(R.id.thumbsDown) FontTextView thumbsDown; + @BindView(R.id.laugh) FontTextView laugh; + @BindView(R.id.hurray) FontTextView hurray; + @BindView(R.id.sad) FontTextView sad; + @BindView(R.id.heart) FontTextView heart; + @BindView(R.id.emojiesList) HorizontalScrollView emojiesList; + @BindView(R.id.commentOptions) RelativeLayout commentOptions; + @BindView(R.id.comment) FontTextView comment; + @BindView(R.id.reactionsText) FontTextView reactionsText; + @BindView(R.id.owner) FontTextView owner; + private OnToggleView onToggleView; + private ViewGroup viewGroup; + + @Override public void onClick(View v) { + if (v.getId() == R.id.toggle || v.getId() == R.id.toggleHolder) { + if (onToggleView != null) { + int position = getAdapterPosition(); + onToggleView.onToggle(position, !onToggleView.isCollapsed(position)); + onToggle(onToggleView.isCollapsed(position), true); + } + } else { + addReactionCount(v); + super.onClick(v); + } + } + + private PullRequestTimelineCommentsViewHolder(@NonNull View itemView, @NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter, + @NonNull OnToggleView onToggleView) { + super(itemView, adapter); + this.viewGroup = viewGroup; + this.onToggleView = onToggleView; + itemView.setOnClickListener(null); + itemView.setOnLongClickListener(null); + commentMenu.setOnClickListener(this); + commentMenu.setOnLongClickListener(this); + toggleHolder.setOnClickListener(this); + toggle.setOnClickListener(this); + laugh.setOnClickListener(this); + sad.setOnClickListener(this); + thumbsDown.setOnClickListener(this); + thumbsUp.setOnClickListener(this); + hurray.setOnClickListener(this); + laugh.setOnLongClickListener(this); + sad.setOnLongClickListener(this); + thumbsDown.setOnLongClickListener(this); + thumbsUp.setOnLongClickListener(this); + hurray.setOnLongClickListener(this); + heart.setOnLongClickListener(this); + heart.setOnClickListener(this); + } + + public static PullRequestTimelineCommentsViewHolder newInstance(@NonNull ViewGroup viewGroup, @Nullable BaseRecyclerAdapter adapter, + @NonNull OnToggleView onToggleView) { + return new PullRequestTimelineCommentsViewHolder(getView(viewGroup, R.layout.comments_row_item), viewGroup, adapter, onToggleView); + } + + @Override public void bind(@NonNull PullRequestTimelineModel timelineModel) { + PullRequestTimelineQuery.AsIssueComment commentsModel = timelineModel.getNode().asIssueComment(); + if (commentsModel != null) { + PullRequestTimelineQuery.Author3 author3 = commentsModel.author(); + owner.setVisibility(View.VISIBLE); + owner.setText(commentsModel.authorAssociation().name().toLowerCase()); + if (author3 != null) { + avatar.setUrl(author3.avatarUrl().toString(), author3.login(), + false, LinkParserHelper.isEnterprise(author3.url().toString())); + name.setText(author3.login()); + } else { + avatar.setUrl(null, null, false, false); + name.setText(null); + } + if (!InputHelper.isEmpty(commentsModel.bodyHTML())) { + String body = commentsModel.bodyHTML().toString(); + HtmlHelper.htmlIntoTextView(comment, body, viewGroup.getWidth()); + } else { + comment.setText(""); + } + if (commentsModel.createdAt().equals(commentsModel.lastEditedAt())) { + date.setText(String.format("%s %s", ParseDateFormat.getTimeAgo(commentsModel.lastEditedAt().toString()), itemView + .getResources().getString(R.string.edited))); + } else { + date.setText(ParseDateFormat.getTimeAgo(commentsModel.createdAt().toString())); + } + appendEmojies(timelineModel.getReactions()); + emojiesList.setVisibility(View.VISIBLE); + if (onToggleView != null) onToggle(onToggleView.isCollapsed(getAdapterPosition()), false); + } + } + + private void addReactionCount(View v) { + if (adapter != null) { + PullRequestTimelineModel timelineModel = (PullRequestTimelineModel) adapter.getItem(getAdapterPosition()); + if (timelineModel == null) return; + List reactions = timelineModel.getReactions(); + if (reactions != null && !reactions.isEmpty()) { + int reactionIndex = getReaction(v.getId(), reactions); + if (reactionIndex != -1) { + ReactionsModel reaction = reactions.get(reactionIndex); + if (!reaction.isViewerHasReacted()) { + reaction.setViewerHasReacted(true); + reaction.setTotal_count(reaction.getTotal_count() + 1); + } else { + reaction.setViewerHasReacted(false); + reaction.setTotal_count(reaction.getTotal_count() - 1); + } + reactions.set(reactionIndex, reaction); + } + appendEmojies(reactions); + timelineModel.setReactions(reactions); + } + } + } + + private int getReaction(int id, @NonNull List reactionGroup) { + for (int i = 0; i < reactionGroup.size(); i++) { + ReactionsModel reactionGroup1 = reactionGroup.get(i); + if (id == R.id.heart && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.HEART.name())) { + return i; + } else if (id == R.id.sad && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.CONFUSED.name())) { + return i; + } else if (id == R.id.hurray && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.HOORAY.name())) { + return i; + } else if (id == R.id.laugh && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.LAUGH.name())) { + return i; + } else if (id == R.id.thumbsDown && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.THUMBS_DOWN.name())) { + return i; + } else if (id == R.id.thumbsUp && reactionGroup1.getContent().equalsIgnoreCase(ReactionContent.THUMBS_UP.name())) { + return i; + } + } + return -1; + } + + private void appendEmojies(@NonNull List reactions) { + reactionsText.setText(""); + SpannableBuilder spannableBuilder = SpannableBuilder.builder(); + for (ReactionsModel reaction : reactions) { + CharSequence charSequence = null; + if (reaction.getContent().equalsIgnoreCase(ReactionContent.THUMBS_UP.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getThumbsUp()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + thumbsUp.setText(charSequence); + } else if (reaction.getContent().equalsIgnoreCase(ReactionContent.THUMBS_DOWN.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getThumbsDown()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + thumbsDown.setText(charSequence); + } else if (reaction.getContent().equalsIgnoreCase(ReactionContent.LAUGH.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getLaugh()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + laugh.setText(charSequence); + } else if (reaction.getContent().equalsIgnoreCase(ReactionContent.HOORAY.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getHooray()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + hurray.setText(charSequence); + } else if (reaction.getContent().equalsIgnoreCase(ReactionContent.HEART.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getHeart()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + heart.setText(charSequence); + } else if (reaction.getContent().equalsIgnoreCase(ReactionContent.CONFUSED.name())) { + charSequence = SpannableBuilder.builder() + .append(CommentsHelper.getSad()).append(" ") + .append(String.valueOf(reaction.getTotal_count())) + .append(" "); + sad.setText(charSequence); + } + if (charSequence != null && reaction.getTotal_count() > 0) { + spannableBuilder.append(charSequence); + } + } + if (spannableBuilder.length() > 0) { + reactionsText.setText(spannableBuilder); + if (!onToggleView.isCollapsed(getAdapterPosition())) { + reactionsText.setVisibility(View.VISIBLE); + } + } else { + reactionsText.setVisibility(View.GONE); + } + } + + private void onToggle(boolean expanded, boolean animate) { + if (animate) { + TransitionManager.beginDelayedTransition(viewGroup, new ChangeBounds()); + } + toggle.setRotation(!expanded ? 0.0F : 180F); + commentOptions.setVisibility(!expanded ? View.GONE : View.VISIBLE); + if (!InputHelper.isEmpty(reactionsText)) { + reactionsText.setVisibility(!expanded ? View.VISIBLE : View.GONE); + } + } + + @Override protected void onViewIsDetaching() { + DrawableGetter drawableGetter = (DrawableGetter) comment.getTag(R.id.drawable_callback); + if (drawableGetter != null) { + drawableGetter.clear(drawableGetter); + } + } +} From 28965f2190b5a7c216253e2a84f1323d7ec045ab Mon Sep 17 00:00:00 2001 From: Yakov Date: Tue, 8 Aug 2017 12:09:18 -0400 Subject: [PATCH 31/67] Change scope to private --- .../data/dao/PullRequestStatusModel.java | 18 +++---- .../data/dao/ReviewCommentModel.java | 34 ++++++------ .../com/fastaccess/data/dao/ReviewModel.java | 20 +++---- .../data/dao/timeline/GenericEvent.java | 52 +++++++++---------- .../provider/timeline/handler/HrSpan.java | 7 ++- .../filter/issues/FilterIssuesActivity.java | 2 +- 6 files changed, 66 insertions(+), 67 deletions(-) diff --git a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java index 1f64f2dd..b8e0b566 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PullRequestStatusModel.java @@ -17,14 +17,14 @@ import lombok.Setter; @Getter @Setter public class PullRequestStatusModel implements Parcelable { - StatusStateType state; - String sha; - int totalCount; - List statuses; - String commitUrl; - String url; - boolean mergable; - Date createdAt; + private StatusStateType state; + private String sha; + private int totalCount; + private List statuses; + private String commitUrl; + private String url; + private boolean mergable; + private Date createdAt; public PullRequestStatusModel() {} @@ -41,7 +41,7 @@ import lombok.Setter; dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1); } - protected PullRequestStatusModel(Parcel in) { + private PullRequestStatusModel(Parcel in) { int tmpState = in.readInt(); this.state = tmpState == -1 ? null : StatusStateType.values()[tmpState]; this.sha = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java index 818589d3..d4627040 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewCommentModel.java @@ -16,23 +16,23 @@ import lombok.Setter; @Getter @Setter public class ReviewCommentModel implements Parcelable { - long id; - String url; - long pullRequestReviewId; - String diffHunk; - String path; - int position; - int originalPosition; - String commitId; - String originalCommitId; - User user; - String bodyHtml; - String body; - Date createdAt; - Date updatedAt; - String htmlUrl; - String pullRequestUrl; - ReactionsModel reactions; + private long id; + private String url; + private long pullRequestReviewId; + private String diffHunk; + private String path; + private int position; + private int originalPosition; + private String commitId; + private String originalCommitId; + private User user; + private String bodyHtml; + private String body; + private Date createdAt; + private Date updatedAt; + private String htmlUrl; + private String pullRequestUrl; + private ReactionsModel reactions; public ReviewCommentModel() {} diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java index f28e57c5..ed45a96d 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewModel.java @@ -17,15 +17,15 @@ import lombok.Setter; @Getter @Setter public class ReviewModel implements Parcelable { - long id; - User user; - String bodyHtml; - String state; - Date submittedAt; - String commitId; - String diffText; - List comments; - ReactionsModel reactions; + private long id; + private User user; + private String bodyHtml; + private String state; + private Date submittedAt; + private String commitId; + private String diffText; + private List comments; + private ReactionsModel reactions; public ReviewModel() {} @@ -43,7 +43,7 @@ import lombok.Setter; dest.writeParcelable(this.reactions, flags); } - protected ReviewModel(Parcel in) { + private ReviewModel(Parcel in) { this.id = in.readLong(); this.user = in.readParcelable(User.class.getClassLoader()); this.bodyHtml = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java index b1af219e..a5d4c86b 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/GenericEvent.java @@ -25,31 +25,31 @@ import lombok.Setter; @NoArgsConstructor @Getter @Setter public class GenericEvent implements Parcelable { - long id; - String url; - String commitId; - String commitUrl; - String message; - String sha; - String htmlUrl; - Date createdAt; - User actor; - User requestedReviewer; - User reviewRequester; - User assigner; - User assignee; - User author; - User committer; - LabelModel label; - TeamsModel requestedTeam; - MilestoneModel milestone; - RenameModel rename; - SourceModel source; - Issue issue; - PullRequest pullRequest; - ParentsModel tree; - List parents; - IssueEventType event; + private long id; + private String url; + private String commitId; + private String commitUrl; + private String message; + private String sha; + private String htmlUrl; + private Date createdAt; + private User actor; + private User requestedReviewer; + private User reviewRequester; + private User assigner; + private User assignee; + private User author; + private User committer; + private LabelModel label; + private TeamsModel requestedTeam; + private MilestoneModel milestone; + private RenameModel rename; + private SourceModel source; + private Issue issue; + private PullRequest pullRequest; + private ParentsModel tree; + private List parents; + private IssueEventType event; @Override public int describeContents() { return 0; } @@ -81,7 +81,7 @@ import lombok.Setter; dest.writeInt(this.event == null ? -1 : this.event.ordinal()); } - protected GenericEvent(Parcel in) { + private GenericEvent(Parcel in) { this.id = in.readLong(); this.url = in.readString(); this.commitId = in.readString(); diff --git a/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java index 6bfa74fe..176612d2 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/handler/HrSpan.java @@ -11,15 +11,13 @@ import android.text.style.ReplacementSpan; public class HrSpan extends ReplacementSpan implements LineHeightSpan { - private final int height = 10; - private int width; - private final Drawable drawable; + private final int width; private final int color; HrSpan(int color, int width) { this.color = color; this.width = width; - this.drawable = new ColorDrawable(color); + Drawable drawable = new ColorDrawable(color); } @Override public int getSize(@NonNull Paint paint, CharSequence text, int start, int end, Paint.FontMetricsInt fm) { @@ -31,6 +29,7 @@ public class HrSpan extends ReplacementSpan implements LineHeightSpan { final int currentColor = paint.getColor(); paint.setColor(color); paint.setStyle(Paint.Style.FILL); + int height = 10; canvas.drawRect(new Rect(0, bottom - height, (int) x + width, bottom), paint); paint.setColor(currentColor); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java index 37e85897..d9d50e89 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/filter/issues/FilterIssuesActivity.java @@ -244,7 +244,7 @@ public class FilterIssuesActivity extends BaseActivity Date: Tue, 8 Aug 2017 17:20:16 -0400 Subject: [PATCH 32/67] Change scope to private/protected --- app/build.gradle | 3 +- .../fastaccess/data/dao/AccessTokenModel.java | 2 +- .../fastaccess/data/dao/AppLanguageModel.java | 2 +- .../com/fastaccess/data/dao/AuthModel.java | 2 +- .../fastaccess/data/dao/BranchesModel.java | 2 +- .../data/dao/CommentRequestModel.java | 2 +- .../fastaccess/data/dao/CommitCountModel.java | 2 +- .../data/dao/CommitFileChanges.java | 4 +- .../fastaccess/data/dao/CommitLinesModel.java | 2 +- .../data/dao/EditReviewCommentModel.java | 2 +- .../fastaccess/data/dao/FilesListModel.java | 2 +- .../data/dao/FilterOptionsModel.java | 2 +- .../data/dao/GroupedNotificationModel.java | 2 +- .../data/dao/GroupedReviewModel.java | 2 +- .../data/dao/ImgurReponseModel.java | 4 +- .../data/dao/IssueEventAdapterModel.java | 2 +- .../data/dao/IssueRequestModel.java | 2 +- .../data/dao/LanguageColorModel.java | 2 +- .../data/dao/PostReactionModel.java | 2 +- .../data/dao/PullRequestAdapterModel.java | 2 +- .../data/dao/ReviewRequestModel.java | 2 +- .../data/dao/SlackInvitePostModel.java | 2 +- .../data/dao/SlackResponseModel.java | 2 +- .../fastaccess/data/dao/StatusesModel.java | 2 +- .../com/fastaccess/data/dao/WikiModel.java | 2 +- .../data/dao/timeline/AuthorModel.java | 2 +- .../data/dao/timeline/CommentEvent.java | 2 +- .../data/dao/timeline/ParentsModel.java | 2 +- .../data/dao/timeline/SourceModel.java | 2 +- .../data/dao/wiki/WikiContentModel.kt | 2 +- .../java/com/fastaccess/helper/Bundler.java | 2 +- .../fastaccess/helper/CustomTabsHelper.java | 2 +- .../fastaccess/provider/theme/ThemeEngine.kt | 4 +- .../provider/timeline/CommentsHelper.java | 2 +- .../ui/adapter/IssuesTimelineAdapter.java | 6 +-- .../com/fastaccess/ui/adapter/LoginAdapter.kt | 2 +- .../ui/adapter/PullRequestTimelineAdapter.kt | 10 ++--- .../ui/adapter/viewholder/LoginViewHolder.kt | 4 +- .../viewholder/PullRequestEventViewHolder.kt | 40 +++++++++---------- .../adapter/viewholder/TrendingViewHolder.kt | 12 +++--- .../viewholder/UnknownTypeViewHolder.kt | 2 +- .../com/fastaccess/ui/base/BaseActivity.java | 6 +-- .../ui/base/BaseBottomSheetDialog.java | 2 +- .../com/fastaccess/ui/base/MainNavDrawer.kt | 12 +++--- .../ui/modules/editor/EditorActivity.java | 4 +- .../login/chooser/LoginChooserActivity.kt | 12 +++--- .../main/donation/DonationActivity.java | 2 +- .../modules/main/premium/PremiumActivity.kt | 6 +-- .../all/AllNotificationsPresenter.java | 2 +- .../repos/extras/branches/BranchesFragment.kt | 10 ++--- .../branches/pager/BranchesPagerFragment.kt | 6 +-- .../create/CreateLabelDialogFragment.java | 1 - .../extras/license/RepoLicenseBottomSheet.kt | 8 ++-- .../extras/license/RepoLicensePresenter.kt | 2 +- .../extras/popup/IssuePopupPresenter.java | 2 +- .../ui/modules/repos/wiki/WikiActivity.kt | 10 ++--- .../reviews/AddReviewDialogFragment.kt | 10 ++--- .../reviews/changes/ReviewChangesActivity.kt | 4 +- .../sound/NotificationSoundBottomSheet.kt | 12 +++--- .../ui/modules/theme/ThemeActivity.kt | 4 +- .../modules/theme/code/ThemeCodeActivity.kt | 6 +-- .../modules/theme/fragment/ThemeFragment.kt | 4 +- .../ui/modules/trending/TrendingActivity.kt | 14 +++---- .../trending/fragment/TrendingFragment.kt | 10 ++--- .../fragment/TrendingFragmentPresenter.kt | 4 +- .../ui/widgets/AutoLinearLayout.java | 10 ++--- .../ui/widgets/ColorPickerPreference.java | 8 ++-- .../com/fastaccess/ui/widgets/LabelSpan.java | 2 +- .../contributions/ContributionsDay.java | 2 +- .../contributions/ContributionsProvider.java | 6 +-- .../GitHubContributionsView.java | 8 ++-- .../recyclerview/BaseRecyclerAdapter.java | 10 ++--- .../widgets/recyclerview/BaseViewHolder.java | 2 +- .../recyclerview/DynamicRecyclerView.java | 2 +- app/src/main/res/values-ru/strings.xml | 1 - build.gradle | 3 +- 76 files changed, 177 insertions(+), 181 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5bc0c224..849f3d55 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,7 +24,7 @@ android { } } compileSdkVersion 26 - buildToolsVersion "26.0.0" + buildToolsVersion "26.0.1" defaultConfig { applicationId "com.fastaccess.github" minSdkVersion 21 @@ -112,6 +112,7 @@ repositories { maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url "https://jitpack.io" } maven { url 'https://maven.fabric.io/public' } + maven { url 'http://dl.bintray.com/kotlin/kotlin-eap-1.2' } } dependencies { diff --git a/app/src/main/java/com/fastaccess/data/dao/AccessTokenModel.java b/app/src/main/java/com/fastaccess/data/dao/AccessTokenModel.java index 1322ebc9..2766fa0e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/AccessTokenModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/AccessTokenModel.java @@ -30,7 +30,7 @@ public class AccessTokenModel implements Parcelable { dest.writeString(this.tokenType); } - protected AccessTokenModel(Parcel in) { + private AccessTokenModel(Parcel in) { this.id = in.readLong(); this.token = in.readString(); this.hashedToken = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/AppLanguageModel.java b/app/src/main/java/com/fastaccess/data/dao/AppLanguageModel.java index 1fbeb5b2..81350448 100644 --- a/app/src/main/java/com/fastaccess/data/dao/AppLanguageModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/AppLanguageModel.java @@ -22,7 +22,7 @@ import lombok.Setter; dest.writeString(this.label); } - protected AppLanguageModel(Parcel in) { + private AppLanguageModel(Parcel in) { this.value = in.readString(); this.label = in.readString(); } diff --git a/app/src/main/java/com/fastaccess/data/dao/AuthModel.java b/app/src/main/java/com/fastaccess/data/dao/AuthModel.java index d347f281..a37d066e 100644 --- a/app/src/main/java/com/fastaccess/data/dao/AuthModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/AuthModel.java @@ -40,7 +40,7 @@ public class AuthModel implements Parcelable { dest.writeString(this.otpCode); } - protected AuthModel(Parcel in) { + private AuthModel(Parcel in) { this.clientId = in.readString(); this.clientSecret = in.readString(); this.redirectUri = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/BranchesModel.java b/app/src/main/java/com/fastaccess/data/dao/BranchesModel.java index 9e2c3a41..77a08db4 100644 --- a/app/src/main/java/com/fastaccess/data/dao/BranchesModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/BranchesModel.java @@ -37,7 +37,7 @@ public class BranchesModel implements Parcelable { dest.writeByte(this.isTag ? (byte) 1 : (byte) 0); } - protected BranchesModel(Parcel in) { + private BranchesModel(Parcel in) { this.name = in.readString(); this.commit = in.readParcelable(Commit.class.getClassLoader()); this.protectedBranch = in.readByte() != 0; diff --git a/app/src/main/java/com/fastaccess/data/dao/CommentRequestModel.java b/app/src/main/java/com/fastaccess/data/dao/CommentRequestModel.java index 26ea4a7b..b7bb58fa 100644 --- a/app/src/main/java/com/fastaccess/data/dao/CommentRequestModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/CommentRequestModel.java @@ -44,7 +44,7 @@ import lombok.Setter; dest.writeValue(this.line); } - protected CommentRequestModel(Parcel in) { + private CommentRequestModel(Parcel in) { this.body = in.readString(); this.inReplyTo = (Long) in.readValue(Long.class.getClassLoader()); this.path = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/CommitCountModel.java b/app/src/main/java/com/fastaccess/data/dao/CommitCountModel.java index 22802147..8b74c785 100644 --- a/app/src/main/java/com/fastaccess/data/dao/CommitCountModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/CommitCountModel.java @@ -26,7 +26,7 @@ import lombok.Setter; public CommitCountModel() {} - protected CommitCountModel(Parcel in) { + private CommitCountModel(Parcel in) { this.all = new ArrayList(); in.readList(this.all, Integer.class.getClassLoader()); this.owner = new ArrayList(); diff --git a/app/src/main/java/com/fastaccess/data/dao/CommitFileChanges.java b/app/src/main/java/com/fastaccess/data/dao/CommitFileChanges.java index b297cfba..7a45c30a 100644 --- a/app/src/main/java/com/fastaccess/data/dao/CommitFileChanges.java +++ b/app/src/main/java/com/fastaccess/data/dao/CommitFileChanges.java @@ -23,7 +23,7 @@ import lombok.Setter; public List linesModel; public CommitFileModel commitFileModel; - public CommitFileChanges() {} + private CommitFileChanges() {} public static Observable constructToObservable(@Nullable List files) { if (files == null || files.isEmpty()) return Observable.empty(); @@ -56,7 +56,7 @@ import lombok.Setter; dest.writeParcelable(this.commitFileModel, flags); } - protected CommitFileChanges(Parcel in) { + private CommitFileChanges(Parcel in) { this.linesModel = in.createTypedArrayList(CommitLinesModel.CREATOR); this.commitFileModel = in.readParcelable(CommitFileModel.class.getClassLoader()); } diff --git a/app/src/main/java/com/fastaccess/data/dao/CommitLinesModel.java b/app/src/main/java/com/fastaccess/data/dao/CommitLinesModel.java index 3591c298..9940b56c 100644 --- a/app/src/main/java/com/fastaccess/data/dao/CommitLinesModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/CommitLinesModel.java @@ -100,7 +100,7 @@ import static com.fastaccess.ui.widgets.DiffLineSpan.HUNK_TITLE; dest.writeInt(this.position); } - protected CommitLinesModel(Parcel in) { + private CommitLinesModel(Parcel in) { this.text = in.readString(); this.color = in.readInt(); this.leftLineNo = in.readInt(); diff --git a/app/src/main/java/com/fastaccess/data/dao/EditReviewCommentModel.java b/app/src/main/java/com/fastaccess/data/dao/EditReviewCommentModel.java index 62be6592..cba7d4b7 100644 --- a/app/src/main/java/com/fastaccess/data/dao/EditReviewCommentModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/EditReviewCommentModel.java @@ -33,7 +33,7 @@ import lombok.Setter; dest.writeLong(this.inReplyTo); } - protected EditReviewCommentModel(Parcel in) { + private EditReviewCommentModel(Parcel in) { this.groupPosition = in.readInt(); this.commentPosition = in.readInt(); this.comment = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/FilesListModel.java b/app/src/main/java/com/fastaccess/data/dao/FilesListModel.java index 7e20da76..2883f6f3 100644 --- a/app/src/main/java/com/fastaccess/data/dao/FilesListModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/FilesListModel.java @@ -35,7 +35,7 @@ public class FilesListModel implements Parcelable, Serializable { dest.writeString(this.language); } - protected FilesListModel(Parcel in) { + private FilesListModel(Parcel in) { this.filename = in.readString(); this.type = in.readString(); this.rawUrl = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/FilterOptionsModel.java b/app/src/main/java/com/fastaccess/data/dao/FilterOptionsModel.java index 83c61180..e74e4145 100644 --- a/app/src/main/java/com/fastaccess/data/dao/FilterOptionsModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/FilterOptionsModel.java @@ -146,7 +146,7 @@ public class FilterOptionsModel implements Parcelable { dest.writeByte(this.isOrg ? (byte) 1 : (byte) 0); } - protected FilterOptionsModel(Parcel in) { + private FilterOptionsModel(Parcel in) { this.type = in.readString(); this.sort = in.readString(); this.sortDirection = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/GroupedNotificationModel.java b/app/src/main/java/com/fastaccess/data/dao/GroupedNotificationModel.java index 867a074d..515d3cb1 100644 --- a/app/src/main/java/com/fastaccess/data/dao/GroupedNotificationModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/GroupedNotificationModel.java @@ -33,7 +33,7 @@ import static com.annimon.stream.Collectors.toList; private Notification notification; private Date date; - public GroupedNotificationModel(Repo repo) { + private GroupedNotificationModel(Repo repo) { this.type = HEADER; this.repo = repo; } diff --git a/app/src/main/java/com/fastaccess/data/dao/GroupedReviewModel.java b/app/src/main/java/com/fastaccess/data/dao/GroupedReviewModel.java index 88f83f21..a905fe59 100644 --- a/app/src/main/java/com/fastaccess/data/dao/GroupedReviewModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/GroupedReviewModel.java @@ -36,7 +36,7 @@ import lombok.Setter; dest.writeTypedList(this.comments); } - protected GroupedReviewModel(Parcel in) { + private GroupedReviewModel(Parcel in) { this.position = in.readInt(); this.diffText = in.readString(); long tmpDate = in.readLong(); diff --git a/app/src/main/java/com/fastaccess/data/dao/ImgurReponseModel.java b/app/src/main/java/com/fastaccess/data/dao/ImgurReponseModel.java index a029a08b..bd8d66e3 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ImgurReponseModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ImgurReponseModel.java @@ -25,7 +25,7 @@ import lombok.Setter; public ImgurReponseModel() {} - protected ImgurReponseModel(Parcel in) { + private ImgurReponseModel(Parcel in) { this.success = in.readByte() != 0; this.status = in.readInt(); this.data = in.readParcelable(ImgurImage.class.getClassLoader()); @@ -52,7 +52,7 @@ import lombok.Setter; dest.writeString(this.link); } - protected ImgurImage(Parcel in) { + private ImgurImage(Parcel in) { this.title = in.readString(); this.description = in.readString(); this.link = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/IssueEventAdapterModel.java b/app/src/main/java/com/fastaccess/data/dao/IssueEventAdapterModel.java index 70a11037..915df44b 100644 --- a/app/src/main/java/com/fastaccess/data/dao/IssueEventAdapterModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/IssueEventAdapterModel.java @@ -55,7 +55,7 @@ public class IssueEventAdapterModel implements Parcelable { dest.writeParcelable(this.issueModel, flags); } - protected IssueEventAdapterModel(Parcel in) { + private IssueEventAdapterModel(Parcel in) { this.type = in.readInt(); this.issueEvent = in.readParcelable(IssueEvent.class.getClassLoader()); this.issueModel = in.readParcelable(Issue.class.getClassLoader()); diff --git a/app/src/main/java/com/fastaccess/data/dao/IssueRequestModel.java b/app/src/main/java/com/fastaccess/data/dao/IssueRequestModel.java index 8c012533..73a7a805 100644 --- a/app/src/main/java/com/fastaccess/data/dao/IssueRequestModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/IssueRequestModel.java @@ -71,7 +71,7 @@ public class IssueRequestModel implements Parcelable { dest.writeStringList(this.labels); } - protected IssueRequestModel(Parcel in) { + private IssueRequestModel(Parcel in) { int tmpState = in.readInt(); this.state = tmpState == -1 ? null : IssueState.values()[tmpState]; this.title = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/LanguageColorModel.java b/app/src/main/java/com/fastaccess/data/dao/LanguageColorModel.java index 15c89e64..2f40fc9a 100644 --- a/app/src/main/java/com/fastaccess/data/dao/LanguageColorModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/LanguageColorModel.java @@ -24,7 +24,7 @@ import lombok.ToString; public LanguageColorModel() {} - protected LanguageColorModel(Parcel in) { + private LanguageColorModel(Parcel in) { this.color = in.readString(); this.url = in.readString(); } diff --git a/app/src/main/java/com/fastaccess/data/dao/PostReactionModel.java b/app/src/main/java/com/fastaccess/data/dao/PostReactionModel.java index 0a513f9a..46f428e8 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PostReactionModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PostReactionModel.java @@ -20,7 +20,7 @@ import lombok.Setter; @Override public void writeToParcel(Parcel dest, int flags) {dest.writeString(this.content);} - protected PostReactionModel(Parcel in) {this.content = in.readString();} + private PostReactionModel(Parcel in) {this.content = in.readString();} public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { @Override public PostReactionModel createFromParcel(Parcel source) {return new PostReactionModel(source);} diff --git a/app/src/main/java/com/fastaccess/data/dao/PullRequestAdapterModel.java b/app/src/main/java/com/fastaccess/data/dao/PullRequestAdapterModel.java index adb10254..92d2451f 100644 --- a/app/src/main/java/com/fastaccess/data/dao/PullRequestAdapterModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/PullRequestAdapterModel.java @@ -55,7 +55,7 @@ public class PullRequestAdapterModel implements Parcelable { dest.writeParcelable(this.pullRequest, flags); } - protected PullRequestAdapterModel(Parcel in) { + private PullRequestAdapterModel(Parcel in) { this.type = in.readInt(); this.issueEvent = in.readParcelable(IssueEvent.class.getClassLoader()); this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); diff --git a/app/src/main/java/com/fastaccess/data/dao/ReviewRequestModel.java b/app/src/main/java/com/fastaccess/data/dao/ReviewRequestModel.java index 7cfcc89d..df40f83c 100644 --- a/app/src/main/java/com/fastaccess/data/dao/ReviewRequestModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/ReviewRequestModel.java @@ -27,7 +27,7 @@ import lombok.Setter; dest.writeTypedList(this.comments); } - protected ReviewRequestModel(Parcel in) { + private ReviewRequestModel(Parcel in) { this.commitId = in.readString(); this.body = in.readString(); this.event = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/SlackInvitePostModel.java b/app/src/main/java/com/fastaccess/data/dao/SlackInvitePostModel.java index e7ca64c6..ee147436 100644 --- a/app/src/main/java/com/fastaccess/data/dao/SlackInvitePostModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/SlackInvitePostModel.java @@ -25,7 +25,7 @@ import lombok.Setter; public SlackInvitePostModel() {} - protected SlackInvitePostModel(Parcel in) { + private SlackInvitePostModel(Parcel in) { this.email = in.readString(); this.first_name = in.readString(); this.last_name = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/SlackResponseModel.java b/app/src/main/java/com/fastaccess/data/dao/SlackResponseModel.java index 72b7b08f..d30da669 100644 --- a/app/src/main/java/com/fastaccess/data/dao/SlackResponseModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/SlackResponseModel.java @@ -23,7 +23,7 @@ import lombok.Setter; public SlackResponseModel() {} - protected SlackResponseModel(Parcel in) { + private SlackResponseModel(Parcel in) { this.ok = in.readByte() != 0; this.error = in.readString(); } diff --git a/app/src/main/java/com/fastaccess/data/dao/StatusesModel.java b/app/src/main/java/com/fastaccess/data/dao/StatusesModel.java index 29c32fc4..adcda4e0 100644 --- a/app/src/main/java/com/fastaccess/data/dao/StatusesModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/StatusesModel.java @@ -39,7 +39,7 @@ import lombok.Setter; dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1); } - protected StatusesModel(Parcel in) { + private StatusesModel(Parcel in) { this.url = in.readString(); this.id = in.readInt(); int tmpState = in.readInt(); diff --git a/app/src/main/java/com/fastaccess/data/dao/WikiModel.java b/app/src/main/java/com/fastaccess/data/dao/WikiModel.java index d84b543c..02c85ead 100644 --- a/app/src/main/java/com/fastaccess/data/dao/WikiModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/WikiModel.java @@ -32,7 +32,7 @@ import lombok.Setter; dest.writeString(this.htmlUrl); } - protected WikiModel(Parcel in) { + private WikiModel(Parcel in) { this.pageName = in.readString(); this.title = in.readString(); this.summary = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java index 68713dc9..fc89b57b 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/AuthorModel.java @@ -23,7 +23,7 @@ import lombok.Setter; dest.writeLong(this.date != null ? this.date.getTime() : -1); } - protected AuthorModel(Parcel in) { + private AuthorModel(Parcel in) { this.name = in.readString(); this.email = in.readString(); long tmpDate = in.readLong(); diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java b/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java index 837576c6..4086a577 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/CommentEvent.java @@ -95,7 +95,7 @@ import lombok.Setter; dest.writeParcelable(this.reactions, flags); } - protected CommentEvent(Parcel in) { + private CommentEvent(Parcel in) { this.id = in.readLong(); this.user = in.readParcelable(User.class.getClassLoader()); this.url = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java index a0e546f6..9c091d98 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/ParentsModel.java @@ -21,7 +21,7 @@ import lombok.Setter; public ParentsModel() {} - protected ParentsModel(Parcel in) { + private ParentsModel(Parcel in) { this.sha = in.readString(); this.url = in.readString(); this.htmlUrl = in.readString(); diff --git a/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java index 5eadd86d..3efcfe06 100644 --- a/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java +++ b/app/src/main/java/com/fastaccess/data/dao/timeline/SourceModel.java @@ -35,7 +35,7 @@ import lombok.Setter; dest.writeParcelable(this.repository, flags); } - protected SourceModel(Parcel in) { + private SourceModel(Parcel in) { this.type = in.readString(); this.issue = in.readParcelable(Issue.class.getClassLoader()); this.pullRequest = in.readParcelable(PullRequest.class.getClassLoader()); diff --git a/app/src/main/java/com/fastaccess/data/dao/wiki/WikiContentModel.kt b/app/src/main/java/com/fastaccess/data/dao/wiki/WikiContentModel.kt index 4428ea5c..a8cc9162 100644 --- a/app/src/main/java/com/fastaccess/data/dao/wiki/WikiContentModel.kt +++ b/app/src/main/java/com/fastaccess/data/dao/wiki/WikiContentModel.kt @@ -6,7 +6,7 @@ import android.os.Parcelable /** * Created by Kosh on 13 Jun 2017, 8:06 PM */ -data class WikiContentModel(val content: String? = null, val footer: String? = null, +data class WikiContentModel(val content: String? = null, private val footer: String? = null, val sidebar: ArrayList) : Parcelable { companion object { @JvmField val CREATOR: Parcelable.Creator = object : Parcelable.Creator { diff --git a/app/src/main/java/com/fastaccess/helper/Bundler.java b/app/src/main/java/com/fastaccess/helper/Bundler.java index 8f682783..409819f0 100644 --- a/app/src/main/java/com/fastaccess/helper/Bundler.java +++ b/app/src/main/java/com/fastaccess/helper/Bundler.java @@ -185,7 +185,7 @@ public class Bundler { /** * Get the underlying start. */ - public Bundle get() { + private Bundle get() { return bundle; } diff --git a/app/src/main/java/com/fastaccess/helper/CustomTabsHelper.java b/app/src/main/java/com/fastaccess/helper/CustomTabsHelper.java index e90232b5..722820ed 100644 --- a/app/src/main/java/com/fastaccess/helper/CustomTabsHelper.java +++ b/app/src/main/java/com/fastaccess/helper/CustomTabsHelper.java @@ -12,7 +12,7 @@ import android.util.Log; import java.util.ArrayList; import java.util.List; -public class CustomTabsHelper { +class CustomTabsHelper { private static final String TAG = "CustomTabsHelper"; private static final String STABLE_PACKAGE = "com.android.chrome"; private static final String BETA_PACKAGE = "com.chrome.beta"; diff --git a/app/src/main/java/com/fastaccess/provider/theme/ThemeEngine.kt b/app/src/main/java/com/fastaccess/provider/theme/ThemeEngine.kt index dfdfc238..81477840 100644 --- a/app/src/main/java/com/fastaccess/provider/theme/ThemeEngine.kt +++ b/app/src/main/java/com/fastaccess/provider/theme/ThemeEngine.kt @@ -57,7 +57,7 @@ object ThemeEngine { setTaskDescription(activity) } - @StyleRes fun getTheme(themeMode: Int, themeColor: Int): Int { + @StyleRes private fun getTheme(themeMode: Int, themeColor: Int): Int { Logger.e(themeMode, themeColor) // I wish if I could simplify this :'( too many cases for the love of god. when (themeMode) { @@ -156,7 +156,7 @@ object ThemeEngine { return R.style.ThemeLight } - @StyleRes fun getDialogTheme(themeMode: Int, themeColor: Int): Int { + @StyleRes private fun getDialogTheme(themeMode: Int, themeColor: Int): Int { when (themeMode) { PrefGetter.LIGHT -> when (themeColor) { PrefGetter.RED -> return R.style.DialogThemeLight_Red diff --git a/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java b/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java index c8be02e4..3814968b 100644 --- a/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java +++ b/app/src/main/java/com/fastaccess/provider/timeline/CommentsHelper.java @@ -62,7 +62,7 @@ public class CommentsHelper { } } - public static String getEmojiByUnicode(int unicode) { + private static String getEmojiByUnicode(int unicode) { return new String(Character.toChars(unicode)); } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java index a8dc20e0..e22fa0b5 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java +++ b/app/src/main/java/com/fastaccess/ui/adapter/IssuesTimelineAdapter.java @@ -33,9 +33,9 @@ public class IssuesTimelineAdapter extends BaseRecyclerAdapter data, OnToggleView onToggleView, boolean showEmojies, - ReactionsCallback reactionsCallback, boolean isMerged, - ReviewCommentCallback reviewCommentCallback, String repoOwner, String poster) { + private IssuesTimelineAdapter(@NonNull List data, OnToggleView onToggleView, boolean showEmojies, + ReactionsCallback reactionsCallback, boolean isMerged, + ReviewCommentCallback reviewCommentCallback, String repoOwner, String poster) { super(data); this.onToggleView = onToggleView; this.showEmojies = showEmojies; diff --git a/app/src/main/java/com/fastaccess/ui/adapter/LoginAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/LoginAdapter.kt index da012001..f554840e 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/LoginAdapter.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/LoginAdapter.kt @@ -9,7 +9,7 @@ import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder /** * Created by Kosh on 09 Jul 2017, 5:00 PM */ -class LoginAdapter constructor(val small: Boolean = false) : BaseRecyclerAdapter>() { +class LoginAdapter constructor(private val small: Boolean = false) : BaseRecyclerAdapter>() { override fun onBindView(holder: LoginViewHolder, position: Int) { holder.bind(getItem(position)) diff --git a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt index fbf48388..425c0859 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/PullRequestTimelineAdapter.kt @@ -15,12 +15,12 @@ import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder.OnItemClickListener /** * Created by kosh on 03/08/2017. */ -class PullRequestTimelineAdapter constructor(val data: ArrayList, - internal var onToggleView: OnToggleView, - internal var reactionsCallback: ReactionsCallback, +class PullRequestTimelineAdapter constructor(private val data: ArrayList, + private var onToggleView: OnToggleView, + private var reactionsCallback: ReactionsCallback, internal var isMerged: Boolean = false, - internal var repoOwner: String, - internal var poster: String) : BaseRecyclerAdapter, OnItemClickListener>(data) { override fun viewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt index d5600260..3afcb1c4 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/LoginViewHolder.kt @@ -19,8 +19,8 @@ import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder class LoginViewHolder private constructor(itemView: View, adapter: BaseRecyclerAdapter<*, *, *>?) : BaseViewHolder(itemView, adapter) { - val avatarLayout: AvatarLayout? by bindOptionalView(R.id.avatarLayout) - val title: FontTextView by bindView(R.id.title) + private val avatarLayout: AvatarLayout? by bindOptionalView(R.id.avatarLayout) + private val title: FontTextView by bindView(R.id.title) @SuppressLint("SetTextI18n") override fun bind(login: Login) { diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt index c4ecb5cb..2a61c4a0 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/PullRequestEventViewHolder.kt @@ -26,7 +26,7 @@ import pr.PullRequestTimelineQuery * Created by kosh on 03/08/2017. */ -class PullRequestEventViewHolder private constructor(val view: View, adapter: BaseRecyclerAdapter<*, *, *>) : +class PullRequestEventViewHolder private constructor(private val view: View, adapter: BaseRecyclerAdapter<*, *, *>) : BaseViewHolder(view, adapter) { @BindView(R.id.stateImage) lateinit var stateImage: ForegroundImageView @@ -68,7 +68,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("unlocked this conversation") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_lock) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -84,7 +84,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_label) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -99,7 +99,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.user()?.login()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_profile) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -112,7 +112,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("reopened this") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_issue_opened) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -126,7 +126,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append("changed the title from").append(" ").append(event.previousTitle()) .append(" ").append("to").append(" ").bold(event.currentTitle()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_edit) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -159,7 +159,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba event.commitRepository().nameWithOwner() }) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -174,7 +174,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.milestoneTitle()).append(" ").append("milestone") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_milestone) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -195,7 +195,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(":") .append(event.mergeRefName(), BackgroundColorSpan(HtmlHelper.getWindowBackground(PrefGetter.getThemeType()))) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -208,7 +208,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("locked and limited conversation to collaborators") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_lock) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -224,7 +224,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.label().name(), CodeSpan(color, ViewHelper.generateTextColor(color), 5.0f)) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_label) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -243,7 +243,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("branch") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -258,7 +258,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.afterCommit().oid().toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -277,7 +277,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append("branch") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_trash) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -292,7 +292,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.deployment().latestStatus()?.state()?.name) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -307,7 +307,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.milestoneTitle()).append(" ").append("milestone") .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_milestone) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -324,7 +324,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.oid().toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.committedDate()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.committedDate().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.user()?.avatarUrl().toString(), it.user()?.login(), false, LinkParserHelper.isEnterprise(it.user()?.url().toString())) @@ -340,7 +340,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.commit()?.oid()?.toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_merge) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -355,7 +355,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .url(substring(event.afterCommit().oid().toString())) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_push) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } @@ -370,7 +370,7 @@ class PullRequestEventViewHolder private constructor(val view: View, adapter: Ba .append(" ") .append(event.user()?.login()) .append(" ") - .append(ParseDateFormat.getTimeAgo((event.createdAt()?.toString()))) + .append(ParseDateFormat.getTimeAgo((event.createdAt().toString()))) stateImage.setImageResource(R.drawable.ic_profile) avatarLayout.setUrl(it.avatarUrl().toString(), it.login(), false, LinkParserHelper.isEnterprise(it.url().toString())) } diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TrendingViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TrendingViewHolder.kt index 8f4e8ed8..67533a89 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TrendingViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/TrendingViewHolder.kt @@ -18,12 +18,12 @@ import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder open class TrendingViewHolder(itemView: View, adapter: BaseRecyclerAdapter>) : BaseViewHolder(itemView, adapter) { - val title: FontTextView by bindView(R.id.title) - val description: FontTextView by bindView(R.id.description) - val todayStars: FontTextView by bindView(R.id.todayStars) - val stars: FontTextView by bindView(R.id.stars) - val fork: FontTextView by bindView(R.id.forks) - val lang: FontTextView by bindView(R.id.language) + private val title: FontTextView by bindView(R.id.title) + private val description: FontTextView by bindView(R.id.description) + private val todayStars: FontTextView by bindView(R.id.todayStars) + private val stars: FontTextView by bindView(R.id.stars) + private val fork: FontTextView by bindView(R.id.forks) + private val lang: FontTextView by bindView(R.id.language) override fun bind(t: TrendingModel) { title.text = t.title diff --git a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt index e2d0d440..6fe1a3cf 100644 --- a/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt +++ b/app/src/main/java/com/fastaccess/ui/adapter/viewholder/UnknownTypeViewHolder.kt @@ -6,6 +6,6 @@ import com.fastaccess.ui.widgets.recyclerview.BaseViewHolder /** * Created by kosh on 07/08/2017. */ -class UnknownTypeViewHolder(val view: View) : BaseViewHolder(view) { +class UnknownTypeViewHolder(private val view: View) : BaseViewHolder(view) { override fun bind(t: Any) {} //DO NOTHING } \ No newline at end of file diff --git a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java index 0fb10620..b3a60310 100644 --- a/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java +++ b/app/src/main/java/com/fastaccess/ui/base/BaseActivity.java @@ -63,9 +63,9 @@ public abstract class BaseActivity, val extraNav: NavigationView?, val accountsNav: NavigationView?) +class MainNavDrawer(val view: BaseActivity<*, *>, private val extraNav: NavigationView?, private val accountsNav: NavigationView?) : BaseViewHolder.OnItemClickListener { - var menusHolder: ViewGroup? = null - val togglePinned: View? = view.findViewById(R.id.togglePinned) - val pinnedList: DynamicRecyclerView? = view.findViewById(R.id.pinnedList) - val pinnedListAdapter = PinnedReposAdapter(true) - val userModel: Login? = Login.getUser() + private var menusHolder: ViewGroup? = null + private val togglePinned: View? = view.findViewById(R.id.togglePinned) + private val pinnedList: DynamicRecyclerView? = view.findViewById(R.id.pinnedList) + private val pinnedListAdapter = PinnedReposAdapter(true) + private val userModel: Login? = Login.getUser() init { menusHolder = view.findViewById(R.id.menusHolder) diff --git a/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java b/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java index 2e1b097d..961a9a03 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/editor/EditorActivity.java @@ -165,9 +165,7 @@ public class EditorActivity extends BaseActivity { - PrefHelper.set("sent_via", isChecked); - }); + sentVia.setOnCheckedChangeListener((buttonView, isChecked) -> PrefHelper.set("sent_via", isChecked)); MarkDownProvider.setMdText(sentVia, sentFromFastHub); if (savedInstanceState == null) { onCreate(); diff --git a/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt index da839eff..3636e54d 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/login/chooser/LoginChooserActivity.kt @@ -30,12 +30,12 @@ import java.util.* class LoginChooserActivity : BaseActivity(), LoginChooserMvp.View { - val language_selector: RelativeLayout by bindView(R.id.language_selector) - val recycler: DynamicRecyclerView by bindView(R.id.recycler) - val multiAccLayout: View by bindView(R.id.multiAccLayout) - val viewGroup: CoordinatorLayout by bindView(R.id.viewGroup) - val toggleImage: View by bindView(R.id.toggleImage) - val adapter = LoginAdapter() + private val language_selector: RelativeLayout by bindView(R.id.language_selector) + private val recycler: DynamicRecyclerView by bindView(R.id.recycler) + private val multiAccLayout: View by bindView(R.id.multiAccLayout) + private val viewGroup: CoordinatorLayout by bindView(R.id.viewGroup) + private val toggleImage: View by bindView(R.id.toggleImage) + private val adapter = LoginAdapter() override fun layout(): Int = R.layout.login_chooser_layout diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java b/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java index 149aef43..5d6fe076 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java +++ b/app/src/main/java/com/fastaccess/ui/modules/main/donation/DonationActivity.java @@ -85,7 +85,7 @@ public class DonationActivity extends BaseActivity { } } - protected void checkPurchase() { + private void checkPurchase() { ((BasePresenter) getPresenter()).manageViewDisposable(RxBillingService.getInstance(this, BuildConfig.DEBUG) .getPurchases(ProductType.IN_APP) .subscribe((purchases, throwable) -> { diff --git a/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt index d331264b..b2628a0b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/main/premium/PremiumActivity.kt @@ -26,9 +26,9 @@ import com.fastaccess.ui.widgets.bindView */ class PremiumActivity : BaseActivity(), PremiumMvp.View { - val editText: EditText by bindView(R.id.editText) - val progressLayout: View by bindView(R.id.progressLayout) - val viewGroup: FrameLayout by bindView(R.id.viewGroup) + private val editText: EditText by bindView(R.id.editText) + private val progressLayout: View by bindView(R.id.progressLayout) + private val viewGroup: FrameLayout by bindView(R.id.viewGroup) override fun layout(): Int = R.layout.pro_features_layout diff --git a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java index 7550e035..ddfb9270 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/notification/all/AllNotificationsPresenter.java @@ -26,7 +26,7 @@ import io.reactivex.Observable; */ public class AllNotificationsPresenter extends BasePresenter implements AllNotificationsMvp.Presenter { - private ArrayList notifications = new ArrayList<>(); + private final ArrayList notifications = new ArrayList<>(); @Override public void onItemClick(int position, View v, GroupedNotificationModel model) { if (getView() == null) return; diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesFragment.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesFragment.kt index 5caacfe1..36390821 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesFragment.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/BranchesFragment.kt @@ -20,14 +20,14 @@ import com.fastaccess.ui.widgets.recyclerview.scroll.RecyclerViewFastScroller * Created by Kosh on 06 Jul 2017, 9:48 PM */ class BranchesFragment : BaseFragment(), BranchesMvp.View { - val recycler: DynamicRecyclerView by lazy { view!!.findViewById(R.id.recycler) } - val refresh: SwipeRefreshLayout by lazy { view!!.findViewById(R.id.refresh) } - val stateLayout: StateLayout by lazy { view!!.findViewById(R.id.stateLayout) } - val fastScroller: RecyclerViewFastScroller by lazy { view!!.findViewById(R.id.fastScroller) } + private val recycler: DynamicRecyclerView by lazy { view!!.findViewById(R.id.recycler) } + private val refresh: SwipeRefreshLayout by lazy { view!!.findViewById(R.id.refresh) } + private val stateLayout: StateLayout by lazy { view!!.findViewById(R.id.stateLayout) } + private val fastScroller: RecyclerViewFastScroller by lazy { view!!.findViewById(R.id.fastScroller) } private var onLoadMore: OnLoadMore? = null private var branchCallback: BranchesPagerListener? = null - val adapter by lazy { BranchesAdapter(presenter.branches, presenter) } + private val adapter by lazy { BranchesAdapter(presenter.branches, presenter) } override fun onAttach(context: Context) { super.onAttach(context) diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/pager/BranchesPagerFragment.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/pager/BranchesPagerFragment.kt index 53044da8..23cbd3e5 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/pager/BranchesPagerFragment.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/branches/pager/BranchesPagerFragment.kt @@ -21,9 +21,9 @@ import com.fastaccess.ui.modules.repos.extras.branches.BranchesMvp * Created by kosh on 15/07/2017. */ class BranchesPagerFragment : BaseDialogFragment>(), BranchesPagerListener { - val pager: ViewPager by lazy { view!!.findViewById(R.id.pager) } - val tabs: TabLayout by lazy { view!!.findViewById(R.id.tabs) } - val toolbar: Toolbar by lazy { view!!.findViewById(R.id.toolbar) } + private val pager: ViewPager by lazy { view!!.findViewById(R.id.pager) } + private val tabs: TabLayout by lazy { view!!.findViewById(R.id.tabs) } + private val toolbar: Toolbar by lazy { view!!.findViewById(R.id.toolbar) } private var branchCallback: BranchesMvp.BranchSelectionListener? = null override fun onAttach(context: Context) { diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/create/CreateLabelDialogFragment.java b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/create/CreateLabelDialogFragment.java index c69bd3dd..c5ea19d6 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/create/CreateLabelDialogFragment.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/labels/create/CreateLabelDialogFragment.java @@ -79,7 +79,6 @@ public class CreateLabelDialogFragment extends BaseDialogFragment(R.id.stateLayout) } + private val stateLayout: StateLayout by lazy { view!!.findViewById(R.id.stateLayout) } - val loader: ProgressBar by lazy { view!!.findViewById(R.id.readmeLoader) } - val webView: PrettifyWebView by lazy { view!!.findViewById(R.id.webView) } - val licenseName: TextView by lazy { view!!.findViewById(R.id.licenseName) } + private val loader: ProgressBar by lazy { view!!.findViewById(R.id.readmeLoader) } + private val webView: PrettifyWebView by lazy { view!!.findViewById(R.id.webView) } + private val licenseName: TextView by lazy { view!!.findViewById(R.id.licenseName) } override fun providePresenter(): RepoLicensePresenter = RepoLicensePresenter() diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/license/RepoLicensePresenter.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/license/RepoLicensePresenter.kt index d7d6ff57..4db1f0ff 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/license/RepoLicensePresenter.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/license/RepoLicensePresenter.kt @@ -9,7 +9,7 @@ import com.fastaccess.ui.base.mvp.presenter.BasePresenter class RepoLicensePresenter : BasePresenter(), RepoLicenseMvp.Presenter { override fun onLoadLicense(login: String, repo: String) { - makeRestCall(RestProvider.getRepoService(isEnterprise()).getLicense(login, repo), + makeRestCall(RestProvider.getRepoService(isEnterprise).getLicense(login, repo), { license -> sendToView { it.onLicenseLoaded(license) } }) } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/popup/IssuePopupPresenter.java b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/popup/IssuePopupPresenter.java index 906b82da..7aa24dab 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/extras/popup/IssuePopupPresenter.java +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/extras/popup/IssuePopupPresenter.java @@ -16,7 +16,7 @@ public class IssuePopupPresenter extends BasePresenter imple CommentRequestModel requestModel = new CommentRequestModel(); requestModel.setBody(text); makeRestCall(RestProvider.getIssueService(isEnterprise()).createIssueComment(login, repoId, issueNumber, requestModel), - comment -> sendToView(view -> view.onSuccessfullySubmitted())); + comment -> sendToView(IssuePopupMvp.View::onSuccessfullySubmitted)); } diff --git a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt index 10faabeb..9f12547b 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/repos/wiki/WikiActivity.kt @@ -30,11 +30,11 @@ import com.prettifier.pretty.PrettifyWebView */ class WikiActivity : BaseActivity(), WikiMvp.View { - val navMenu: NavigationView by bindView(R.id.wikiSidebar) - val drawerLayout: DrawerLayout by bindView(R.id.drawer) - val progressbar: ProgressBar by bindView(R.id.progress) - val stateLayout: StateLayout by bindView(R.id.stateLayout) - val webView: PrettifyWebView by bindView(R.id.webView) + private val navMenu: NavigationView by bindView(R.id.wikiSidebar) + private val drawerLayout: DrawerLayout by bindView(R.id.drawer) + private val progressbar: ProgressBar by bindView(R.id.progress) + private val stateLayout: StateLayout by bindView(R.id.stateLayout) + private val webView: PrettifyWebView by bindView(R.id.webView) @State var wiki = WikiContentModel(null, null, arrayListOf()) diff --git a/app/src/main/java/com/fastaccess/ui/modules/reviews/AddReviewDialogFragment.kt b/app/src/main/java/com/fastaccess/ui/modules/reviews/AddReviewDialogFragment.kt index 9ba284dc..7378f377 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/reviews/AddReviewDialogFragment.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/reviews/AddReviewDialogFragment.kt @@ -25,11 +25,11 @@ import com.fastaccess.ui.widgets.SpannableBuilder */ class AddReviewDialogFragment : BaseDialogFragment>() { - val toolbar: Toolbar by lazy { view!!.findViewById(R.id.toolbar) } - val textView: TextView by lazy { view!!.findViewById(R.id.text) } - val lineNo: TextView by lazy { view!!.findViewById(R.id.lineNo) } - val editText: TextInputLayout by lazy { view!!.findViewById(R.id.editText) } - val spacePattern = "\\s+".toRegex() + private val toolbar: Toolbar by lazy { view!!.findViewById(R.id.toolbar) } + private val textView: TextView by lazy { view!!.findViewById(R.id.text) } + private val lineNo: TextView by lazy { view!!.findViewById(R.id.lineNo) } + private val editText: TextInputLayout by lazy { view!!.findViewById(R.id.editText) } + private val spacePattern = "\\s+".toRegex() private var commentCallback: ReviewCommentListener? = null diff --git a/app/src/main/java/com/fastaccess/ui/modules/reviews/changes/ReviewChangesActivity.kt b/app/src/main/java/com/fastaccess/ui/modules/reviews/changes/ReviewChangesActivity.kt index 58a7799c..d672a799 100644 --- a/app/src/main/java/com/fastaccess/ui/modules/reviews/changes/ReviewChangesActivity.kt +++ b/app/src/main/java/com/fastaccess/ui/modules/reviews/changes/ReviewChangesActivity.kt @@ -26,8 +26,8 @@ class ReviewChangesActivity : BaseActivity(), NotificationSoundMvp.View { - val title: FontTextView by lazy { view!!.findViewById(R.id.title) } - val radioGroup: RadioGroup by lazy { view!!.findViewById(R.id.picker) } - val okButton: Button by lazy { view!!.findViewById