ahmadnassri / action-dependabot-auto-merge

Automatically merge Dependabot PRs when version comparison is within range
MIT License
342 stars 48 forks source link

feat(config): support for rules & ignore sections in config #43

Open ahmadnassri opened 3 years ago

ahmadnassri commented 3 years ago

in an attempt to simplify the configuration file format and allow for additional features, this PR introduces a breaking change (and thus a major version will be released)

BREAKING CHANGE:

Before

workflow.yml
name: auto-merge

on:
  pull_request:

jobs:
  auto-merge:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ahmadnassri/action-dependabot-auto-merge@v2
        with:
          github-token: ${{ secrets.mytoken }}
          command: merge
          approve: true
          target: patch
config.yml
- match:
    dependency_type: all
    update_type: "semver:minor" # includes patch updates!

After

workflow:yml
name: auto-merge

on:
  pull_request:

jobs:
  auto-merge:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ahmadnassri/action-dependabot-auto-merge@v2
        with:
          config: .github/auto-merge.yml
          github-token: ${{ secrets.mytoken }}
config.yml
ignore: 
  - dependency_name: react-*

rules: 
  - dependency_name: aws-sdk
    update_type: semver:minor

  - dependency_type: development
    update_type: semver:minor
ahmadnassri commented 3 years ago

asking @ttshivers @leblancfg @AlCalzone for feedback on this breaking change, as you've all helped contribute and shape this action :)

AlCalzone commented 3 years ago

Didn't look at everything in-depth, but the changes make sense IMO. Just two documentation-related nits.

ahmadnassri commented 3 years ago

FYI: I'm holding this release back as GH Actions has showed issue with version fixing on docker based actions ...

for tracking: https://github.com/github/super-linter/issues/943

mileszim commented 1 year ago

Hey what's the status on this?

PhoenixmitX commented 1 year ago

@ahmadnassri I was just about to write a feature request. What I need is something similar to this. Are there any plans to merge this?