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

Allow declaring reviewers from keywords #14

Closed
operte opened this issue Mar 5, 2021 · 3 comments
Closed

Allow declaring reviewers from keywords #14

operte opened this issue Mar 5, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@operte
Copy link
Collaborator

operte commented Mar 5, 2021

Imagine if I have a long list of contributors or I don't want to set the same default reviewers all the time but I also don't want to type their emails out when declaring the reviewers.

An idea is to allow the user to define a list of contributors on the doing-cli config file, so a keyword (like the first name of the contributor) and its email address:

john: john.doe@email.net
jane: jane.doe@webmail.org

So then I could do doing create pr --reviewers john jane

What do you think? Does it sound useful?

@operte operte added the enhancement New feature or request label Mar 5, 2021
@timvink
Copy link
Collaborator

timvink commented Mar 6, 2021

Really good idea!

So something like:

# .doing-cli-config.yml
# ... other settings ....
aliases:
    - john: john.doe@email.net
    - jane: jane.doe@webmail.org

Would allow you to use the aliases in both reviewers and assignees:

  • doing create pr --reviewers 'john jane'. it needs a string because --reviewers takes a single option. doing would expand the string to 'john.doe@email.net jane.doe@webmail.org' before passing it to the az devops cli.
  • doing create issue "an issue" -a john

It would have to work with default_reviewers as well.

Thoughts? And, do you want to work on the PR or shall I pick it up? :)

@timvink
Copy link
Collaborator

timvink commented Mar 10, 2021

@operte any feedback on the synax for aliases?

@operte
Copy link
Collaborator Author

operte commented Mar 10, 2021

Your idea sounds good to me.
We can scan the string of reviewers and if the individual elements don't include an @ in them, then we search for matches in .doing-cli-config.yaml#aliases. I like that :)

I don't think I'll be able to work on this for the next couple of weeks, though, so if you want to go ahead, that's fine with me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants