maybe a handy script for working with PRs

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

maybe a handy script for working with PRs

Otto Fowler
On the metron project, many of our committers use a couple of scripts when
working with PRs, either cloning and testing or preparing commits.
I have created a version of the checkout-pr script for the nifi project,
and though maybe someone would be interested.

This work is a fork of Nick Allen’s original repo for Metron.

https://github.com/ottobackwards/commit-pr-stuff

If you look in the nifi folder, there is a checkout-nifi-pr script, which
when called will checkout a pr for you to work with.
I am not sure if you have something similar already, but I thought I would
throw this over the wall just the same.

O
Reply | Threaded
Open this post in threaded view
|

Re: maybe a handy script for working with PRs

Andy LoPresto-2
Thanks Otto. I have a similar bash function I use:

function gpr() {
echo "Fetching and checking out new git branch pr$@..."
git fetch --all
git checkout master
git pull upstream master
git checkout "upstream/pr/$@"
git checkout -b "pr$@“
}

Usage: For PR 1234

$ gpr 1234

Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Mar 23, 2017, at 7:00 AM, Otto Fowler <[hidden email]> wrote:

On the metron project, many of our committers use a couple of scripts when
working with PRs, either cloning and testing or preparing commits.
I have created a version of the checkout-pr script for the nifi project,
and though maybe someone would be interested.

This work is a fork of Nick Allen’s original repo for Metron.

https://github.com/ottobackwards/commit-pr-stuff

If you look in the nifi folder, there is a checkout-nifi-pr script, which
when called will checkout a pr for you to work with.
I am not sure if you have something similar already, but I thought I would
throw this over the wall just the same.

O


signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: maybe a handy script for working with PRs

Otto Fowler
Nice,
I like this one because I can just dump a pr in ~/tmp or wherever -or- in
my current.

I’ll star this though :)


On March 23, 2017 at 18:55:52, Andy LoPresto ([hidden email]) wrote:

Thanks Otto. I have a similar bash function I use:

function gpr() {
echo "Fetching and checking out new git branch pr$@..."
git fetch --all
git checkout master
git pull upstream master
git checkout "upstream/pr/$@"
git checkout -b "pr$@“
}

Usage: For PR 1234

$ gpr 1234

Andy LoPresto
[hidden email]
*[hidden email] <[hidden email]>*
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Mar 23, 2017, at 7:00 AM, Otto Fowler <[hidden email]> wrote:

On the metron project, many of our committers use a couple of scripts when
working with PRs, either cloning and testing or preparing commits.
I have created a version of the checkout-pr script for the nifi project,
and though maybe someone would be interested.

This work is a fork of Nick Allen’s original repo for Metron.

https://github.com/ottobackwards/commit-pr-stuff

If you look in the nifi folder, there is a checkout-nifi-pr script, which
when called will checkout a pr for you to work with.
I am not sure if you have something similar already, but I thought I would
throw this over the wall just the same.

O
Reply | Threaded
Open this post in threaded view
|

Re: maybe a handy script for working with PRs

Sean Busbey-2
May I humbly suggest y'all check out the Apache Yetus project?

http://yetus.apache.org/

It includes a framework for running some community decided automated
tests against new contributions and works for both JIRA attachments
and PRs in github.

http://yetus.apache.org/documentation/0.4.0/precommit-basic/

It also has a stripped down tool for just doing the fetch / apply
dance called 'smart-apply-patch'.



On Thu, Mar 23, 2017 at 9:01 PM, Otto Fowler <[hidden email]> wrote:

> Nice,
> I like this one because I can just dump a pr in ~/tmp or wherever -or- in
> my current.
>
> I’ll star this though :)
>
>
> On March 23, 2017 at 18:55:52, Andy LoPresto ([hidden email]) wrote:
>
> Thanks Otto. I have a similar bash function I use:
>
> function gpr() {
> echo "Fetching and checking out new git branch pr$@..."
> git fetch --all
> git checkout master
> git pull upstream master
> git checkout "upstream/pr/$@"
> git checkout -b "pr$@“
> }
>
> Usage: For PR 1234
>
> $ gpr 1234
>
> Andy LoPresto
> [hidden email]
> *[hidden email] <[hidden email]>*
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>
> On Mar 23, 2017, at 7:00 AM, Otto Fowler <[hidden email]> wrote:
>
> On the metron project, many of our committers use a couple of scripts when
> working with PRs, either cloning and testing or preparing commits.
> I have created a version of the checkout-pr script for the nifi project,
> and though maybe someone would be interested.
>
> This work is a fork of Nick Allen’s original repo for Metron.
>
> https://github.com/ottobackwards/commit-pr-stuff
>
> If you look in the nifi folder, there is a checkout-nifi-pr script, which
> when called will checkout a pr for you to work with.
> I am not sure if you have something similar already, but I thought I would
> throw this over the wall just the same.
>
> O
Reply | Threaded
Open this post in threaded view
|

Re: maybe a handy script for working with PRs

Matt Burgess
+1 for Yetus, also this for saving keystrokes :)

https://dev.to/sendra/git-faster-with-mingit



> On Mar 24, 2017, at 3:58 PM, Sean Busbey <[hidden email]> wrote:
>
> May I humbly suggest y'all check out the Apache Yetus project?
>
> http://yetus.apache.org/
>
> It includes a framework for running some community decided automated
> tests against new contributions and works for both JIRA attachments
> and PRs in github.
>
> http://yetus.apache.org/documentation/0.4.0/precommit-basic/
>
> It also has a stripped down tool for just doing the fetch / apply
> dance called 'smart-apply-patch'.
>
>
>
>> On Thu, Mar 23, 2017 at 9:01 PM, Otto Fowler <[hidden email]> wrote:
>> Nice,
>> I like this one because I can just dump a pr in ~/tmp or wherever -or- in
>> my current.
>>
>> I’ll star this though :)
>>
>>
>> On March 23, 2017 at 18:55:52, Andy LoPresto ([hidden email]) wrote:
>>
>> Thanks Otto. I have a similar bash function I use:
>>
>> function gpr() {
>> echo "Fetching and checking out new git branch pr$@..."
>> git fetch --all
>> git checkout master
>> git pull upstream master
>> git checkout "upstream/pr/$@"
>> git checkout -b "pr$@“
>> }
>>
>> Usage: For PR 1234
>>
>> $ gpr 1234
>>
>> Andy LoPresto
>> [hidden email]
>> *[hidden email] <[hidden email]>*
>> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
>>
>> On Mar 23, 2017, at 7:00 AM, Otto Fowler <[hidden email]> wrote:
>>
>> On the metron project, many of our committers use a couple of scripts when
>> working with PRs, either cloning and testing or preparing commits.
>> I have created a version of the checkout-pr script for the nifi project,
>> and though maybe someone would be interested.
>>
>> This work is a fork of Nick Allen’s original repo for Metron.
>>
>> https://github.com/ottobackwards/commit-pr-stuff
>>
>> If you look in the nifi folder, there is a checkout-nifi-pr script, which
>> when called will checkout a pr for you to work with.
>> I am not sure if you have something similar already, but I thought I would
>> throw this over the wall just the same.
>>
>> O
Reply | Threaded
Open this post in threaded view
|

Re: maybe a handy script for working with PRs

Andre
Trying to save key strokes?

Just use gitg.... No wasted keystrokes, just use the
mouse/trackball/touchpad/whatever

:-D

On Mon, Mar 27, 2017 at 12:52 PM, Matt Burgess <[hidden email]> wrote:

> +1 for Yetus, also this for saving keystrokes :)
>
> https://dev.to/sendra/git-faster-with-mingit
>
>
>
> > On Mar 24, 2017, at 3:58 PM, Sean Busbey <[hidden email]> wrote:
> >
> > May I humbly suggest y'all check out the Apache Yetus project?
> >
> > http://yetus.apache.org/
> >
> > It includes a framework for running some community decided automated
> > tests against new contributions and works for both JIRA attachments
> > and PRs in github.
> >
> > http://yetus.apache.org/documentation/0.4.0/precommit-basic/
> >
> > It also has a stripped down tool for just doing the fetch / apply
> > dance called 'smart-apply-patch'.
> >
> >
> >
> >> On Thu, Mar 23, 2017 at 9:01 PM, Otto Fowler <[hidden email]>
> wrote:
> >> Nice,
> >> I like this one because I can just dump a pr in ~/tmp or wherever -or-
> in
> >> my current.
> >>
> >> I’ll star this though :)
> >>
> >>
> >> On March 23, 2017 at 18:55:52, Andy LoPresto ([hidden email])
> wrote:
> >>
> >> Thanks Otto. I have a similar bash function I use:
> >>
> >> function gpr() {
> >> echo "Fetching and checking out new git branch pr$@..."
> >> git fetch --all
> >> git checkout master
> >> git pull upstream master
> >> git checkout "upstream/pr/$@"
> >> git checkout -b "pr$@“
> >> }
> >>
> >> Usage: For PR 1234
> >>
> >> $ gpr 1234
> >>
> >> Andy LoPresto
> >> [hidden email]
> >> *[hidden email] <[hidden email]>*
> >> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
> >>
> >> On Mar 23, 2017, at 7:00 AM, Otto Fowler <[hidden email]>
> wrote:
> >>
> >> On the metron project, many of our committers use a couple of scripts
> when
> >> working with PRs, either cloning and testing or preparing commits.
> >> I have created a version of the checkout-pr script for the nifi project,
> >> and though maybe someone would be interested.
> >>
> >> This work is a fork of Nick Allen’s original repo for Metron.
> >>
> >> https://github.com/ottobackwards/commit-pr-stuff
> >>
> >> If you look in the nifi folder, there is a checkout-nifi-pr script,
> which
> >> when called will checkout a pr for you to work with.
> >> I am not sure if you have something similar already, but I thought I
> would
> >> throw this over the wall just the same.
> >>
> >> O
>