{"action":"created","comment":{"url":"https://api.github.com/repos/magfest/ubersystem/pulls/comments/238043774","pull_request_review_id":180498402,"id":238043774,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODA0Mzc3NA==","diff_hunk":"@@ -407,6 +416,38 @@ def hours(self):\n     def end_time(self):\n         return self.start_time + timedelta(hours=self.duration)\n \n+    def working_limit_ok(self, attendee):\n+        attendee_hour_map = attendee.hour_map\n+        hours_worked = self.duration\n+        working_hour_limit = self.department_max_consecutive_hours\n+        if working_hour_limit == 0:\n+            working_hour_limit = 1000 # just default to something large","path":"uber/models/department.py","position":32,"original_position":32,"commit_id":"28154e97bc4cc0a07b269f67e0a8177e40aed3c2","original_commit_id":"28154e97bc4cc0a07b269f67e0a8177e40aed3c2","user":{"login":"kitsuta","id":7198215,"node_id":"MDQ6VXNlcjcxOTgyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7198215?v=4","gravatar_id":"","url":"https://api.github.com/users/kitsuta","html_url":"https://github.com/kitsuta","followers_url":"https://api.github.com/users/kitsuta/followers","following_url":"https://api.github.com/users/kitsuta/following{/other_user}","gists_url":"https://api.github.com/users/kitsuta/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsuta/subscriptions","organizations_url":"https://api.github.com/users/kitsuta/orgs","repos_url":"https://api.github.com/users/kitsuta/repos","events_url":"https://api.github.com/users/kitsuta/events{/privacy}","received_events_url":"https://api.github.com/users/kitsuta/received_events","type":"User","site_admin":false},"body":"Just to clarify, the reason you don't just `return True` here is that while this department might not have a working limit, their adjacent shift in another department would, right?","created_at":"2018-12-01T01:02:50Z","updated_at":"2018-12-01T01:06:19Z","html_url":"https://github.com/magfest/ubersystem/pull/3381#discussion_r238043774","pull_request_url":"https://api.github.com/repos/magfest/ubersystem/pulls/3381","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/comments/238043774"},"html":{"href":"https://github.com/magfest/ubersystem/pull/3381#discussion_r238043774"},"pull_request":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/3381"}}},"pull_request":{"url":"https://api.github.com/repos/magfest/ubersystem/pulls/3381","id":235152487,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MTUyNDg3","html_url":"https://github.com/magfest/ubersystem/pull/3381","diff_url":"https://github.com/magfest/ubersystem/pull/3381.diff","patch_url":"https://github.com/magfest/ubersystem/pull/3381.patch","issue_url":"https://api.github.com/repos/magfest/ubersystem/issues/3381","number":3381,"state":"open","locked":false,"title":"Add consecutive hour shift signup limit","user":{"login":"khyperia","id":953151,"node_id":"MDQ6VXNlcjk1MzE1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/953151?v=4","gravatar_id":"","url":"https://api.github.com/users/khyperia","html_url":"https://github.com/khyperia","followers_url":"https://api.github.com/users/khyperia/followers","following_url":"https://api.github.com/users/khyperia/following{/other_user}","gists_url":"https://api.github.com/users/khyperia/gists{/gist_id}","starred_url":"https://api.github.com/users/khyperia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khyperia/subscriptions","organizations_url":"https://api.github.com/users/khyperia/orgs","repos_url":"https://api.github.com/users/khyperia/repos","events_url":"https://api.github.com/users/khyperia/events{/privacy}","received_events_url":"https://api.github.com/users/khyperia/received_events","type":"User","site_admin":false},"body":"Reg has been requesting this feature for a while, I figured I'd poke up something.\r\n\r\nNot 100% sure if I did the DB migration right, that python file was created via `sep alembic --plugin uber revision --autogenerate -m \"Add Department.max_consecutive_hours\"` and I'm kinda just hoping it works (or y'all can point out fixes I need to do).\r\n\r\nFeel free to ask about the actual `working_limit_ok` algorithm, it's a little weird.","created_at":"2018-12-01T00:26:26Z","updated_at":"2018-12-01T01:06:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca7ad5a283d796ac5ddfd6d531fa1be603a33c5a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/magfest/ubersystem/pulls/3381/commits","review_comments_url":"https://api.github.com/repos/magfest/ubersystem/pulls/3381/comments","review_comment_url":"https://api.github.com/repos/magfest/ubersystem/pulls/comments{/number}","comments_url":"https://api.github.com/repos/magfest/ubersystem/issues/3381/comments","statuses_url":"https://api.github.com/repos/magfest/ubersystem/statuses/28154e97bc4cc0a07b269f67e0a8177e40aed3c2","head":{"label":"khyperia:max_consecutive_hours","ref":"max_consecutive_hours","sha":"28154e97bc4cc0a07b269f67e0a8177e40aed3c2","user":{"login":"khyperia","id":953151,"node_id":"MDQ6VXNlcjk1MzE1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/953151?v=4","gravatar_id":"","url":"https://api.github.com/users/khyperia","html_url":"https://github.com/khyperia","followers_url":"https://api.github.com/users/khyperia/followers","following_url":"https://api.github.com/users/khyperia/following{/other_user}","gists_url":"https://api.github.com/users/khyperia/gists{/gist_id}","starred_url":"https://api.github.com/users/khyperia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khyperia/subscriptions","organizations_url":"https://api.github.com/users/khyperia/orgs","repos_url":"https://api.github.com/users/khyperia/repos","events_url":"https://api.github.com/users/khyperia/events{/privacy}","received_events_url":"https://api.github.com/users/khyperia/received_events","type":"User","site_admin":false},"repo":{"id":116434745,"node_id":"MDEwOlJlcG9zaXRvcnkxMTY0MzQ3NDU=","name":"ubersystem","full_name":"khyperia/ubersystem","private":false,"owner":{"login":"khyperia","id":953151,"node_id":"MDQ6VXNlcjk1MzE1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/953151?v=4","gravatar_id":"","url":"https://api.github.com/users/khyperia","html_url":"https://github.com/khyperia","followers_url":"https://api.github.com/users/khyperia/followers","following_url":"https://api.github.com/users/khyperia/following{/other_user}","gists_url":"https://api.github.com/users/khyperia/gists{/gist_id}","starred_url":"https://api.github.com/users/khyperia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khyperia/subscriptions","organizations_url":"https://api.github.com/users/khyperia/orgs","repos_url":"https://api.github.com/users/khyperia/repos","events_url":"https://api.github.com/users/khyperia/events{/privacy}","received_events_url":"https://api.github.com/users/khyperia/received_events","type":"User","site_admin":false},"html_url":"https://github.com/khyperia/ubersystem","description":"MAGFest's Ubersystem - handles ticketing, staffing, analytics, volunteers, and tons more","fork":true,"url":"https://api.github.com/repos/khyperia/ubersystem","forks_url":"https://api.github.com/repos/khyperia/ubersystem/forks","keys_url":"https://api.github.com/repos/khyperia/ubersystem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/khyperia/ubersystem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/khyperia/ubersystem/teams","hooks_url":"https://api.github.com/repos/khyperia/ubersystem/hooks","issue_events_url":"https://api.github.com/repos/khyperia/ubersystem/issues/events{/number}","events_url":"https://api.github.com/repos/khyperia/ubersystem/events","assignees_url":"https://api.github.com/repos/khyperia/ubersystem/assignees{/user}","branches_url":"https://api.github.com/repos/khyperia/ubersystem/branches{/branch}","tags_url":"https://api.github.com/repos/khyperia/ubersystem/tags","blobs_url":"https://api.github.com/repos/khyperia/ubersystem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/khyperia/ubersystem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/khyperia/ubersystem/git/refs{/sha}","trees_url":"https://api.github.com/repos/khyperia/ubersystem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/khyperia/ubersystem/statuses/{sha}","languages_url":"https://api.github.com/repos/khyperia/ubersystem/languages","stargazers_url":"https://api.github.com/repos/khyperia/ubersystem/stargazers","contributors_url":"https://api.github.com/repos/khyperia/ubersystem/contributors","subscribers_url":"https://api.github.com/repos/khyperia/ubersystem/subscribers","subscription_url":"https://api.github.com/repos/khyperia/ubersystem/subscription","commits_url":"https://api.github.com/repos/khyperia/ubersystem/commits{/sha}","git_commits_url":"https://api.github.com/repos/khyperia/ubersystem/git/commits{/sha}","comments_url":"https://api.github.com/repos/khyperia/ubersystem/comments{/number}","issue_comment_url":"https://api.github.com/repos/khyperia/ubersystem/issues/comments{/number}","contents_url":"https://api.github.com/repos/khyperia/ubersystem/contents/{+path}","compare_url":"https://api.github.com/repos/khyperia/ubersystem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/khyperia/ubersystem/merges","archive_url":"https://api.github.com/repos/khyperia/ubersystem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/khyperia/ubersystem/downloads","issues_url":"https://api.github.com/repos/khyperia/ubersystem/issues{/number}","pulls_url":"https://api.github.com/repos/khyperia/ubersystem/pulls{/number}","milestones_url":"https://api.github.com/repos/khyperia/ubersystem/milestones{/number}","notifications_url":"https://api.github.com/repos/khyperia/ubersystem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/khyperia/ubersystem/labels{/name}","releases_url":"https://api.github.com/repos/khyperia/ubersystem/releases{/id}","deployments_url":"https://api.github.com/repos/khyperia/ubersystem/deployments","created_at":"2018-01-05T22:49:54Z","updated_at":"2018-12-01T00:22:10Z","pushed_at":"2018-12-01T00:22:09Z","git_url":"git://github.com/khyperia/ubersystem.git","ssh_url":"git@github.com:khyperia/ubersystem.git","clone_url":"https://github.com/khyperia/ubersystem.git","svn_url":"https://github.com/khyperia/ubersystem","homepage":"http://magfest.org","size":69317,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"magfest:master","ref":"master","sha":"66883bfd4aea9f83dda9e30089ce99b68aaae6e5","user":{"login":"magfest","id":7840140,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NDAxNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7840140?v=4","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"repo":{"id":16427229,"node_id":"MDEwOlJlcG9zaXRvcnkxNjQyNzIyOQ==","name":"ubersystem","full_name":"magfest/ubersystem","private":false,"owner":{"login":"magfest","id":7840140,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4NDAxNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/7840140?v=4","gravatar_id":"","url":"https://api.github.com/users/magfest","html_url":"https://github.com/magfest","followers_url":"https://api.github.com/users/magfest/followers","following_url":"https://api.github.com/users/magfest/following{/other_user}","gists_url":"https://api.github.com/users/magfest/gists{/gist_id}","starred_url":"https://api.github.com/users/magfest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfest/subscriptions","organizations_url":"https://api.github.com/users/magfest/orgs","repos_url":"https://api.github.com/users/magfest/repos","events_url":"https://api.github.com/users/magfest/events{/privacy}","received_events_url":"https://api.github.com/users/magfest/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/magfest/ubersystem","description":"MAGFest's Ubersystem - handles ticketing, staffing, analytics, volunteers, and tons more","fork":false,"url":"https://api.github.com/repos/magfest/ubersystem","forks_url":"https://api.github.com/repos/magfest/ubersystem/forks","keys_url":"https://api.github.com/repos/magfest/ubersystem/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magfest/ubersystem/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magfest/ubersystem/teams","hooks_url":"https://api.github.com/repos/magfest/ubersystem/hooks","issue_events_url":"https://api.github.com/repos/magfest/ubersystem/issues/events{/number}","events_url":"https://api.github.com/repos/magfest/ubersystem/events","assignees_url":"https://api.github.com/repos/magfest/ubersystem/assignees{/user}","branches_url":"https://api.github.com/repos/magfest/ubersystem/branches{/branch}","tags_url":"https://api.github.com/repos/magfest/ubersystem/tags","blobs_url":"https://api.github.com/repos/magfest/ubersystem/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magfest/ubersystem/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magfest/ubersystem/git/refs{/sha}","trees_url":"https://api.github.com/repos/magfest/ubersystem/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magfest/ubersystem/statuses/{sha}","languages_url":"https://api.github.com/repos/magfest/ubersystem/languages","stargazers_url":"https://api.github.com/repos/magfest/ubersystem/stargazers","contributors_url":"https://api.github.com/repos/magfest/ubersystem/contributors","subscribers_url":"https://api.github.com/repos/magfest/ubersystem/subscribers","subscription_url":"https://api.github.com/repos/magfest/ubersystem/subscription","commits_url":"https://api.github.com/repos/magfest/ubersystem/commits{/sha}","git_commits_url":"https://api.github.com/repos/magfest/ubersystem/git/commits{/sha}","comments_url":"https://api.github.com/repos/magfest/ubersystem/comments{/number}","issue_comment_url":"https://api.github.com/repos/magfest/ubersystem/issues/comments{/number}","contents_url":"https://api.github.com/repos/magfest/ubersystem/contents/{+path}","compare_url":"https://api.github.com/repos/magfest/ubersystem/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magfest/ubersystem/merges","archive_url":"https://api.github.com/repos/magfest/ubersystem/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magfest/ubersystem/downloads","issues_url":"https://api.github.com/repos/magfest/ubersystem/issues{/number}","pulls_url":"https://api.github.com/repos/magfest/ubersystem/pulls{/number}","milestones_url":"https://api.github.com/repos/magfest/ubersystem/milestones{/number}","notifications_url":"https://api.github.com/repos/magfest/ubersystem/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magfest/ubersystem/labels{/name}","releases_url":"https://api.github.com/repos/magfest/ubersystem/releases{/id}","deployments_url":"https://api.github.com/repos/magfest/ubersystem/deployments","created_at":"2014-02-01T02:56:25Z","updated_at":"2018-11-28T03:18:52Z","pushed_at":"2018-12-01T00:26:27Z","git_url":"git://github.com/magfest/ubersystem.git","ssh_url":"git@github.com:magfest/ubersystem.git","clone_url":"https://github.com/magfest/ubersystem.git","svn_url":"https://github.com/magfest/ubersystem","homepage":"http://magfest.org","size":69568,"stargazers_count":32,"watchers_count":32,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":429,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":40,"open_issues":429,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/3381"},"html":{"href":"https://github.com/magfest/ubersystem/pull/3381"},"issue":{"href":"https://api.github.com/repos/magfest/ubersystem/issues/3381"},"comments":{"href":"https://api.github.com/repos/magfest/ubersystem/issues/3381/comments"},"review_comments":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/3381/comments"},"review_comment":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/magfest/ubersystem/pulls/3381/commits"},"statuses":{"href":"https://api.github.com/repos/magfest/ubersystem/statuses/28154e97bc4cc0a07b269f67e0a8177e40aed3c2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kitsuta"}}