Skip to content

Commit

Permalink
fix(travis): Properly return API triggered builds
Browse files Browse the repository at this point in the history
When populating the build dropdown for manual executions, manually triggered builds are missing for Travis Enterprise version 3.0.54 and newer.
Before these builds had the same `event_type=push` as other builds, but now they have `event_type=api`. Adding `api` to the filtering fixes the issue.
  • Loading branch information
jervi committed May 8, 2024
1 parent ff4019b commit 63a5a50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public List<GenericBuild> getBuilds(String inputRepoSlug) {
getAccessToken(),
repoSlug,
branch,
"push",
"push,api",
buildResultLimit,
addLogCompleteIfApplicable());
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ class TravisServiceSpec extends Specification {
service.accessToken = accessToken

when:
def genericBuilds = service.getBuilds("my/slug")
def genericBuilds = service.getBuilds("my/slug/master")

then:
1 * client.v3builds("token someToken", "my/slug", TRAVIS_BUILD_RESULT_LIMIT,
1 * client.v3builds("token someToken", "my/slug", "master", "push,api", TRAVIS_BUILD_RESULT_LIMIT,
legacyLogFetching ? null : "build.log_complete") >> new V3Builds([builds: [build]])
(isLogCompleteFlag ? 0 : 1) * travisCache.getJobLog("travis-ci", 2) >> (isLogCached ? "log" : null)
(!isLogCompleteFlag && !isLogCached ? 1 : 0) * client.jobLog("token someToken", 2) >> v3log
Expand Down

0 comments on commit 63a5a50

Please sign in to comment.