Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
31 changes: 31 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2
updates:
- package-ecosystem: "npm"
directories:
- "/"
schedule:
interval: "daily"
time: "09:00"
timezone: "Europe/Berlin"
versioning-strategy: increase
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
reviewers:
- "bajtos"
- "juliangruber"
- "pyropy"
- "NikolasHaimerl"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "09:00"
timezone: "Europe/Berlin"
commit-message:
prefix: "ci"
reviewers:
- "bajtos"
- "juliangruber"
- "pyropy"
- "NikolasHaimerl"
37 changes: 37 additions & 0 deletions .github/workflows/dependabot-auto-approve-minor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Dependabot auto-approve minor updates
on: pull_request

permissions:
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
strategy:
matrix:
dependencyStartsWith:
- '@sentry/'
- mocha
- pg
- debug
- ethers
- typescript
- postgrator
- '@types/'
- standard
- cross-spawn
- '@filecoin-station/spark-impact-evaluator'
- '@fastify/'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
strategy:
matrix:
dependencyStartsWith:
- '@sentry/'
- mocha
- pg
- debug
- ethers
- typescript
- postgrator
- '@types/'
- standard
- cross-spawn
- '@filecoin-station/spark-impact-evaluator'
- '@fastify/'

As we're not using these dependencies inside this project I suggest we delete them or replace them, otherwise auto-approve script won't pass.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, i have updated the auto approve script to use the right dependencies based on the package.json file.
Kindly check it out.

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
if: ${{startsWith(steps.metadata.outputs.dependency-names, matrix.dependencyStartsWith) && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')}}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
18 changes: 18 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Dependabot auto-merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Authenticate cli with a PAT
run: echo "${{ secrets.DEPENDABOT_TOKEN }}" | gh auth login --with-token
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}