Skip to content

Commit

Permalink
Resolve conflict in cherry-pick of d0d10d4d0a0eb052ef35f12258bcee1990…
Browse files Browse the repository at this point in the history
…7a9b22 and change the commit message
  • Loading branch information
TivonB-AI2 authored and RafaelOAiSquared committed Aug 15, 2024
1 parent 13c17f9 commit 8a31238
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
29 changes: 29 additions & 0 deletions cherry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PREV_DATE=$(date -v -1d '+%Y-%m-%d')
PREV_DATE="2024-08-06"
echo "::set-output name=date::$PREV_DATE"
echo $PREV_DATE

git log enterprise/main --since="$PREV_DATE 00:00" --until="$PREV_DATE 23:59" --grep="(CE)" --format="%H" --no-merges | while read sha; do
AUTHOR_NAME=$(git log -1 --pretty=format:'%an' $sha)
AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae' $sha)
COMMIT_MESSAGE=$(git log -1 --pretty=format:'%s' $sha)
BRANCH_NAME="cherry-pick-ce-commit-${sha}"
git checkout -b $BRANCH_NAME
git cherry-pick $sha || {
echo "Conflict in commit $sha, resolving manually."
git add .
git commit -am "Resolve conflict in cherry-pick of $sha and change the commit message"
}
git push --force --set-upstream origin $BRANCH_NAME
PR_TITLE="${COMMIT_MESSAGE}"
PR_BODY="This PR cherry-picks the CE commit ${sha} from the Enterprise repository. Commit author: ${AUTHOR_NAME} (${AUTHOR_EMAIL})"
AUTHOR_GH_USERNAME=$(gh api graphql -f query='query { search(query: "${AUTHOR_EMAIL}", type: USER, first: 1) { nodes { ... on User { login } } } }' -q '.data.search.nodes[0].login')
if [ -n "$AUTHOR_GH_USERNAME" ]; then
PR_BODY="${PR_BODY}\n\ncc @${AUTHOR_GH_USERNAME}"
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base main --head $BRANCH_NAME --assignee "$AUTHOR_GH_USERNAME"
else
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base main --head $BRANCH_NAME
fi
git checkout main
git branch -D $BRANCH_NAME
done
4 changes: 4 additions & 0 deletions integrations/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ GIT
PATH
remote: .
specs:
<<<<<<< HEAD
multiwoven-integrations (0.7.9)
=======
multiwoven-integrations (0.7.2)
>>>>>>> d0d10d4d (chore(CE): add request response log for MariaDB (#350))
activesupport
async-websocket
aws-sdk-athena
Expand Down
4 changes: 4 additions & 0 deletions integrations/lib/multiwoven/integrations/rollout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

module Multiwoven
module Integrations
<<<<<<< HEAD
VERSION = "0.7.9"
=======
VERSION = "0.7.2"
>>>>>>> d0d10d4d (chore(CE): add request response log for MariaDB (#350))

ENABLED_SOURCES = %w[
Snowflake
Expand Down

0 comments on commit 8a31238

Please sign in to comment.