Skip to content

Commit

Permalink
feat(config): rename azureAutoApprove to autoApprove (#21576)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 18, 2023
1 parent 75a1ab0 commit bce88c8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docs/usage/configuration-options.md
Expand Up @@ -119,6 +119,12 @@ See [GitHub](https://docs.github.com/en/repositories/managing-your-repositorys-s

If configured, Renovate will take a random sample of given size from assignees and assign them only, instead of assigning the entire list of `assignees` you have configured.

## autoApprove

Setting this to `true` will automatically approve the PRs.

You can also configure this using `packageRules` if you want to use it selectively (e.g. per-package).

## autoReplaceGlobalMatch

Setting this to `false` will replace only the first match during replacements updates.
Expand Down Expand Up @@ -258,12 +264,6 @@ If you prefer that Renovate more silently automerge _without_ Pull Requests at a
The final value for `automergeType` is `"pr-comment"`, intended only for users who already have a "merge bot" such as [bors-ng](https://github.com/bors-ng/bors-ng) and want Renovate to _not_ actually automerge by itself and instead tell `bors-ng` to merge for it, by using a comment in the PR.
If you're not already using `bors-ng` or similar, don't worry about this option.

## azureAutoApprove

Setting this to `true` will automatically approve the PRs in Azure DevOps.

You can also configure this using `packageRules` if you want to use it selectively (e.g. per-package).

## azureWorkItemId

When creating a PR in Azure DevOps, some branches can be protected with branch policies to [check for linked work items](https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops#check-for-linked-work-items).
Expand Down
1 change: 1 addition & 0 deletions lib/config/migrations/migrations-service.ts
Expand Up @@ -76,6 +76,7 @@ export class MigrationsService {

static readonly renamedProperties: ReadonlyMap<string, string> = new Map([
['adoptium-java', 'java-version'],
['azureAutoApprove', 'autoApprove'],
['endpoints', 'hostRules'],
['excludedPackageNames', 'excludePackageNames'],
['exposeEnv', 'exposeAllEnv'],
Expand Down
4 changes: 2 additions & 2 deletions lib/config/options/index.ts
Expand Up @@ -925,8 +925,8 @@ const options: RenovateOptions[] = [
supportedPlatforms: ['azure'],
},
{
name: 'azureAutoApprove',
description: 'Set to `true` to automatically approve Azure DevOps PRs.',
name: 'autoApprove',
description: 'Set to `true` to automatically approve PRs.',
type: 'boolean',
default: false,
supportedPlatforms: ['azure'],
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/azure/index.spec.ts
Expand Up @@ -805,7 +805,7 @@ describe('modules/platform/azure/index', () => {
prTitle: 'The Title',
prBody: 'Hello world',
labels: ['deps', 'renovate'],
platformOptions: { azureAutoApprove: true },
platformOptions: { autoApprove: true },
});
expect(updateFn).toHaveBeenCalled();
expect(pr).toMatchSnapshot();
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/azure/index.ts
Expand Up @@ -472,7 +472,7 @@ export async function createPr({
pr.pullRequestId!
);
}
if (platformOptions?.azureAutoApprove) {
if (platformOptions?.autoApprove) {
await azureApiGit.createPullRequestReviewer(
{
reviewerUrl: pr.createdBy!.url,
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/platform/types.ts
Expand Up @@ -88,7 +88,7 @@ export interface Issue {
title?: string;
}
export type PlatformPrOptions = {
azureAutoApprove?: boolean;
autoApprove?: boolean;
azureWorkItemId?: number;
bbUseDefaultReviewers?: boolean;
gitLabIgnoreApprovals?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/repository/update/pr/index.ts
Expand Up @@ -50,7 +50,7 @@ export function getPlatformPrOptions(
);

return {
azureAutoApprove: !!config.azureAutoApprove,
autoApprove: !!config.autoApprove,
azureWorkItemId: config.azureWorkItemId ?? 0,
bbUseDefaultReviewers: !!config.bbUseDefaultReviewers,
gitLabIgnoreApprovals: !!config.gitLabIgnoreApprovals,
Expand Down

0 comments on commit bce88c8

Please sign in to comment.