Skip to content

Commit

Permalink
ci(dependabot): auto-merge PRs for non-major versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoeurderoy committed Mar 13, 2023
1 parent 08d18fc commit 9caab2c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 83 deletions.
82 changes: 0 additions & 82 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,85 +7,3 @@ updates:
time: "04:00"
open-pull-requests-limit: 10
versioning-strategy: increase
ignore:
- dependency-name: content-range
versions:
- ">= 2.a, < 3"
- dependency-name: "@algoan/pubsub"
versions:
- 4.5.0
- dependency-name: y18n
versions:
- 4.0.1
- 4.0.2
- dependency-name: "@nestjs/testing"
versions:
- 7.6.11
- 7.6.12
- 7.6.13
- 7.6.14
- 7.6.15
- 7.6.7
- 7.6.8
- 7.6.9
- dependency-name: "@nestjs/microservices"
versions:
- 7.6.11
- 7.6.12
- 7.6.13
- 7.6.14
- 7.6.15
- 7.6.7
- 7.6.8
- 7.6.9
- dependency-name: "@nestjs/core"
versions:
- 7.6.11
- 7.6.12
- 7.6.13
- 7.6.14
- 7.6.15
- 7.6.7
- 7.6.8
- 7.6.9
- dependency-name: "@nestjs/common"
versions:
- 7.6.11
- 7.6.12
- 7.6.13
- 7.6.14
- 7.6.15
- 7.6.7
- 7.6.8
- 7.6.9
- dependency-name: "@nestjs/platform-express"
versions:
- 7.6.11
- 7.6.12
- 7.6.13
- 7.6.14
- 7.6.15
- 7.6.7
- 7.6.8
- 7.6.9
- dependency-name: "@types/mocha"
versions:
- 8.2.0
- 8.2.1
- 8.2.2
- dependency-name: node-notifier
versions:
- 8.0.1
- 8.0.2
- dependency-name: "@types/express"
versions:
- 4.17.11
- dependency-name: jwt-decode
versions:
- 3.1.2
- dependency-name: content-range
versions:
- 1.1.1
- dependency-name: tslint
versions:
- 6.1.3
21 changes: 20 additions & 1 deletion .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,26 @@ jobs:
name: Lint all packages
- run: npm run test:cov:all
name: Launch tests for each packages

dependabot:
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]'
name: Auto-merge Dependabot PRs if tests pass and non-major version
needs:
- test
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.PUBLIC_REPO_GHA_PAT }}

publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'workflow_dispatch' }}
Expand Down

0 comments on commit 9caab2c

Please sign in to comment.