Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ updates:
directory: /
schedule:
interval: daily
cooldown:
default-days: 7
include:
- "*"
allow:
- dependency-name: mongodb
- dependency-name: bson
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Dependabot PR
on:
pull_request_target:
types: [opened]
branches:
- main

permissions:
pull-requests: write

jobs:
enable-auto-merge-on-dependabot-pr:
name: Enable auto-merge for Dependabot PRs
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 3 additions & 21 deletions .github/workflows/test-and-build-from-fork.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Test and Build (from fork)
on:
pull_request_target:
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
contents: read

jobs:
test-and-build:
Expand All @@ -22,10 +21,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: Setup Node.js Environment
uses: actions/setup-node@v4
Expand All @@ -44,18 +39,5 @@ jobs:
- name: Run Tests
env:
NODE_OPTIONS: "--max_old_space_size=4096"
SEGMENT_KEY: ${{ secrets.SEGMENT_KEY_DEV }}
SEGMENT_KEY: "test-segment-key"
run: npm run test

merge-dependabot-pr:
name: Merge Dependabot PR
runs-on: ubuntu-latest
needs:
- test-and-build
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}