Skip to content

Resolve merge conflict for tag 0.306.2.0#33

Merged
jeffborg merged 149 commits into
tag-0.306.2from
master
May 5, 2026
Merged

Resolve merge conflict for tag 0.306.2.0#33
jeffborg merged 149 commits into
tag-0.306.2from
master

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions Bot commented May 5, 2026

A merge conflict was detected while syncing tag 0.306.2.0. Please resolve the conflict in this PR.

Comment on lines +11 to +61
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches and tags
token: ${{ secrets.EVCC_PAT }}

- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

- name: Get merged branch name
id: get-branch
run: echo "BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV

- name: Validate branch name
id: validate-branch
run: |
# Extract the tag name from the branch name
TAG_NAME=$(echo "${{ env.BRANCH }}" | sed 's/tag-//')

# Check if the tag name matches the expected pattern
if [[ ! "$TAG_NAME" =~ ^0\.[0-9]+\.[0-9]+$ ]]; then
echo "Branch name does not match the expected pattern. Skipping tag creation."
exit 1
else
echo "Valid branch name: $TAG_NAME Saving for next step"
echo "BRANCH=$TAG_NAME" >> $GITHUB_OUTPUT
fi
continue-on-error: true

- name: Tag the merged branch
if: success() && steps.validate-branch.outcome == 'success'
run: |
# Checkout the branch that was merged
git checkout "${{ env.BRANCH }}"

# Create the new tag
NEW_TAG="${{ steps.validate-branch.outputs.BRANCH }}.0"

# Tag the branch
git tag "${NEW_TAG}"

# Push the tag to the repository
git push origin "${NEW_TAG}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +11 to +98
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all branches and tags
token: ${{ secrets.EVCC_PAT }}

- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

- name: Add public repo as remote
run: |
git remote add public https://github.com/evcc-io/evcc.git

- name: Fetch tags from the public repo
run: |
git fetch public --tags

- name: Get all tags from the public repo
id: get-public-tags
run: |
git tag -l | grep -E '^0\.[0-9]+\.[0-9]+$' > public_tags.txt
echo "Public tags:"
cat public_tags.txt

- name: Get existing tags in the repo
id: get-existing-tags
run: |
git tag -l | grep -E '^0\.[0-9]+\.[0-9]+\.0$' > existing_tags.txt
echo "Existing tags:"
cat existing_tags.txt

- name: Sync missing tags
run: |
# Define the starting tag
START_TAG="0.130.7"

# Convert version to numeric format for comparison
tag_to_numeric() {
echo "$1" | sed 's/\./_/g' | awk -F'_' '{ printf("%d%03d%03d", $1, $2, $3) }'
}

START_NUMERIC=$(tag_to_numeric $START_TAG)

# Read tags from files
PUBLIC_TAGS=$(cat public_tags.txt)
EXISTING_TAGS=$(cat existing_tags.txt)

for TAG in $PUBLIC_TAGS; do
# Convert the current tag to numeric format
TAG_NUMERIC=$(tag_to_numeric $TAG)

# Check if the tag is greater than the starting tag
if [ "$TAG_NUMERIC" -gt "$START_NUMERIC" ]; then
# Generate the new tag name with .0 suffix
NEW_TAG="${TAG}.0"

# Check if the tag already exists
if ! echo "$EXISTING_TAGS" | grep -q "^${NEW_TAG}$"; then
echo "Processing new tag: $NEW_TAG"

# Create a new branch for the tag
git checkout -b "tag-${TAG}" ${TAG}

# Attempt to merge the master branch into the new branch
git merge master --no-edit || {
# If there's a merge conflict, create a pull request
echo "Merge conflict detected for tag ${TAG}. Creating pull request."
git push origin "tag-${TAG}"
gh pr create --title "Resolve merge conflict for tag ${NEW_TAG}" --body "A merge conflict was detected while syncing tag ${NEW_TAG}. Please resolve the conflict in this PR." --head master --base "tag-${TAG}"
continue
}
# Tag the branch with .0 appended to the original tag name
git tag "${NEW_TAG}"

# Push the new branch and tag to your repository
git push origin "tag-${TAG}"
git push origin "${NEW_TAG}"
fi
fi
done

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +11 to +44
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
# Fetch all branches
fetch-depth: 0
token: ${{ secrets.EVCC_PAT }}

- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"

- name: Add public repo as remote
run: |
git remote add public https://github.com/evcc-io/evcc.git

- name: Fetch master branch from public repo
run: |
git fetch public master

- name: Checkout evcc-master branch
run: |
git checkout evcc-master

- name: Merge master branch from public repo into evcc-master
run: |
git merge public/master --no-edit

- name: Push changes to evcc-master
run: |
git push origin evcc-master
Copilot AI and others added 10 commits May 5, 2026 22:11
Keeps only the applyBatteryGridChargeLimit function restoration, not the other optimizer changes.

Co-authored-by: jeffborg <1595430+jeffborg@users.noreply.github.com>
Agent-Logs-Url: https://github.com/jeffborg/evcc/sessions/2a6e3659-01e7-4040-a943-26f63dee4e0c

Co-authored-by: jeffborg <1595430+jeffborg@users.noreply.github.com>
…-forecast-battery

Co-authored-by: jeffborg <1595430+jeffborg@users.noreply.github.com>
…slot-time

Co-authored-by: jeffborg <1595430+jeffborg@users.noreply.github.com>
Increase plan minimum slot duration from 3min to 4min
…tery

Restore applyBatteryGridChargeLimit in optimizer
@jeffborg jeffborg merged commit 7630168 into tag-0.306.2 May 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants