Commit graph

5 commits

Author SHA1 Message Date
Miklos Vajna
3859ca3119 g review: check if 'gh' is authenticated already
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I689348489f89d74b10782302d7bea57a845e36d4
2020-10-26 11:03:32 +01:00
Miklos Vajna
85e51bbb53 g review: update list of remote branches before checking for branch existence
This helps in case you deleted a remote branch using the GitHub web UI,
so the local view is outdated.

Change-Id: I98be33ea5712c66589f42b64e3462b76b84fbcc5
2020-10-22 14:32:55 +02:00
Miklos Vajna
a1ff7a7fee ./g review: don't assume that local and tracked branch is the same
E.g. local branch is OK to be 'co-4-2' while it tracks
origin/distro/collabora/co-4-2.

Previously this was only working when the local branch was not renamed.

Change-Id: I11c24d71e903d27d34ec498604190d6b436b593d
2020-10-14 09:39:29 +02:00
Miklos Vajna
b35b2448ab ./g review: add an optional 'name' parameter
Use-case: create a commit, submit to CI, then forget about it (git reset
--hard origin/master). Then create a next commit, and submit that to CI
as well -- instead of silently updating the previous PR.

Now the silent update doesn't happen anymore:

- If the update is intentional, have to specify the same branch name
explicitly. (E.g. you're on master, then specify 'master'.)

- If the update is not intentional, choose a different name.

Change-Id: Iee9d9ef13286a6a5083c6f9a28682ba65b8504ff
2020-10-09 15:51:19 +02:00
Miklos Vajna
2ca8cf9f7e Add a './g review' script to trigger CI for a commit in an easy way
Similar to gerrit's 'git review' which creates/updates a change without
clicking anywhere in a browser.

Also add a './g pull' to help those who are used to that.

Change-Id: I240ff55c7480d0a2cd6de3f2ea3cd84ca0556af4
2020-10-09 11:58:43 +02:00