[ 
https://issues.apache.org/jira/browse/KAFKA-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ismael Juma updated KAFKA-6616:
-------------------------------
    Description: 
The merge script currently squashes the commits in the pull request locally and 
then merges it to the target branch. It can also cherry-pick it to other 
branches. The downside is that GitHub doesn't know that the pull request has 
been merged. As a workaround, the script includes a keyword in the commit 
message to close the pull request. Since the merged commit is different to the 
pull request branch, GitHub assumes that the PR was not merged.

[~hachikuji] suggested that an API may be available that mimics what the GitHub 
merge button does. And he is correct. Given our recent transition to GitBox, 
committers have write access to GitHub, so it's feasible to update the merge 
script to do this. Rough steps:
 # Replace local squashing and merging with GitHub REST API for merging 
([https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button)]
 # After the merge, pull changes from target branch and offer the option to 
cherry-pick to other branches (i.e. the code may have to be updated a little 
for the rest of the workflow to work).
 # Update wiki documentation and code to state that GITHUB_OAUTH_KEY must be 
set (it's currently optional since we don't rely on any operations that require 
authentication).
 # Update wiki documentation to remove the main downside for using the merge 
script and perhaps to recommend it.

Wiki documentation: 
[https://cwiki.apache.org/confluence/display/KAFKA/Merging+Github+Pull+Requests]

  was:
The merge script currently squashes the commits in the pull request locally and 
then merges it to the target branch. It can also cherry-pick it to other 
branches. The downside is that GitHub doesn't know that the pull request has 
been merged. As a workaround, the script includes a keyword in the commit 
message to close the pull request. Since the merged commit is different to the 
pull request branch, GitHub assumes that the PR was not merged.

[~hachikuji] suggested that an API may be available that mimics what the GitHub 
merge button does. And he is correct. Given our recent transition to GitBox, 
committers have write access to GitHub, so it's feasible to update the merge 
script to do this. Rough steps:
 # Replace local squashing and merging with GitHub REST API for merging 
([https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button)]
 # After the merge, pull changes from target branch and offer the option to 
cherry-pick to other branches (i.e. the code may have to be updated a little 
for the rest of the workflow to work).
 # Update wiki documentation and code to state that GITHUB_OAUTH_KEY must be 
set (it's currently optional since we don't rely on any operations that require 
authentication).
 # Update wiki documentation to remove the main downside for using the merge 
script and perhaps to recommend it.

Documentation: 
https://cwiki.apache.org/confluence/display/KAFKA/Merging+Github+Pull+Requests


> kafka-merge-pr.py should use GitHub's REST API to merge
> -------------------------------------------------------
>
>                 Key: KAFKA-6616
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6616
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Ismael Juma
>            Priority: Major
>              Labels: newbie
>
> The merge script currently squashes the commits in the pull request locally 
> and then merges it to the target branch. It can also cherry-pick it to other 
> branches. The downside is that GitHub doesn't know that the pull request has 
> been merged. As a workaround, the script includes a keyword in the commit 
> message to close the pull request. Since the merged commit is different to 
> the pull request branch, GitHub assumes that the PR was not merged.
> [~hachikuji] suggested that an API may be available that mimics what the 
> GitHub merge button does. And he is correct. Given our recent transition to 
> GitBox, committers have write access to GitHub, so it's feasible to update 
> the merge script to do this. Rough steps:
>  # Replace local squashing and merging with GitHub REST API for merging 
> ([https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button)]
>  # After the merge, pull changes from target branch and offer the option to 
> cherry-pick to other branches (i.e. the code may have to be updated a little 
> for the rest of the workflow to work).
>  # Update wiki documentation and code to state that GITHUB_OAUTH_KEY must be 
> set (it's currently optional since we don't rely on any operations that 
> require authentication).
>  # Update wiki documentation to remove the main downside for using the merge 
> script and perhaps to recommend it.
> Wiki documentation: 
> [https://cwiki.apache.org/confluence/display/KAFKA/Merging+Github+Pull+Requests]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to