GCLI-PULLS(1) | General Commands Manual | GCLI-PULLS(1) |
gcli pulls
—
Manage Pull Requests on Git Forges
gcli pulls |
[-a ] [-A
author] [-L
label] [-M
milestone] [-s ]
[-n n]
[-o owner
-r repo] |
gcli pulls |
-i pr
[-o owner
-r repo]
actions... |
gcli pulls |
create [-o
owner -r
repo] [-t
branch] [-f
owner:branch] [-y ]
PR title... |
Use gcli pulls
to list, create, edit or
delete Pull Requests (PRs) in repositories on various
git(1) forges such as GitLab, Gitea or GitHub. Without any
action specified, gcli pulls
will list open PRs in
the given or autodetected repository.
-s
,
--sorted
-o
,
--owner
owner-r
.-r
,
--repo
repo-o
.-A
,
--author
authorNote that the implementation is somewhat limited on GitHub and
Gitea since the respective API does not allow off-loading the filtering
to its side. Due to this fact using this option may take an increased
amount of time because gcli pulls
needs to
iterate all the fetched data and filter out the requested
information.
-L
,
--label
label-A
option above - the same reasoning applies to
this option.-M
,
--milestone
milestone-A
option above - the same reasoning applies to
this option.-a
-n
option. Note
that this flag has a different meaning in the
create
subcommand. See
SUBCOMMANDS for more
information.-n
,
--count
n-i
,
--id
PRcreate
The following flags can be specified:
-o
,
--owner
owner-r
,
--repo
repository-t
,
--to
branch-f
,
--from
owner:branch-y
,
--yes
-a
,
--automerge
actions... may be one or more of the following:
all
status
, op
,
commits and
ci
.commits
comments
status
op
ci
diff
close
reopen
merge
[options]--squash
,
-s
--inhibit-delete
,
-D
milestone
milestone-idmilestone
-d
notes
comments
action that prints a list
of comments associated with the PR.labels
[options]title
new-titlePrint a list of open PRs in the current project:
$ gcli pulls
Create a new PR in the current Project, the head is the currently checked out branch of git. See git-status(1) The base will be what pr.base in .gcli is set to.
$ gcli pulls create "summary here"
Print both a summary and comments of PR 11 in herrhotzenplotz/gcli:
$ gcli pulls -o herrhotzenplotz -r gcli -i 11 all comments
Merge PR 42 in the upstream repository:
$ gcli pulls -i 42 merge
Note that you could also pull the PR head and merge it manually into the base branch. Assuming trunk is the base branch:
$ git fetch upstream pull/42/head:42-review $ git checkout 42-review $ <make etc> $ git checkout trunk $ git merge --no-ff 42-review
List pull requests that have the “bug” label:
$ gcli pulls -L bug
List pull requests that are associated with the milestone “version420”:
$ gcli pulls -M version420
Change the title of pull request #42 on Github to “This is the new title”:
$ gcli -t github pulls -i 42 title "This is the new title"
Same command as above, but with abbreviated pulls subcommand:
$ gcli -t github pu -i 42 title "This is the new title"
Nico Sonack aka. herrhotzenplotz <nsonack@herrhotzenplotz.de> and contributors.
Please report bugs via E-Mail to ~herrhotzenplotz/gcli-discuss@lists.sr.ht.
Alternatively you can report them on any of the forges linked at https://herrhotzenplotz.de/gcli. However, the preferred and quickest method is to use the mailing list.
2024-Feb-05 | gcli 2.2.0 |