Closed henriquemoraeszup closed 3 years ago
hello @henriquemoraeszup, can i work on this? :smile:
I've assigned you the issue @matheussn 👍🏼 Thanks for helping once again 🚀
Sorry for the delay, please go ahead! You have been an active contributor and we appreciate it! @matheussn would you be willing to have a chat with the team next week so we get your feedback on ritchie?
Hello @henriquemoraeszup! These are my first contributions to Open Source projects. I am very happy to contribute to the project, and happier for the recognition! And I would love to participate in this chat!
Wassup @matheussn! I will schedule 30min shortly. Also we have updated the user flow on the description on how this command should behave
hello @matheussn, how are you? if you need any help i am on hand to assist in whatever is necessary.
Hi! I did an implementation, but I didn't like some details hehehe 😄 Even so, I will open the PR for you to help me
@lucasdittrichzup Currently, I'm getting the token like this:
token, err = ad.Resolve (" CREDENTIAL_ "+ provider +" -add-repo_token ")
"github-add-repo" and "gitlab-add-repo", would be the new credentials, as agreed.
As I understand it, this Resolve
method is used to get information from credentials that are not necessarily listed as Ritchie" default credentials ".
Since the credentials listed above will be listed in Ritchie's "default credentials", I believe that using this method is not ideal.
I was thinking of creating a method to abstract the part of asking the user for the fields of standard credentials. Where I say "Create credential X" And regardless of the number of fields and types, he creates the structure for that credential.
Some questions:
I was thinking of creating a method to abstract the part of asking the user for the fields of standard credentials. Where I say "Create credential X" And regardless of the number of fields and types, he creates the structure for that credential.
Would the set credential class help with this part @matheussn ?
Would the set credential class help with this part @matheussn ?
Yes, the idea would be to abstract the user input part of that class, so that I could use it in the add repo command. And don't use the Resolve
method, since in the set credential
class I would also be able to create the "github-add-repo" and "gitlab-add-repo" credentials.
There is the runStdin()
method in that class that could work informing the input parameters directly. But the stdin
method is deprecated as everything will migrate to the input flag
method, as used for formulas.
This issue has been automatically marked as stale because it hasn't had any activity in 60 days. It will be closed in 7 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn't apply. Thank you for submitting this issue and helping make Ritchie a better product!
What would you like to be added: When adding a private repo, the token is asked for every time. Ritchie could try to fetch the credential from the saved file. If there is no credential, prompt and save it
IMPORTANT: We should have a specific dedicated credential value for this token and In case a 401 is found (i.e.: user has more than 1 private repo requiring more than 1 different tokens), we should instruct the user about the fail and how he/she can proceed by either overwriting the current token or by switching to a new env
Why is this needed: For better DevEx and so people do not need to regenerate private tokens every time they add a repo