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

add revision describe (#15) #16

Merged
merged 2 commits into from
Feb 1, 2019
Merged

add revision describe (#15) #16

merged 2 commits into from
Feb 1, 2019

Conversation

nimakaviani
Copy link
Contributor

  • print the yaml formatted revision by default
  • allow for custom formatting to be passed in

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 30, 2019
@nimakaviani
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/cli-runtime/pkg/genericclioptions"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"

Choose a reason for hiding this comment

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

we should move this line into root command.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in a separate commit in the PR

var revisionDescribePrintFlags *genericclioptions.PrintFlags

func NewRevisionDescribeCommand(p *KnParams) *cobra.Command {
revisionDescribePrintFlags = genericclioptions.NewPrintFlags("").WithDefaultOutput("yaml")

Choose a reason for hiding this comment

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

should use := and remove outside declaration. wanna keep scope as tight as possible.


action, data, err := fakeRevision([]string{"revision", "describe", "test-rev"}, expectedRevision)
if err != nil {
t.Error(err)

Choose a reason for hiding this comment

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

t.Fatal(err) and below as well.

return
}

var returnedRevision = &v1alpha1.Revision{}

Choose a reason for hiding this comment

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

more common is to have var returnedRevision *v1alpha1.Revision{} as declaration

@evankanderson
Copy link
Member

evankanderson commented Jan 30, 2019 via email

@knative-prow-robot knative-prow-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 30, 2019
@@ -0,0 +1,65 @@
// Copyright © 2018 The Knative Authors
Copy link
Member

Choose a reason for hiding this comment

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

nit: 2019 🙃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. gotta fix it all across the board though. probably in a separate PR

@evankanderson
Copy link
Member

evankanderson commented Jan 31, 2019 via email

@sixolet
Copy link
Contributor

sixolet commented Jan 31, 2019

This looks good to me as soon as the copyright date is changed :)

@nimakaviani
Copy link
Contributor Author

done!

@nimakaviani nimakaviani mentioned this pull request Feb 1, 2019
* print the yaml formatted revision by default
* allow for custom formatting to be passed in
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2019
@cppforlife
Copy link

/lgtm
/approve

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cppforlife, nimakaviani, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2019
@sixolet sixolet merged commit ad636ad into knative:master Feb 1, 2019
@cppforlife cppforlife mentioned this pull request Feb 4, 2019
coryrc pushed a commit to coryrc/client that referenced this pull request May 14, 2020
Kaustubh-pande pushed a commit to Kaustubh-pande/client that referenced this pull request Aug 8, 2023
* Multiarch github action

* Remove upstream workflows from create-release-branch.sh

* Patch for ko base image

* Remove upstream github actions in update-to-head.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants