[
https://issues.apache.org/jira/browse/METRON-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409682#comment-16409682
]
ASF GitHub Bot commented on METRON-1500:
----------------------------------------
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 [[email protected]]:
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 <[email protected]>
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 <[email protected]>
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 [[email protected]]:
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 <[email protected]>
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 <[email protected]>
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 <nick@...>
Date: 2018-03-22T14:56:25Z
METRON-1500 Enhance 'prepare-commit' to Support Feature Branches
----
> Enhance 'prepare-commit' to Support Feature Branches
> ----------------------------------------------------
>
> Key: METRON-1500
> URL: https://issues.apache.org/jira/browse/METRON-1500
> Project: Metron
> Issue Type: Improvement
> Reporter: Nick Allen
> Assignee: Nick Allen
> Priority: Minor
>
> I'd like to be able to use `prepare-commit` to review and commit PRs that are
> submitted against feature branches.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)