-
Notifications
You must be signed in to change notification settings - Fork 203
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
WIP: Specify user by ID in assign-user-to-coauthor #698
base: develop
Are you sure you want to change the base?
Conversation
@@ -210,30 +210,36 @@ public function assign_coauthors( $args, $assoc_args ) { | |||
* @since 3.0 | |||
* | |||
* @subcommand assign-user-to-coauthor | |||
* @synopsis --user_login=<user-login> --coauthor=<coauthor> | |||
* @synopsis --user_login=<user-login> --user_id=<user-id> --coauthor=<coauthor> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not at all sure how to specify that one of user_login
or user_id
is required. Anyone else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In git
's man pages, parentheses and pipes are used to indicate that a subcommand accepts one and only one of a selection of flags (see the last line):
SYNOPSIS
git rebase [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
[<upstream> [<branch>]]
git rebase [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>]
--root [<branch>]
git rebase (--continue | --skip | --abort | --quit | --edit-todo | --show-current-patch)
So this line could be rewritten as:
* @synopsis ( --user_login=<user-login> | --user_id=<user-id> ) --coauthor=<coauthor>
Can you please refresh and fix the conflicts? |
If a user has already been deleted, we need to specify just the user ID when assigning coauthors, instead of the login. This PR adds a second command-line option. One of either
--user_id
or--user_login
is required. Existing behaviour should be unchanged.