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

Added completion for domain command #1562

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

vyasgun
Copy link
Contributor

@vyasgun vyasgun commented Jan 6, 2022

Description

Added auto completion function for domain command

Changes

  • Added auto completion function for domain command
  • Added unit tests for the above

Reference

Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@vyasgun: 0 warnings.

In response to this:

Description

Added auto completion function for domain command

Changes

  • Added auto completion function for domain command
  • Added unit tests for the above

Reference

Fixes #1373

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 6, 2022
@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Merging #1562 (f192bcb) into main (07d0cd7) will increase coverage by 0.02%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1562      +/-   ##
==========================================
+ Coverage   79.63%   79.65%   +0.02%     
==========================================
  Files         163      163              
  Lines        8597     8616      +19     
==========================================
+ Hits         6846     6863      +17     
- Misses       1071     1072       +1     
- Partials      680      681       +1     
Impacted Files Coverage Δ
pkg/kn/commands/completion_helper.go 89.56% <88.23%> (-0.34%) ⬇️
pkg/kn/commands/domain/delete.go 82.60% <100.00%> (+0.79%) ⬆️
pkg/kn/commands/domain/describe.go 81.13% <100.00%> (+0.36%) ⬆️
pkg/kn/commands/domain/update.go 66.66% <100.00%> (+0.95%) ⬆️

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 07d0cd7...f192bcb. Read the comment docs.

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 10, 2022
Comment on lines 31 to 33
resourceToFuncMap = map[string]func(config *completionConfig) []string{
"service": completeService,
"domain": completeDomain,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since that's going to be the last conflict. Maybe, I'd order the list alphabetically by the resource name for the better overview.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I reordered.

@vyasgun vyasgun force-pushed the pr/completion-domain branch from db0baea to f192bcb Compare January 10, 2022 18:31
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 10, 2022
@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-client-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/kn/commands/completion_helper.go 95.0% 94.9% -0.1

Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

Wondering if we really should have completion helper for delete?

Also, is this worth adding some docs to README or perhaps a simple ascii recoding?

@vyasgun
Copy link
Contributor Author

vyasgun commented Jan 11, 2022

@maximilien delete needs a resource name so I think there should be completion suggestions.

@dsimansk
Copy link
Contributor

dsimansk commented Jan 11, 2022

Wondering if we really should have completion helper for delete?

Also, is this worth adding some docs to README or perhaps a simple ascii recoding?

IMO, it should be consistent across the commands, therefore once there's NAME arg required such command should have completion enabled.

@maximilien I'd suggest to continue with merging this PR, as it's part of "add completion" issue and maybe continue the further discussion about delete case there. Wdyt?

@dsimansk dsimansk linked an issue Jan 11, 2022 that may be closed by this pull request
6 tasks
@dsimansk dsimansk mentioned this pull request Jan 11, 2022
6 tasks
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2022
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dsimansk, vyasgun

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 Jan 12, 2022
@knative-prow-robot knative-prow-robot merged commit d8670f5 into knative:main Jan 12, 2022
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.

Context sensitive Bash completion
5 participants