{"action":"created","comment":{"url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments/79795374","id":79795374,"diff_hunk":"@@ -3,6 +3,14 @@\n     sequence(:name) { |n| \"project_#{n}\" }\n     title { Faker::Book.title }\n \n+    after(:create) do |project|\n+      # NOTE: Enable global write through when writing new VCR cassetes.\n+      # ensure the backend knows the project\n+      if CONFIG['global_write_through']\n+        Suse::Backend.put(\"/source/#{CGI.escape(project.name)}/_meta\", project.to_axml)","path":"src/api/spec/factories/project.rb","position":null,"original_position":8,"commit_id":"d5be1cbeee349abddd856bdb8603f6fd7d9eec85","original_commit_id":"96e571a87928b13aba28545636d6f2d6af56b607","user":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"body":"@hennevogel This actually fails when global_write_through got enabled.\r\n\r\n```\r\n     NoMethodError:\r\n       undefined method `login' for nil:NilClass\r\n     # ./app/models/project.rb:830:in `write_to_backend'\r\n     # ./app/models/project.rb:879:in `block in store'\r\n     # ./app/models/project.rb:877:in `store'\r\n     # ./spec/factories/project.rb:10:in `block (3 levels) in <top (required)>'\r\n```\r\n\r\nAnd I wouldn't want to monkey patch this, just make it pass.","created_at":"2016-09-21T09:40:28Z","updated_at":"2016-09-21T09:40:29Z","html_url":"https://github.com/openSUSE/open-build-service/pull/2167#discussion_r79795374","pull_request_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167","_links":{"self":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments/79795374"},"html":{"href":"https://github.com/openSUSE/open-build-service/pull/2167#discussion_r79795374"},"pull_request":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167"}}},"pull_request":{"url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167","id":86119336,"html_url":"https://github.com/openSUSE/open-build-service/pull/2167","diff_url":"https://github.com/openSUSE/open-build-service/pull/2167.diff","patch_url":"https://github.com/openSUSE/open-build-service/pull/2167.patch","issue_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/2167","number":2167,"state":"open","locked":false,"title":"[ci] Add backend calls to project and package factories","user":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"body":"Certain parts of OBS send http requests to the backend. For that to work we\r\nneed project, package and probably other factories to correctly setup the\r\nbackend for the created objects.","created_at":"2016-09-21T08:38:21Z","updated_at":"2016-09-21T09:40:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd0fd4b531641be65e5bfa9e7fbeddc55f2ea80b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167/commits","review_comments_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167/comments","review_comment_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/2167/comments","statuses_url":"https://api.github.com/repos/openSUSE/open-build-service/statuses/d5be1cbeee349abddd856bdb8603f6fd7d9eec85","head":{"label":"bgeuken:cleanup_backend_calls_in_our_factories","ref":"cleanup_backend_calls_in_our_factories","sha":"d5be1cbeee349abddd856bdb8603f6fd7d9eec85","user":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"repo":{"id":10003040,"name":"open-build-service","full_name":"bgeuken/open-build-service","owner":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bgeuken/open-build-service","description":"A generic system to build and distribute packages from sources in an automatic, consistent and reproducible way. Release your software for a wide range of operating systems and hardware architectures.","fork":true,"url":"https://api.github.com/repos/bgeuken/open-build-service","forks_url":"https://api.github.com/repos/bgeuken/open-build-service/forks","keys_url":"https://api.github.com/repos/bgeuken/open-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bgeuken/open-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bgeuken/open-build-service/teams","hooks_url":"https://api.github.com/repos/bgeuken/open-build-service/hooks","issue_events_url":"https://api.github.com/repos/bgeuken/open-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/bgeuken/open-build-service/events","assignees_url":"https://api.github.com/repos/bgeuken/open-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/bgeuken/open-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/bgeuken/open-build-service/tags","blobs_url":"https://api.github.com/repos/bgeuken/open-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bgeuken/open-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bgeuken/open-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/bgeuken/open-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bgeuken/open-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/bgeuken/open-build-service/languages","stargazers_url":"https://api.github.com/repos/bgeuken/open-build-service/stargazers","contributors_url":"https://api.github.com/repos/bgeuken/open-build-service/contributors","subscribers_url":"https://api.github.com/repos/bgeuken/open-build-service/subscribers","subscription_url":"https://api.github.com/repos/bgeuken/open-build-service/subscription","commits_url":"https://api.github.com/repos/bgeuken/open-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/bgeuken/open-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/bgeuken/open-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/bgeuken/open-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/bgeuken/open-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/bgeuken/open-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bgeuken/open-build-service/merges","archive_url":"https://api.github.com/repos/bgeuken/open-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bgeuken/open-build-service/downloads","issues_url":"https://api.github.com/repos/bgeuken/open-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/bgeuken/open-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/bgeuken/open-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/bgeuken/open-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bgeuken/open-build-service/labels{/name}","releases_url":"https://api.github.com/repos/bgeuken/open-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/bgeuken/open-build-service/deployments","created_at":"2013-05-11T17:48:20Z","updated_at":"2015-07-22T13:02:48Z","pushed_at":"2016-09-21T09:15:20Z","git_url":"git://github.com/bgeuken/open-build-service.git","ssh_url":"git@github.com:bgeuken/open-build-service.git","clone_url":"https://github.com/bgeuken/open-build-service.git","svn_url":"https://github.com/bgeuken/open-build-service","homepage":"http://openbuildservice.org/","size":46966,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"openSUSE:master","ref":"master","sha":"a794e08075de1078695701e682e48f7f2300d271","user":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"repo":{"id":2046192,"name":"open-build-service","full_name":"openSUSE/open-build-service","owner":{"login":"openSUSE","id":623819,"avatar_url":"https://avatars.githubusercontent.com/u/623819?v=3","gravatar_id":"","url":"https://api.github.com/users/openSUSE","html_url":"https://github.com/openSUSE","followers_url":"https://api.github.com/users/openSUSE/followers","following_url":"https://api.github.com/users/openSUSE/following{/other_user}","gists_url":"https://api.github.com/users/openSUSE/gists{/gist_id}","starred_url":"https://api.github.com/users/openSUSE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openSUSE/subscriptions","organizations_url":"https://api.github.com/users/openSUSE/orgs","repos_url":"https://api.github.com/users/openSUSE/repos","events_url":"https://api.github.com/users/openSUSE/events{/privacy}","received_events_url":"https://api.github.com/users/openSUSE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openSUSE/open-build-service","description":"A generic system to build and distribute packages from sources in an automatic, consistent and reproducible way. Release your software for a wide range of operating systems and hardware architectures.","fork":false,"url":"https://api.github.com/repos/openSUSE/open-build-service","forks_url":"https://api.github.com/repos/openSUSE/open-build-service/forks","keys_url":"https://api.github.com/repos/openSUSE/open-build-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openSUSE/open-build-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openSUSE/open-build-service/teams","hooks_url":"https://api.github.com/repos/openSUSE/open-build-service/hooks","issue_events_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/events{/number}","events_url":"https://api.github.com/repos/openSUSE/open-build-service/events","assignees_url":"https://api.github.com/repos/openSUSE/open-build-service/assignees{/user}","branches_url":"https://api.github.com/repos/openSUSE/open-build-service/branches{/branch}","tags_url":"https://api.github.com/repos/openSUSE/open-build-service/tags","blobs_url":"https://api.github.com/repos/openSUSE/open-build-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openSUSE/open-build-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openSUSE/open-build-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/openSUSE/open-build-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openSUSE/open-build-service/statuses/{sha}","languages_url":"https://api.github.com/repos/openSUSE/open-build-service/languages","stargazers_url":"https://api.github.com/repos/openSUSE/open-build-service/stargazers","contributors_url":"https://api.github.com/repos/openSUSE/open-build-service/contributors","subscribers_url":"https://api.github.com/repos/openSUSE/open-build-service/subscribers","subscription_url":"https://api.github.com/repos/openSUSE/open-build-service/subscription","commits_url":"https://api.github.com/repos/openSUSE/open-build-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/openSUSE/open-build-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/openSUSE/open-build-service/contents/{+path}","compare_url":"https://api.github.com/repos/openSUSE/open-build-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openSUSE/open-build-service/merges","archive_url":"https://api.github.com/repos/openSUSE/open-build-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openSUSE/open-build-service/downloads","issues_url":"https://api.github.com/repos/openSUSE/open-build-service/issues{/number}","pulls_url":"https://api.github.com/repos/openSUSE/open-build-service/pulls{/number}","milestones_url":"https://api.github.com/repos/openSUSE/open-build-service/milestones{/number}","notifications_url":"https://api.github.com/repos/openSUSE/open-build-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openSUSE/open-build-service/labels{/name}","releases_url":"https://api.github.com/repos/openSUSE/open-build-service/releases{/id}","deployments_url":"https://api.github.com/repos/openSUSE/open-build-service/deployments","created_at":"2011-07-14T06:52:57Z","updated_at":"2016-09-19T23:19:00Z","pushed_at":"2016-09-21T09:18:52Z","git_url":"git://github.com/openSUSE/open-build-service.git","ssh_url":"git@github.com:openSUSE/open-build-service.git","clone_url":"https://github.com/openSUSE/open-build-service.git","svn_url":"https://github.com/openSUSE/open-build-service","homepage":"http://openbuildservice.org/","size":55798,"stargazers_count":221,"watchers_count":221,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":296,"forks":169,"open_issues":296,"watchers":221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167"},"html":{"href":"https://github.com/openSUSE/open-build-service/pull/2167"},"issue":{"href":"https://api.github.com/repos/openSUSE/open-build-service/issues/2167"},"comments":{"href":"https://api.github.com/repos/openSUSE/open-build-service/issues/2167/comments"},"review_comments":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167/comments"},"review_comment":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openSUSE/open-build-service/pulls/2167/commits"},"statuses":{"href":"https://api.github.com/repos/openSUSE/open-build-service/statuses/d5be1cbeee349abddd856bdb8603f6fd7d9eec85"}}}}
{"actor":{"display_login":"bgeuken"}}