From 5484aff18306cf60cb626321d1acd4cbaf3c8816 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 2 Jan 2026 01:57:22 +0000 Subject: [PATCH 1/2] Initial plan From c29b34f7d3b2a3b33fd27fd82f3bf890d9863d74 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 2 Jan 2026 02:01:50 +0000 Subject: [PATCH 2/2] Add rebase workflow and conflict message template Co-authored-by: brettheap <1513478+brettheap@users.noreply.github.com> --- .github/rebase-conflict-message.md | 53 ++++++++++++++++++++ .github/workflows/rebase-opensoft-prod.yml | 56 ++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 .github/rebase-conflict-message.md create mode 100644 .github/workflows/rebase-opensoft-prod.yml diff --git a/.github/rebase-conflict-message.md b/.github/rebase-conflict-message.md new file mode 100644 index 00000000000..606601e9b15 --- /dev/null +++ b/.github/rebase-conflict-message.md @@ -0,0 +1,53 @@ +## Rebase Conflict Detected + +The automated weekly rebase of `opensoft-prod` onto `production` has encountered merge conflicts and requires manual resolution. + +### Steps to Resolve + +1. **Clone the repository and fetch latest changes:** + ```bash + git fetch origin + ``` + +2. **Checkout the opensoft-prod branch:** + ```bash + git checkout opensoft-prod + ``` + +3. **Start the rebase onto production:** + ```bash + git rebase origin/production + ``` + +4. **Resolve conflicts:** + - Git will pause at each conflicting commit + - Open the conflicting files and resolve the conflicts manually + - Look for conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) + - Edit the files to keep the desired changes + +5. **After resolving conflicts in each file:** + ```bash + git add + git rebase --continue + ``` + +6. **Repeat steps 4-5 until the rebase is complete** + +7. **Force-push the rebased branch:** + ```bash + git push --force-with-lease origin opensoft-prod + ``` + +### Need Help? + +If you're unsure about resolving conflicts, consider: +- Consulting with the team members who made the conflicting changes +- Using a visual merge tool like `git mergetool` +- Reviewing the commit history: `git log origin/production..origin/opensoft-prod` + +### Prevention + +To minimize future conflicts: +- Keep `opensoft-prod` regularly synced with `production` +- Coordinate large changes with the team +- Consider breaking large features into smaller, incremental updates diff --git a/.github/workflows/rebase-opensoft-prod.yml b/.github/workflows/rebase-opensoft-prod.yml new file mode 100644 index 00000000000..ef554951dfe --- /dev/null +++ b/.github/workflows/rebase-opensoft-prod.yml @@ -0,0 +1,56 @@ +name: Rebase opensoft-prod onto production + +on: + schedule: + - cron: "0 2 * * 0" # Weekly on Sunday at 2:00 AM UTC + workflow_dispatch: + +jobs: + rebase: + runs-on: blacksmith-4vcpu-ubuntu-2404 + permissions: + contents: write + issues: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Fetch all branches + run: | + git fetch origin production + git fetch origin opensoft-prod + + - name: Attempt rebase + id: rebase + run: | + git checkout opensoft-prod + if git rebase origin/production; then + echo "rebase_status=success" >> $GITHUB_OUTPUT + else + echo "rebase_status=conflict" >> $GITHUB_OUTPUT + git rebase --abort + fi + + - name: Push rebased branch + if: steps.rebase.outputs.rebase_status == 'success' + run: | + git push --force-with-lease origin opensoft-prod + + - name: Create issue on conflict + if: steps.rebase.outputs.rebase_status == 'conflict' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ISSUE_BODY=$(cat .github/rebase-conflict-message.md) + gh issue create \ + --title "Rebase Conflict: opensoft-prod onto production" \ + --body "$ISSUE_BODY" \ + --label "maintenance,rebase-conflict"