Skip to content

Commit 2903046

Browse files
committed
Merge pull request #49 from SethTisue/issue/48
fix #48 (handle more than 30 commits in a PR)
2 parents daa87b2 + d05150c commit 2903046

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: scala
22
script:
33
- sbt ++$TRAVIS_SCALA_VERSION compile
44
scala:
5-
- 2.11.6
5+
- 2.11.7
66
# we actually build and run on openjdk8 in production, see scala-jenkins-infra.
77
# but (as of June 2015) Travis only supports Oracle Java 8, not OpenJDK 8
88
jdk:

build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name := "scabot"
22

33
organization in ThisBuild := "com.typesafe"
44
version in ThisBuild := "0.1.0"
5-
scalaVersion in ThisBuild := "2.11.6"
5+
scalaVersion in ThisBuild := "2.11.7"
66

77
scalacOptions in ThisBuild ++=
88
Seq("-feature", "-deprecation", "-Xfatal-warnings")
99

1010
lazy val deps: Seq[sbt.Def.Setting[_]] = Seq(
1111
libraryDependencies ++= Seq(
12-
"com.typesafe.akka" %% "akka-actor" % "2.3.9",
13-
"com.typesafe.akka" %% "akka-kernel" % "2.3.9",
12+
"com.typesafe.akka" %% "akka-actor" % "2.3.14",
13+
"com.typesafe.akka" %% "akka-kernel" % "2.3.14",
1414
"io.spray" %% "spray-client" % "1.3.2",
1515
"io.spray" %% "spray-json" % "1.3.1"
1616
))

cli.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,20 @@ scala: {
1414
token: ""
1515
}
1616
}
17+
18+
dotty: {
19+
jenkins: {
20+
jobSuffix: ""
21+
host: ""
22+
user: ""
23+
token: ""
24+
}
25+
github: {
26+
user: "lampepfl"
27+
repo: "dotty"
28+
branches: ["master"]
29+
lastCommitOnly: true
30+
host: "api.github.com"
31+
token: ""
32+
}
33+
}

github/src/main/scala/scabot/github/GithubApi.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
// of a user name and a repository name. The user name might be an
77
// individual's, but is more likely an organization name.
88

9+
// A note on pagination: many API calls only return the first n
10+
// results, where n is often 30 but may be 100 or a different
11+
// number depending on the particular call. This can lead to
12+
// random-seeming failage when we happen to exceed the limit.
13+
// For now, we add `per_page` if the limit is found to be a
14+
// problem in practice. per_page cannot be increased past
15+
// 100; if we ever find that's not enough in practice, we'd
16+
// have to add additional code to split the request into
17+
// multiple pages. relevant doc:
18+
// * https://developer.github.com/guides/traversing-with-pagination/
19+
920
package scabot
1021
package github
1122

@@ -163,7 +174,8 @@ trait GithubApiActions extends GithubJsonProtocol with core.HttpClient {
163174
def pullRequests = p[List[PullRequest]] (Get(api("pulls")))
164175
def closedPullRequests = p[List[PullRequest]] (Get(api("pulls") withQuery Map("state" -> "closed")))
165176
def pullRequest(nb: Int) = p[PullRequest] (Get(api("pulls" / nb)))
166-
def pullRequestCommits(nb: Int) = p[List[Commit]] (Get(api("pulls" / nb / "commits")))
177+
def pullRequestCommits(nb: Int) = p[List[Commit]] (Get(api("pulls" / nb / "commits")
178+
withQuery Map("per_page" -> "100")))
167179
def deletePRComment(id: String) = px (Delete(api("pulls" / "comments" / id)))
168180

169181
def issueComments(nb: Int) = p[List[IssueComment]](Get(api("issues" / nb / "comments")))

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 0.13.8
1+
sbt.version = 0.13.9

0 commit comments

Comments
 (0)