Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Set credential flags #824

Merged

Conversation

henriquemoraeszup
Copy link
Contributor

Description

  • Adding flag capacity to the command rit set credential with provider, fields, and values. Fields and values are a comma separated list of strings.
  • Simplified the user flow by removing the "add new credential from filepath" option. It does not seem to bring any value to provide a filepath for a txt file with a single credential value in it. Also there has not been any reports about user consuming this functionality

How to verify it

Run rit set credential --provider=github fields=username,token values=user1,token1

Changelog

Added flag capacity to rit set credential
Removed add new credential from filepath capacity

Screen Shot 2021-01-10 at 10 53 01

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

merge
…credential-flags

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

# Conflicts:
#	pkg/cmd/cmd.go
#	pkg/cmd/delete_credential.go
#	pkg/cmd/delete_credential_test.go
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

Fixing tests and mocks
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
…credential-flags

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

# Conflicts:
#	internal/mocks/mocks.go
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

Implementing tests
…dential-flags

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>

# Conflicts:
#	pkg/cmd/cmd.go
#	pkg/cmd/delete_credential.go
#	pkg/cmd/formula.go
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
@henriquemoraeszup henriquemoraeszup self-assigned this Jan 11, 2021
@henriquemoraeszup henriquemoraeszup added 📚 documentation Improvements or additions to documentation 🔨 improvement Improvement in features labels Jan 11, 2021
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
@codecov-io
Copy link

codecov-io commented Jan 11, 2021

Codecov Report

Merging #824 (22186b7) into master (37ab4d1) will decrease coverage by 0.32%.
The diff coverage is 73.07%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #824      +/-   ##
==========================================
- Coverage   84.34%   84.01%   -0.33%     
==========================================
  Files         111      111              
  Lines        3857     3873      +16     
==========================================
+ Hits         3253     3254       +1     
- Misses        432      438       +6     
- Partials      172      181       +9     
Impacted Files Coverage Δ
pkg/commands/builder.go 90.25% <ø> (-0.05%) ⬇️
pkg/cmd/delete_credential.go 92.13% <64.28%> (-4.34%) ⬇️
pkg/cmd/set_credential.go 69.09% <75.00%> (-7.68%) ⬇️
pkg/cmd/cmd.go 70.83% <100.00%> (+2.65%) ⬆️

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 37ab4d1...22186b7. Read the comment docs.

Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
Signed-off-by: Henrique Moraes <henrique.moraes@zup.com.br>
@henriquemoraeszup henriquemoraeszup linked an issue Jan 18, 2021 that may be closed by this pull request
pkg/cmd/set_credential.go Show resolved Hide resolved
@lucasdittrichzup
Copy link
Contributor

/merge qa

@lucasdittrichzup lucasdittrichzup merged commit d365d2e into ZupIT:master Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📚 documentation Improvements or additions to documentation 🔨 improvement Improvement in features ✔️ ready-for-review ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support flags for rit set credential
4 participants