{"action":"closed","issue":{"url":"https://api.github.com/repos/assaydepot/git-trim/issues/1","repository_url":"https://api.github.com/repos/assaydepot/git-trim","labels_url":"https://api.github.com/repos/assaydepot/git-trim/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/assaydepot/git-trim/issues/1/comments","events_url":"https://api.github.com/repos/assaydepot/git-trim/issues/1/events","html_url":"https://github.com/assaydepot/git-trim/issues/1","id":334327526,"node_id":"MDU6SXNzdWUzMzQzMjc1MjY=","number":1,"title":"Error when protected_branches hasn't been initialized by a file when appending master","user":{"login":"micahiriye","id":2937524,"node_id":"MDQ6VXNlcjI5Mzc1MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2937524?v=4","gravatar_id":"","url":"https://api.github.com/users/micahiriye","html_url":"https://github.com/micahiriye","followers_url":"https://api.github.com/users/micahiriye/followers","following_url":"https://api.github.com/users/micahiriye/following{/other_user}","gists_url":"https://api.github.com/users/micahiriye/gists{/gist_id}","starred_url":"https://api.github.com/users/micahiriye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahiriye/subscriptions","organizations_url":"https://api.github.com/users/micahiriye/orgs","repos_url":"https://api.github.com/users/micahiriye/repos","events_url":"https://api.github.com/users/micahiriye/events{/privacy}","received_events_url":"https://api.github.com/users/micahiriye/received_events","type":"User","site_admin":false},"labels":[{"id":970839321,"node_id":"MDU6TGFiZWw5NzA4MzkzMjE=","url":"https://api.github.com/repos/assaydepot/git-trim/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"closed","locked":false,"assignee":{"login":"micahiriye","id":2937524,"node_id":"MDQ6VXNlcjI5Mzc1MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2937524?v=4","gravatar_id":"","url":"https://api.github.com/users/micahiriye","html_url":"https://github.com/micahiriye","followers_url":"https://api.github.com/users/micahiriye/followers","following_url":"https://api.github.com/users/micahiriye/following{/other_user}","gists_url":"https://api.github.com/users/micahiriye/gists{/gist_id}","starred_url":"https://api.github.com/users/micahiriye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahiriye/subscriptions","organizations_url":"https://api.github.com/users/micahiriye/orgs","repos_url":"https://api.github.com/users/micahiriye/repos","events_url":"https://api.github.com/users/micahiriye/events{/privacy}","received_events_url":"https://api.github.com/users/micahiriye/received_events","type":"User","site_admin":false},"assignees":[{"login":"micahiriye","id":2937524,"node_id":"MDQ6VXNlcjI5Mzc1MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2937524?v=4","gravatar_id":"","url":"https://api.github.com/users/micahiriye","html_url":"https://github.com/micahiriye","followers_url":"https://api.github.com/users/micahiriye/followers","following_url":"https://api.github.com/users/micahiriye/following{/other_user}","gists_url":"https://api.github.com/users/micahiriye/gists{/gist_id}","starred_url":"https://api.github.com/users/micahiriye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahiriye/subscriptions","organizations_url":"https://api.github.com/users/micahiriye/orgs","repos_url":"https://api.github.com/users/micahiriye/repos","events_url":"https://api.github.com/users/micahiriye/events{/privacy}","received_events_url":"https://api.github.com/users/micahiriye/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-21T03:48:43Z","updated_at":"2018-06-21T03:57:10Z","closed_at":"2018-06-21T03:57:10Z","author_association":"NONE","body":"I get: `git-trim.rb:10:in run: undefined method <<' for nil:NilClass (NoMethodError)`\r\n\r\nI think this is just because the `protected_branches` variable isn't guaranteed to be available:\r\n\r\n```ruby\r\nif File.exists?(\".git-protected-branches\")\r\n   protected_branches = File.read(\".git-protected-branches\").split(\"\\n\")\r\nend\r\n\r\nprotected_branches << \"master\"\r\n\r\n```\r\n\r\nshould be:\r\n\r\n```ruby\r\nprotected_branches = [\"master\"]\r\n\r\nif File.exists?(\".git-protected-branches\")\r\n   protected_branches = File.read(\".git-protected-branches\").split(\"\\n\")\r\nend\r\n```\r\n?"}}
{"actor":{"display_login":"cpetersen"}}