Skip to content

Creating a Pull Request

Will Dazey edited this page Oct 23, 2018 · 11 revisions

How to create a pull request

This is a guide for new users to create and propose changes in EclipseLink via a pull request.

Prerequisite steps:

Step 1 : EclipseLink BugZilla

EclipseLink utilizes Bugzilla bug tracker for tracking reported issues and their completion status. First, search for an existing EclipseLink Bugzilla bug that duplicates the issue you are attempting to fix. If no existing bugs can be found, please open a new EclipseLink Bugzilla bug that represents the issue your code change is meant to resolve.

Step 2 : GitHub Issue

Open a new GitHub issue. This issue will be used to manage your EclipseLink BugZilla bug and all subsequent pull requests you will need (master, 2.7, 2.6, ect).

Step 3 : Push changes to your fork

  1. Navigate to your local directory where EclipseLink source was cloned to:

    cd <local-path>\eclipselink\

  2. Verify your current branch is set to the applicable EclipseLink source version (master, 2.7, 2.6, ect):

    git branch

  3. Create a new feature branch to contain your proposed code change:

    git checkout -b <github-issue-#>_<branch>

    Note: <github-issue-#>: the issue number created from Step 2. <branch>: the origin branch this change will be merged into (ie. master, 2.7, 2.6, ect).

  4. Make your proposed changes to EclipseLink source

    Note: Changing EclipseLink source is most likely not enough for your proposed change. It is generally a good idea to add testing for your change as well. The eclipselink.jpa.test.jse test bucket can be used to for simple JUnit testing. Alternatively, you can search for existing tests that are similar to your test and integrate into that bucket. Your code reviewer should be able to suggest a location for your testing if you have questions.

  5. Commit your changes locally

    git commit --signoff -a -m "Bug <bugzilla-#>** - <description>"

    Note: <bugzilla-#> refers to the EclipseLink Bugzilla bug from Step 1. <description> refers to a simple description for the issue being fixed.

  6. Push your changes to your fork

    git push

Step 4 : Create a pull request

  1. Navigate to your personal fork branch: github.ibm.com/<github-user-id>/eclipselink/compare.
  2. Configure your pull request
  • Select base as the EclipseLink branch applicable to your commit (ie. master, 2.7, 2.6, ect)
  • Select compare as the branch name created from Step 3.3
  • Click the button Create pull request
    • Provide a title with format: [<branch>] Bug <bugzilla-#>: <description>
      • <branch>: the origin branch this pull request will be merged into (ie. master, 2.7, 2.6, ect)
      • <bugzilla-#>: the EclipseLink Bugzilla bug from Step 1
      • <description>: a simple description, plus the following:
        • Fixes #12345 - indicates that this PR fixes Issue 12345, creates a nice link and will automatically close Issue when PR is merged
        • For issue #12345 - indicates and links the PR to the Issue only (no auto close)
  1. Click the button Create pull request

Next steps: