Skip to content

Commit

Permalink
Merge pull request #15 from Harmanpreet-Microsoft/main
Browse files Browse the repository at this point in the history
chore: Redirect Dependabot PRs to 'dependentbotchanges' for Pre-Merge Testing
  • Loading branch information
Roopan-Microsoft authored Nov 4, 2024
2 parents 56ef162 + 8b56cb1 commit 48af8b6
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,41 @@ updates:
directory: "/"
schedule:
interval: "weekly"

commit-message:
prefix: "build"
target-branch: "dependabotchanges"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"


commit-message:
prefix: "build"
groups:
langchain:
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"
44 changes: 44 additions & 0 deletions .github/workflows/sync-branches.yml
Original file line number Diff line number Diff line change
@@ -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!"

0 comments on commit 48af8b6

Please sign in to comment.