@kolatts/pncli 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -744,6 +744,12 @@ var BitbucketClient = class {
744
744
  const pr = await this.getPR(project, repo, prId);
745
745
  return pr.reviewers;
746
746
  }
747
+ async addReviewer(project, repo, prId, username) {
748
+ return this.http.bitbucket(
749
+ `${API}/projects/${project}/repos/${repo}/pull-requests/${prId}/participants`,
750
+ { method: "POST", body: { user: { name: username }, role: "REVIEWER" } }
751
+ );
752
+ }
747
753
  async listBuilds(project, repo, prId) {
748
754
  const commits = await this.http.bitbucket(
749
755
  `${API}/projects/${project}/repos/${repo}/pull-requests/${prId}/commits`,
@@ -1986,6 +1992,16 @@ function registerBitbucketCommands(program2) {
1986
1992
  fail(err, "bitbucket", "list-reviewers", start);
1987
1993
  }
1988
1994
  });
1995
+ bb.command("add-reviewer").description("Add a reviewer to a pull request").requiredOption("--pr <pr-id>", "Pull request ID").requiredOption("--user <username>", "Username to add as a reviewer").action(async (opts) => {
1996
+ const start = Date.now();
1997
+ try {
1998
+ const { client, project, repo } = getClient2(bb);
1999
+ const data = await client.addReviewer(project, repo, parseInt(opts.pr, 10), opts.user);
2000
+ success(data, "bitbucket", "add-reviewer", start);
2001
+ } catch (err) {
2002
+ fail(err, "bitbucket", "add-reviewer", start);
2003
+ }
2004
+ });
1989
2005
  bb.command("list-builds").description("List build statuses for a pull request").requiredOption("--pr <pr-id>", "Pull request ID").action(async (opts) => {
1990
2006
  const start = Date.now();
1991
2007
  try {
@@ -9047,7 +9063,7 @@ function assertInteractive(hint) {
9047
9063
  }
9048
9064
  }
9049
9065
  var AGENT_PATHS = {
9050
- "github-copilot": { project: ".agents/skills", user: path7.join(os.homedir(), ".copilot/skills") },
9066
+ "github-copilot": { project: ".agents/skills", user: path7.join(os.homedir(), ".agents/skills") },
9051
9067
  "claude-code": { project: ".claude/skills", user: path7.join(os.homedir(), ".claude/skills") }
9052
9068
  };
9053
9069
  function resolveAgentName(opts) {