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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-pr: rename "update" to "set" #449

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -552,7 +552,7 @@ public static void main(String[] args) throws IOException, InterruptedException
.optional());

var actions = List.of("list", "fetch", "show", "checkout", "apply", "integrate",
"approve", "create", "close", "update", "test", "status");
"approve", "create", "close", "set", "test", "status");
var inputs = List.of(
Input.position(0)
.describe(String.join("|", actions))
@@ -1383,15 +1383,15 @@ public static void main(String[] args) throws IOException, InterruptedException
var remoteRepo = getHostedRepositoryFor(uri, repo, host);
var pr = remoteRepo.pullRequest(prId.asString());
pr.setState(PullRequest.State.CLOSED);
} else if (action.equals("update")) {
} else if (action.equals("set")) {
var prId = arguments.at(1);
if (!prId.isPresent()) {
exit("error: missing pull request identifier");
}

var remoteRepo = getHostedRepositoryFor(uri, repo, host);
var pr = remoteRepo.pullRequest(prId.asString());
var assigneesOption = getOption("assignees", "update", arguments);
var assigneesOption = getOption("assignees", "set", arguments);
if (assigneesOption != null) {
var usernames = Arrays.asList(assigneesOption.split(","));
var assignees = usernames.stream()