ci-merge : Adding option to bypass topic branch in case of merge conflicts and adding a log-parser#6
Open
sgaud-quic wants to merge 4 commits intoqualcomm-linux:mainfrom
Open
ci-merge : Adding option to bypass topic branch in case of merge conflicts and adding a log-parser#6sgaud-quic wants to merge 4 commits intoqualcomm-linux:mainfrom
sgaud-quic wants to merge 4 commits intoqualcomm-linux:mainfrom
Conversation
shashim-quic
reviewed
Jun 5, 2025
ci-merge
Outdated
| echo "Merging topic branches..." | ||
|
|
||
| mkdir qcom-next | ||
| printf "%*s %*s\n" 10 "Name" 20 "SHA1" > qcom-next/topic_SHA1 |
Contributor
There was a problem hiding this comment.
Let's not redirect o/p to hardcoded file from within code. You can print info here, and then pass to some script to generate o/p in a preferred format that goes into topic_SHA1 file.
ci-merge
Outdated
| if echo "$MERGE_OUTPUT" | grep -q "Already up to date." ; then | ||
| echo "Nothing to merge: Already up to date." | ||
| else | ||
| printf "%-20s %*s\n" "$REMOTE_NAME" 45 "$branch_tip" >> qcom-next/topic_SHA1 |
ci-merge
Outdated
|
|
||
| git merge -q --no-ff --no-edit -m "Merge remote-tracking branch $REMOTE_NAME into $INTEG_BRANCH" $MERGER | ||
| branch_tip=$(git rev-parse $MERGER) | ||
| MERGE_OUTPUT=$(git merge --no-ff --no-edit -m "Merge remote-tracking branch $REMOTE_NAME into $INTEG_BRANCH" $MERGER 2>&1) |
Contributor
There was a problem hiding this comment.
is 2>&1 necessary ? you can work with all err + success output log ?
fd80905 to
9b5c743
Compare
Introducing a option -p, which will bypass a conflicting branch in case of non-interactive merge. Branch would be reset with git merge --abort and next branch would be merged, instead of exiting. Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
Script to parse the merge logs, this will search for "Merge sucessful: " string and capture branch name and SHA in a text file. Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
Calculate and print number of commits present in each branch that is merged into baseline. Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
Parse number of commits from log file and add to topic_SHA1 file Signed-off-by: Salendarsingh Gaud <sgaud@qti.qualcomm.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is intended to add functionality in automerge to capture topic branch SHA that are getting merged into the baseline. This will generate a file qcom-next/topic_SHA1 which will have topic brancg name and the SHA that is merged in baseline while running automerge tool.