Skip to content

Commit 31b7507

Browse files
authored
Merge pull request piotrmurach#287 from prasadsurase/updated-tags-create-parameters
Updated the tags creation parameters to reflect current api options.
2 parents 8264891 + 8811288 commit 31b7507

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

lib/github_api/client/git_data/tags.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module Github
44
class Client::GitData::Tags < API
55
# This tags api only deals with tag objects -
66
# so only annotated tags, not lightweight tags.
7+
# Refer https://developer.github.com/v3/git/tags/#parameters
78

89
VALID_TAG_PARAM_NAMES = %w[
910
tag
@@ -13,8 +14,6 @@ class Client::GitData::Tags < API
1314
name
1415
email
1516
date
16-
sha
17-
url
1817
tagger
1918
].freeze
2019

spec/github/client/git_data/tags/create_spec.rb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,15 @@
1818

1919
let(:inputs) {
2020
{
21-
"tag" => "v0.0.1",
22-
"message" => "initial version\n",
23-
"object" => {
24-
"type" => "commit",
25-
"sha" => "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
26-
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
27-
},
28-
"tagger" => {
29-
"name" => "Scott Chacon",
30-
"email" => "[email protected]",
31-
"date" => "2011-06-17T14:53:35-07:00"
32-
},
33-
'unrelated' => 'giberrish'
21+
"tag": "v0.0.1",
22+
"message": "initial version\n",
23+
"object": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
24+
"type": "commit",
25+
"tagger": {
26+
"name": "Scott Chacon",
27+
"email": "[email protected]",
28+
"date": "2011-06-17T14:53:35-07:00"
29+
}
3430
}
3531
}
3632

0 commit comments

Comments
 (0)