Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahmadnassri
Copy link
Owner

@ahmadnassri ahmadnassri commented Dec 15, 2020

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
Copy link
Owner Author

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

### Configuration file syntax
### Configuration File

A configuration file is **REQUIRED** to successfully determine the
Copy link
Contributor

Choose a reason for hiding this comment

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

Incomplete sentence?

Comment on lines -92 to -93
| `command` | ❌ | `merge` | The command to pass to Dependabot |
| `approve` | ❌ | `true` | Auto-approve pull-requests |
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these two are missing from the docs now.

@AlCalzone
Copy link
Contributor

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

@ahmadnassri
Copy link
Owner Author

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

config file now supports separate sections for ignore directives and auto-merge rules

BREAKING CHANGE:
- config file is now required
- action inputs no longer accept target & command
- config file format has changed
@mileszim
Copy link

mileszim commented Feb 2, 2023

Hey what's the status on this?

@PhoenixmitX
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants