You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jose Armando Garcia Sancio (Jira)" <ji...@apache.org> on 2021/12/10 19:28:00 UTC

[jira] [Commented] (KAFKA-6616) kafka-merge-pr.py should use GitHub's REST API to merge

    [ https://issues.apache.org/jira/browse/KAFKA-6616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457334#comment-17457334 ] 

Jose Armando Garcia Sancio commented on KAFKA-6616:
---------------------------------------------------

[~vpopov89] I am going to take the Jira as I assume you haven't had the chance to work on this.

> 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
>            Assignee: Viktor Popov
>            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).
>  # Remove the code that adds "Closes #1234..." (e.g. "Closes #3917 from ewencp/stage-docs") to the squashed commit message.
>  # 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
(v8.20.1#820001)