-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doc: Update doc with some common uses cases.
Use cases with conflicts are out if this documentation.
- Loading branch information
1 parent
61264f4
commit b5c5106
Showing
2 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Workflows for some common use cases | ||
|
||
## 1.- Add a new feature at the end of the feature list. | ||
|
||
Manual actions to do by the dev: | ||
|
||
* Create a new branch with the feature using the last feature as base. | ||
* Create a new PR with the new branch to get the review. | ||
|
||
Manual actions to do by the review: | ||
|
||
* Validate the PR | ||
|
||
Automated actions done by GHA when the PR is approved. | ||
|
||
* Execute guw `add` command. | ||
* Close PR with the feature with a comment to the guw PR merged. | ||
|
||
## 2.- Add a new feature in the middle of the features without conflict. | ||
|
||
Similar to use case \#1, but creating the new branch with the feature using the previous feature as base. If feature `foo` is created on top of feature `bar`, checkout from `bar`. | ||
|
||
## 3.- Remove a feature in the without a conflict | ||
|
||
* Execute the guw `remove` command to remove the features and generate a new target. | ||
|
||
## 4.- Add a new commit into a pending feature because of an internal requirement without conflict. | ||
|
||
Manual actions to do by the dev: | ||
|
||
* Create a new branch with the feature hotfix using the feature as base. If feature `foo` need to be updated, checkout a new branch `hox-hotfix1` from `foo`. | ||
* Create a new PR with the new branch | ||
|
||
> [!IMPORTANT] | ||
> Use the base branch as prefix of the new branch is mandatory to detect that it is not a new feature | ||
Manual actions to do by the review: | ||
|
||
* Validate the PR | ||
|
||
Automated actions done by GHA when the PR is approved. | ||
|
||
* Close PR with a comment. | ||
* Execute the guw `update` command to sync the features and generate a new target. | ||
|
||
## 5.- Change or delete a commit of a pending feature because of an internal requirement without conflict. | ||
|
||
Similar to use case \#3 using a fixup commit to edit a previous commit of the feature or a revert commit to delete one. The goal is to make reviewing easier while ensuring a clean Git history after the review. | ||
When the PR is approved the feature needs to be rebased by squashing fixup commits (autosquash) | ||
|
||
> [!IMPORTANT] | ||
> Reverted commits also must be a fixup commit | ||
> | ||
> ``` | ||
> git revert --no-commit 1234 | ||
> git commit --fixup 1234 | ||
> ``` | ||
> | ||
> Explanation https://stackoverflow.com/a/67739266 | ||
# Conflicts | ||
TODO | ||