From 1ee6be92c6d301a0ca06b6a90797e59e6115c1df Mon Sep 17 00:00:00 2001 From: Ruben Dijkstra Date: Wed, 15 Jun 2016 00:27:54 +0200 Subject: [PATCH 1/2] Add the original assignee to the list of assignees --- lib/responses/issues_and_prs.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/responses/issues_and_prs.rb b/lib/responses/issues_and_prs.rb index d955cb1744..0f7d9a0fb9 100644 --- a/lib/responses/issues_and_prs.rb +++ b/lib/responses/issues_and_prs.rb @@ -135,6 +135,7 @@ module Responses ISSUE_WITH_ASSIGNEES ||= ISSUE.merge({ "assignees" => [ + USER, USER.merge("login" => "hubot"), USER.merge("login" => "other_user") ] From aae43caa7b147a24b6b3b1989493ee364cd5cb21 Mon Sep 17 00:00:00 2001 From: Ruben Dijkstra Date: Wed, 15 Jun 2016 00:28:42 +0200 Subject: [PATCH 2/2] Rename the USERS to the right user This introduces new constants, so that they can be used in other places as well. This makes the data a little more realistic. --- lib/responses/issues_and_prs.rb | 4 ++-- lib/responses/user.rb | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/lib/responses/issues_and_prs.rb b/lib/responses/issues_and_prs.rb index 0f7d9a0fb9..847579d06a 100644 --- a/lib/responses/issues_and_prs.rb +++ b/lib/responses/issues_and_prs.rb @@ -136,8 +136,8 @@ module Responses ISSUE_WITH_ASSIGNEES ||= ISSUE.merge({ "assignees" => [ USER, - USER.merge("login" => "hubot"), - USER.merge("login" => "other_user") + HUBOT, + OTHER_USER ] }) diff --git a/lib/responses/user.rb b/lib/responses/user.rb index 402ad59936..300cd900e6 100644 --- a/lib/responses/user.rb +++ b/lib/responses/user.rb @@ -21,6 +21,46 @@ module Responses "site_admin" => false } + HUBOT ||= { + "login" => "hubot", + "id" => 1, + "avatar_url" => "https://github.com/images/error/hubot_happy.gif", + "gravatar_id" => "", + "url" => "https://api.github.com/users/hubot", + "html_url" => "https://github.com/hubot", + "followers_url" => "https://api.github.com/users/hubot/followers", + "following_url" => "https://api.github.com/users/hubot/following{/other_user}", + "gists_url" => "https://api.github.com/users/hubot/gists{/gist_id}", + "starred_url" => "https://api.github.com/users/hubot/starred{/owner}{/repo}", + "subscriptions_url" => "https://api.github.com/users/hubot/subscriptions", + "organizations_url" => "https://api.github.com/users/hubot/orgs", + "repos_url" => "https://api.github.com/users/hubot/repos", + "events_url" => "https://api.github.com/users/hubot/events{/privacy}", + "received_events_url" => "https://api.github.com/users/hubot/received_events", + "type" => "User", + "site_admin" => true + } + + OTHER_USER ||= { + "login" => "other_user", + "id" => 1, + "avatar_url" => "https://github.com/images/error/other_user_happy.gif", + "gravatar_id" => "", + "url" => "https://api.github.com/users/other_user", + "html_url" => "https://github.com/other_user", + "followers_url" => "https://api.github.com/users/other_user/followers", + "following_url" => "https://api.github.com/users/other_user/following{/other_user}", + "gists_url" => "https://api.github.com/users/other_user/gists{/gist_id}", + "starred_url" => "https://api.github.com/users/other_user/starred{/owner}{/repo}", + "subscriptions_url" => "https://api.github.com/users/other_user/subscriptions", + "organizations_url" => "https://api.github.com/users/other_user/orgs", + "repos_url" => "https://api.github.com/users/other_user/repos", + "events_url" => "https://api.github.com/users/other_user/events{/privacy}", + "received_events_url" => "https://api.github.com/users/other_user/received_events", + "type" => "User", + "site_admin" => false + } + CONTRIBUTOR ||= USER.merge({ "contributions" => 32 }) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy