github_api 0.4.11 → 0.5.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +76 -72
- data/features/cassettes/gists/starred.yml +48 -0
- data/features/cassettes/pagination/repos/commits/list.yml +193 -0
- data/features/cassettes/pagination/repos/commits/next.yml +183 -0
- data/features/cassettes/pagination/repos/diff/next.yml +45 -0
- data/features/cassettes/pagination/repos/list.yml +176 -0
- data/features/cassettes/pagination/repos/list/next.yml +222 -0
- data/features/cassettes/pagination/repos/per_page/each_page.yml +45 -0
- data/features/cassettes/repos/list.yml +92 -0
- data/features/error_codes.feature +1 -1
- data/features/gists.feature +12 -3
- data/features/gists/comments.feature +3 -3
- data/features/github_api.feature +13 -2
- data/features/pagination.feature +40 -39
- data/features/repos.feature +2 -2
- data/features/step_definitions/common_steps.rb +12 -0
- data/features/step_definitions/github_api_steps.rb +12 -1
- data/lib/github_api.rb +1 -1
- data/lib/github_api/api.rb +4 -2
- data/lib/github_api/api_factory.rb +11 -5
- data/lib/github_api/authorizations.rb +23 -32
- data/lib/github_api/client.rb +1 -0
- data/lib/github_api/events.rb +38 -38
- data/lib/github_api/filter.rb +1 -1
- data/lib/github_api/gists.rb +47 -42
- data/lib/github_api/gists/comments.rb +77 -84
- data/lib/github_api/git_data.rb +25 -6
- data/lib/github_api/git_data/blobs.rb +48 -45
- data/lib/github_api/git_data/commits.rb +76 -73
- data/lib/github_api/git_data/references.rb +137 -118
- data/lib/github_api/git_data/tags.rb +74 -70
- data/lib/github_api/git_data/trees.rb +88 -85
- data/lib/github_api/issues.rb +43 -31
- data/lib/github_api/issues/comments.rb +116 -119
- data/lib/github_api/issues/events.rb +20 -19
- data/lib/github_api/issues/labels.rb +200 -197
- data/lib/github_api/issues/milestones.rb +137 -134
- data/lib/github_api/orgs.rb +27 -23
- data/lib/github_api/orgs/members.rb +105 -108
- data/lib/github_api/orgs/teams.rb +236 -237
- data/lib/github_api/paged_request.rb +1 -1
- data/lib/github_api/pull_requests.rb +40 -42
- data/lib/github_api/pull_requests/comments.rb +140 -143
- data/lib/github_api/repos.rb +101 -67
- data/lib/github_api/repos/collaborators.rb +64 -68
- data/lib/github_api/repos/commits.rb +50 -39
- data/lib/github_api/repos/downloads.rb +107 -110
- data/lib/github_api/repos/forks.rb +38 -39
- data/lib/github_api/repos/hooks.rb +161 -167
- data/lib/github_api/repos/keys.rb +86 -86
- data/lib/github_api/repos/pub_sub_hubbub.rb +99 -87
- data/lib/github_api/repos/watching.rb +80 -82
- data/lib/github_api/request.rb +5 -9
- data/lib/github_api/users.rb +26 -16
- data/lib/github_api/users/emails.rb +47 -47
- data/lib/github_api/users/followers.rb +85 -86
- data/lib/github_api/users/keys.rb +73 -75
- data/lib/github_api/validations.rb +25 -0
- data/lib/github_api/validations/format.rb +23 -0
- data/lib/github_api/validations/presence.rb +25 -0
- data/lib/github_api/validations/required.rb +21 -0
- data/lib/github_api/validations/token.rb +41 -0
- data/lib/github_api/version.rb +3 -3
- data/spec/fixtures/repos/commit_comparison.json +112 -0
- data/spec/github/api_factory_spec.rb +17 -1
- data/spec/github/authorizations_spec.rb +36 -34
- data/spec/github/gists/comments_spec.rb +39 -45
- data/spec/github/gists_spec.rb +50 -53
- data/spec/github/git_data/blobs_spec.rb +27 -20
- data/spec/github/git_data/commits_spec.rb +20 -19
- data/spec/github/git_data/references_spec.rb +83 -46
- data/spec/github/git_data/tags_spec.rb +16 -15
- data/spec/github/git_data/trees_spec.rb +20 -19
- data/spec/github/git_data_spec.rb +10 -1
- data/spec/github/issues/comments_spec.rb +78 -68
- data/spec/github/issues/events_spec.rb +42 -34
- data/spec/github/issues/labels_spec.rb +89 -101
- data/spec/github/issues/milestones_spec.rb +76 -54
- data/spec/github/issues_spec.rb +53 -57
- data/spec/github/orgs/members_spec.rb +64 -49
- data/spec/github/orgs/teams_spec.rb +112 -101
- data/spec/github/orgs_spec.rb +41 -31
- data/spec/github/paged_request_spec.rb +6 -5
- data/spec/github/pull_requests/comments_spec.rb +39 -44
- data/spec/github/pull_requests_spec.rb +32 -48
- data/spec/github/repos/collaborators_spec.rb +40 -29
- data/spec/github/repos/commits_spec.rb +108 -64
- data/spec/github/repos/downloads_spec.rb +46 -45
- data/spec/github/repos/forks_spec.rb +23 -24
- data/spec/github/repos/hooks_spec.rb +69 -71
- data/spec/github/repos/keys_spec.rb +39 -34
- data/spec/github/repos/pub_sub_hubbub_spec.rb +4 -4
- data/spec/github/repos/watching_spec.rb +31 -33
- data/spec/github/repos_spec.rb +74 -83
- data/spec/github/request_spec.rb +31 -2
- data/spec/github/users/emails_spec.rb +19 -17
- data/spec/github/users/followers_spec.rb +30 -28
- data/spec/github/users/keys_spec.rb +37 -33
- data/spec/github/users_spec.rb +124 -125
- data/spec/github/validations/format_spec.rb +42 -0
- data/spec/github/validations/presence_spec.rb +18 -0
- data/spec/github/validations/required_spec.rb +28 -0
- data/spec/github/validations/token_spec.rb +19 -0
- data/spec/github/validations_spec.rb +23 -0
- metadata +33 -10
- data/features/cassettes/pagination/repos.yml +0 -177
- data/features/cassettes/pagination/repos/next.yml +0 -177
- data/lib/github_api/validation.rb +0 -53
- data/spec/github/validation_spec.rb +0 -62
@@ -1,101 +1,94 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Github
|
4
|
-
class Gists
|
5
|
-
module Comments
|
4
|
+
class Gists::Comments < API
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
REQUIRED_GIST_COMMENT_INPUTS = %w[
|
7
|
+
body
|
8
|
+
].freeze
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
ALLOWED_GIST_COMMENT_INPUTS = %w[
|
11
|
+
body
|
12
|
+
mime_type
|
13
|
+
resource
|
14
|
+
].freeze
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
16
|
+
# List comments on a gist
|
17
|
+
#
|
18
|
+
# = Examples
|
19
|
+
# github = Github.new
|
20
|
+
# github.gists.comments.list 'gist-id'
|
21
|
+
#
|
22
|
+
def list(gist_id, params={})
|
23
|
+
_normalize_params_keys(params)
|
24
|
+
_validate_presence_of(gist_id)
|
25
|
+
# _merge_mime_type(:gist_comment, params)
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
alias :gist_comments :comments
|
27
|
+
response = get_request("/gists/#{gist_id}/comments", params)
|
28
|
+
return response unless block_given?
|
29
|
+
response.each { |el| yield el }
|
30
|
+
end
|
31
|
+
alias :all :list
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
# Get a single comment
|
34
|
+
#
|
35
|
+
# = Examples
|
36
|
+
# github = Github.new
|
37
|
+
# github.gists.comments.get 'comment-id'
|
38
|
+
#
|
39
|
+
def get(comment_id, params={})
|
40
|
+
_normalize_params_keys(params)
|
41
|
+
_validate_presence_of(comment_id)
|
42
|
+
# _merge_mime_type(:gist_comment, params)
|
45
43
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
alias :get_comment :comment
|
44
|
+
get_request("/gists/comments/#{comment_id}", params)
|
45
|
+
end
|
46
|
+
alias :find :get
|
50
47
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
48
|
+
# Create a comment
|
49
|
+
#
|
50
|
+
# = Examples
|
51
|
+
# github = Github.new
|
52
|
+
# github.gists.comments.create 'gist-id'
|
53
|
+
#
|
54
|
+
def create(gist_id, params={})
|
55
|
+
_normalize_params_keys(params)
|
56
|
+
# _merge_mime_type(:gist_comment, params)
|
57
|
+
_filter_params_keys(ALLOWED_GIST_COMMENT_INPUTS, params)
|
58
|
+
_validate_inputs(REQUIRED_GIST_COMMENT_INPUTS, params)
|
62
59
|
|
63
|
-
|
64
|
-
|
65
|
-
alias :create_gist_comment :create_comment
|
60
|
+
post_request("/gists/#{gist_id}/comments", params)
|
61
|
+
end
|
66
62
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
63
|
+
# Edit a comment
|
64
|
+
#
|
65
|
+
# = Examples
|
66
|
+
# github = Github.new
|
67
|
+
# github.gists.comments.edit 'comment-id'
|
68
|
+
#
|
69
|
+
def edit(comment_id, params={})
|
70
|
+
_normalize_params_keys(params)
|
71
|
+
_validate_presence_of(comment_id)
|
72
|
+
# _merge_mime_type(:gist_comment, params)
|
73
|
+
_filter_params_keys(ALLOWED_GIST_COMMENT_INPUTS, params)
|
74
|
+
_validate_inputs(REQUIRED_GIST_COMMENT_INPUTS, params)
|
79
75
|
|
80
|
-
|
81
|
-
|
82
|
-
alias :edit_gist_comment :edit_comment
|
76
|
+
patch_request("/gists/comments/#{comment_id}", params)
|
77
|
+
end
|
83
78
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
79
|
+
# Delete a comment
|
80
|
+
#
|
81
|
+
# = Examples
|
82
|
+
# github = Github.new
|
83
|
+
# github.gists.comments.delete 'comment-id'
|
84
|
+
#
|
85
|
+
def delete(comment_id, params={})
|
86
|
+
_normalize_params_keys(params)
|
87
|
+
_validate_presence_of(comment_id)
|
88
|
+
# _merge_mime_type(:gist_comment, params)
|
94
89
|
|
95
|
-
|
96
|
-
|
97
|
-
alias :delete_gist_comment :delete_comment
|
90
|
+
delete_request("/gists/comments/#{comment_id}", params)
|
91
|
+
end
|
98
92
|
|
99
|
-
|
100
|
-
end # Gists
|
93
|
+
end # Gists::Comments
|
101
94
|
end # Github
|
data/lib/github_api/git_data.rb
CHANGED
@@ -11,16 +11,35 @@ module Github
|
|
11
11
|
:Tags => 'tags',
|
12
12
|
:Trees => 'trees'
|
13
13
|
|
14
|
-
include Github::GitData::Blobs
|
15
|
-
include Github::GitData::Commits
|
16
|
-
include Github::GitData::References
|
17
|
-
include Github::GitData::Tags
|
18
|
-
include Github::GitData::Trees
|
19
|
-
|
20
14
|
# Creates new GitData API
|
21
15
|
def initialize(options = {})
|
22
16
|
super(options)
|
23
17
|
end
|
24
18
|
|
19
|
+
# Access to GitData::Blobs API
|
20
|
+
def blobs
|
21
|
+
@blobs ||= ApiFactory.new 'GitData::Blobs'
|
22
|
+
end
|
23
|
+
|
24
|
+
# Access to GitData::Commits API
|
25
|
+
def commits
|
26
|
+
@commits ||= ApiFactory.new 'GitData::Commits'
|
27
|
+
end
|
28
|
+
|
29
|
+
# Access to GitData::References API
|
30
|
+
def references
|
31
|
+
@references ||= ApiFactory.new 'GitData::References'
|
32
|
+
end
|
33
|
+
|
34
|
+
# Access to GitData::Tags API
|
35
|
+
def tags
|
36
|
+
@tags ||= ApiFactory.new 'GitData::Tags'
|
37
|
+
end
|
38
|
+
|
39
|
+
# Access to GitData::Tags API
|
40
|
+
def trees
|
41
|
+
@trees ||= ApiFactory.new 'GitData::Trees'
|
42
|
+
end
|
43
|
+
|
25
44
|
end # GitData
|
26
45
|
end # Github
|
@@ -1,52 +1,55 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Github
|
4
|
-
class GitData
|
4
|
+
class GitData::Blobs < API
|
5
5
|
# Since blobs can be any arbitrary binary data, the input and responses for
|
6
6
|
# the blob api takes an encoding parameter that can be either utf-8 or base64.
|
7
7
|
# If your data cannot be losslessly sent as a UTF-8 string, you can base64 encode it.
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
8
|
+
|
9
|
+
VALID_BLOB_PARAM_NAMES = %w[ content encoding ].freeze
|
10
|
+
|
11
|
+
# Creates new GitData::Blobs API
|
12
|
+
def initialize(options = {})
|
13
|
+
super(options)
|
14
|
+
end
|
15
|
+
|
16
|
+
# Get a blob
|
17
|
+
#
|
18
|
+
# = Examples
|
19
|
+
# github = Github.new
|
20
|
+
# github.git_data.blobs.get 'user-name', 'repo-name', 'sha'
|
21
|
+
#
|
22
|
+
def get(user_name, repo_name, sha, params={})
|
23
|
+
_update_user_repo_params(user_name, repo_name)
|
24
|
+
_validate_user_repo_params(user, repo) unless user? && repo?
|
25
|
+
_validate_presence_of sha
|
26
|
+
_normalize_params_keys params
|
27
|
+
|
28
|
+
get_request("/repos/#{user}/#{repo}/git/blobs/#{sha}", params)
|
29
|
+
end
|
30
|
+
alias :find :get
|
31
|
+
|
32
|
+
# Create a blob
|
33
|
+
#
|
34
|
+
# = Inputs
|
35
|
+
# * <tt>:content</tt> - String of content
|
36
|
+
# * <tt>:encoding</tt> - String containing encoding<tt>utf-8</tt> or <tt>base64</tt>
|
37
|
+
# = Examples
|
38
|
+
# github = Github.new
|
39
|
+
# github.git_data.blobs.create 'user-name', 'repo-name',
|
40
|
+
# "content" => "Content of the blob",
|
41
|
+
# "encoding" => "utf-8"
|
42
|
+
#
|
43
|
+
def create(user_name, repo_name, params={})
|
44
|
+
_update_user_repo_params(user_name, repo_name)
|
45
|
+
_validate_user_repo_params(user, repo) unless user? && repo?
|
46
|
+
|
47
|
+
_normalize_params_keys(params)
|
48
|
+
_filter_params_keys(VALID_BLOB_PARAM_NAMES, params)
|
49
|
+
_validate_inputs(VALID_BLOB_PARAM_NAMES, params)
|
50
|
+
|
51
|
+
post_request("/repos/#{user}/#{repo}/git/blobs", params)
|
52
|
+
end
|
53
|
+
|
54
|
+
end # GitData::Blobs
|
52
55
|
end # Github
|
@@ -1,84 +1,87 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Github
|
4
|
-
class GitData
|
5
|
-
module Commits
|
4
|
+
class GitData::Commits < API
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
VALID_COMMIT_PARAM_NAMES = %w[
|
7
|
+
message
|
8
|
+
tree
|
9
|
+
parents
|
10
|
+
author
|
11
|
+
committer
|
12
|
+
name
|
13
|
+
email
|
14
|
+
date
|
15
|
+
].freeze
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
REQUIRED_COMMIT_PARAMS = %w[
|
18
|
+
message
|
19
|
+
tree
|
20
|
+
parents
|
21
|
+
].freeze
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
# @github.git_data.commit 'user-name', 'repo-name', 'sha'
|
29
|
-
#
|
30
|
-
def commit(user_name, repo_name, sha, params={})
|
31
|
-
_update_user_repo_params(user_name, repo_name)
|
32
|
-
_validate_user_repo_params(user, repo) unless user? && repo?
|
33
|
-
_validate_presence_of sha
|
34
|
-
_normalize_params_keys(params)
|
23
|
+
# Creates new GitData::Commits API
|
24
|
+
def initialize(options = {})
|
25
|
+
super(options)
|
26
|
+
end
|
35
27
|
|
36
|
-
|
37
|
-
|
38
|
-
|
28
|
+
# Get a commit
|
29
|
+
#
|
30
|
+
# = Examples
|
31
|
+
# @github = Github.new
|
32
|
+
# @github.git_data.commit 'user-name', 'repo-name', 'sha'
|
33
|
+
#
|
34
|
+
def get(user_name, repo_name, sha, params={})
|
35
|
+
_update_user_repo_params(user_name, repo_name)
|
36
|
+
_validate_user_repo_params(user, repo) unless user? && repo?
|
37
|
+
_validate_presence_of sha
|
38
|
+
_normalize_params_keys(params)
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
# * <tt>message</tt> - String of the commit message
|
44
|
-
# * <tt>tree</tt> - String of the SHA of the tree object this commit points to
|
45
|
-
# * <tt>parents</tt> - Array of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided, for a merge commit, an array of more than one should be provided.
|
46
|
-
#
|
47
|
-
# = Optional Parameters
|
48
|
-
#
|
49
|
-
# The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated users information and the current date.
|
50
|
-
#
|
51
|
-
# * author.name:: String of the name of the author of the commit
|
52
|
-
# * author.email:: String of the email of the author of the commit
|
53
|
-
# * author.date:: Timestamp of when this commit was authored
|
54
|
-
# * committer.name:: String of the name of the committer of the commit
|
55
|
-
# * committer.email:: String of the email of the committer of the commit
|
56
|
-
# * committer.date:: Timestamp of when this commit was committed
|
57
|
-
#
|
58
|
-
# = Examples
|
59
|
-
# @github = Github.new
|
60
|
-
# @github.git_data.create_commit 'user-name', 'repo-name',
|
61
|
-
# "message": "my commit message",
|
62
|
-
# "author": {
|
63
|
-
# "name": "Scott Chacon",
|
64
|
-
# "email": "schacon@gmail.com",
|
65
|
-
# "date": "2008-07-09T16:13:30+12:00"
|
66
|
-
# },
|
67
|
-
# "parents": [
|
68
|
-
# "7d1b31e74ee336d15cbd21741bc88a537ed063a0"
|
69
|
-
# ],
|
70
|
-
# "tree": "827efc6d56897b048c772eb4087f854f46256132"]
|
71
|
-
#
|
72
|
-
def create_commit(user_name, repo_name, params={})
|
73
|
-
_update_user_repo_params(user_name, repo_name)
|
74
|
-
_validate_user_repo_params(user, repo) unless user? && repo?
|
75
|
-
_normalize_params_keys(params)
|
76
|
-
_filter_params_keys(VALID_COMMIT_PARAM_NAMES, params)
|
77
|
-
_validate_inputs(REQUIRED_COMMIT_PARAMS, params)
|
40
|
+
get_request("/repos/#{user}/#{repo}/git/commits/#{sha}", params)
|
41
|
+
end
|
42
|
+
alias :find :get
|
78
43
|
|
79
|
-
|
80
|
-
|
44
|
+
# Create a commit
|
45
|
+
#
|
46
|
+
# = Parameters
|
47
|
+
# * <tt>message</tt> - String of the commit message
|
48
|
+
# * <tt>tree</tt> - String of the SHA of the tree object this commit points to
|
49
|
+
# * <tt>parents</tt> - Array of the SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided, for a merge commit, an array of more than one should be provided.
|
50
|
+
#
|
51
|
+
# = Optional Parameters
|
52
|
+
#
|
53
|
+
# The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated users information and the current date.
|
54
|
+
#
|
55
|
+
# * author.name:: String of the name of the author of the commit
|
56
|
+
# * author.email:: String of the email of the author of the commit
|
57
|
+
# * author.date:: Timestamp of when this commit was authored
|
58
|
+
# * committer.name:: String of the name of the committer of the commit
|
59
|
+
# * committer.email:: String of the email of the committer of the commit
|
60
|
+
# * committer.date:: Timestamp of when this commit was committed
|
61
|
+
#
|
62
|
+
# = Examples
|
63
|
+
# @github = Github.new
|
64
|
+
# @github.git_data.create_commit 'user-name', 'repo-name',
|
65
|
+
# "message": "my commit message",
|
66
|
+
# "author": {
|
67
|
+
# "name": "Scott Chacon",
|
68
|
+
# "email": "schacon@gmail.com",
|
69
|
+
# "date": "2008-07-09T16:13:30+12:00"
|
70
|
+
# },
|
71
|
+
# "parents": [
|
72
|
+
# "7d1b31e74ee336d15cbd21741bc88a537ed063a0"
|
73
|
+
# ],
|
74
|
+
# "tree": "827efc6d56897b048c772eb4087f854f46256132"]
|
75
|
+
#
|
76
|
+
def create(user_name, repo_name, params={})
|
77
|
+
_update_user_repo_params(user_name, repo_name)
|
78
|
+
_validate_user_repo_params(user, repo) unless user? && repo?
|
79
|
+
_normalize_params_keys(params)
|
80
|
+
_filter_params_keys(VALID_COMMIT_PARAM_NAMES, params)
|
81
|
+
_validate_inputs(REQUIRED_COMMIT_PARAMS, params)
|
81
82
|
|
82
|
-
|
83
|
-
|
83
|
+
post_request("/repos/#{user}/#{repo}/git/commits", params)
|
84
|
+
end
|
85
|
+
|
86
|
+
end # GitData::Commits
|
84
87
|
end # Github
|