@sonar-autofix/cli 0.0.8 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -38,6 +38,7 @@ async function main() {
|
|
|
38
38
|
console.log(' LLM_MODEL LLM model name');
|
|
39
39
|
console.log(' LLM_API_KEY LLM API key');
|
|
40
40
|
console.log(' GIT_BRANCH Branch name for autofix commits (default: sonar-autofix)');
|
|
41
|
+
console.log(' GIT_BASE_BRANCH Base branch for the pull request (default: main)');
|
|
41
42
|
console.log(' GITHUB_TOKEN GitHub token used to authenticate git push and gh CLI');
|
|
42
43
|
console.log(' GIT_USERNAME Git username for token auth (default: x-access-token)');
|
|
43
44
|
console.log('');
|
|
@@ -84,9 +85,10 @@ async function main() {
|
|
|
84
85
|
if (process.env.LLM_API_KEY) config.llm.apiKey = process.env.LLM_API_KEY;
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
if (process.env.GIT_BRANCH || process.env.GITHUB_TOKEN || process.env.GIT_USERNAME) {
|
|
88
|
+
if (process.env.GIT_BRANCH || process.env.GIT_BASE_BRANCH || process.env.GITHUB_TOKEN || process.env.GIT_USERNAME) {
|
|
88
89
|
config.git = config.git || {};
|
|
89
90
|
if (process.env.GIT_BRANCH) config.git.branch = process.env.GIT_BRANCH;
|
|
91
|
+
if (process.env.GIT_BASE_BRANCH) config.git.baseBranch = process.env.GIT_BASE_BRANCH;
|
|
90
92
|
if (process.env.GITHUB_TOKEN) config.git.token = process.env.GITHUB_TOKEN;
|
|
91
93
|
if (process.env.GIT_USERNAME) config.git.username = process.env.GIT_USERNAME;
|
|
92
94
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonar-autofix/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "CLI tool for the Sonar Autofix tool",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"author": "Sonar Autofix Team",
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sonar-autofix/core": "^0.
|
|
21
|
+
"@sonar-autofix/core": "^0.2.2"
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
}
|