@codacy/codacy-mcp 0.6.8 → 0.6.10
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.
|
@@ -93,19 +93,17 @@ export class MacCodacyCli extends CodacyCli {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
if (needsInitialization) {
|
|
96
|
-
const
|
|
97
|
-
? { 'api-token': this._accountToken }
|
|
98
|
-
: {};
|
|
99
|
-
const repositoryAccess = this.repository && this.provider && this.organization
|
|
96
|
+
const initParams = (this._accountToken && this.repository && this.provider && this.organization
|
|
100
97
|
? {
|
|
101
98
|
provider: this.provider,
|
|
102
99
|
organization: this.organization,
|
|
103
100
|
repository: this.repository,
|
|
101
|
+
'api-token': this._accountToken,
|
|
104
102
|
}
|
|
105
|
-
: {};
|
|
103
|
+
: {});
|
|
106
104
|
try {
|
|
107
105
|
// initialize codacy-cli
|
|
108
|
-
await this.execAsync(`${this.getCliCommand()} init`,
|
|
106
|
+
await this.execAsync(`${this.getCliCommand()} init`, initParams);
|
|
109
107
|
}
|
|
110
108
|
catch (error) {
|
|
111
109
|
throw new Error(`Failed to initialize CLI: ${error}`);
|