action-dependabot-auto-merge icon indicating copy to clipboard operation
action-dependabot-auto-merge copied to clipboard

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

Open ahmadnassri opened this issue 3 years ago • 5 comments

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:

  • config file is now required
  • action inputs is now limited to token & config file, all other values are moved to config file
  • config file format has changed syntax

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 avatar Dec 15 '20 00:12 ahmadnassri

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

ahmadnassri avatar Dec 15 '20 00:12 ahmadnassri

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

AlCalzone avatar Dec 15 '20 08:12 AlCalzone

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

ahmadnassri avatar Jan 12 '21 20:01 ahmadnassri

Hey what's the status on this?

mileszim avatar Feb 02 '23 19:02 mileszim

@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?

PhoenixmitX avatar Apr 15 '23 15:04 PhoenixmitX