diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f1f39cb96..40eecc389 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,12 +8,16 @@ updates: directory: "/" schedule: interval: "weekly" + commit-message: prefix: "build" + target-branch: "dependabotchanges" - package-ecosystem: "pip" directory: "/" schedule: interval: "weekly" + + commit-message: prefix: "build" groups: @@ -21,17 +25,24 @@ updates: patterns: - "langchain*" open-pull-requests-limit: 50 + target-branch: "dependabotchanges" - package-ecosystem: "npm" directory: "/code/frontend" schedule: interval: "weekly" + + commit-message: prefix: "build" open-pull-requests-limit: 50 + target-branch: "dependabotchanges" - package-ecosystem: "npm" directory: "/tests/integration/ui" schedule: interval: "weekly" + + commit-message: prefix: "build" open-pull-requests-limit: 50 + target-branch: "dependabotchanges" diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 000000000..e7eee8fb4 --- /dev/null +++ b/.github/workflows/sync-branches.yml @@ -0,0 +1,44 @@ +name: Sync Main to dependabotchanges + +on: + # Schedule the sync job to run daily or customize as needed + schedule: + - cron: '0 1 * * *' # Runs every day at 1 AM UTC + # Trigger the sync job on pushes to the main branch + push: + branches: + - main + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for accurate branch comparison + + - name: Configure Git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Sync main to dependabotchanges + run: | + # Ensure we're on the main branch + git checkout main + # Fetch the latest changes + git pull origin main + + # Switch to dependabotchanges branch + git checkout dependabotchanges + # Merge main branch changes + git merge main --no-edit + + # Push changes back to dependabotchanges branch + git push origin dependabotchanges + + - name: Notify on Failure + if: failure() + run: echo "Sync from main to dependabotchanges failed!"