{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5160","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5160/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5160/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5160/events","html_url":"https://github.com/travis-ci/travis-ci/issues/5160","id":118664462,"number":5160,"title":"Possibility to only build the latest version of a branch. ","user":{"login":"PommeVerte","id":1415875,"avatar_url":"https://avatars.githubusercontent.com/u/1415875?v=3","gravatar_id":"","url":"https://api.github.com/users/PommeVerte","html_url":"https://github.com/PommeVerte","followers_url":"https://api.github.com/users/PommeVerte/followers","following_url":"https://api.github.com/users/PommeVerte/following{/other_user}","gists_url":"https://api.github.com/users/PommeVerte/gists{/gist_id}","starred_url":"https://api.github.com/users/PommeVerte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PommeVerte/subscriptions","organizations_url":"https://api.github.com/users/PommeVerte/orgs","repos_url":"https://api.github.com/users/PommeVerte/repos","events_url":"https://api.github.com/users/PommeVerte/events{/privacy}","received_events_url":"https://api.github.com/users/PommeVerte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-11-24T17:36:07Z","updated_at":"2016-10-27T02:54:22Z","closed_at":null,"body":"Hey guys,\r\n\r\nI was wondering if it were possible to tell travis to only build the latest version of a branch. If I make 5 merges within 5mn I'm not interested in having each and every one of those merges tested by the CI, same with pushes to branches. Only the latest one is relevant and if an error occurs I can take it locally and revert/test there to fix things.\r\nThis gets really painful if you're constantly dealing with 1h builds and can quickly clog up your history with pending builds.\r\n\r\nIf it isn't possible could this become an option? \r\nIt doesn't necessarily need to close running builds but if any builds are **pending** for the **same** branch then it would discard all but the latest one.\r\n\r\nCheers."},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/256533571","html_url":"https://github.com/travis-ci/travis-ci/issues/5160#issuecomment-256533571","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5160","id":256533571,"user":{"login":"ntwb","id":1016458,"avatar_url":"https://avatars.githubusercontent.com/u/1016458?v=3","gravatar_id":"","url":"https://api.github.com/users/ntwb","html_url":"https://github.com/ntwb","followers_url":"https://api.github.com/users/ntwb/followers","following_url":"https://api.github.com/users/ntwb/following{/other_user}","gists_url":"https://api.github.com/users/ntwb/gists{/gist_id}","starred_url":"https://api.github.com/users/ntwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntwb/subscriptions","organizations_url":"https://api.github.com/users/ntwb/orgs","repos_url":"https://api.github.com/users/ntwb/repos","events_url":"https://api.github.com/users/ntwb/events{/privacy}","received_events_url":"https://api.github.com/users/ntwb/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T02:54:22Z","updated_at":"2016-10-27T02:54:22Z","body":"Just to add from the #6782 issue I opened and now closed:\r\n\r\nAppVeyor include a feature called \"Rolling Builds\":\r\n> https://www.appveyor.com/docs/build-configuration/#rolling-builds\r\n> “Rolling builds” are great for very active OSS projects with lengthy queue. Whenever you do a new commit to the same branch OR pull request all current queued/running builds for that branch or PR are cancelled and the new one is queued. Other words, rolling builds make sure that only the most recent commit is built.\r\n>\r\n> For example, you do commit A to master branch - it’s being queued and then run. Then you do B commit to master branch while A is running - build of A will be cancelled immediately and B is queued. If you do another C commit while B is queued it will be cancelled and C queued.\r\n\r\nIt would be great if Travis CI also offered something similar and easily configurable in `.travis.yml`\r\n\r\n----\r\n\r\nAnd to add the context of our use case, adding @johnbillions comment also:\r\n> For background, [the WordPress project](https://travis-ci.org/aaronjorbin/develop.wordpress/builds) experiences backlogs of builds during periods of frequent pushes (via commits to its svn repo), and a rolling build would be ideal to mitigate this.\r\n"}}
{"actor":{"display_login":"ntwb"}}