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

SKARA-725: Rename git-pr-reviewer --add to git-pr-reviewer --credit #938

wants to merge 2 commits into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -23,8 +23,6 @@

import org.openjdk.skara.args.*;
import org.openjdk.skara.issuetracker.Comment;
import org.openjdk.skara.forge.PullRequest;

import static*;

@@ -34,9 +32,9 @@
public class GitPrReviewer {
static final List<Flag> flags = List.of(
.helptext("Consider pull request reviewed by this user")
.helptext("Credit a person as a reviewer of this pull request")
@@ -73,16 +71,16 @@ public static void main(String[] args) throws IOException, InterruptedException
var id = pullRequestIdArgument(repo, arguments);
var pr = getPullRequest(uri, repo, host, id);

if (arguments.contains("add")) {
var username = arguments.get("add").asString();
var comment = pr.addComment("/reviewer add" + " " + username);
if (arguments.contains("credit")) {
var username = arguments.get("credit").asString();
var comment = pr.addComment("/reviewer credit" + " " + username);
showReply(awaitReplyTo(pr, comment));
} else if (arguments.contains("remove")) {
var username = arguments.get("remove").asString();
var comment = pr.addComment("/reviewer remove" + " " + username);
showReply(awaitReplyTo(pr, comment));
} else {
System.err.println("error: must use either --add or --remove");
System.err.println("error: must use either --credit or --remove");