-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathtask.json
More file actions
133 lines (133 loc) · 9 KB
/
task.json
File metadata and controls
133 lines (133 loc) · 9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"$schema": "https://raw.githubusercontent.com/microsoft/azure-pipelines-task-lib/master/tasks.schema.json",
"id": "907d3b28-6b37-4ac7-ac75-9631ee53e512",
"name": "PRMetrics",
"friendlyName": "PR Metrics v1.7.13",
"description": "Augments pull request titles to let reviewers quickly determine PR size and test coverage.",
"helpUrl": "https://aka.ms/PRMetrics/README",
"helpMarkDown": "[More information](https://aka.ms/PRMetrics/README)",
"author": "Microsoft Corporation",
"category": "Azure Pipelines",
"visibility": ["Build"],
"minimumAgentVersion": "4.269.0",
"version": {
"Major": 1,
"Minor": 7,
"Patch": 13
},
"instanceNameFormat": "PR Metrics",
"showEnvironmentVariables": true,
"inputs": [
{
"name": "BaseSize",
"label": "Base size",
"type": "string",
"helpMarkDown": "The maximum number of new lines in an extra small PR. If left blank, a default of '200' will be used."
},
{
"name": "GrowthRate",
"label": "Growth rate",
"type": "string",
"helpMarkDown": "The growth rate applied to the base size for calculating the size of larger PRs. If left blank, a default of '2.0' will be used."
},
{
"name": "TestFactor",
"label": "Test factor",
"type": "string",
"helpMarkDown": "The lines of test code expected for each line of product code. This check can be disabled by setting the value to '0'. If left blank, a default of '1.0' will be used."
},
{
"name": "AlwaysCloseComment",
"label": "Always close comment?",
"type": "string",
"helpMarkDown": "If set to 'true', the size and test comment will be always closed instead of left open when requiring attention."
},
{
"name": "FileMatchingPatterns",
"label": "File matching patterns",
"type": "multiLine",
"helpMarkDown": "[Globs](https://aka.ms/PRMetrics/Globs) specifying the files and folders to include. Autogenerated files should typically be excluded. Excluded files will contain a comment to inform reviewers that they do not to need to review those files. If left blank, a default of '**/*' will be used."
},
{
"name": "TestMatchingPatterns",
"label": "Test matching patterns",
"type": "multiLine",
"helpMarkDown": "[Globs](https://aka.ms/PRMetrics/Globs) specifying the files and folders to consider tests. If left blank, files and folders containing 'test' or '.spec.' will be considered tests."
},
{
"name": "CodeFileExtensions",
"label": "Code file extensions",
"type": "multiLine",
"helpMarkDown": "Extensions for files containing code so that non-code files can be excluded. If left blank, a default set of file extensions will be used."
},
{
"name": "WorkloadIdentityFederation",
"label": "Workload identity federation",
"type": "connectedService:AzureRM",
"helpMarkDown": "The optional workload identity federation that can be used for authentication instead of Personal Access Tokens (PATs).",
"properties": {
"EndpointFilterRule": ""
}
}
],
"execution": {
"Node24": {
"target": "index.mjs"
}
},
"messages": {
"metrics.codeMetrics.titleSizeIndicatorFormat": "%s%s",
"metrics.codeMetrics.titleSizeL": "L",
"metrics.codeMetrics.titleSizeM": "M",
"metrics.codeMetrics.titleSizeS": "S",
"metrics.codeMetrics.titleSizeXL": "XL",
"metrics.codeMetrics.titleSizeXS": "XS",
"metrics.codeMetrics.titleTestsInsufficient": "⚠️",
"metrics.codeMetrics.titleTestsSufficient": "✔",
"metrics.codeMetricsCalculator.noGitHistoryAzureDevOps": "Could not access sufficient Git history. Set 'fetchDepth: 0' as a parameter to the 'checkout' task (YAML) or disable 'Shallow fetch' under the build process phase settings (classic).",
"metrics.codeMetricsCalculator.noGitHistoryGitHub": "Could not access sufficient Git history. Add 'fetch-depth: 0' as a parameter to the 'actions/checkout' action.",
"metrics.codeMetricsCalculator.noGitRepoAzureDevOps": "No Git repo present. Remove 'checkout: none' (YAML) or disable 'Don't sync sources' under the build process phase settings (classic).",
"metrics.codeMetricsCalculator.noGitRepoGitHub": "No Git repo present. Run the 'actions/checkout' action prior to PR Metrics.",
"metrics.codeMetricsCalculator.noPullRequest": "The build is not running against a pull request.",
"metrics.codeMetricsCalculator.noPullRequestIdAzureDevOps": "Could not determine the Pull Request ID.",
"metrics.codeMetricsCalculator.noPullRequestIdGitHub": "Could not determine the Pull Request ID. Ensure 'pull_request' is the pipeline trigger.",
"metrics.codeMetricsCalculator.unsupportedProvider": "The build is running against a pull request from '%s', which is not a supported provider.",
"metrics.inputs.adjustingAlwaysCloseComment": "Adjusting the always-close-comment mode input to 'false'.",
"metrics.inputs.adjustingBaseSize": "Adjusting the base size input to '%s'.",
"metrics.inputs.adjustingCodeFileExtensions": "Adjusting the code file extensions input to '%s'.",
"metrics.inputs.adjustingFileMatchingPatterns": "Adjusting the file matching patterns input to '%s'.",
"metrics.inputs.adjustingGrowthRate": "Adjusting the growth rate input to '%s'.",
"metrics.inputs.adjustingTestFactor": "Adjusting the test factor input to '%s'.",
"metrics.inputs.adjustingTestMatchingPatterns": "Adjusting the test matching patterns input to '%s'.",
"metrics.inputs.disablingTestFactor": "Disabling the test factor validation.",
"metrics.inputs.settingAlwaysCloseComment": "Setting the always-close-comment mode input to 'true'.",
"metrics.inputs.settingBaseSize": "Setting the base size input to '%s'.",
"metrics.inputs.settingCodeFileExtensions": "Setting the code file extensions input to '%s'.",
"metrics.inputs.settingFileMatchingPatterns": "Setting the file matching patterns input to '%s'.",
"metrics.inputs.settingGrowthRate": "Setting the growth rate input to '%s'.",
"metrics.inputs.settingTestFactor": "Setting the test factor input to '%s'.",
"metrics.inputs.settingTestMatchingPatterns": "Setting the test matching patterns input to '%s'.",
"pullRequestMetrics.succeeded": "PR Metrics succeeded",
"pullRequests.pullRequest.addDescription": "❌ **Add a description.**",
"pullRequests.pullRequest.titleFormat": "%s ◾ %s",
"pullRequests.pullRequestComments.commentFooter": "[Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!](https://aka.ms/PRMetrics/Comment)",
"pullRequests.pullRequestComments.commentTitle": "# PR Metrics",
"pullRequests.pullRequestComments.largePullRequestComment": "❌ **Try to keep pull requests smaller than %s lines of new product code by following the [Single Responsibility Principle (SRP)](https://aka.ms/PRMetrics/SRP).**",
"pullRequests.pullRequestComments.noReviewRequiredComment": "❗ **This file doesn't require review.**",
"pullRequests.pullRequestComments.smallPullRequestComment": "✔ **Thanks for keeping your pull request small.**",
"pullRequests.pullRequestComments.tableIgnoredCode": "Ignored Code",
"pullRequests.pullRequestComments.tableLines": "Lines",
"pullRequests.pullRequestComments.tableProductCode": "Product Code",
"pullRequests.pullRequestComments.tableSubtotal": "Subtotal",
"pullRequests.pullRequestComments.tableTestCode": "Test Code",
"pullRequests.pullRequestComments.tableTotal": "Total",
"pullRequests.pullRequestComments.testsInsufficientComment": "⚠️ **Consider adding additional tests.**",
"pullRequests.pullRequestComments.testsSufficientComment": "✔ **Thanks for adding tests.**",
"repos.azureReposInvoker.insufficientAzureReposAccessTokenPermissions": "Could not access the resources. Ensure the 'PR_Metrics_Access_Token' secret environment variable has access to 'Code' > 'Read & write' and 'Pull Request Threads' > 'Read & write'.",
"repos.azureReposInvoker.noAzureReposAccessToken": "Could not access the Workload Identity Federation or Personal Access Token (PAT). Add the 'WorkloadIdentityFederation' input or 'PR_Metrics_Access_Token' as a secret environment variable.",
"repos.baseReposInvoker.resourceNotFound": "The resource could not be found. Verify the repository and pull request exist.",
"repos.gitHubReposInvoker.insufficientGitHubAccessTokenPermissions": "Could not access the resources. Ensure the 'PR_Metrics_Access_Token' secret environment variable has Read and Write access to pull requests (or access to 'repos' if using a Classic PAT).",
"repos.gitHubReposInvoker.noGitHubAccessToken": "Could not access the Personal Access Token (PAT). Add 'PR_Metrics_Access_Token' as a secret environment variable with Read and Write access to Pull Requests (or access to 'repos' if using a Classic PAT, or write access to 'pull-requests' and 'statuses' if specified within the workflow YAML).",
"repos.tokenManager.incorrectAuthorizationScheme": "Authorization scheme of workload identity federation '%s' must be 'WorkloadIdentityFederation' instead of '%s'."
}
}