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

Support wildcard/glob patterns in directory config #1958

Closed
clxmstaab opened this issue Jun 19, 2020 · 3 comments
Closed

Support wildcard/glob patterns in directory config #1958

clxmstaab opened this issue Jun 19, 2020 · 3 comments

Comments

@clxmstaab
Copy link

when working with the very popular Composer bin plugin to isolate your dependencies in a php and composer depenency manager context, the resulting file structure in your repo looks like

vendor-bin/
├── churn-php
│   ├── composer.json
│   ├── composer.lock
│   └── vendor
├── clx-active-record-fixer
│   ├── composer.json
│   ├── composer.lock
│   └── vendor
├── php-cs-fixer
│   ├── composer.json
│   ├── composer.lock
│   └── vendor
└── phpstan
    ├── composer.json
    ├── composer.lock
    └── vendor

this means for every dependency/tool I managed via the "Composer bin plugin" today, I need to configure a separate pattern in my dependabot.conf.

in our usual projects this looks like

version: 2
updates:
  -   package-ecosystem: composer
      directory: /
      schedule:
        interval: daily

  -   package-ecosystem: npm
      directory: /
      schedule:
        interval: daily

  -   package-ecosystem: composer
      directory: /vendor-bin/churn-php/
      versioning-strategy: increase
      schedule:
        interval: daily

  -   package-ecosystem: composer
      directory: /vendor-bin/clx-active-record-fixer/
      versioning-strategy: increase
      schedule:
        interval: daily

  -   package-ecosystem: composer
      directory: /vendor-bin/php-cs-fixer/
      versioning-strategy: increase
      schedule:
        interval: daily

  -   package-ecosystem: composer
      directory: /vendor-bin/phpstan/
      versioning-strategy: increase
      schedule:
        interval: daily

the number of entries grows with the number of dependencies managed via "Composer bin plugin".

things would get a lot easier if we could glob/wildcard patterns in the directory config. when glob/wildcard patterns would be supported our dependabot.conf could get simplified to

version: 2
updates:
  -   package-ecosystem: composer
      directory: /
      schedule:
        interval: daily

  -   package-ecosystem: npm
      directory: /
      schedule:
        interval: daily

  -   package-ecosystem: composer
      directory: /vendor-bin/*/
      versioning-strategy: increase
      schedule:
        interval: daily

see the directory: /vendor-bin/*/ line which would contain "all the magic".

@clxmstaab
Copy link
Author

I guess my request is similar to https://github.com/dependabot/feedback/issues/911 but my use case is for php instead of javascript as in the mentioned issue.

@infin8x infin8x transferred this issue from dependabot/feedback Jun 29, 2020
@IEvangelist
Copy link

IEvangelist commented Dec 3, 2020

I too would like this feature, I was exploring the source code - looking to understand how this works. I noticed that allowing the directory to config option to support globbing would really make this much more powerful. Right now we have many repos that have to define an entry per directory, it would be much easier to specify a glob instead.

See #1952

@feelepxyz
Copy link
Contributor

Closing as a duplicate of #2178

This isn't specific to the package manager and requires some deeper changes in the way dependabot fetches the repo contents to work. We've got some ideas around how this will also play into grouped updates.

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

No branches or pull requests

3 participants