{"action":"created","comment":{"url":"https://api.github.com/repos/travis-ci/travis-api/pulls/comments/51401473","id":51401473,"diff_hunk":"@@ -9,6 +9,8 @@ module Services\n     Broadcasts    = Module.new { extend Services }\n     Build         = Module.new { extend Services }\n     Builds        = Module.new { extend Services }\n+    Cron          = Module.new { extend Services }\n+    Crons         = Module.new { extend Services }","path":"lib/travis/api/v3/services.rb","position":5,"original_position":5,"commit_id":"64478d50d1540bb40c153174870c32cfb1051cc2","original_commit_id":"64478d50d1540bb40c153174870c32cfb1051cc2","user":{"login":"rkh","id":30442,"avatar_url":"https://avatars.githubusercontent.com/u/30442?v=3","gravatar_id":"","url":"https://api.github.com/users/rkh","html_url":"https://github.com/rkh","followers_url":"https://api.github.com/users/rkh/followers","following_url":"https://api.github.com/users/rkh/following{/other_user}","gists_url":"https://api.github.com/users/rkh/gists{/gist_id}","starred_url":"https://api.github.com/users/rkh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkh/subscriptions","organizations_url":"https://api.github.com/users/rkh/orgs","repos_url":"https://api.github.com/users/rkh/repos","events_url":"https://api.github.com/users/rkh/events{/privacy}","received_events_url":"https://api.github.com/users/rkh/received_events","type":"User","site_admin":false},"body":"Looks good! :+1:","created_at":"2016-02-01T10:29:50Z","updated_at":"2016-02-01T10:29:50Z","html_url":"https://github.com/travis-ci/travis-api/pull/225#discussion_r51401473","pull_request_url":"https://api.github.com/repos/travis-ci/travis-api/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/comments/51401473"},"html":{"href":"https://github.com/travis-ci/travis-api/pull/225#discussion_r51401473"},"pull_request":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/travis-ci/travis-api/pulls/225","id":56743736,"html_url":"https://github.com/travis-ci/travis-api/pull/225","diff_url":"https://github.com/travis-ci/travis-api/pull/225.diff","patch_url":"https://github.com/travis-ci/travis-api/pull/225.patch","issue_url":"https://api.github.com/repos/travis-ci/travis-api/issues/225","number":225,"state":"open","locked":false,"title":"Cronjobs","user":{"login":"Nef10","id":4551135,"avatar_url":"https://avatars.githubusercontent.com/u/4551135?v=3","gravatar_id":"","url":"https://api.github.com/users/Nef10","html_url":"https://github.com/Nef10","followers_url":"https://api.github.com/users/Nef10/followers","following_url":"https://api.github.com/users/Nef10/following{/other_user}","gists_url":"https://api.github.com/users/Nef10/gists{/gist_id}","starred_url":"https://api.github.com/users/Nef10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nef10/subscriptions","organizations_url":"https://api.github.com/users/Nef10/orgs","repos_url":"https://api.github.com/users/Nef10/repos","events_url":"https://api.github.com/users/Nef10/events{/privacy}","received_events_url":"https://api.github.com/users/Nef10/received_events","type":"User","site_admin":false},"body":"This PR adds support for cron build to travis_api.\r\n\r\nVia 5 new endpoints you can create, get and delete cron jobs for repositories:\r\n```\r\nGET    /v3/cron/{cron.id}\r\nDELETE /v3/cron/{cron.id}\r\nGET    /v3/repo/{repository.id|repository.slug}/crons\r\nGET    /v3/repo/{repository.id|repository.slug}/branch/{branch.name}/cron\r\nPOST   /v3/repo/{repository.id|repository.slug}/branch/{branch.name}/cron\r\n```\r\n\r\nThe ```create``` endpoint accepts the following JSON example:\r\n```\r\n{\r\n   interval: 'daily'|'weekly'|'monthly'\r\n   disable_by_push: true\r\n}\r\n```\r\nThe requested cron jobs are added into the ```cron``` table, the db migration is in travis-ci/travis-core#510\r\n\r\nThe **question** is where the start_all method should be called.\r\n\r\nTest tests are failing because this PR requires the DB migration.\r\n\r\nMockup for updated settings page:\r\n\r\n![screenshot 2016-01-21 15 18 12](https://cloud.githubusercontent.com/assets/4551135/12482891/66c04828-c052-11e5-885a-f15cbc217d4e.png)\r\n","created_at":"2016-01-21T12:39:28Z","updated_at":"2016-02-01T10:29:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"267678e3c3dc8d0ec32f69caffdf65ef75967da3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/travis-ci/travis-api/pulls/225/commits","review_comments_url":"https://api.github.com/repos/travis-ci/travis-api/pulls/225/comments","review_comment_url":"https://api.github.com/repos/travis-ci/travis-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/travis-ci/travis-api/issues/225/comments","statuses_url":"https://api.github.com/repos/travis-ci/travis-api/statuses/64478d50d1540bb40c153174870c32cfb1051cc2","head":{"label":"HPI-BP2015H:cronjobs","ref":"cronjobs","sha":"64478d50d1540bb40c153174870c32cfb1051cc2","user":{"login":"HPI-BP2015H","id":15087662,"avatar_url":"https://avatars.githubusercontent.com/u/15087662?v=3","gravatar_id":"","url":"https://api.github.com/users/HPI-BP2015H","html_url":"https://github.com/HPI-BP2015H","followers_url":"https://api.github.com/users/HPI-BP2015H/followers","following_url":"https://api.github.com/users/HPI-BP2015H/following{/other_user}","gists_url":"https://api.github.com/users/HPI-BP2015H/gists{/gist_id}","starred_url":"https://api.github.com/users/HPI-BP2015H/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HPI-BP2015H/subscriptions","organizations_url":"https://api.github.com/users/HPI-BP2015H/orgs","repos_url":"https://api.github.com/users/HPI-BP2015H/repos","events_url":"https://api.github.com/users/HPI-BP2015H/events{/privacy}","received_events_url":"https://api.github.com/users/HPI-BP2015H/received_events","type":"Organization","site_admin":false},"repo":{"id":45170369,"name":"travis-api","full_name":"HPI-BP2015H/travis-api","owner":{"login":"HPI-BP2015H","id":15087662,"avatar_url":"https://avatars.githubusercontent.com/u/15087662?v=3","gravatar_id":"","url":"https://api.github.com/users/HPI-BP2015H","html_url":"https://github.com/HPI-BP2015H","followers_url":"https://api.github.com/users/HPI-BP2015H/followers","following_url":"https://api.github.com/users/HPI-BP2015H/following{/other_user}","gists_url":"https://api.github.com/users/HPI-BP2015H/gists{/gist_id}","starred_url":"https://api.github.com/users/HPI-BP2015H/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HPI-BP2015H/subscriptions","organizations_url":"https://api.github.com/users/HPI-BP2015H/orgs","repos_url":"https://api.github.com/users/HPI-BP2015H/repos","events_url":"https://api.github.com/users/HPI-BP2015H/events{/privacy}","received_events_url":"https://api.github.com/users/HPI-BP2015H/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HPI-BP2015H/travis-api","description":"The public Travis API","fork":true,"url":"https://api.github.com/repos/HPI-BP2015H/travis-api","forks_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/forks","keys_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/teams","hooks_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/hooks","issue_events_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/issues/events{/number}","events_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/events","assignees_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/assignees{/user}","branches_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/branches{/branch}","tags_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/tags","blobs_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/statuses/{sha}","languages_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/languages","stargazers_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/stargazers","contributors_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/contributors","subscribers_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/subscribers","subscription_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/subscription","commits_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/contents/{+path}","compare_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/merges","archive_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/downloads","issues_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/issues{/number}","pulls_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/pulls{/number}","milestones_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/milestones{/number}","notifications_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/labels{/name}","releases_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/releases{/id}","deployments_url":"https://api.github.com/repos/HPI-BP2015H/travis-api/deployments","created_at":"2015-10-29T08:34:03Z","updated_at":"2016-01-28T12:21:23Z","pushed_at":"2016-01-28T16:23:48Z","git_url":"git://github.com/HPI-BP2015H/travis-api.git","ssh_url":"git@github.com:HPI-BP2015H/travis-api.git","clone_url":"https://github.com/HPI-BP2015H/travis-api.git","svn_url":"https://github.com/HPI-BP2015H/travis-api","homepage":"https://api.travis-ci.org","size":2202,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"travis-ci:master","ref":"master","sha":"1640c444deed91c5c566088b0259a8b23ac74e78","user":{"login":"travis-ci","id":639823,"avatar_url":"https://avatars.githubusercontent.com/u/639823?v=3","gravatar_id":"","url":"https://api.github.com/users/travis-ci","html_url":"https://github.com/travis-ci","followers_url":"https://api.github.com/users/travis-ci/followers","following_url":"https://api.github.com/users/travis-ci/following{/other_user}","gists_url":"https://api.github.com/users/travis-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/travis-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travis-ci/subscriptions","organizations_url":"https://api.github.com/users/travis-ci/orgs","repos_url":"https://api.github.com/users/travis-ci/repos","events_url":"https://api.github.com/users/travis-ci/events{/privacy}","received_events_url":"https://api.github.com/users/travis-ci/received_events","type":"Organization","site_admin":false},"repo":{"id":5096124,"name":"travis-api","full_name":"travis-ci/travis-api","owner":{"login":"travis-ci","id":639823,"avatar_url":"https://avatars.githubusercontent.com/u/639823?v=3","gravatar_id":"","url":"https://api.github.com/users/travis-ci","html_url":"https://github.com/travis-ci","followers_url":"https://api.github.com/users/travis-ci/followers","following_url":"https://api.github.com/users/travis-ci/following{/other_user}","gists_url":"https://api.github.com/users/travis-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/travis-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travis-ci/subscriptions","organizations_url":"https://api.github.com/users/travis-ci/orgs","repos_url":"https://api.github.com/users/travis-ci/repos","events_url":"https://api.github.com/users/travis-ci/events{/privacy}","received_events_url":"https://api.github.com/users/travis-ci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/travis-ci/travis-api","description":"The public Travis API","fork":false,"url":"https://api.github.com/repos/travis-ci/travis-api","forks_url":"https://api.github.com/repos/travis-ci/travis-api/forks","keys_url":"https://api.github.com/repos/travis-ci/travis-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/travis-ci/travis-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/travis-ci/travis-api/teams","hooks_url":"https://api.github.com/repos/travis-ci/travis-api/hooks","issue_events_url":"https://api.github.com/repos/travis-ci/travis-api/issues/events{/number}","events_url":"https://api.github.com/repos/travis-ci/travis-api/events","assignees_url":"https://api.github.com/repos/travis-ci/travis-api/assignees{/user}","branches_url":"https://api.github.com/repos/travis-ci/travis-api/branches{/branch}","tags_url":"https://api.github.com/repos/travis-ci/travis-api/tags","blobs_url":"https://api.github.com/repos/travis-ci/travis-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/travis-ci/travis-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/travis-ci/travis-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/travis-ci/travis-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/travis-ci/travis-api/statuses/{sha}","languages_url":"https://api.github.com/repos/travis-ci/travis-api/languages","stargazers_url":"https://api.github.com/repos/travis-ci/travis-api/stargazers","contributors_url":"https://api.github.com/repos/travis-ci/travis-api/contributors","subscribers_url":"https://api.github.com/repos/travis-ci/travis-api/subscribers","subscription_url":"https://api.github.com/repos/travis-ci/travis-api/subscription","commits_url":"https://api.github.com/repos/travis-ci/travis-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/travis-ci/travis-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/travis-ci/travis-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/travis-ci/travis-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/travis-ci/travis-api/contents/{+path}","compare_url":"https://api.github.com/repos/travis-ci/travis-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/travis-ci/travis-api/merges","archive_url":"https://api.github.com/repos/travis-ci/travis-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/travis-ci/travis-api/downloads","issues_url":"https://api.github.com/repos/travis-ci/travis-api/issues{/number}","pulls_url":"https://api.github.com/repos/travis-ci/travis-api/pulls{/number}","milestones_url":"https://api.github.com/repos/travis-ci/travis-api/milestones{/number}","notifications_url":"https://api.github.com/repos/travis-ci/travis-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/travis-ci/travis-api/labels{/name}","releases_url":"https://api.github.com/repos/travis-ci/travis-api/releases{/id}","deployments_url":"https://api.github.com/repos/travis-ci/travis-api/deployments","created_at":"2012-07-18T12:55:46Z","updated_at":"2016-01-20T12:21:54Z","pushed_at":"2016-01-29T12:34:03Z","git_url":"git://github.com/travis-ci/travis-api.git","ssh_url":"git@github.com:travis-ci/travis-api.git","clone_url":"https://github.com/travis-ci/travis-api.git","svn_url":"https://github.com/travis-ci/travis-api","homepage":"https://api.travis-ci.org","size":2238,"stargazers_count":106,"watchers_count":106,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":7,"forks":47,"open_issues":7,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/225"},"html":{"href":"https://github.com/travis-ci/travis-api/pull/225"},"issue":{"href":"https://api.github.com/repos/travis-ci/travis-api/issues/225"},"comments":{"href":"https://api.github.com/repos/travis-ci/travis-api/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/travis-ci/travis-api/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/travis-ci/travis-api/statuses/64478d50d1540bb40c153174870c32cfb1051cc2"}}}}