dependabot / dependabot-core

🤖 Dependabot's core logic for creating update PRs.
https://docs.github.com/en/code-security/dependabot
MIT License
4.68k stars 1.01k forks source link

Feature request: support adding per-group labels when grouping #9908

Open bdragon opened 4 months ago

bdragon commented 4 months ago

Is there an existing issue for this?

Feature description

As a Dependabot user, when I configure groups for a particular (ecosystem, directory, target branch), I want to be able to add different labels to each group.

Proposal:

version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: daily
    groups:
      version-updates:
        applies-to: version-updates
        labels:
          - version-update
        patterns:
          - "*"
      security-updates:
        applies-to: security-updates
        labels:
          - security-update
        patterns:
          - "*"
snsinahub commented 4 months ago

thanks @bdragon for creating feature request... I'd like to add the requirement from my customer which might help to address additional questions

My customer has a mono repo based on multiple programming languages such as Python, JavaScript and more... they would like to distinguish between version and security updates PRs...

I hope this feature request will support more programming languages such as Python, Java, dotnet and more

Thanks

leplatrem commented 4 months ago

We would also be interested in this in order to ignore certain groups from our autogenerated changelog 😊

# .github/release.yml
changelog:
  exclude:
    labels:
      - development
  categories:
    - title: Bug Fixes
      labels:
        - "bug"
    - title: Dependency Updates
      labels:
        - "dependencies"
# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: pip
  directory: "/"
  schedule:
    interval: weekly
  groups:
    production-dependency-patches:
      dependency-type: "production"
      update-types: ["patch"]
    development-dependencies:
      dependency-type: "development"
      update-types: ["major", "minor", "patch"]
      labels:
      - development

If this is relatively trivial to implement, and you provide a bit of guidance on where this would have to be done, I'd be willing to give it a try 🙏

Thank you!