This is in relation with "Github PRs and Jira" thread 
(https://markmail.org/message/s422zuivbmzglph4)

Below is my 1st experience of GitHub PR merge in the context of ASF dual 
hosting with GitBox. So I somehow made a jump in the void...

After reviewing the change I picked "squash and merge PR" among the 3 GitHub PR merge options. Because I did not want to break the linear Git flow, it seemed the best option. But despite "squashing" we got  3 commits; 2 from Daniel Watford and one from I. I don't know if it's possible to do otherwise with the 2 other options. Maybe it's good to know that Daniel contributed...

Also I expected that my comment in GitHub would be used as the final commit comment. So I then tried to amend the commit by modifying ONLY the comment, and then push comment after a pull. But I got a fast-forward issue and after trying several pull and push tricks I understood I'll never pass over this issue:

   "[remote rejected]       trunk -> trunk (pre-receive hook declined)"

Because it's related to having "receive.denynonfastforwards" set to true on GitBox server[1] and I don't want to annoy Infra to temporary set it true for a such change.

But I really wanted to change the commit comment to follow our template. So I decided to pull rebase, slightly change the ComponentContainerTest class, commit and push. Hence I created a new commit, somehow a duplicate of the PR merge, at least with a correctly formatted comment.

This was an awkward experience, I don't know if i could have done it better, 
ideas, advices?
Maybe advising contributors to use our template in commit comments used by 
GitHub PRs?
Also we can ask our contributors to use in the PRs title the format of our 
commit template. For instance in[2] instead of

   OFBIZ-11331: Allow ComponentContainerTest to run on windows
   rather
   Fixed: Allow ComponentContainerTest to run on windows (OFBIZ-11331)

   Then the commit/s would contain the explanations.

I just fear we will have sometimes to explain, and ask contributors to edit 
their comments or titles...

I'll sleep on it and wait for comments before doing any additions or changes in our documentation about that, in relation with the "Github PRs and Jira" thread

Thanks

Jacques
[1] 
https://stackoverflow.com/questions/253055/how-do-i-push-amended-commit-to-the-remote-git-repository
[2] 
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;a=commit;h=6d194cf8c363435e212282e31f575ca93f14d72d


Le 28/01/2020 à 15:58, jler...@apache.org a écrit :
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git.


     from 6f39741  Fixed: Fixed the issue on party page that will upload the 
data each time after refreshing the page. (OFBIZ-11325)
      add 0c2124a  Get Path from URI than a string representation of a file 
path when building Path to test resources.
      add 259f71d  Removed unused test imports.
      new 6d194cf  OFBIZ-11331: Allow ComponentContainerTest to run on windows 
(#8)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
  .../apache/ofbiz/base/container/ComponentContainerTest.java  | 12 +++++++-----
  1 file changed, 7 insertions(+), 5 deletions(-)

Reply via email to