     update_mock([:files], &(Map.put(&1, sha, @def_files)))
     update_mock([:statuses], &(Map.put(&1, sha, %{})))
     WebhookController.do_webhook(%{
-    	  body_params: %{
-    	    "installation" => %{ "id" => @def_inst },
-    	    "sender" => @def_user,
-	    "repository" => %{ "id" => @def_repo},
-    	    "pull_request" => pr_to_json(pr),
-	    "action" => "opened" }},
+              body_params: %{
+                "installation" => %{ "id" => @def_inst },
+                "sender" => @def_user,
+            "repository" => %{ "id" => @def_repo},
+                "pull_request" => pr_to_json(pr),
+            "action" => "opened" }},
           "github", "pull_request")
     number
   end

    pr = Enum.find(prs(), &(match?(%{number: ^pr_num}, &1)))
    update_mock([:comments, pr_num], &([body | &1]))
    WebhookController.do_webhook(%{
	  body_params: %{
	    "sender" => author,
    	    "repository" => %{ "id" => @def_repo},
	    "comment" => %{ "user" => author,
			    "body" => body },
	    "pull_request" => pr_to_json(pr),
	    "action" => "created" }} , "github", "pull_request_review_comment")
  end

  def make_admin(username \\ @def_user["login"]) do

      iex> FriendlyMock.add_comment(pr_num, "bors ping")
      iex> FriendlyMock.add_comment(pr_num, "bors r+")
      iex> FriendlyMock.get_state
        %{
          {:installation, 91} => %{
                repos: [
                  %BorsNG.GitHub.Repo{
                    id: 14,
                    name: "test/repo",
                    owner: %{avatar_url: "", id: 7, login: "tester", type: :user},
                    private: false
                  }
                ]
          },
          {{:installation, 91}, 14} => %{
                branches: %{"first" => "SHA-1", "master" => "ini"},
                collaborators: %{},
                comments: %{
                  1 => [":-1: Rejected by PR status", "bors r+", "pong", "bors ping"]
                },
                commits: %{},
                files: %{
                  "SHA-1" => %{
                    ".github/bors.toml" => "status = [ \"ci\" ]\npr_status = [ \"ci\" ]\nprerun_timeout_sec = 5\ndelete_merged_branches = true\n"
                  },
                  "master" => %{
                    ".github/bors.toml" => "status = [ \"ci\" ]\npr_status = [ \"ci\" ]\nprerun_timeout_sec = 5\ndelete_merged_branches = true\n"
                  },
                  "staging.tmp" => %{
                    ".github/bors.toml" => "status = [ \"ci\" ]\npr_status = [ \"ci\" ]\nprerun_timeout_sec = 5\ndelete_merged_branches = true\n"
                  }
                },
                pr_commits: %{1 => []},
                pulls: %{
                  1 => %BorsNG.GitHub.Pr{
                    base_ref: "master",
                    base_repo_id: 0,
                    body: nil,
                    head_ref: "first",
                    head_repo_id: 0,
                    head_sha: "SHA-1",
                    merged: false,
                    number: 1,
                    state: :open,
                    title: "first",
                    user: %{"avatar_url" => "", "id" => 7, "login" => "tester"}
                  }
                },
                statuses: %{"SHA-1" => %{"ci" => :running}}
          }
        }
  """

  alias BorsNG.GitHub.ServerMock
