Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1362

PR suggestion for fixing username is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • None
    • bots
    • None

      In case a PR author has no associated OpenJDK ID, Skara takes the username and email address from the HEAD commit in the PR branch to use when the PR is integrated. If the Author name in the HEAD commit doesn't match the preferred name of the PR author's GitHub profile, the Skara PR bot warns about the mismatch and suggests the following steps to correct it:

      "the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:"

      $ git checkout BRANCHNAME
      $ git commit -c user.name='Preferred Full Name' --allow-empty -m 'Update full name'
      $ git push

      The commit command is wrong and produces an error:

      fatal: Option -m cannot be combined with -c/-C/-F.

      Removing the '-m' option makes it succeed, but does so by amending the existing commit (thus requiring a force-push), rather than by adding a new one.

      Here is a command that works and does what is intended:

      $ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: