From c80335de2c13a83149a9163425567a4e9dc88603 Mon Sep 17 00:00:00 2001 From: Harmanpreet-Microsoft Date: Fri, 29 Nov 2024 11:40:38 +0530 Subject: [PATCH 1/2] Create sync-branches.yml --- .github/workflows/sync-branches.yml | 44 +++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/sync-branches.yml diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 00000000..7e4e8b45 --- /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 dependabotchanges1 branch + git push origin dependabotchanges + + - name: Notify on Failure + if: failure() + run: echo "Sync from main to dependabotchanges failed!" From 10232166f6add8fe5c7c54c93e73baef93daa175 Mon Sep 17 00:00:00 2001 From: Harmanpreet-Microsoft Date: Fri, 29 Nov 2024 11:41:29 +0530 Subject: [PATCH 2/2] Update dependabot.yml --- .github/dependabot.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 91abb11f..f628fd9d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,20 @@ version: 2 updates: - - package-ecosystem: "pip" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: "npm" # for frontend dependencies + directory: "/frontend" schedule: - interval: "weekly" + interval: "monthly" + commit-message: + prefix: "build" + target-branch: "dependabotchanges" + open-pull-requests-limit: 10 + + - package-ecosystem: "pip" # for backend dependencies + directory: "/" + schedule: + interval: "monthly" + commit-message: + prefix: "build" + target-branch: "dependabotchanges" + open-pull-requests-limit: 10