{"action":"created","comment":{"url":"https://api.github.com/repos/starkandwayne/shield/pulls/comments/53842777","id":53842777,"diff_hunk":"@@ -82,6 +77,12 @@ func (f *ArchiveFilter) Query() string {\n \t\twheres = append(wheres, fmt.Sprintf(\"expires_at < $%d\", n))\n \t\tn++\n \t}\n+\tlimit := \"\"\n+\tif f.Limit != \"\" {\n+\t\tlimit = fmt.Sprintf(\" LIMIT $%d\", n)\n+\t\tn++\n+\t}\n+","path":"db/archives.go","position":21,"original_position":21,"commit_id":"35cca984312f84b8f54fa3a10f6174d53923302c","original_commit_id":"35cca984312f84b8f54fa3a10f6174d53923302c","user":{"login":"geofffranks","id":7180882,"avatar_url":"https://avatars.githubusercontent.com/u/7180882?v=3","gravatar_id":"","url":"https://api.github.com/users/geofffranks","html_url":"https://github.com/geofffranks","followers_url":"https://api.github.com/users/geofffranks/followers","following_url":"https://api.github.com/users/geofffranks/following{/other_user}","gists_url":"https://api.github.com/users/geofffranks/gists{/gist_id}","starred_url":"https://api.github.com/users/geofffranks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geofffranks/subscriptions","organizations_url":"https://api.github.com/users/geofffranks/orgs","repos_url":"https://api.github.com/users/geofffranks/repos","events_url":"https://api.github.com/users/geofffranks/events{/privacy}","received_events_url":"https://api.github.com/users/geofffranks/received_events","type":"User","site_admin":false},"body":"Can you add an associated test for this, to prevent it from breaking in the future? Probably something using all the filters + limit. Also a comment on the limit block indicating why it must be last","created_at":"2016-02-23T20:15:27Z","updated_at":"2016-02-23T20:15:27Z","html_url":"https://github.com/starkandwayne/shield/pull/114#discussion_r53842777","pull_request_url":"https://api.github.com/repos/starkandwayne/shield/pulls/114","_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/comments/53842777"},"html":{"href":"https://github.com/starkandwayne/shield/pull/114#discussion_r53842777"},"pull_request":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/114"}}},"pull_request":{"url":"https://api.github.com/repos/starkandwayne/shield/pulls/114","id":60377061,"html_url":"https://github.com/starkandwayne/shield/pull/114","diff_url":"https://github.com/starkandwayne/shield/pull/114.diff","patch_url":"https://github.com/starkandwayne/shield/pull/114.patch","issue_url":"https://api.github.com/repos/starkandwayne/shield/issues/114","number":114,"state":"open","locked":false,"title":"restore archive now asks for target instead of job.","user":{"login":"thomasmmitchell","id":12000017,"avatar_url":"https://avatars.githubusercontent.com/u/12000017?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmmitchell","html_url":"https://github.com/thomasmmitchell","followers_url":"https://api.github.com/users/thomasmmitchell/followers","following_url":"https://api.github.com/users/thomasmmitchell/following{/other_user}","gists_url":"https://api.github.com/users/thomasmmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmmitchell/subscriptions","organizations_url":"https://api.github.com/users/thomasmmitchell/orgs","repos_url":"https://api.github.com/users/thomasmmitchell/repos","events_url":"https://api.github.com/users/thomasmmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmmitchell/received_events","type":"User","site_admin":false},"body":"This happens to fix #82.\r\n\r\nAlso, fixed comment for how to make config for s3 plugin.\r\nAlso, fixes a recent bug where archives could not be listed because of a mis-ordering of arguments in the sql query.","created_at":"2016-02-23T17:26:55Z","updated_at":"2016-02-23T20:15:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49b16adaa69929db425ed669383262cd7a39c9b4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/starkandwayne/shield/pulls/114/commits","review_comments_url":"https://api.github.com/repos/starkandwayne/shield/pulls/114/comments","review_comment_url":"https://api.github.com/repos/starkandwayne/shield/pulls/comments{/number}","comments_url":"https://api.github.com/repos/starkandwayne/shield/issues/114/comments","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/35cca984312f84b8f54fa3a10f6174d53923302c","head":{"label":"starkandwayne:restore_archive","ref":"restore_archive","sha":"35cca984312f84b8f54fa3a10f6174d53923302c","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":44686588,"name":"shield","full_name":"starkandwayne/shield","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/shield","description":"A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems","fork":false,"url":"https://api.github.com/repos/starkandwayne/shield","forks_url":"https://api.github.com/repos/starkandwayne/shield/forks","keys_url":"https://api.github.com/repos/starkandwayne/shield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/shield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/shield/teams","hooks_url":"https://api.github.com/repos/starkandwayne/shield/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/shield/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/shield/events","assignees_url":"https://api.github.com/repos/starkandwayne/shield/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/shield/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/shield/tags","blobs_url":"https://api.github.com/repos/starkandwayne/shield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/shield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/shield/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/shield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/shield/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/shield/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/shield/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/shield/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/shield/subscription","commits_url":"https://api.github.com/repos/starkandwayne/shield/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/shield/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/shield/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/shield/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/shield/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/shield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/shield/merges","archive_url":"https://api.github.com/repos/starkandwayne/shield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/shield/downloads","issues_url":"https://api.github.com/repos/starkandwayne/shield/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/shield/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/shield/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/shield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/shield/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/shield/releases{/id}","deployments_url":"https://api.github.com/repos/starkandwayne/shield/deployments","created_at":"2015-10-21T15:39:36Z","updated_at":"2016-02-17T19:51:17Z","pushed_at":"2016-02-23T17:26:55Z","git_url":"git://github.com/starkandwayne/shield.git","ssh_url":"git@github.com:starkandwayne/shield.git","clone_url":"https://github.com/starkandwayne/shield.git","svn_url":"https://github.com/starkandwayne/shield","homepage":"","size":4373,"stargazers_count":21,"watchers_count":21,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":21,"default_branch":"master"}},"base":{"label":"starkandwayne:master","ref":"master","sha":"35d0b68828ef9479bd750d3ae68bccb6ba8a57d1","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":44686588,"name":"shield","full_name":"starkandwayne/shield","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/shield","description":"A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems","fork":false,"url":"https://api.github.com/repos/starkandwayne/shield","forks_url":"https://api.github.com/repos/starkandwayne/shield/forks","keys_url":"https://api.github.com/repos/starkandwayne/shield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/shield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/shield/teams","hooks_url":"https://api.github.com/repos/starkandwayne/shield/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/shield/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/shield/events","assignees_url":"https://api.github.com/repos/starkandwayne/shield/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/shield/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/shield/tags","blobs_url":"https://api.github.com/repos/starkandwayne/shield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/shield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/shield/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/shield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/shield/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/shield/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/shield/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/shield/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/shield/subscription","commits_url":"https://api.github.com/repos/starkandwayne/shield/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/shield/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/shield/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/shield/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/shield/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/shield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/shield/merges","archive_url":"https://api.github.com/repos/starkandwayne/shield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/shield/downloads","issues_url":"https://api.github.com/repos/starkandwayne/shield/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/shield/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/shield/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/shield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/shield/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/shield/releases{/id}","deployments_url":"https://api.github.com/repos/starkandwayne/shield/deployments","created_at":"2015-10-21T15:39:36Z","updated_at":"2016-02-17T19:51:17Z","pushed_at":"2016-02-23T17:26:55Z","git_url":"git://github.com/starkandwayne/shield.git","ssh_url":"git@github.com:starkandwayne/shield.git","clone_url":"https://github.com/starkandwayne/shield.git","svn_url":"https://github.com/starkandwayne/shield","homepage":"","size":4373,"stargazers_count":21,"watchers_count":21,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":19,"forks":1,"open_issues":19,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/114"},"html":{"href":"https://github.com/starkandwayne/shield/pull/114"},"issue":{"href":"https://api.github.com/repos/starkandwayne/shield/issues/114"},"comments":{"href":"https://api.github.com/repos/starkandwayne/shield/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/starkandwayne/shield/statuses/35cca984312f84b8f54fa3a10f6174d53923302c"}}}}