Skip to content
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

Merged

Conversation

DerProfessor
Copy link
Member

Closes #184

@codecov-io
Copy link

codecov-io commented Aug 25, 2017

Codecov Report

Merging #190 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
app/controllers/rest/tags_controller.rb 100% <100%> (ø)
app/controllers/rest/branches_controller.rb 100% <100%> (ø)
spec/controllers/rest/branches_controller_spec.rb 100% <100%> (ø)
spec/controllers/rest/tags_controller_spec.rb 100% <100%> (ø)
config/routes.rb 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9412a52...2d96213. Read the comment docs.

Copy link
Member

@eugenk eugenk left a 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
Copy link
Member

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
Copy link
Member

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!) {
Copy link
Member

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!) {
Copy link
Member

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'
Copy link
Member

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"
Copy link
Member

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"
Copy link
Member

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"
}
Copy link
Member

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).",
Copy link
Member

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" }
}
]
}
Copy link
Member

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.

@eugenk
Copy link
Member

eugenk commented Sep 1, 2017

Since #198 is merged, you need to

  • rebase on master
  • put the new routes in the proper scope block
  • change every v3 to rest (same with upper case)

@DerProfessor DerProfessor force-pushed the 184-create_graphql-rest_controller_for_branches_and_tags branch from 946ce4e to f049788 Compare September 6, 2017 08:01
# frozen_string_literal: true

module Rest
# Handles requests for tags read operations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for tag read operations

Copy link
Member

@eugenk eugenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DerProfessor DerProfessor merged commit 8ba9e81 into master Sep 6, 2017
@DerProfessor DerProfessor deleted the 184-create_graphql-rest_controller_for_branches_and_tags branch September 6, 2017 08:17
This was referenced Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants