-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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): filePatterns #34615
base: main
Are you sure you want to change the base?
feat(config): filePatterns #34615
Conversation
Co-authored-by: Sebastian Poxhofer <[email protected]>
Co-authored-by: HonkingGoose <[email protected]>
Co-authored-by: Michael Kriese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some more samples, which can be simplified by using glob, otherwise LGTM
Co-authored-by: Michael Kriese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can do the regex to glob changes in a followup pr of cause
needs update because of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review done. Please note each of the suggested changes and apply them widely to the whole PR. e.g. ^foo$
patterns should always just be foo
.
docs/usage/user-stories/maintaining-aur-packages-with-renovate.md
Outdated
Show resolved
Hide resolved
@@ -78,7 +78,7 @@ export const presets: Record<string, Preset> = { | |||
{ | |||
customType: 'regex', | |||
datasourceTemplate: 'docker', | |||
fileMatch: ['(^|/)Chart\\.yaml$'], | |||
filePatterns: ['/(^|/)Chart\\.yaml$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)Chart\\.yaml$/'], | |
filePatterns: ['**/Chart.yaml'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why resolved?
@@ -792,7 +792,7 @@ Example: | |||
"customManagers": [ | |||
{ | |||
"customType": "regex", | |||
"fileMatch": ["values.yaml$"], | |||
"filePatterns": ["**values.yaml"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filePatterns": ["**values.yaml"], | |
"filePatterns": ["**/values.yaml"], |
@@ -884,7 +884,7 @@ Only the `json`, `toml` and `yaml` formats are supported. | |||
{ | |||
"customType": "jsonata", | |||
"fileFormat": "toml", | |||
"fileMatch": ["file.toml"], | |||
"filePatterns": ["some/file.toml"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this path change intentional?
|
||
```json | ||
{ | ||
"kubernetes": { | ||
"fileMatch": ["^config/.*\\.yaml$"] | ||
"filePatterns": ["/^config/.*\\.yaml$/"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filePatterns": ["/^config/.*\\.yaml$/"] | |
"filePatterns": ["config/**/*.yaml"] |
looks simpler
@@ -78,7 +78,7 @@ export const presets: Record<string, Preset> = { | |||
{ | |||
customType: 'regex', | |||
datasourceTemplate: 'docker', | |||
fileMatch: ['(^|/)Chart\\.yaml$'], | |||
filePatterns: ['/(^|/)Chart\\.yaml$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why resolved?
'(^|/)GNUMakefile$', | ||
'\\.mk$', | ||
], | ||
filePatterns: ['**/Makefile', '**/GNUMakefile', '**/*.mk'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure glob is case insensitive?
filePatterns: ['**/Makefile', '**/GNUMakefile', '**/*.mk'], | |
filePatterns: ['**/{M,m}akefile', '**/GNUMakefile', '**/*.mk'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rhys, suggested that it is case insensitive. I didn't double check and went with the suggestion.
I looked it up and there seems to be mixed answers. I will apply your suggestion to be 100% safe.
@@ -109,7 +104,7 @@ export const presets: Record<string, Preset> = { | |||
customType: 'regex', | |||
datasourceTemplate: | |||
'{{#if datasource}}{{{datasource}}}{{else}}maven{{/if}}', | |||
fileMatch: ['(^|/)pom\\.xml$'], | |||
filePatterns: ['/(^|/)pom\\.xml$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)pom\\.xml$/'], | |
filePatterns: ['**/pom.xml'], |
@@ -122,7 +117,7 @@ export const presets: Record<string, Preset> = { | |||
customManagers: [ | |||
{ | |||
customType: 'regex', | |||
fileMatch: ['.+\\.tfvars$'], | |||
filePatterns: ['/.+\\.tfvars$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/.+\\.tfvars$/'], | |
filePatterns: ['**/*.tfvars'], |
simplify others too where possible
@@ -91,7 +91,7 @@ Here is the Renovate configuration to use Terraform, `aws-rds` and Aurora MySQL: | |||
{ | |||
"description": "Update RDS", | |||
"customType": "regex", | |||
"fileMatch": [".+\\.tf$"], | |||
"filePatterns": ["/.+\\.tf$/"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filePatterns": ["/.+\\.tf$/"], | |
"filePatterns": ["**/*.tf"], |
prefer glob in samples where possible
Co-authored-by: Michael Kriese <[email protected]>
|
||
```json | ||
{ | ||
"fileMatch": ["'(^|/)fleet.ya?ml", "myGitRepoManifests\\.yaml"] | ||
"filePatterns": ["**/fleet.{yaml,yml}", "**myGitRepoManifests.yaml"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filePatterns": ["**/fleet.{yaml,yml}", "**myGitRepoManifests.yaml"] | |
"filePatterns": ["**/fleet.{yaml,yml}", "**/myGitRepoManifests.yaml"] |
|
||
```json | ||
{ | ||
"pip-compile": { | ||
"fileMatch": ["(^|/)requirements\\.txt$"] | ||
"filePatterns": ["**/requirements\\.txt"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"filePatterns": ["**/requirements\\.txt"] | |
"filePatterns": ["**/requirements.txt"] |
'/(^|/)pyproject\\.toml$/', // `tool.pixi` section | ||
'/(^|/)pixi\\.toml$/', // root object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'/(^|/)pyproject\\.toml$/', // `tool.pixi` section | |
'/(^|/)pixi\\.toml$/', // root object | |
'**/pyproject.toml', // `tool.pixi` section | |
'**/pixi.toml', // root object |
@@ -9,7 +9,7 @@ export const url = 'https://www.puppet.com/docs/index.html'; | |||
export const categories: Category[] = ['iac', 'ruby']; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)Puppetfile$'], | |||
filePatterns: ['/(^|/)Puppetfile$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)Puppetfile$/'], | |
filePatterns: ['**/Puppetfile'], |
@@ -9,7 +9,7 @@ export const url = 'https://github.com/pyenv/pyenv#readme'; | |||
export const categories: Category[] = ['python']; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)\\.python-version$'], | |||
filePatterns: ['/(^|/)\\.python-version$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)\\.python-version$/'], | |
filePatterns: ['**/.python-version'], |
@@ -8,7 +8,7 @@ export const url = 'https://cakebuild.net/docs'; | |||
export const categories: Category[] = ['dotnet']; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['\\.cake$'], | |||
filePatterns: ['/\\.cake$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/\\.cake$/'], | |
filePatterns: ['**/*.cake'], |
@@ -16,7 +16,7 @@ export const categories: Category[] = ['rust']; | |||
|
|||
export const defaultConfig = { | |||
commitMessageTopic: 'Rust crate {{depName}}', | |||
fileMatch: ['(^|/)Cargo\\.toml$'], | |||
filePatterns: ['/(^|/)Cargo\\.toml$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)Cargo\\.toml$/'], | |
filePatterns: ['**/Cargo.toml'], |
@@ -13,7 +13,7 @@ export const url = 'https://cocoapods.org'; | |||
export const categories: Category[] = ['swift']; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)Podfile$'], | |||
filePatterns: ['/(^|/)Podfile$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)Podfile$/'], | |
filePatterns: ['**/Podfile'], |
@@ -10,7 +10,7 @@ export const url = | |||
export const categories: Category[] = ['perl']; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)cpanfile$'], | |||
filePatterns: ['/(^|/)cpanfile$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)cpanfile$/'], | |
filePatterns: ['**/cpanfile'], |
@@ -6,7 +6,7 @@ export { updateArtifacts } from './artifacts'; | |||
export const supportsLockFileMaintenance = true; | |||
|
|||
export const defaultConfig = { | |||
fileMatch: ['(^|/)devbox\\.json$'], | |||
filePatterns: ['/(^|/)devbox\\.json$/'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filePatterns: ['/(^|/)devbox\\.json$/'], | |
filePatterns: ['**/devbox.json'], |
Changes
fileMatch
tofilePatterns
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: