-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create GraphQL-REST Controller for Branches and Tags #190
Create GraphQL-REST Controller for Branches and Tags #190
Conversation
Codecov Report
@@ Coverage Diff @@
## master #190 +/- ##
==========================================
+ Coverage 99.97% 99.97% +<.01%
==========================================
Files 197 201 +4
Lines 4599 4701 +102
==========================================
+ Hits 4598 4700 +102
Misses 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# frozen_string_literal: true | ||
|
||
module V3 | ||
# Handles requests for branches read operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for branch read operations
# frozen_string_literal: true | ||
|
||
module V3 | ||
# Handles requests for tags read operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for tag read operations
'name' => params[:name]} | ||
end | ||
query <<-QUERY | ||
query ($id: ID!,$name: String!) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space after the comma
'name' => params[:name]} | ||
end | ||
query <<-QUERY | ||
query ($id: ID!,$name: String!) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space after the comma
config/routes.rb
Outdated
get '/tags', | ||
controller: 'v3/tags', action: 'index' | ||
get '/tags/:name', | ||
controller: 'v3/tags', action: 'show' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make all of these one-lined if they fit in 80 characters.
"id": { | ||
"type": "string", | ||
"example": "498875f01d2f57f01a83338d80f0fd0b05b39eb4", | ||
"description": "ID of the tag" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ID of the commit that the tag points to
"id":{ | ||
"type": "string", | ||
"example": "498875f01d2f57f01a83338d80f0fd0b05b39eb4", | ||
"description": "ID of the branch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ID of the commit that the branch points to
"type": "string", | ||
"example": "my first annotated tag", | ||
"description": "Annotation of the tag" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The annotation can be null
. Please use oneOf
.
}, | ||
{ | ||
"title": "Index", | ||
"description": "List all tags of an repository Returns HTTP 200 (OK).", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tags of a repository
"targetSchema": { "$ref": "#/definitions/actions/index" } | ||
} | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a trailing newline.
Since #198 is merged, you need to
|
946ce4e
to
f049788
Compare
# frozen_string_literal: true | ||
|
||
module Rest | ||
# Handles requests for tags read operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for tag read operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closes #184