1.. _modifying_contributions: 2 3Modifying Contributions made by other developers 4************************************************ 5 6Scenarios 7######### 8 9Zephyr contributors and collaborators are encouraged to assist 10as reviewers in pull requests, so that patches may be approved and merged 11to Zephyr's main branch as part of the original pull requests. The authors 12of the pull requests are responsible for amending their original commits 13following the review process. 14 15There are occasions, however, when a contributor might need to modify patches 16included in pull requests that are submitted by other Zephyr contributors. 17For instance, this is the case when: 18 19* a developer cherry-picks commits submitted by other contributors into their 20 own pull requests in order to: 21 22 * integrate useful content which is part of a stale pull request, or 23 * get content merged to the project's main branch as part of a larger 24 patch 25 26* a developer pushes to a branch or pull request opened by another 27 contributor in order to: 28 29 * assist in updating pull requests in order to get the patches merged 30 to the project's main branch 31 * drive stale pull requests to completion so they can be merged 32 33 34Accepted policies 35################# 36 37A developer who intends to cherry-pick and potentially modify patches sent by 38another contributor shall: 39 40* clarify in their pull request the reason for cherry-picking the patches, 41 instead of assisting in getting the patches merged in their original 42 pull request, and 43* invite the original author of the patches to their pull request review. 44 45A developer who intends to force-push to a branch or pull request of 46another Zephyr contributor shall clarify in the pull request the reason 47for pushing and for modifying the existing patches (e.g. stating that it 48is done to drive the pull request review to completion, when the pull 49request author is not able to do so). 50 51.. note:: 52 Developers should try to limit the above practice to pull requests identified 53 as *stale*. Read about how to identify pull requests as stale in 54 :ref:`development processes and tools <dev-environment-and-tools>` 55 56If the original patches are substantially modified, the developer can either: 57 58* (preferably) reach out to the original author and request them to 59 acknowledge that the modified patches may be merged while having 60 the original sign-off line and author identity, or 61* submit the modified patches as their *own* work (i.e. with their 62 *own* sign-off line and author identity). In this case, the developer 63 shall identify in the commit message(s) the original source the 64 submitted work is based on (mentioning, for example, the original PR 65 number). 66 67.. note:: 68 Contributors should uncheck the box *“Allow Edits By Maintainers"* 69 to indicate that they do not wish their patches to be amended, 70 inside their original branch or pull request, by other Zephyr developers. 71