From 5963e53abbae890a6e7e8da8214c3bf711f539da Mon Sep 17 00:00:00 2001
From: Pierre DAL-PRA
Reactions
+
+ Repositories
diff --git a/lib/responses/git.rb b/lib/responses/git.rb
index 97ed4d345d..ab4e20f637 100644
--- a/lib/responses/git.rb
+++ b/lib/responses/git.rb
@@ -1,4 +1,5 @@
require_relative 'user'
+require_relative 'reactions'
module GitHub
module Resources
@@ -470,6 +471,16 @@ module Responses
"message" => "Not Found",
"documentation_url" => "https://developer.github.com/v3"
}
+
+
+ PULL_COMMENT_REACTION_SUMMARY ||= REACTION_SUMMARY.merge({
+ "url" => PULL_COMMENT["url"] + "/reactions"
+ })
+
+ COMMIT_COMMENT_REACTION_SUMMARY ||= REACTION_SUMMARY.merge({
+ "url" => COMMIT_COMMENT["url"] + "/reactions"
+ })
+
end
end
end
diff --git a/lib/responses/issues_and_prs.rb b/lib/responses/issues_and_prs.rb
index f254f45c18..897e4d8cb8 100644
--- a/lib/responses/issues_and_prs.rb
+++ b/lib/responses/issues_and_prs.rb
@@ -1,5 +1,6 @@
require_relative 'user'
require_relative 'repos'
+require_relative 'reactions'
module GitHub
module Resources
@@ -153,6 +154,14 @@ module Responses
}
FULL_ISSUE_EVENT ||= ISSUE_EVENT.merge('issue' => ISSUE)
+
+ ISSUE_REACTION_SUMMARY ||= REACTION_SUMMARY.merge({
+ "url" => ISSUE["url"] + "/reactions"
+ })
+
+ ISSUE_COMMENT_REACTION_SUMMARY ||= REACTION_SUMMARY.merge({
+ "url" => ISSUE_COMMENT["url"] + "/reactions"
+ })
end
end
end
diff --git a/lib/responses/reactions.rb b/lib/responses/reactions.rb
new file mode 100644
index 0000000000..cdef1d59fd
--- /dev/null
+++ b/lib/responses/reactions.rb
@@ -0,0 +1,21 @@
+module GitHub
+ module Resources
+ module Responses
+ REACTION ||= {
+ "id": 1,
+ "user_id": 1,
+ "content": "heart"
+ }
+
+ REACTION_SUMMARY ||= {
+ "total_count": 5,
+ "+1": 3,
+ "-1": 1,
+ "laugh": 0,
+ "confused": 0,
+ "heart": 1,
+ "hooray": 0
+ }
+ end
+ end
+end
From 8b0528e0381cd00918e5c0c1a4c579a5795ca549 Mon Sep 17 00:00:00 2001
From: Hubot
+
+
+### Events
+
+
+
+
+## List events for an issue
+
+ GET /repos/:owner/:repo/issues/:issue_number/timeline
+
+### Response
+
+<%= headers 200, :pagination => default_pagination_rels %>
+<%= json(:issue_event) { |h| [h] } %>
diff --git a/layouts/sidebar.html b/layouts/sidebar.html
index c179fd3fc7..54ebad1a7b 100644
--- a/layouts/sidebar.html
+++ b/layouts/sidebar.html
@@ -47,6 +47,9 @@
* `secret` - only visible to organization owners and members of this team.
* `closed` - visible to all members of this organization.
Default: `secret`
{% if page.version != 'dotcom' and page.version == 2.4 %}**This parameter requires a custom media type to be specified. Please see more in the alert below.**{% endif %}
`permission`|`string` | **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:
* `pull` - team members can pull, but not push to or administer newly-added repositories.
* `push` - team members can pull and push, but not administer newly-added repositories.
* `admin` - team members can pull, push and administer newly-added repositories.
Default: `pull`
-{% if page.version != 'dotcom' and (page.version == 2.4 or page.version == 2.5) %}
+{% if page.version != 'dotcom' and page.version > 2.3 and page.version < 2.6 %}
{{#tip}}
@@ -129,7 +129,7 @@ Name | Type | Description
`privacy`|`string`| The level of privacy this team should have. Can be one of:
* `secret` - only visible to organization owners and members of this team.
* `closed` - visible to all members of this organization.
Default: `secret`
{% if page.version != 'dotcom' and page.version == 2.4 %}**This parameter requires a custom media type to be specified. Please see more in the alert below.**{% endif %}
`permission`|`string` | **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of:
* `pull` - team members can pull, but not push to or administer newly-added repositories.
* `push` - team members can pull and push, but not administer newly-added repositories.
* `admin` - team members can pull, push and administer newly-added repositories.
Default: `pull`
-{% if page.version != 'dotcom' and (page.version == 2.4 or page.version == 2.5) %}
+{% if page.version != 'dotcom' and page.version > 2.3 and page.version < 2.6 %}
{{#tip}}
@@ -522,7 +522,7 @@ Name | Type | Description
{% endif %}
-{% if page.version != 'dotcom' and (page.version == 2.4 or page.version == 2.5) %}
+{% if page.version != 'dotcom' and page.version > 2.3 and page.version < 2.6 %}
{{#tip}}
diff --git a/content/v3/repos/collaborators.md b/content/v3/repos/collaborators.md
index b3ddcf3de7..2f5e94b9aa 100644
--- a/content/v3/repos/collaborators.md
+++ b/content/v3/repos/collaborators.md
@@ -22,7 +22,7 @@ collaborators list.
<%= headers 200, :pagination => default_pagination_rels %>
<%= json(:user) { |h| [h] } %>
-{% if page.version != 'dotcom' and (page.version == 2.4 or page.version == 2.5) %}
+{% if page.version != 'dotcom' and page.version > 2.3 and page.version < 2.6 %}
### Alternative response with extra repository information
@@ -70,7 +70,7 @@ Name | Type | Description
<%= fetch_content(:optional_put_content_length) %>
-{% if page.version != 'dotcom' and (page.version == 2.4 or page.version == 2.5) %}
+{% if page.version != 'dotcom' and page.version > 2.3 and page.version < 2.6 %}
{{#tip}}
From 8f3dd1456bd06a559e8431604b6339150b84e2c5 Mon Sep 17 00:00:00 2001
From: Hubot
Repositories
+
We're going to now talk to the GitHub API. Ready? - Click here to begin! + Click here to begin!
If that link doesn't work, remember to provide your own Client ID!
From cb063a6aa0b6918b230934c6017160eb4c01cf2f Mon Sep 17 00:00:00 2001
From: Hubot