-
11 months ago
-
Thanks for working on this. Will review over the weekend.
-
I did some basic testing and it is throwing exception. To reproduce:
- Push this test repository to a project
- Switch to commit "Add main1.txt" and cherry pick it to dev branch
Additional observations:
- Label of the dialog selecting branch should be "Cherry Pick Commit" instead of "Revert Commit"
- No space between branch selector and commit message input.
-
11 months ago
-
If I revert commit to any branch, it will report exception. Also if the commit being cherry-picked to a branch with conflict modification, there are exceptions.
Please do more testing before requesting review to save our time.
-
Also I checked the code briefly:
- An integer is used to distinguish cherrypick/revert. This makes code less readable, a boolean or enum can be better
- Only commit signature is checked for branch protection. Please do the same as in pull request update source feature to check other rules
-
Sorry for causing the trouble. I will go through all functions and perform more tests to save our time.
-
-
No problem. If you are unsure about some functionalities, just raise them in the pull request.
-
11 months ago11 months ago11 months ago11 months ago
-
11 months ago
-
No problem. If you are unsure about some functionalities, just raise them in the pull request.
- I wonder whether it is necessary to check the commit is obsolete since when cherry pick in some situations, calling the
commitfunction will produce "Commit is obsolete". - If the commit being cherry-picked to a branch with conflict modification, exceptions are fixed and now an error is displayed. I don't know if this is appropriate.
- I wonder whether it is necessary to check the commit is obsolete since when cherry pick in some situations, calling the
-
The correct workflow would be:
- Display a dialog to let user select target branch.
- Get head commit of target branch, and check if there is a conflict when cherry-pick/revert a new commit onto the branch. If yes, display error and exit
- Continue to check branch protection rules, and there are any violations, display error and exit
- Continue to display commit message for user to customize (the default commit message should be the one git uses when cherry-pick/revert from command line)
- Check if customized commit message satisfies branch protection commit message requirement.
- Now cherry-pick/revert the commit onto target branch, with old commit and parent commit set to head commit retrieved in step 2. This ensures that the branch can be safely updated without overriding others. In case the branch is updated after step 2, the commit method will throw obsolete commit exception which is fine.
-
11 months ago
-
11 months ago
-
Large part of the logic works great now. I will merge and continue to make some improvements at my side.
-
-
| Submitter | sususweet |
| Target | main |
| Source | sususweet-server:main |
OD-2230