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
36 changes: 20 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
groups:
npm-dependencies:
patterns:
- '*'

- package-ecosystem: github-actions
directory: '/'
multi-ecosystem-groups:
dependencies:
schedule:
interval: monthly
groups:
github-actions:
patterns:
- '*'
interval: "monthly"

updates:
- package-ecosystem: "npm"
directory: "/"
patterns:
- "*"
multi-ecosystem-group: "dependencies"
cooldown:
default-days: 7

- package-ecosystem: "github-actions"
directory: "/"
patterns:
- "*"
multi-ecosystem-group: "dependencies"
cooldown:
default-days: 7
28 changes: 28 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,31 @@ jobs:
- name: Validate JSDoc vs Code
run: npm run validate:docs

dependabot:
name: Dependabot auto-merge
runs-on: ubuntu-latest
needs: [build, validate-docs]
if: |
github.event_name == 'pull_request' &&
github.event.pull_request.user.login == 'dependabot[bot]' &&
github.repository == 'HTTPArchive/custom-metrics'

permissions:
contents: write
pull-requests: write

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Loading