Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Merging and/or cherry-picking
    1.  If the Github PR has already been merged into Apache Git repo, the script will ask if you want to cherry-pick the PR commits to other branches (to backport the changes to other branches, for example). After we are done cherry-picking (the script asks if we want to continue), no further steps from this script are executed.
       
    2. Otherwise, the script will try to merge the PR into the target reference (if the PR is targeting the master branch it will try to merge the PR on master, if targeting branch-3.5 it will try to merge on branch-3.5, etc). It will ask for authors and reviewers names/emails, among other bits of info that compose the commit log.


      1. After executing step b, the script will ask if you want to backport (i.e., cherry-pick) the PR into other branches, suggesting the latest branch it has already found (say, branch-3.6), but you are free to choose other branches. After each cherry-pick it will ask if you want to backport the PR to another branch until you choose not to (in a nutshell, the same procedure as step b).


    3. During this step, the script will update the JIRA entry, marking it as closed. It will try to fill the fixed versions accordingly. The committer should provide the JIRA ID. If the JIRA credentials are not set up or jira-python lib is not installed, the script will merge the PR and push to Apache git repo, but won't close the JIRA issue, so make sure the correspondent JIRA issue was closed after merging the PR.

      It sends an API request to squash and merge the pull request.

  1. Answering Squashing Question:

    Respond to the question 'Would you like to squash the commit messages? (y/n): ' by typing 'n' as suggested.

  2. Reviewing Checks:

    Check for disapproval reviews and prompt confirmation if changes are requested. Also, verify if the PR has approved reviews; if not, prompt confirmation for the merge.

  3. Author and Closing Line:

    Gather information about the PR author and create a closing line for the commit message.

  4. Checking GitHub Checks:

    Check the status of GitHub checks for the latest commit. If all checks pass, proceed; otherwise, prompt confirmation if there are pending or unsuccessful checks.

  5. GitHub API Request - Merge:

    Send a request to the GitHub API to merge the PR using the specified squash method, including the commit title and modified commit message.

  6. Handling API Response:

    If the merge is successful, print the merged PR information and return the merge commit SHA. If unsuccessful, print an error message, details, and exit the script.

Troubleshooting

Code Block
languagetext
titleError
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>

...