@codacy/codacy-mcp 0.6.8 → 0.6.9
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.
|
@@ -96,16 +96,18 @@ export class MacCodacyCli extends CodacyCli {
|
|
|
96
96
|
const apiToken = this._accountToken
|
|
97
97
|
? { 'api-token': this._accountToken }
|
|
98
98
|
: {};
|
|
99
|
+
// Repository params are required for the "api-token" flag to work; it only works all together
|
|
99
100
|
const repositoryAccess = this.repository && this.provider && this.organization
|
|
100
101
|
? {
|
|
101
102
|
provider: this.provider,
|
|
102
103
|
organization: this.organization,
|
|
103
104
|
repository: this.repository,
|
|
105
|
+
...apiToken,
|
|
104
106
|
}
|
|
105
107
|
: {};
|
|
106
108
|
try {
|
|
107
109
|
// initialize codacy-cli
|
|
108
|
-
await this.execAsync(`${this.getCliCommand()} init`, { ...
|
|
110
|
+
await this.execAsync(`${this.getCliCommand()} init`, { ...repositoryAccess });
|
|
109
111
|
}
|
|
110
112
|
catch (error) {
|
|
111
113
|
throw new Error(`Failed to initialize CLI: ${error}`);
|