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(platform/bitbucket): use development branching model as default branch #20803

Closed
Closed
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
040d348
feat(config)!: add new option `constraintsFiltering` (#19992)
RahulGautamSingh Jan 28, 2023
ec36b16
feat!: default to rangeStrategy=auto, prefer update-lockfile (#19942)
rarkins Jan 28, 2023
766ba9a
feat(config)!: non-zero defaults for PR concurrent, hourly limits (#1…
rarkins Jan 28, 2023
7d9ce6a
feat(cache): default cacheHardTtlMinutes to 24 hours (#20079)
rarkins Jan 28, 2023
abdee35
feat(go)!: default GOPROXY (#20081)
rarkins Jan 29, 2023
2f4e448
fix(regex): don’t escape forward slash in fileMatch (#19314)
rarkins Jan 30, 2023
bbe71cf
feat(cache): file cache cleanup (#20061)
rarkins Feb 1, 2023
956c9c1
feat(config): default `dockerImagePrefix` to `containerbase` (#20150)
viceice Feb 1, 2023
92b3082
chore: fix artifacts tests
rarkins Feb 11, 2023
3d6898e
fix(versioning)!: bump short ranges to version (#20494)
rarkins Feb 20, 2023
dec97be
refactor!: use packageName and not depName for datasource lookups (#2…
rarkins Feb 21, 2023
06936dd
feat!: update `github-releases` datasource digest computation to use …
devversion Feb 22, 2023
a6bbf93
feat!: default to semver-coerced instead of semver (#20573)
secustor Feb 25, 2023
a2bc23c
chore: fix packagist tests
rarkins Mar 4, 2023
789238c
feat!: internalChecksAsSuccess (#20572)
rarkins Mar 4, 2023
4bbfd40
refactor!: prefer packageName over depName in datasource (#20221)
rarkins Mar 4, 2023
9b2b69b
feat(config)!: forkProcessing (#20759)
rarkins Mar 5, 2023
ec66dbb
feat: set bitbucket development branch as default
setchy Mar 8, 2023
3a8bfd1
feat: set bitbucket development branch as default
setchy Mar 8, 2023
933e6b3
fix type import
setchy Mar 8, 2023
217785a
feat: update to check if branch exists. added unit tests for these sc…
setchy Mar 8, 2023
d41fe0f
feat(config)!: add new option `constraintsFiltering` (#19992)
RahulGautamSingh Jan 28, 2023
d68f008
feat!: default to rangeStrategy=auto, prefer update-lockfile (#19942)
rarkins Jan 28, 2023
88ac1c2
feat(config)!: non-zero defaults for PR concurrent, hourly limits (#1…
rarkins Jan 28, 2023
c6943ba
feat(cache): default cacheHardTtlMinutes to 24 hours (#20079)
rarkins Jan 28, 2023
8d845c5
feat(go)!: default GOPROXY (#20081)
rarkins Jan 29, 2023
c493fe8
fix(regex): don’t escape forward slash in fileMatch (#19314)
rarkins Jan 30, 2023
cb1c737
feat(cache): file cache cleanup (#20061)
rarkins Feb 1, 2023
3cdaf0d
feat(config): default `dockerImagePrefix` to `containerbase` (#20150)
viceice Feb 1, 2023
23cf041
chore: fix artifacts tests
rarkins Feb 11, 2023
9088606
fix(versioning)!: bump short ranges to version (#20494)
rarkins Feb 20, 2023
16457b6
Merge remote-tracking branch 'upstream/v35' into feature/bitbucket-de…
setchy Mar 8, 2023
90fb9e8
refactor!: use packageName and not depName for datasource lookups (#2…
rarkins Feb 21, 2023
b7944ed
feat!: update `github-releases` datasource digest computation to use …
devversion Feb 22, 2023
aa1a8bb
feat!: default to semver-coerced instead of semver (#20573)
secustor Feb 25, 2023
3365726
feat!: internalChecksAsSuccess (#20572)
rarkins Mar 4, 2023
394b4a6
refactor!: prefer packageName over depName in datasource (#20221)
rarkins Mar 4, 2023
a832fdf
feat(config)!: forkProcessing (#20759)
rarkins Mar 5, 2023
6c9ea7f
Merge branch 'v35' into feature/bitbucket-development-branch
rarkins Mar 8, 2023
00f2622
Update lib/modules/platform/bitbucket/index.ts
setchy Mar 8, 2023
bdde7ad
refactor: update to be more succinct
setchy Mar 8, 2023
4b34b3c
add bbUseDevelopmentBranch configuration option
setchy Mar 8, 2023
de5f03b
docs: update
setchy Mar 8, 2023
36f16d9
fix: remove from platform type
setchy Mar 8, 2023
b66c312
Update docs/usage/configuration-options.md
setchy Mar 8, 2023
24407ed
Update docs/usage/configuration-options.md
setchy Mar 8, 2023
81b22b6
Update lib/config/options/index.ts
setchy Mar 8, 2023
091f1bb
make configuration option global. reword verbiage.
setchy Mar 8, 2023
6e20975
refactor main branch logic based on PR feedback
setchy Mar 8, 2023
9d2704b
remove global option
setchy Mar 8, 2023
fa59473
make config global only
setchy Mar 9, 2023
d37cbd1
revert mainbranch rename
setchy Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ e.g. apply one set of labels for `backend/package.json` and a different set of l
module.exports = {
npmrc: '//registry.npmjs.org/:_authToken=abc123',
baseDir: '/tmp/renovate',
includeForks: true,
forkProcessing: 'enabled',
gradle: { enabled: false },
};
```
Expand Down
11 changes: 0 additions & 11 deletions docs/development/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,6 @@ To do this, see these GitHub guides:

## Tips and tricks

### Running Renovate against forked repositories

Quite often, the quickest way for you to test or fix something is to fork an existing repository.
But by default Renovate skips over repositories that are forked.
To override this default, you need to specify the setting `includeForks` as `true`.

Tell Renovate to run on your forked repository by doing one of the following:

1. Add `"includeForks": true` to the `renovate.json` file in your forked repository
1. Run Renovate with the CLI flag `--renovate-fork=true`

### Log files

Usually, `debug` is good enough to troubleshoot most problems or verify functionality.
Expand Down
45 changes: 35 additions & 10 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,19 @@ If you need to _override_ constraints that Renovate detects from the repository,
!!! note
Make sure not to mix this up with the term `compatibility`, which Renovate uses in the context of version releases, e.g. if a Docker image is `node:12.16.0-alpine` then the `-alpine` suffix represents `compatibility`.

## constraintsFiltering

This option controls whether Renovate filters new releases based on configured or detected `constraints`.
Renovate supports two options:

- `none`: No release filtering (all releases allowed)
- `strict`: If the release's constraints match the package file constraints, then it's included

We are working on adding more advanced filtering options.

Note: There must be a `constraints` object in your Renovate config for this to work.
This feature is limited to `pypi` datasource only.

## defaultRegistryUrls

Override a datasource's default registries with this config option.
Expand Down Expand Up @@ -910,6 +923,16 @@ If this option is enabled, reviewers will need to create a new PR if additional
!!! note
This option is only relevant if you set `forkToken`.

## forkProcessing

By default, Renovate will skip over any repositories that are forked if Renovate is using `autodiscover` mode.
This includes if the forked repository has a Renovate config file, because Renovate can't tell if that file was added by the original repository or not.
If you wish to enable processing of a forked repository by Renovate when autodiscovering, you need to add `"forkProcessing": "enabled"` to your repository config or run the CLI command with `--fork-processing=enabled`.

If you are running in non-autodiscover mode (e.g. supplying a list of repositories to Renovate) but wish to skip forked repositories, you need to configure `"forkProcessing": "disabled"` in your global config.

If you are using the hosted Mend Renovate then this option will be configured to `"enabled"` automatically if you "Selected" repositories individually but `"disabled"` if you installed for "All" repositories. If you have installed Renovate into "All" repositories but have a fork you want to use, then add `"forkProcessing": "enabled"` to the repository's `renovate.json` file.

## gitAuthor

You can customize the Git author that's used whenever Renovate creates a commit.
Expand Down Expand Up @@ -1404,21 +1427,23 @@ If you need to force permanent unstable updates for a package, you can add a pac

Also check out the `followTag` configuration option above if you wish Renovate to keep you pinned to a particular release tag.

## includeForks

By default, Renovate will skip over any repositories that are forked.
This includes if the forked repository has a Renovate config file, because Renovate can't tell if that file was added by the original repository or not.
If you wish to enable processing of a forked repository by Renovate, you need to add `"includeForks": true` to your repository config or run the CLI command with `--include-forks=true`.

If you are using the hosted Mend Renovate then this option will be configured to `true` automatically if you "Selected" repositories individually but remain as `false` if you installed for "All" repositories.

## includePaths

If you wish for Renovate to process only select paths in the repository, use `includePaths`.

Alternatively, if you need to just _exclude_ certain paths in the repository then consider `ignorePaths` instead.
If you are more interested in including only certain package managers (e.g. `npm`), then consider `enabledManagers` instead.

## internalChecksAsSuccess

By default, internal Renovate checks such as `renovate/stability-days` are not counted towards a branch being "green" or not.
This is primarily to prevent automerge when the only check is a passing Renovate check.

Internal checks will always be counted/considered if they are in pending or failed states.
If there are multiple passing checks for a branch, including non-Renovate ones, then this setting won't make any difference.

Change this setting to `true` if you want to use internal Renovate checks towards a passing branch result.

## internalChecksFilter

This setting determines whether Renovate controls when and how filtering of internal checks are performed, particularly when multiple versions of the same update type are available.
Expand Down Expand Up @@ -1796,7 +1821,7 @@ This field also supports Regular Expressions if they begin and end with `/`. e.g
{
"packageRules": [
{
"matchBaseBranches": ["/^release\\/.*/"],
"matchBaseBranches": ["/^release/.*/"],
"excludePackagePatterns": ["^eslint"],
"enabled": false
}
Expand Down Expand Up @@ -2769,7 +2794,7 @@ regex definition:
{
"fileMatch": ["values.yaml$"],
"matchStrings": [
"image:\\s+(?<depName>my\\.old\\.registry\\/aRepository\\/andImage):(?<currentValue>[^\\s]+)"
"image:\\s+(?<depName>my\\.old\\.registry/aRepository/andImage):(?<currentValue>[^\\s]+)"
],
"depNameTemplate": "my.new.registry/aRepository/andImage",
"autoReplaceStringTemplate": "image: {{{depName}}}:{{{newValue}}}",
Expand Down
12 changes: 6 additions & 6 deletions docs/usage/self-hosted-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ You can skip the host part, and use just the datasource and credentials.

Adds a custom prefix to the default Renovate sidecar Docker containers name and label.

For example, if you set `dockerChildPrefix=myprefix_` then the final container created from the `renovate/node` is:
For example, if you set `dockerChildPrefix=myprefix_` then the final container created from the `containerbase/sidecar` is:

- called `myprefix_node` instead of `renovate_node`
- called `myprefix_sidecar` instead of `renovate_sidecar`
- labeled `myprefix_child` instead of `renovate_child`

<!-- prettier-ignore -->
Expand All @@ -313,19 +313,19 @@ For example, if you set `dockerChildPrefix=myprefix_` then the final container c

## dockerImagePrefix

By default Renovate pulls the sidecar Docker containers from `docker.io/renovate`.
By default Renovate pulls the sidecar Docker containers from `docker.io/containerbase`.
You can use the `dockerImagePrefix` option to override this default.

Say you want to pull your images from `ghcr.io/renovatebot`.
Say you want to pull your images from `ghcr.io/containerbase` to bypass Docker Hub limits.
You would put this in your configuration file:

```json
{
"dockerImagePrefix": "ghcr.io/renovatebot"
"dockerImagePrefix": "ghcr.io/containerbase"
}
```

If you pulled a new `node` image, the final image would be `ghcr.io/renovatebot/node` instead of `docker.io/renovate/node`.
Now when Renovate pulls a new `sidecar` image, the final image is `ghcr.io/containerbase/sidecar` instead of `docker.io/containerbase/sidecar`.

## dockerUser

Expand Down
2 changes: 1 addition & 1 deletion lib/config/__snapshots__/migration.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ exports[`config/migration migrateConfig(config, parentConfig) migrates config 1`
"config:js-lib",
":dependencyDashboard",
],
"forkProcessing": "enabled",
"hostRules": [
{
"hostType": "docker",
Expand All @@ -142,7 +143,6 @@ exports[`config/migration migrateConfig(config, parentConfig) migrates config 1`
"ignorePaths": [
"node_modules/",
],
"includeForks": true,
"lockFileMaintenance": {
"automerge": true,
"exposeAllEnv": false,
Expand Down
34 changes: 34 additions & 0 deletions lib/config/migrations/custom/include-forks-migration.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { RenovateForkMigration } from './include-forks-migration';

describe('config/migrations/custom/include-forks-migration', () => {
it('should migrate true', () => {
expect(RenovateForkMigration).toMigrate(
{
includeForks: true,
},
{
forkProcessing: 'enabled',
}
);
});

it('should migrate false', () => {
expect(RenovateForkMigration).toMigrate(
{
includeForks: false,
},
{
forkProcessing: 'disabled',
}
);
});

it('should not migrate non boolean value', () => {
expect(RenovateForkMigration).toMigrate(
{
includeForks: 'test',
},
{}
);
});
});
13 changes: 13 additions & 0 deletions lib/config/migrations/custom/include-forks-migration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import is from '@sindresorhus/is';
import { AbstractMigration } from '../base/abstract-migration';

export class RenovateForkMigration extends AbstractMigration {
override readonly deprecated = true;
override readonly propertyName = 'includeForks';

override run(value: unknown): void {
if (is.boolean(value)) {
this.setSafely('forkProcessing', value ? 'enabled' : 'disabled');
}
}
}
4 changes: 2 additions & 2 deletions lib/config/migrations/custom/renovate-fork-migration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('config/migrations/custom/renovate-fork-migration', () => {
renovateFork: true,
},
{
includeForks: true,
forkProcessing: 'enabled',
}
);
});
Expand All @@ -18,7 +18,7 @@ describe('config/migrations/custom/renovate-fork-migration', () => {
renovateFork: false,
},
{
includeForks: false,
forkProcessing: 'disabled',
}
);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/config/migrations/custom/renovate-fork-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class RenovateForkMigration extends AbstractMigration {

override run(value: unknown): void {
if (is.boolean(value)) {
this.setSafely('includeForks', value);
this.setSafely('forkProcessing', value ? 'enabled' : 'disabled');
}
}
}
41 changes: 28 additions & 13 deletions lib/config/options/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ const options: RenovateOptions[] = [
cli: false,
env: false,
},
{
name: 'constraintsFiltering',
description: 'Perform release filtering based on language constraints.',
type: 'string',
allowedValues: ['none', 'strict'],
cli: false,
default: 'none',
},
{
name: 'repositoryCache',
description:
Expand Down Expand Up @@ -340,7 +348,7 @@ const options: RenovateOptions[] = [
description:
'Change this value to override the default Renovate Docker sidecar image name prefix.',
type: 'string',
default: 'docker.io/renovate',
default: 'docker.io/containerbase',
globalOnly: true,
},
{
Expand Down Expand Up @@ -411,12 +419,13 @@ const options: RenovateOptions[] = [
experimentalIssues: [17633],
},
{
name: 'includeForks',
name: 'forkProcessing',
description:
'Whether to process forked repositories. By default, all forked repositories are skipped.',
'Whether to process forked repositories. By default, all forked repositories are skipped when in autodiscover mode.',
stage: 'repository',
type: 'boolean',
default: false,
type: 'string',
allowedValues: ['auto', 'enabled', 'disabled'],
default: 'auto',
},
{
name: 'forkToken',
Expand Down Expand Up @@ -954,7 +963,7 @@ const options: RenovateOptions[] = [
{
name: 'matchBaseBranches',
description:
'List of strings containing exact matches (e.g. `["main"]`) and/or regex expressions (e.g. `["/^release\\/.*/"]`). Valid only within a `packageRules` object.',
'List of strings containing exact matches (e.g. `["main"]`) and/or regex expressions (e.g. `["/^release/.*/"]`). Valid only within a `packageRules` object.',
type: 'array',
subType: 'string',
allowString: true,
Expand Down Expand Up @@ -1336,7 +1345,7 @@ const options: RenovateOptions[] = [
name: 'rangeStrategy',
description: 'Determines how to modify or update existing ranges.',
type: 'string',
default: 'replace',
default: 'auto',
allowedValues: [
'auto',
'pin',
Expand Down Expand Up @@ -1539,6 +1548,13 @@ const options: RenovateOptions[] = [
type: 'integer',
default: 0,
},
{
name: 'internalChecksAsSuccess',
description:
'Whether to consider passing internal checks such as stabilityDays when determining branch status.',
type: 'boolean',
default: false,
},
/*
* Undocumented experimental feature
{
Expand Down Expand Up @@ -1573,16 +1589,16 @@ const options: RenovateOptions[] = [
{
name: 'prHourlyLimit',
description:
'Rate limit PRs to maximum x created per hour. 0 (default) means no limit.',
'Rate limit PRs to maximum x created per hour. 0 means no limit.',
type: 'integer',
default: 0, // no limit
default: 2,
},
{
name: 'prConcurrentLimit',
description:
'Limit to a maximum of x concurrent branches/PRs. 0 (default) means no limit.',
'Limit to a maximum of x concurrent branches/PRs. 0 means no limit.',
type: 'integer',
default: 0, // no limit
default: 10,
},
{
name: 'branchConcurrentLimit',
Expand Down Expand Up @@ -2250,9 +2266,8 @@ const options: RenovateOptions[] = [
'Maximum duration in minutes to keep datasource cache entries.',
type: 'integer',
stage: 'repository',
default: 0,
default: 24 * 60,
globalOnly: true,
experimental: true,
},
{
name: 'prBodyDefinitions',
Expand Down
3 changes: 2 additions & 1 deletion lib/config/presets/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const removedPresets: Record<string, string | null> = {
':autodetectPinVersions': ':autodetectRangeStrategy',
':autodetectPinVersions': null,
':autodetectRangeStrategy': null,
':automergeBranchMergeCommit': ':automergeBranch',
':automergeBranchPush': ':automergeBranch',
':base': 'config:base',
Expand Down
3 changes: 0 additions & 3 deletions lib/config/presets/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,6 @@ describe('config/presets/index', () => {
':dependencyDashboard',
':semanticPrefixFixDepsChoreOthers',
':ignoreModulesAndTests',
':autodetectRangeStrategy',
':prHourlyLimit2',
':prConcurrentLimit10',
'group:monorepos',
'group:recommended',
'workarounds:all',
Expand Down
3 changes: 0 additions & 3 deletions lib/config/presets/internal/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ export const presets: Record<string, Preset> = {
':dependencyDashboard',
':semanticPrefixFixDepsChoreOthers',
':ignoreModulesAndTests',
':autodetectRangeStrategy',
':prHourlyLimit2',
':prConcurrentLimit10',
'group:monorepos',
'group:recommended',
'workarounds:all',
Expand Down
4 changes: 0 additions & 4 deletions lib/config/presets/internal/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ export const presets: Record<string, Preset> = {
assignees: ['{{arg0}}'],
description: 'Assign PRs to `{{arg0}}`.',
},
autodetectRangeStrategy: {
description: 'Automatically detect the best rangeStrategy to use.',
rangeStrategy: 'auto',
},
automergeAll: {
automerge: true,
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/config/presets/internal/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const staticGroups = {
{
groupName: 'PHPStan packages',
matchDatasources: ['packagist'],
matchPackagePatterns: ['^phpstan\\/phpstan$', '\\/phpstan-'],
matchPackagePatterns: ['^phpstan/phpstan$', '/phpstan-'],
},
],
},
Expand Down
Loading