You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by Wilfred Spiegelenburg <wi...@apache.org> on 2022/02/01 04:24:17 UTC

JIRA references in commits

Please make sure that when changes are committed the jira reference is
part of the first line of the commit message.
Even when using the option from github to merge via the UI this is not
guaranteed. The commit message used is not related to the GitHub
description for the PR. Updating the description does not update the
message that will be used in the commit.
I will update the text on how to commit a change to state that more
clearly. Please check before you commit that the message complies with
the guidelines [1].

Wilfred

[1] https://yunikorn.apache.org/community/how_to_contribute#committing-a-change

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org


Re: JIRA references in commits

Posted by Wilfred Spiegelenburg <wi...@apache.org>.
I have uploaded a new script [1] to YUNIKORN-197 [2] which is open to
update the commit instructions in the documentation.

The script is written to handle the whole process of committing a PR.
The call syntax has been simplified to just the PR ID for example:
  merge_pr.sh 368
It has to be called from the directory which contains the checked out code.
All that is needed for the merge and commit is scripted up and it
prepares a commit message for you. The commit message can be edited
before the commit to clean up the content. If there is a merge
conflict there is a possibility to fix them while the script stops.
The script waits and allows changes to be made in a different window.

The preparation of the commit message:
* The subject of the commit will be taken from the first commit. The
subject is syntax checked and the committer is made aware if it does
not follow the layout rules.
* The body of the commit is the concatenated content of all other commits.
* The author of the commit is set based on the user information from
the first commit in the PR.
* The committers user information is added as a "Signed-off-by:" line
in the commit.
* The PR reference to close the PR is added. The PR reference is also
automatically added to the subject line.
* If there are conflicts that are manually solved a comment is left in
the commit message.

If at any point the process is cancelled or interrupted the script
cleans up. Temporary branches are cleaned up. You end up again at the
original point
An example of a really simple commit that was made using the script is
commit for core PR #368 [3] The commit can be directly accessed at
[4]. Since that commit the script has slightly changed to handle more
edge cases.

The script does not only simplify the commit but also gives us a
standardised way to commit changes. There are further improvements
possible like supporting a cherry pick or using python as the language
as we do for the release script.

I would like to propose that we start using the script and not the
github UI see my previous email for the background on that [5].

Wilfred

[1] https://issues.apache.org/jira/secure/attachment/13039900/merge_pr.sh
[2] https://issues.apache.org/jira/browse/YUNIKORN-197
[3] https://github.com/apache/incubator-yunikorn-core/pull/368
[4] https://github.com/apache/incubator-yunikorn-core/commit/a79d0fe0bd791e92d783c91450ca495006d748ec
[5] https://lists.apache.org/thread.html/r70bd2c8b3d5be4b3b8eeae7a1d56eed1bfdba73ae8072d6eae510c01%40%3Cdev.yunikorn.apache.org%3E


On Tue, 1 Feb 2022 at 15:24, Wilfred Spiegelenburg <wi...@apache.org> wrote:
>
> Please make sure that when changes are committed the jira reference is
> part of the first line of the commit message.
> Even when using the option from github to merge via the UI this is not
> guaranteed. The commit message used is not related to the GitHub
> description for the PR. Updating the description does not update the
> message that will be used in the commit.
> I will update the text on how to commit a change to state that more
> clearly. Please check before you commit that the message complies with
> the guidelines [1].
>
> Wilfred
>
> [1] https://yunikorn.apache.org/community/how_to_contribute#committing-a-change

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org