You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by nickwallen <gi...@git.apache.org> on 2018/03/22 15:07:16 UTC

[GitHub] metron pull request #971: METRON-1500 Enhance 'prepare-commit' to Support Fe...

GitHub user nickwallen opened a pull request:

    https://github.com/apache/metron/pull/971

    METRON-1500 Enhance 'prepare-commit' to Support Feature Branches

    This update allows you to commit PRs against a feature branch in the same way that we have always used this script to commit PRs against master.
    
    An extra prompt has been added to ask the user what base branch the PR should be merged into.  The Github PR is interrogated to determine which branch the user submitted the PR against.  This is used as the default value so that in most cases you do not need to actually type the name of the base branch.
    
    The extra prompt looks something like the following.
    ```
      base branch to merge into [feature/METRON-1416-upgrade-solr]:
    ```
    
    ### Testing
    
    #### Merge a PR into a Feature Branch
    
    ```
    $ prepare-commit
      ...using settings from /Users/nallen/.metron-prepare-commit
        [1] metron
        [2] metron-bro-plugin-kafka
      which repo? [1]:
      pull request: 970
      local working directory [/Users/nallen/tmp/metron-pr970]:
      origin repo [https://github.com/apache/metron]:
      base branch to merge into [feature/METRON-1416-upgrade-solr]:
    
    ...
    
      github contributor's username [justinleet]:
      github contributor's email [justinjleet@gmail.com]:
      issue identifier in jira [METRON-1421]:
      issue description [Create a SolrMetaAlertDao]:
      commit message [METRON-1421 Create a SolrMetaAlertDao (justinleet via nickwallen) closes apache/metron#970]:
    
    Updating f715d6db..d2ad9be2
    Fast-forward
    Squash commit -- not updating HEAD
     metron-interface/metron-rest/src/main/java/org/apache/metron/rest/config/IndexConfig.java                                              |   10 +-
    ...
    
    af4e87ad (HEAD -> feature/METRON-1416-upgrade-solr) METRON-1421 Create a SolrMetaAlertDao (justinleet via nickwallen) closes apache/metron#970
    
      run test suite? [yN]
    
    Review commit carefully then run...
        cd /Users/nallen/tmp/metron-pr970
        git push upstream master
    ```
    
    You can see that the commit was prepared correctly.
    ```
    $ cd ~/tmp/metron-pr970/
    $ git log -2
    commit af4e87ad3d7182446b01fe2dd3eebabdc8a8b676 (HEAD -> feature/METRON-1416-upgrade-solr)
    Author: justinleet <ju...@gmail.com>
    Date:   Thu Mar 22 10:50:15 2018 -0400
    
        METRON-1421 Create a SolrMetaAlertDao (justinleet via nickwallen) closes apache/metron#970
    
    commit f715d6dbaf7ab4272c2e51430f4da13c8f688916 (upstream/feature/METRON-1416-upgrade-solr, origin/feature/METRON-1416-upgrade-solr)
    Author: merrimanr <me...@gmail.com>
    Date:   Wed Mar 21 09:13:16 2018 -0500
    
        METRON-1424 Kerberos: Solr (merrimanr) closes apache/metron#960
    ```
    
    #### Merge a PR into Master
    
    ```
    $ prepare-commit
      ...using settings from /Users/nallen/.metron-prepare-commit
        [1] metron
        [2] metron-bro-plugin-kafka
      which repo? [1]:
      pull request: 967
      local working directory [/Users/nallen/tmp/metron-pr967]:
      origin repo [https://github.com/apache/metron]:
      base branch to merge into [master]:
    
    ...
    
      github contributor's username [nickwallen]:
      github contributor's email [nick@nickallen.org]:
      issue identifier in jira [METRON-1494]:
      issue description [Profiler Emits Messages to Kafka When Not Needed]:
      commit message [METRON-1494 Profiler Emits Messages to Kafka When Not Needed (nickwallen) closes apache/metron#967]:
    
    ...
    
    198884af (HEAD -> master) METRON-1494 Profiler Emits Messages to Kafka When Not Needed (nickwallen) closes apache/metron#967
    
      run test suite? [yN]
    
    Review commit carefully then run...
        cd /Users/nallen/tmp/metron-pr967
        git push upstream master
    ```
    
    You can see that the commit was prepared correctly.
    
    ```
    $ cd ~/tmp/metron-pr967/
    $ git log -2
    commit 198884af27aab0775b740cf5b87c6a40691e0558 (HEAD -> master)
    Author: nickwallen <ni...@nickallen.org>
    Date:   Thu Mar 22 10:52:25 2018 -0400
    
        METRON-1494 Profiler Emits Messages to Kafka When Not Needed (nickwallen) closes apache/metron#967
    
    commit 5ed9631a2936ec60d0ea6557ca4396cffdadc688 (upstream/master, origin/master, origin/HEAD)
    Author: cstella <ce...@gmail.com>
    Date:   Tue Mar 20 16:08:02 2018 -0600
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/metron METRON-1500

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/971.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #971
    
----
commit b51e4d0c85552bc377d4a9f51159ff1d5a4085a3
Author: Nick Allen <ni...@...>
Date:   2018-03-22T14:56:25Z

    METRON-1500 Enhance 'prepare-commit' to Support Feature Branches

----


---

[GitHub] metron issue #971: METRON-1500 Enhance 'prepare-commit' to Support Feature B...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/metron/pull/971
  
    +1 by inspection.  much better than my script.  Nice!


---

[GitHub] metron issue #971: METRON-1500 Enhance 'prepare-commit' to Support Feature B...

Posted by nickwallen <gi...@git.apache.org>.
Github user nickwallen commented on the issue:

    https://github.com/apache/metron/pull/971
  
    Thanks @ottobackwards .
    
    Feel free to send it.  I'm not sure when I can get it to it, but if I have it, the more likely one of us will get it done. :)


---

[GitHub] metron issue #971: METRON-1500 Enhance 'prepare-commit' to Support Feature B...

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on the issue:

    https://github.com/apache/metron/pull/971
  
    @nickwallen , another thing that maintainers of feature branches have to do is track master.
    I have a script ( based off your old old stuff ) for doing this.  If I send it to you would you have time to adapt it? I'm not sure when I can get to it.


---

[GitHub] metron pull request #971: METRON-1500 Enhance 'prepare-commit' to Support Fe...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/metron/pull/971


---